You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by pr...@apache.org on 2014/04/17 04:42:41 UTC

[01/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Repository: incubator-stratos
Updated Branches:
  refs/heads/master 754df51dd -> 03c5c2344


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/autocomplete.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/autocomplete.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/autocomplete.js
new file mode 100644
index 0000000..90e4bb1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/autocomplete.js
@@ -0,0 +1,2873 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+/////////////////////////////////////////////////////////////////////////////
+//
+// YAHOO.widget.DataSource Backwards Compatibility
+//
+/////////////////////////////////////////////////////////////////////////////
+
+YAHOO.widget.DS_JSArray = YAHOO.util.LocalDataSource;
+
+YAHOO.widget.DS_JSFunction = YAHOO.util.FunctionDataSource;
+
+YAHOO.widget.DS_XHR = function(sScriptURI, aSchema, oConfigs) {
+    var DS = new YAHOO.util.XHRDataSource(sScriptURI, oConfigs);
+    DS._aDeprecatedSchema = aSchema;
+    return DS;
+};
+
+YAHOO.widget.DS_ScriptNode = function(sScriptURI, aSchema, oConfigs) {
+    var DS = new YAHOO.util.ScriptNodeDataSource(sScriptURI, oConfigs);
+    DS._aDeprecatedSchema = aSchema;
+    return DS;
+};
+
+YAHOO.widget.DS_XHR.TYPE_JSON = YAHOO.util.DataSourceBase.TYPE_JSON;
+YAHOO.widget.DS_XHR.TYPE_XML = YAHOO.util.DataSourceBase.TYPE_XML;
+YAHOO.widget.DS_XHR.TYPE_FLAT = YAHOO.util.DataSourceBase.TYPE_TEXT;
+
+// TODO: widget.DS_ScriptNode.scriptCallbackParam
+
+
+
+ /**
+ * The AutoComplete control provides the front-end logic for text-entry suggestion and
+ * completion functionality.
+ *
+ * @module autocomplete
+ * @requires yahoo, dom, event, datasource
+ * @optional animation
+ * @namespace YAHOO.widget
+ * @title AutoComplete Widget
+ */
+
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+
+/**
+ * The AutoComplete class provides the customizable functionality of a plug-and-play DHTML
+ * auto completion widget.  Some key features:
+ * <ul>
+ * <li>Navigate with up/down arrow keys and/or mouse to pick a selection</li>
+ * <li>The drop down container can "roll down" or "fly out" via configurable
+ * animation</li>
+ * <li>UI look-and-feel customizable through CSS, including container
+ * attributes, borders, position, fonts, etc</li>
+ * </ul>
+ *
+ * @class AutoComplete
+ * @constructor
+ * @param elInput {HTMLElement} DOM element reference of an input field.
+ * @param elInput {String} String ID of an input field.
+ * @param elContainer {HTMLElement} DOM element reference of an existing DIV.
+ * @param elContainer {String} String ID of an existing DIV.
+ * @param oDataSource {YAHOO.widget.DataSource} DataSource instance.
+ * @param oConfigs {Object} (optional) Object literal of configuration params.
+ */
+YAHOO.widget.AutoComplete = function(elInput,elContainer,oDataSource,oConfigs) {
+    if(elInput && elContainer && oDataSource) {
+        // Validate DataSource
+        if(oDataSource instanceof YAHOO.util.DataSourceBase) {
+            this.dataSource = oDataSource;
+        }
+        else {
+            return;
+        }
+
+        // YAHOO.widget.DataSource schema backwards compatibility
+        // Converted deprecated schema into supported schema
+        // First assume key data is held in position 0 of results array
+        this.key = 0;
+        var schema = oDataSource.responseSchema;
+        // An old school schema has been defined in the deprecated DataSource constructor
+        if(oDataSource._aDeprecatedSchema) {
+            var aDeprecatedSchema = oDataSource._aDeprecatedSchema;
+            if(YAHOO.lang.isArray(aDeprecatedSchema)) {
+                
+                if((oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_JSON) || 
+                (oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_UNKNOWN)) { // Used to default to unknown
+                    // Store the resultsList
+                    schema.resultsList = aDeprecatedSchema[0];
+                    // Store the key
+                    this.key = aDeprecatedSchema[1];
+                    // Only resultsList and key are defined, so grab all the data
+                    schema.fields = (aDeprecatedSchema.length < 3) ? null : aDeprecatedSchema.slice(1);
+                }
+                else if(oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_XML) {
+                    schema.resultNode = aDeprecatedSchema[0];
+                    this.key = aDeprecatedSchema[1];
+                    schema.fields = aDeprecatedSchema.slice(1);
+                }                
+                else if(oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_TEXT) {
+                    schema.recordDelim = aDeprecatedSchema[0];
+                    schema.fieldDelim = aDeprecatedSchema[1];
+                }                
+                oDataSource.responseSchema = schema;
+            }
+        }
+        
+        // Validate input element
+        if(YAHOO.util.Dom.inDocument(elInput)) {
+            if(YAHOO.lang.isString(elInput)) {
+                    this._sName = "instance" + YAHOO.widget.AutoComplete._nIndex + " " + elInput;
+                    this._elTextbox = document.getElementById(elInput);
+            }
+            else {
+                this._sName = (elInput.id) ?
+                    "instance" + YAHOO.widget.AutoComplete._nIndex + " " + elInput.id:
+                    "instance" + YAHOO.widget.AutoComplete._nIndex;
+                this._elTextbox = elInput;
+            }
+            YAHOO.util.Dom.addClass(this._elTextbox, "yui-ac-input");
+        }
+        else {
+            return;
+        }
+
+        // Validate container element
+        if(YAHOO.util.Dom.inDocument(elContainer)) {
+            if(YAHOO.lang.isString(elContainer)) {
+                    this._elContainer = document.getElementById(elContainer);
+            }
+            else {
+                this._elContainer = elContainer;
+            }
+            if(this._elContainer.style.display == "none") {
+            }
+            
+            // For skinning
+            var elParent = this._elContainer.parentNode;
+            var elTag = elParent.tagName.toLowerCase();
+            if(elTag == "div") {
+                YAHOO.util.Dom.addClass(elParent, "yui-ac");
+            }
+            else {
+            }
+        }
+        else {
+            return;
+        }
+
+        // Default applyLocalFilter setting is to enable for local sources
+        if(this.dataSource.dataType === YAHOO.util.DataSourceBase.TYPE_LOCAL) {
+            this.applyLocalFilter = true;
+        }
+        
+        // Set any config params passed in to override defaults
+        if(oConfigs && (oConfigs.constructor == Object)) {
+            for(var sConfig in oConfigs) {
+                if(sConfig) {
+                    this[sConfig] = oConfigs[sConfig];
+                }
+            }
+        }
+
+        // Initialization sequence
+        this._initContainerEl();
+        this._initProps();
+        this._initListEl();
+        this._initContainerHelperEls();
+
+        // Set up events
+        var oSelf = this;
+        var elTextbox = this._elTextbox;
+
+        // Dom events
+        YAHOO.util.Event.addListener(elTextbox,"keyup",oSelf._onTextboxKeyUp,oSelf);
+        YAHOO.util.Event.addListener(elTextbox,"keydown",oSelf._onTextboxKeyDown,oSelf);
+        YAHOO.util.Event.addListener(elTextbox,"focus",oSelf._onTextboxFocus,oSelf);
+        YAHOO.util.Event.addListener(elTextbox,"blur",oSelf._onTextboxBlur,oSelf);
+        YAHOO.util.Event.addListener(elContainer,"mouseover",oSelf._onContainerMouseover,oSelf);
+        YAHOO.util.Event.addListener(elContainer,"mouseout",oSelf._onContainerMouseout,oSelf);
+        YAHOO.util.Event.addListener(elContainer,"click",oSelf._onContainerClick,oSelf);
+        YAHOO.util.Event.addListener(elContainer,"scroll",oSelf._onContainerScroll,oSelf);
+        YAHOO.util.Event.addListener(elContainer,"resize",oSelf._onContainerResize,oSelf);
+        YAHOO.util.Event.addListener(elTextbox,"keypress",oSelf._onTextboxKeyPress,oSelf);
+        YAHOO.util.Event.addListener(window,"unload",oSelf._onWindowUnload,oSelf);
+
+        // Custom events
+        this.textboxFocusEvent = new YAHOO.util.CustomEvent("textboxFocus", this);
+        this.textboxKeyEvent = new YAHOO.util.CustomEvent("textboxKey", this);
+        this.dataRequestEvent = new YAHOO.util.CustomEvent("dataRequest", this);
+        this.dataReturnEvent = new YAHOO.util.CustomEvent("dataReturn", this);
+        this.dataErrorEvent = new YAHOO.util.CustomEvent("dataError", this);
+        this.containerPopulateEvent = new YAHOO.util.CustomEvent("containerPopulate", this);
+        this.containerExpandEvent = new YAHOO.util.CustomEvent("containerExpand", this);
+        this.typeAheadEvent = new YAHOO.util.CustomEvent("typeAhead", this);
+        this.itemMouseOverEvent = new YAHOO.util.CustomEvent("itemMouseOver", this);
+        this.itemMouseOutEvent = new YAHOO.util.CustomEvent("itemMouseOut", this);
+        this.itemArrowToEvent = new YAHOO.util.CustomEvent("itemArrowTo", this);
+        this.itemArrowFromEvent = new YAHOO.util.CustomEvent("itemArrowFrom", this);
+        this.itemSelectEvent = new YAHOO.util.CustomEvent("itemSelect", this);
+        this.unmatchedItemSelectEvent = new YAHOO.util.CustomEvent("unmatchedItemSelect", this);
+        this.selectionEnforceEvent = new YAHOO.util.CustomEvent("selectionEnforce", this);
+        this.containerCollapseEvent = new YAHOO.util.CustomEvent("containerCollapse", this);
+        this.textboxBlurEvent = new YAHOO.util.CustomEvent("textboxBlur", this);
+        this.textboxChangeEvent = new YAHOO.util.CustomEvent("textboxChange", this);
+        
+        // Finish up
+        elTextbox.setAttribute("autocomplete","off");
+        YAHOO.widget.AutoComplete._nIndex++;
+    }
+    // Required arguments were not found
+    else {
+    }
+};
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Public member variables
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * The DataSource object that encapsulates the data used for auto completion.
+ * This object should be an inherited object from YAHOO.widget.DataSource.
+ *
+ * @property dataSource
+ * @type YAHOO.widget.DataSource
+ */
+YAHOO.widget.AutoComplete.prototype.dataSource = null;
+
+/**
+ * By default, results from local DataSources will pass through the filterResults
+ * method to apply a client-side matching algorithm. 
+ * 
+ * @property applyLocalFilter
+ * @type Boolean
+ * @default true for local arrays and json, otherwise false
+ */
+YAHOO.widget.AutoComplete.prototype.applyLocalFilter = null;
+
+/**
+ * When applyLocalFilter is true, the local filtering algorthim can have case sensitivity
+ * enabled. 
+ * 
+ * @property queryMatchCase
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.queryMatchCase = false;
+
+/**
+ * When applyLocalFilter is true, results can  be locally filtered to return
+ * matching strings that "contain" the query string rather than simply "start with"
+ * the query string.
+ * 
+ * @property queryMatchContains
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.queryMatchContains = false;
+
+/**
+ * Enables query subset matching. When the DataSource's cache is enabled and queryMatchSubset is
+ * true, substrings of queries will return matching cached results. For
+ * instance, if the first query is for "abc" susequent queries that start with
+ * "abc", like "abcd", will be queried against the cache, and not the live data
+ * source. Recommended only for DataSources that return comprehensive results
+ * for queries with very few characters.
+ *
+ * @property queryMatchSubset
+ * @type Boolean
+ * @default false
+ *
+ */
+YAHOO.widget.AutoComplete.prototype.queryMatchSubset = false;
+
+/**
+ * Number of characters that must be entered before querying for results. A negative value
+ * effectively turns off the widget. A value of 0 allows queries of null or empty string
+ * values.
+ *
+ * @property minQueryLength
+ * @type Number
+ * @default 1
+ */
+YAHOO.widget.AutoComplete.prototype.minQueryLength = 1;
+
+/**
+ * Maximum number of results to display in results container.
+ *
+ * @property maxResultsDisplayed
+ * @type Number
+ * @default 10
+ */
+YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed = 10;
+
+/**
+ * Number of seconds to delay before submitting a query request.  If a query
+ * request is received before a previous one has completed its delay, the
+ * previous request is cancelled and the new request is set to the delay. If 
+ * typeAhead is also enabled, this value must always be less than the typeAheadDelay
+ * in order to avoid certain race conditions. 
+ *
+ * @property queryDelay
+ * @type Number
+ * @default 0.2
+ */
+YAHOO.widget.AutoComplete.prototype.queryDelay = 0.2;
+
+/**
+ * If typeAhead is true, number of seconds to delay before updating input with
+ * typeAhead value. In order to prevent certain race conditions, this value must
+ * always be greater than the queryDelay.
+ *
+ * @property typeAheadDelay
+ * @type Number
+ * @default 0.5
+ */
+YAHOO.widget.AutoComplete.prototype.typeAheadDelay = 0.5;
+
+/**
+ * When IME usage is detected, AutoComplete will switch to querying the input
+ * value at the given interval rather than per key event.
+ *
+ * @property queryInterval
+ * @type Number
+ * @default 500
+ */
+YAHOO.widget.AutoComplete.prototype.queryInterval = 500;
+
+/**
+ * Class name of a highlighted item within results container.
+ *
+ * @property highlightClassName
+ * @type String
+ * @default "yui-ac-highlight"
+ */
+YAHOO.widget.AutoComplete.prototype.highlightClassName = "yui-ac-highlight";
+
+/**
+ * Class name of a pre-highlighted item within results container.
+ *
+ * @property prehighlightClassName
+ * @type String
+ */
+YAHOO.widget.AutoComplete.prototype.prehighlightClassName = null;
+
+/**
+ * Query delimiter. A single character separator for multiple delimited
+ * selections. Multiple delimiter characteres may be defined as an array of
+ * strings. A null value or empty string indicates that query results cannot
+ * be delimited. This feature is not recommended if you need forceSelection to
+ * be true.
+ *
+ * @property delimChar
+ * @type String | String[]
+ */
+YAHOO.widget.AutoComplete.prototype.delimChar = null;
+
+/**
+ * Whether or not the first item in results container should be automatically highlighted
+ * on expand.
+ *
+ * @property autoHighlight
+ * @type Boolean
+ * @default true
+ */
+YAHOO.widget.AutoComplete.prototype.autoHighlight = true;
+
+/**
+ * If autohighlight is enabled, whether or not the input field should be automatically updated
+ * with the first query result as the user types, auto-selecting the substring portion
+ * of the first result that the user has not yet typed.
+ *
+ * @property typeAhead
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.typeAhead = false;
+
+/**
+ * Whether or not to animate the expansion/collapse of the results container in the
+ * horizontal direction.
+ *
+ * @property animHoriz
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.animHoriz = false;
+
+/**
+ * Whether or not to animate the expansion/collapse of the results container in the
+ * vertical direction.
+ *
+ * @property animVert
+ * @type Boolean
+ * @default true
+ */
+YAHOO.widget.AutoComplete.prototype.animVert = true;
+
+/**
+ * Speed of container expand/collapse animation, in seconds..
+ *
+ * @property animSpeed
+ * @type Number
+ * @default 0.3
+ */
+YAHOO.widget.AutoComplete.prototype.animSpeed = 0.3;
+
+/**
+ * Whether or not to force the user's selection to match one of the query
+ * results. Enabling this feature essentially transforms the input field into a
+ * &lt;select&gt; field. This feature is not recommended with delimiter character(s)
+ * defined.
+ *
+ * @property forceSelection
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.forceSelection = false;
+
+/**
+ * Whether or not to allow browsers to cache user-typed input in the input
+ * field. Disabling this feature will prevent the widget from setting the
+ * autocomplete="off" on the input field. When autocomplete="off"
+ * and users click the back button after form submission, user-typed input can
+ * be prefilled by the browser from its cache. This caching of user input may
+ * not be desired for sensitive data, such as credit card numbers, in which
+ * case, implementers should consider setting allowBrowserAutocomplete to false.
+ *
+ * @property allowBrowserAutocomplete
+ * @type Boolean
+ * @default true
+ */
+YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete = true;
+
+/**
+ * Enabling this feature prevents the toggling of the container to a collapsed state.
+ * Setting to true does not automatically trigger the opening of the container.
+ * Implementers are advised to pre-load the container with an explicit "sendQuery()" call.   
+ *
+ * @property alwaysShowContainer
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.alwaysShowContainer = false;
+
+/**
+ * Whether or not to use an iFrame to layer over Windows form elements in
+ * IE. Set to true only when the results container will be on top of a
+ * &lt;select&gt; field in IE and thus exposed to the IE z-index bug (i.e.,
+ * 5.5 < IE < 7).
+ *
+ * @property useIFrame
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.useIFrame = false;
+
+/**
+ * Whether or not the results container should have a shadow.
+ *
+ * @property useShadow
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.useShadow = false;
+
+/**
+ * Whether or not the input field should be updated with selections.
+ *
+ * @property supressInputUpdate
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.suppressInputUpdate = false;
+
+/**
+ * For backward compatibility to pre-2.6.0 formatResults() signatures, setting
+ * resultsTypeList to true will take each object literal result returned by
+ * DataSource and flatten into an array.  
+ *
+ * @property resultTypeList
+ * @type Boolean
+ * @default true
+ */
+YAHOO.widget.AutoComplete.prototype.resultTypeList = true;
+
+/**
+ * For XHR DataSources, AutoComplete will automatically insert a "?" between the server URI and 
+ * the "query" param/value pair. To prevent this behavior, implementers should
+ * set this value to false. To more fully customize the query syntax, implementers
+ * should override the generateRequest() method. 
+ *
+ * @property queryQuestionMark
+ * @type Boolean
+ * @default true
+ */
+YAHOO.widget.AutoComplete.prototype.queryQuestionMark = true;
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Public methods
+//
+/////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Public accessor to the unique name of the AutoComplete instance.
+ *
+ * @method toString
+ * @return {String} Unique name of the AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.toString = function() {
+    return "AutoComplete " + this._sName;
+};
+
+ /**
+ * Returns DOM reference to input element.
+ *
+ * @method getInputEl
+ * @return {HTMLELement} DOM reference to input element.
+ */
+YAHOO.widget.AutoComplete.prototype.getInputEl = function() {
+    return this._elTextbox;
+};
+
+ /**
+ * Returns DOM reference to container element.
+ *
+ * @method getContainerEl
+ * @return {HTMLELement} DOM reference to container element.
+ */
+YAHOO.widget.AutoComplete.prototype.getContainerEl = function() {
+    return this._elContainer;
+};
+
+ /**
+ * Returns true if widget instance is currently focused.
+ *
+ * @method isFocused
+ * @return {Boolean} Returns true if widget instance is currently focused.
+ */
+YAHOO.widget.AutoComplete.prototype.isFocused = function() {
+    return (this._bFocused === null) ? false : this._bFocused;
+};
+
+ /**
+ * Returns true if container is in an expanded state, false otherwise.
+ *
+ * @method isContainerOpen
+ * @return {Boolean} Returns true if container is in an expanded state, false otherwise.
+ */
+YAHOO.widget.AutoComplete.prototype.isContainerOpen = function() {
+    return this._bContainerOpen;
+};
+
+/**
+ * Public accessor to the &lt;ul&gt; element that displays query results within the results container.
+ *
+ * @method getListEl
+ * @return {HTMLElement[]} Reference to &lt;ul&gt; element within the results container.
+ */
+YAHOO.widget.AutoComplete.prototype.getListEl = function() {
+    return this._elList;
+};
+
+/**
+ * Public accessor to the matching string associated with a given &lt;li&gt; result.
+ *
+ * @method getListItemMatch
+ * @param elListItem {HTMLElement} Reference to &lt;LI&gt; element.
+ * @return {String} Matching string.
+ */
+YAHOO.widget.AutoComplete.prototype.getListItemMatch = function(elListItem) {
+    if(elListItem._sResultMatch) {
+        return elListItem._sResultMatch;
+    }
+    else {
+        return null;
+    }
+};
+
+/**
+ * Public accessor to the result data associated with a given &lt;li&gt; result.
+ *
+ * @method getListItemData
+ * @param elListItem {HTMLElement} Reference to &lt;LI&gt; element.
+ * @return {Object} Result data.
+ */
+YAHOO.widget.AutoComplete.prototype.getListItemData = function(elListItem) {
+    if(elListItem._oResultData) {
+        return elListItem._oResultData;
+    }
+    else {
+        return null;
+    }
+};
+
+/**
+ * Public accessor to the index of the associated with a given &lt;li&gt; result.
+ *
+ * @method getListItemIndex
+ * @param elListItem {HTMLElement} Reference to &lt;LI&gt; element.
+ * @return {Number} Index.
+ */
+YAHOO.widget.AutoComplete.prototype.getListItemIndex = function(elListItem) {
+    if(YAHOO.lang.isNumber(elListItem._nItemIndex)) {
+        return elListItem._nItemIndex;
+    }
+    else {
+        return null;
+    }
+};
+
+/**
+ * Sets HTML markup for the results container header. This markup will be
+ * inserted within a &lt;div&gt; tag with a class of "yui-ac-hd".
+ *
+ * @method setHeader
+ * @param sHeader {String} HTML markup for results container header.
+ */
+YAHOO.widget.AutoComplete.prototype.setHeader = function(sHeader) {
+    if(this._elHeader) {
+        var elHeader = this._elHeader;
+        if(sHeader) {
+            elHeader.innerHTML = sHeader;
+            elHeader.style.display = "block";
+        }
+        else {
+            elHeader.innerHTML = "";
+            elHeader.style.display = "none";
+        }
+    }
+};
+
+/**
+ * Sets HTML markup for the results container footer. This markup will be
+ * inserted within a &lt;div&gt; tag with a class of "yui-ac-ft".
+ *
+ * @method setFooter
+ * @param sFooter {String} HTML markup for results container footer.
+ */
+YAHOO.widget.AutoComplete.prototype.setFooter = function(sFooter) {
+    if(this._elFooter) {
+        var elFooter = this._elFooter;
+        if(sFooter) {
+                elFooter.innerHTML = sFooter;
+                elFooter.style.display = "block";
+        }
+        else {
+            elFooter.innerHTML = "";
+            elFooter.style.display = "none";
+        }
+    }
+};
+
+/**
+ * Sets HTML markup for the results container body. This markup will be
+ * inserted within a &lt;div&gt; tag with a class of "yui-ac-bd".
+ *
+ * @method setBody
+ * @param sBody {String} HTML markup for results container body.
+ */
+YAHOO.widget.AutoComplete.prototype.setBody = function(sBody) {
+    if(this._elBody) {
+        var elBody = this._elBody;
+        YAHOO.util.Event.purgeElement(elBody, true);
+        if(sBody) {
+            elBody.innerHTML = sBody;
+            elBody.style.display = "block";
+        }
+        else {
+            elBody.innerHTML = "";
+            elBody.style.display = "none";
+        }
+        this._elList = null;
+    }
+};
+
+/**
+* A function that converts an AutoComplete query into a request value which is then
+* passed to the DataSource's sendRequest method in order to retrieve data for 
+* the query. By default, returns a String with the syntax: "query={query}"
+* Implementers can customize this method for custom request syntaxes.
+* 
+* @method generateRequest
+* @param sQuery {String} Query string
+*/
+YAHOO.widget.AutoComplete.prototype.generateRequest = function(sQuery) {
+    var dataType = this.dataSource.dataType;
+    
+    // Transform query string in to a request for remote data
+    // By default, local data doesn't need a transformation, just passes along the query as is.
+    if(dataType === YAHOO.util.DataSourceBase.TYPE_XHR) {
+        // By default, XHR GET requests look like "{scriptURI}?{scriptQueryParam}={sQuery}&{scriptQueryAppend}"
+        if(!this.dataSource.connMethodPost) {
+            sQuery = (this.queryQuestionMark ? "?" : "") + (this.dataSource.scriptQueryParam || "query") + "=" + sQuery + 
+                (this.dataSource.scriptQueryAppend ? ("&" + this.dataSource.scriptQueryAppend) : "");        
+        }
+        // By default, XHR POST bodies are sent to the {scriptURI} like "{scriptQueryParam}={sQuery}&{scriptQueryAppend}"
+        else {
+            sQuery = (this.dataSource.scriptQueryParam || "query") + "=" + sQuery + 
+                (this.dataSource.scriptQueryAppend ? ("&" + this.dataSource.scriptQueryAppend) : "");
+        }
+    }
+    // By default, remote script node requests look like "{scriptURI}&{scriptCallbackParam}={callbackString}&{scriptQueryParam}={sQuery}&{scriptQueryAppend}"
+    else if(dataType === YAHOO.util.DataSourceBase.TYPE_SCRIPTNODE) {
+        sQuery = "&" + (this.dataSource.scriptQueryParam || "query") + "=" + sQuery + 
+            (this.dataSource.scriptQueryAppend ? ("&" + this.dataSource.scriptQueryAppend) : "");    
+    }
+    
+    return sQuery;
+};
+
+/**
+ * Makes query request to the DataSource.
+ *
+ * @method sendQuery
+ * @param sQuery {String} Query string.
+ */
+YAHOO.widget.AutoComplete.prototype.sendQuery = function(sQuery) {
+    // Adjust programatically sent queries to look like they input by user
+    // when delimiters are enabled
+    var newQuery = (this.delimChar) ? this._elTextbox.value + sQuery : sQuery;
+    this._sendQuery(newQuery);
+};
+
+/**
+ * Collapses container.
+ *
+ * @method collapseContainer
+ */
+YAHOO.widget.AutoComplete.prototype.collapseContainer = function() {
+    this._toggleContainer(false);
+};
+
+/**
+ * Handles subset matching for when queryMatchSubset is enabled.
+ *
+ * @method getSubsetMatches
+ * @param sQuery {String} Query string.
+ * @return {Object} oParsedResponse or null. 
+ */
+YAHOO.widget.AutoComplete.prototype.getSubsetMatches = function(sQuery) {
+    var subQuery, oCachedResponse, subRequest;
+    // Loop through substrings of each cached element's query property...
+    for(var i = sQuery.length; i >= this.minQueryLength ; i--) {
+        subRequest = this.generateRequest(sQuery.substr(0,i));
+        this.dataRequestEvent.fire(this, subQuery, subRequest);
+        
+        // If a substring of the query is found in the cache
+        oCachedResponse = this.dataSource.getCachedResponse(subRequest);
+        if(oCachedResponse) {
+            return this.filterResults.apply(this.dataSource, [sQuery, oCachedResponse, oCachedResponse, {scope:this}]);
+        }
+    }
+    return null;
+};
+
+/**
+ * Executed by DataSource (within DataSource scope via doBeforeParseData()) to
+ * handle responseStripAfter cleanup.
+ *
+ * @method preparseRawResponse
+ * @param sQuery {String} Query string.
+ * @return {Object} oParsedResponse or null. 
+ */
+YAHOO.widget.AutoComplete.prototype.preparseRawResponse = function(oRequest, oFullResponse, oCallback) {
+    var nEnd = ((this.responseStripAfter !== "") && (oFullResponse.indexOf)) ?
+        oFullResponse.indexOf(this.responseStripAfter) : -1;
+    if(nEnd != -1) {
+        oFullResponse = oFullResponse.substring(0,nEnd);
+    }
+    return oFullResponse;
+};
+
+/**
+ * Executed by DataSource (within DataSource scope via doBeforeCallback()) to
+ * filter results through a simple client-side matching algorithm. 
+ *
+ * @method filterResults
+ * @param sQuery {String} Original request.
+ * @param oFullResponse {Object} Full response object.
+ * @param oParsedResponse {Object} Parsed response object.
+ * @param oCallback {Object} Callback object. 
+ * @return {Object} Filtered response object.
+ */
+
+YAHOO.widget.AutoComplete.prototype.filterResults = function(sQuery, oFullResponse, oParsedResponse, oCallback) {
+    // Only if a query string is available to match against
+    if(sQuery && sQuery !== "") {
+        // First make a copy of the oParseResponse
+        oParsedResponse = YAHOO.widget.AutoComplete._cloneObject(oParsedResponse);
+        
+        var oAC = oCallback.scope,
+            oDS = this,
+            allResults = oParsedResponse.results, // the array of results
+            filteredResults = [], // container for filtered results
+            bMatchFound = false,
+            bMatchCase = (oDS.queryMatchCase || oAC.queryMatchCase), // backward compat
+            bMatchContains = (oDS.queryMatchContains || oAC.queryMatchContains); // backward compat
+            
+        // Loop through each result object...
+        for(var i = allResults.length-1; i >= 0; i--) {
+            var oResult = allResults[i];
+
+            // Grab the data to match against from the result object...
+            var sResult = null;
+            
+            // Result object is a simple string already
+            if(YAHOO.lang.isString(oResult)) {
+                sResult = oResult;
+            }
+            // Result object is an array of strings
+            else if(YAHOO.lang.isArray(oResult)) {
+                sResult = oResult[0];
+            
+            }
+            // Result object is an object literal of strings
+            else if(this.responseSchema.fields) {
+                var key = this.responseSchema.fields[0].key || this.responseSchema.fields[0];
+                sResult = oResult[key];
+            }
+            // Backwards compatibility
+            else if(this.key) {
+                sResult = oResult[this.key];
+            }
+            
+            if(YAHOO.lang.isString(sResult)) {
+                
+                var sKeyIndex = (bMatchCase) ?
+                sResult.indexOf(decodeURIComponent(sQuery)) :
+                sResult.toLowerCase().indexOf(decodeURIComponent(sQuery).toLowerCase());
+
+                // A STARTSWITH match is when the query is found at the beginning of the key string...
+                if((!bMatchContains && (sKeyIndex === 0)) ||
+                // A CONTAINS match is when the query is found anywhere within the key string...
+                (bMatchContains && (sKeyIndex > -1))) {
+                    // Stash the match
+                    filteredResults.unshift(oResult);
+                }
+            }
+        }
+        oParsedResponse.results = filteredResults;
+    }
+    else {
+    }
+    
+    return oParsedResponse;
+};
+
+/**
+ * Handles response for display. This is the callback function method passed to
+ * YAHOO.util.DataSourceBase#sendRequest so results from the DataSource are
+ * returned to the AutoComplete instance.
+ *
+ * @method handleResponse
+ * @param sQuery {String} Original request.
+ * @param oResponse {Object} Response object.
+ * @param oPayload {MIXED} (optional) Additional argument(s)
+ */
+YAHOO.widget.AutoComplete.prototype.handleResponse = function(sQuery, oResponse, oPayload) {
+    if((this instanceof YAHOO.widget.AutoComplete) && this._sName) {
+        this._populateList(sQuery, oResponse, oPayload);
+    }
+};
+
+/**
+ * Overridable method called before container is loaded with result data.
+ *
+ * @method doBeforeLoadData
+ * @param sQuery {String} Original request.
+ * @param oResponse {Object} Response object.
+ * @param oPayload {MIXED} (optional) Additional argument(s)
+ * @return {Boolean} Return true to continue loading data, false to cancel.
+ */
+YAHOO.widget.AutoComplete.prototype.doBeforeLoadData = function(sQuery, oResponse, oPayload) {
+    return true;
+};
+
+/**
+ * Overridable method that returns HTML markup for one result to be populated
+ * as innerHTML of an &lt;LI&gt; element. 
+ *
+ * @method formatResult
+ * @param oResultData {Object} Result data object.
+ * @param sQuery {String} The corresponding query string.
+ * @param sResultMatch {HTMLElement} The current query string. 
+ * @return {String} HTML markup of formatted result data.
+ */
+YAHOO.widget.AutoComplete.prototype.formatResult = function(oResultData, sQuery, sResultMatch) {
+    var sMarkup = (sResultMatch) ? sResultMatch : "";
+    return sMarkup;
+};
+
+/**
+ * Overridable method called before container expands allows implementers to access data
+ * and DOM elements.
+ *
+ * @method doBeforeExpandContainer
+ * @param elTextbox {HTMLElement} The text input box.
+ * @param elContainer {HTMLElement} The container element.
+ * @param sQuery {String} The query string.
+ * @param aResults {Object[]}  An array of query results.
+ * @return {Boolean} Return true to continue expanding container, false to cancel the expand.
+ */
+YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer = function(elTextbox, elContainer, sQuery, aResults) {
+    return true;
+};
+
+
+/**
+ * Nulls out the entire AutoComplete instance and related objects, removes attached
+ * event listeners, and clears out DOM elements inside the container. After
+ * calling this method, the instance reference should be expliclitly nulled by
+ * implementer, as in myDataTable = null. Use with caution!
+ *
+ * @method destroy
+ */
+YAHOO.widget.AutoComplete.prototype.destroy = function() {
+    var instanceName = this.toString();
+    var elInput = this._elTextbox;
+    var elContainer = this._elContainer;
+
+    // Unhook custom events
+    this.textboxFocusEvent.unsubscribeAll();
+    this.textboxKeyEvent.unsubscribeAll();
+    this.dataRequestEvent.unsubscribeAll();
+    this.dataReturnEvent.unsubscribeAll();
+    this.dataErrorEvent.unsubscribeAll();
+    this.containerPopulateEvent.unsubscribeAll();
+    this.containerExpandEvent.unsubscribeAll();
+    this.typeAheadEvent.unsubscribeAll();
+    this.itemMouseOverEvent.unsubscribeAll();
+    this.itemMouseOutEvent.unsubscribeAll();
+    this.itemArrowToEvent.unsubscribeAll();
+    this.itemArrowFromEvent.unsubscribeAll();
+    this.itemSelectEvent.unsubscribeAll();
+    this.unmatchedItemSelectEvent.unsubscribeAll();
+    this.selectionEnforceEvent.unsubscribeAll();
+    this.containerCollapseEvent.unsubscribeAll();
+    this.textboxBlurEvent.unsubscribeAll();
+    this.textboxChangeEvent.unsubscribeAll();
+
+    // Unhook DOM events
+    YAHOO.util.Event.purgeElement(elInput, true);
+    YAHOO.util.Event.purgeElement(elContainer, true);
+
+    // Remove DOM elements
+    elContainer.innerHTML = "";
+
+    // Null out objects
+    for(var key in this) {
+        if(YAHOO.lang.hasOwnProperty(this, key)) {
+            this[key] = null;
+        }
+    }
+
+};
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Public events
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Fired when the input field receives focus.
+ *
+ * @event textboxFocusEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.textboxFocusEvent = null;
+
+/**
+ * Fired when the input field receives key input.
+ *
+ * @event textboxKeyEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param nKeycode {Number} The keycode number.
+ */
+YAHOO.widget.AutoComplete.prototype.textboxKeyEvent = null;
+
+/**
+ * Fired when the AutoComplete instance makes a request to the DataSource.
+ * 
+ * @event dataRequestEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param sQuery {String} The query string. 
+ * @param oRequest {Object} The request.
+ */
+YAHOO.widget.AutoComplete.prototype.dataRequestEvent = null;
+
+/**
+ * Fired when the AutoComplete instance receives query results from the data
+ * source.
+ *
+ * @event dataReturnEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param sQuery {String} The query string.
+ * @param aResults {Object[]} Results array.
+ */
+YAHOO.widget.AutoComplete.prototype.dataReturnEvent = null;
+
+/**
+ * Fired when the AutoComplete instance does not receive query results from the
+ * DataSource due to an error.
+ *
+ * @event dataErrorEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param sQuery {String} The query string.
+ */
+YAHOO.widget.AutoComplete.prototype.dataErrorEvent = null;
+
+/**
+ * Fired when the results container is populated.
+ *
+ * @event containerPopulateEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.containerPopulateEvent = null;
+
+/**
+ * Fired when the results container is expanded.
+ *
+ * @event containerExpandEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param sQuery {String} The query string.
+ * @param aResults {Object[]} Results array.
+ */
+YAHOO.widget.AutoComplete.prototype.containerExpandEvent = null;
+
+/**
+ * Fired when the input field has been prefilled by the type-ahead
+ * feature. 
+ *
+ * @event typeAheadEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param sQuery {String} The query string.
+ * @param sPrefill {String} The prefill string.
+ */
+YAHOO.widget.AutoComplete.prototype.typeAheadEvent = null;
+
+/**
+ * Fired when result item has been moused over.
+ *
+ * @event itemMouseOverEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param elItem {HTMLElement} The &lt;li&gt element item moused to.
+ */
+YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent = null;
+
+/**
+ * Fired when result item has been moused out.
+ *
+ * @event itemMouseOutEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param elItem {HTMLElement} The &lt;li&gt; element item moused from.
+ */
+YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent = null;
+
+/**
+ * Fired when result item has been arrowed to. 
+ *
+ * @event itemArrowToEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param elItem {HTMLElement} The &lt;li&gt; element item arrowed to.
+ */
+YAHOO.widget.AutoComplete.prototype.itemArrowToEvent = null;
+
+/**
+ * Fired when result item has been arrowed away from.
+ *
+ * @event itemArrowFromEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param elItem {HTMLElement} The &lt;li&gt; element item arrowed from.
+ */
+YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent = null;
+
+/**
+ * Fired when an item is selected via mouse click, ENTER key, or TAB key.
+ *
+ * @event itemSelectEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param elItem {HTMLElement} The selected &lt;li&gt; element item.
+ * @param oData {Object} The data returned for the item, either as an object,
+ * or mapped from the schema into an array.
+ */
+YAHOO.widget.AutoComplete.prototype.itemSelectEvent = null;
+
+/**
+ * Fired when a user selection does not match any of the displayed result items.
+ *
+ * @event unmatchedItemSelectEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param sSelection {String} The selected string.  
+ */
+YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent = null;
+
+/**
+ * Fired if forceSelection is enabled and the user's input has been cleared
+ * because it did not match one of the returned query results.
+ *
+ * @event selectionEnforceEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent = null;
+
+/**
+ * Fired when the results container is collapsed.
+ *
+ * @event containerCollapseEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.containerCollapseEvent = null;
+
+/**
+ * Fired when the input field loses focus.
+ *
+ * @event textboxBlurEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.textboxBlurEvent = null;
+
+/**
+ * Fired when the input field value has changed when it loses focus.
+ *
+ * @event textboxChangeEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.textboxChangeEvent = null;
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Private member variables
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Internal class variable to index multiple AutoComplete instances.
+ *
+ * @property _nIndex
+ * @type Number
+ * @default 0
+ * @private
+ */
+YAHOO.widget.AutoComplete._nIndex = 0;
+
+/**
+ * Name of AutoComplete instance.
+ *
+ * @property _sName
+ * @type String
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._sName = null;
+
+/**
+ * Text input field DOM element.
+ *
+ * @property _elTextbox
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elTextbox = null;
+
+/**
+ * Container DOM element.
+ *
+ * @property _elContainer
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elContainer = null;
+
+/**
+ * Reference to content element within container element.
+ *
+ * @property _elContent
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elContent = null;
+
+/**
+ * Reference to header element within content element.
+ *
+ * @property _elHeader
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elHeader = null;
+
+/**
+ * Reference to body element within content element.
+ *
+ * @property _elBody
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elBody = null;
+
+/**
+ * Reference to footer element within content element.
+ *
+ * @property _elFooter
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elFooter = null;
+
+/**
+ * Reference to shadow element within container element.
+ *
+ * @property _elShadow
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elShadow = null;
+
+/**
+ * Reference to iframe element within container element.
+ *
+ * @property _elIFrame
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elIFrame = null;
+
+/**
+ * Whether or not the input field is currently in focus. If query results come back
+ * but the user has already moved on, do not proceed with auto complete behavior.
+ *
+ * @property _bFocused
+ * @type Boolean
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._bFocused = null;
+
+/**
+ * Animation instance for container expand/collapse.
+ *
+ * @property _oAnim
+ * @type Boolean
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._oAnim = null;
+
+/**
+ * Whether or not the results container is currently open.
+ *
+ * @property _bContainerOpen
+ * @type Boolean
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._bContainerOpen = false;
+
+/**
+ * Whether or not the mouse is currently over the results
+ * container. This is necessary in order to prevent clicks on container items
+ * from being text input field blur events.
+ *
+ * @property _bOverContainer
+ * @type Boolean
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._bOverContainer = false;
+
+/**
+ * Internal reference to &lt;ul&gt; elements that contains query results within the
+ * results container.
+ *
+ * @property _elList
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elList = null;
+
+/*
+ * Array of &lt;li&gt; elements references that contain query results within the
+ * results container.
+ *
+ * @property _aListItemEls
+ * @type HTMLElement[]
+ * @private
+ */
+//YAHOO.widget.AutoComplete.prototype._aListItemEls = null;
+
+/**
+ * Number of &lt;li&gt; elements currently displayed in results container.
+ *
+ * @property _nDisplayedItems
+ * @type Number
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._nDisplayedItems = 0;
+
+/*
+ * Internal count of &lt;li&gt; elements displayed and hidden in results container.
+ *
+ * @property _maxResultsDisplayed
+ * @type Number
+ * @private
+ */
+//YAHOO.widget.AutoComplete.prototype._maxResultsDisplayed = 0;
+
+/**
+ * Current query string
+ *
+ * @property _sCurQuery
+ * @type String
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._sCurQuery = null;
+
+/**
+ * Selections from previous queries (for saving delimited queries).
+ *
+ * @property _sPastSelections
+ * @type String
+ * @default "" 
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._sPastSelections = "";
+
+/**
+ * Stores initial input value used to determine if textboxChangeEvent should be fired.
+ *
+ * @property _sInitInputValue
+ * @type String
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._sInitInputValue = null;
+
+/**
+ * Pointer to the currently highlighted &lt;li&gt; element in the container.
+ *
+ * @property _elCurListItem
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elCurListItem = null;
+
+/**
+ * Whether or not an item has been selected since the container was populated
+ * with results. Reset to false by _populateList, and set to true when item is
+ * selected.
+ *
+ * @property _bItemSelected
+ * @type Boolean
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._bItemSelected = false;
+
+/**
+ * Key code of the last key pressed in textbox.
+ *
+ * @property _nKeyCode
+ * @type Number
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._nKeyCode = null;
+
+/**
+ * Delay timeout ID.
+ *
+ * @property _nDelayID
+ * @type Number
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._nDelayID = -1;
+
+/**
+ * TypeAhead delay timeout ID.
+ *
+ * @property _nTypeAheadDelayID
+ * @type Number
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._nTypeAheadDelayID = -1;
+
+/**
+ * Src to iFrame used when useIFrame = true. Supports implementations over SSL
+ * as well.
+ *
+ * @property _iFrameSrc
+ * @type String
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._iFrameSrc = "javascript:false;";
+
+/**
+ * For users typing via certain IMEs, queries must be triggered by intervals,
+ * since key events yet supported across all browsers for all IMEs.
+ *
+ * @property _queryInterval
+ * @type Object
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._queryInterval = null;
+
+/**
+ * Internal tracker to last known textbox value, used to determine whether or not
+ * to trigger a query via interval for certain IME users.
+ *
+ * @event _sLastTextboxValue
+ * @type String
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._sLastTextboxValue = null;
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Private methods
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Updates and validates latest public config properties.
+ *
+ * @method __initProps
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._initProps = function() {
+    // Correct any invalid values
+    var minQueryLength = this.minQueryLength;
+    if(!YAHOO.lang.isNumber(minQueryLength)) {
+        this.minQueryLength = 1;
+    }
+    var maxResultsDisplayed = this.maxResultsDisplayed;
+    if(!YAHOO.lang.isNumber(maxResultsDisplayed) || (maxResultsDisplayed < 1)) {
+        this.maxResultsDisplayed = 10;
+    }
+    var queryDelay = this.queryDelay;
+    if(!YAHOO.lang.isNumber(queryDelay) || (queryDelay < 0)) {
+        this.queryDelay = 0.2;
+    }
+    var typeAheadDelay = this.typeAheadDelay;
+    if(!YAHOO.lang.isNumber(typeAheadDelay) || (typeAheadDelay < 0)) {
+        this.typeAheadDelay = 0.2;
+    }
+    var delimChar = this.delimChar;
+    if(YAHOO.lang.isString(delimChar) && (delimChar.length > 0)) {
+        this.delimChar = [delimChar];
+    }
+    else if(!YAHOO.lang.isArray(delimChar)) {
+        this.delimChar = null;
+    }
+    var animSpeed = this.animSpeed;
+    if((this.animHoriz || this.animVert) && YAHOO.util.Anim) {
+        if(!YAHOO.lang.isNumber(animSpeed) || (animSpeed < 0)) {
+            this.animSpeed = 0.3;
+        }
+        if(!this._oAnim ) {
+            this._oAnim = new YAHOO.util.Anim(this._elContent, {}, this.animSpeed);
+        }
+        else {
+            this._oAnim.duration = this.animSpeed;
+        }
+    }
+    if(this.forceSelection && delimChar) {
+    }
+};
+
+/**
+ * Initializes the results container helpers if they are enabled and do
+ * not exist
+ *
+ * @method _initContainerHelperEls
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._initContainerHelperEls = function() {
+    if(this.useShadow && !this._elShadow) {
+        var elShadow = document.createElement("div");
+        elShadow.className = "yui-ac-shadow";
+        elShadow.style.width = 0;
+        elShadow.style.height = 0;
+        this._elShadow = this._elContainer.appendChild(elShadow);
+    }
+    if(this.useIFrame && !this._elIFrame) {
+        var elIFrame = document.createElement("iframe");
+        elIFrame.src = this._iFrameSrc;
+        elIFrame.frameBorder = 0;
+        elIFrame.scrolling = "no";
+        elIFrame.style.position = "absolute";
+        elIFrame.style.width = 0;
+        elIFrame.style.height = 0;
+        elIFrame.tabIndex = -1;
+        elIFrame.style.padding = 0;
+        this._elIFrame = this._elContainer.appendChild(elIFrame);
+    }
+};
+
+/**
+ * Initializes the results container once at object creation
+ *
+ * @method _initContainerEl
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._initContainerEl = function() {
+    YAHOO.util.Dom.addClass(this._elContainer, "yui-ac-container");
+    
+    if(!this._elContent) {
+        // The elContent div is assigned DOM listeners and 
+        // helps size the iframe and shadow properly
+        var elContent = document.createElement("div");
+        elContent.className = "yui-ac-content";
+        elContent.style.display = "none";
+
+        this._elContent = this._elContainer.appendChild(elContent);
+
+        var elHeader = document.createElement("div");
+        elHeader.className = "yui-ac-hd";
+        elHeader.style.display = "none";
+        this._elHeader = this._elContent.appendChild(elHeader);
+
+        var elBody = document.createElement("div");
+        elBody.className = "yui-ac-bd";
+        this._elBody = this._elContent.appendChild(elBody);
+
+        var elFooter = document.createElement("div");
+        elFooter.className = "yui-ac-ft";
+        elFooter.style.display = "none";
+        this._elFooter = this._elContent.appendChild(elFooter);
+    }
+    else {
+    }
+};
+
+/**
+ * Clears out contents of container body and creates up to
+ * YAHOO.widget.AutoComplete#maxResultsDisplayed &lt;li&gt; elements in an
+ * &lt;ul&gt; element.
+ *
+ * @method _initListEl
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._initListEl = function() {
+    var nListLength = this.maxResultsDisplayed;
+    
+    var elList = this._elList || document.createElement("ul");
+    var elListItem;
+    while(elList.childNodes.length < nListLength) {
+        elListItem = document.createElement("li");
+        elListItem.style.display = "none";
+        elListItem._nItemIndex = elList.childNodes.length;
+        elList.appendChild(elListItem);
+    }
+    if(!this._elList) {
+        var elBody = this._elBody;
+        YAHOO.util.Event.purgeElement(elBody, true);
+        elBody.innerHTML = "";
+        this._elList = elBody.appendChild(elList);
+    }
+    
+};
+
+/**
+ * Enables interval detection for IME support.
+ *
+ * @method _enableIntervalDetection
+ * @re 
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._enableIntervalDetection = function() {
+    var oSelf = this;
+    if(!oSelf._queryInterval && oSelf.queryInterval) {
+        oSelf._queryInterval = setInterval(function() { oSelf._onInterval(); }, oSelf.queryInterval);
+    }
+};
+
+/**
+ * Enables query triggers based on text input detection by intervals (rather
+ * than by key events).
+ *
+ * @method _onInterval
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._onInterval = function() {
+    var currValue = this._elTextbox.value;
+    var lastValue = this._sLastTextboxValue;
+    if(currValue != lastValue) {
+        this._sLastTextboxValue = currValue;
+        this._sendQuery(currValue);
+    }
+};
+
+/**
+ * Cancels text input detection by intervals.
+ *
+ * @method _clearInterval
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._clearInterval = function() {
+    if(this._queryInterval) {
+        clearInterval(this._queryInterval);
+        this._queryInterval = null;
+    }
+};
+
+/**
+ * Whether or not key is functional or should be ignored. Note that the right
+ * arrow key is NOT an ignored key since it triggers queries for certain intl
+ * charsets.
+ *
+ * @method _isIgnoreKey
+ * @param nKeycode {Number} Code of key pressed.
+ * @return {Boolean} True if key should be ignored, false otherwise.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._isIgnoreKey = function(nKeyCode) {
+    if((nKeyCode == 9) || (nKeyCode == 13)  || // tab, enter
+            (nKeyCode == 16) || (nKeyCode == 17) || // shift, ctl
+            (nKeyCode >= 18 && nKeyCode <= 20) || // alt, pause/break,caps lock
+            (nKeyCode == 27) || // esc
+            (nKeyCode >= 33 && nKeyCode <= 35) || // page up,page down,end
+            /*(nKeyCode >= 36 && nKeyCode <= 38) || // home,left,up
+            (nKeyCode == 40) || // down*/
+            (nKeyCode >= 36 && nKeyCode <= 40) || // home,left,up, right, down
+            (nKeyCode >= 44 && nKeyCode <= 45) || // print screen,insert
+            (nKeyCode == 229) // Bug 2041973: Korean XP fires 2 keyup events, the key and 229
+        ) { 
+        return true;
+    }
+    return false;
+};
+
+/**
+ * Makes query request to the DataSource.
+ *
+ * @method _sendQuery
+ * @param sQuery {String} Query string.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._sendQuery = function(sQuery) {
+    // Widget has been effectively turned off
+    if(this.minQueryLength < 0) {
+        this._toggleContainer(false);
+        return;
+    }
+    // Delimiter has been enabled
+    var aDelimChar = (this.delimChar) ? this.delimChar : null;
+    if(aDelimChar) {
+        // Loop through all possible delimiters and find the rightmost one in the query
+        // A " " may be a false positive if they are defined as delimiters AND
+        // are used to separate delimited queries
+        var nDelimIndex = -1;
+        for(var i = aDelimChar.length-1; i >= 0; i--) {
+            var nNewIndex = sQuery.lastIndexOf(aDelimChar[i]);
+            if(nNewIndex > nDelimIndex) {
+                nDelimIndex = nNewIndex;
+            }
+        }
+        // If we think the last delimiter is a space (" "), make sure it is NOT
+        // a false positive by also checking the char directly before it
+        if(aDelimChar[i] == " ") {
+            for (var j = aDelimChar.length-1; j >= 0; j--) {
+                if(sQuery[nDelimIndex - 1] == aDelimChar[j]) {
+                    nDelimIndex--;
+                    break;
+                }
+            }
+        }
+        // A delimiter has been found in the query so extract the latest query from past selections
+        if(nDelimIndex > -1) {
+            var nQueryStart = nDelimIndex + 1;
+            // Trim any white space from the beginning...
+            while(sQuery.charAt(nQueryStart) == " ") {
+                nQueryStart += 1;
+            }
+            // ...and save the rest of the string for later
+            this._sPastSelections = sQuery.substring(0,nQueryStart);
+            // Here is the query itself
+            sQuery = sQuery.substr(nQueryStart);
+        }
+        // No delimiter found in the query, so there are no selections from past queries
+        else {
+            this._sPastSelections = "";
+        }
+    }
+
+    // Don't search queries that are too short
+    if((sQuery && (sQuery.length < this.minQueryLength)) || (!sQuery && this.minQueryLength > 0)) {
+        if(this._nDelayID != -1) {
+            clearTimeout(this._nDelayID);
+        }
+        this._toggleContainer(false);
+        return;
+    }
+
+    sQuery = encodeURIComponent(sQuery);
+    this._nDelayID = -1;    // Reset timeout ID because request is being made
+    
+    // Subset matching
+    if(this.dataSource.queryMatchSubset || this.queryMatchSubset) { // backward compat
+        var oResponse = this.getSubsetMatches(sQuery);
+        if(oResponse) {
+            this.handleResponse(sQuery, oResponse, {query: sQuery});
+            return;
+        }
+    }
+    
+    if(this.responseStripAfter) {
+        this.dataSource.doBeforeParseData = this.preparseRawResponse;
+    }
+    if(this.applyLocalFilter) {
+        this.dataSource.doBeforeCallback = this.filterResults;
+    }
+    
+    var sRequest = this.generateRequest(sQuery);
+    this.dataRequestEvent.fire(this, sQuery, sRequest);
+
+    this.dataSource.sendRequest(sRequest, {
+            success : this.handleResponse,
+            failure : this.handleResponse,
+            scope   : this,
+            argument: {
+                query: sQuery
+            }
+    });
+};
+
+/**
+ * Populates the array of &lt;li&gt; elements in the container with query
+ * results.
+ *
+ * @method _populateList
+ * @param sQuery {String} Original request.
+ * @param oResponse {Object} Response object.
+ * @param oPayload {MIXED} (optional) Additional argument(s)
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._populateList = function(sQuery, oResponse, oPayload) {
+    // Clear previous timeout
+    if(this._nTypeAheadDelayID != -1) {
+        clearTimeout(this._nTypeAheadDelayID);
+    }
+        
+    sQuery = (oPayload && oPayload.query) ? oPayload.query : sQuery;
+    
+    // Pass data through abstract method for any transformations
+    var ok = this.doBeforeLoadData(sQuery, oResponse, oPayload);
+
+    // Data is ok
+    if(ok && !oResponse.error) {
+        this.dataReturnEvent.fire(this, sQuery, oResponse.results);
+        
+        // Continue only if instance is still focused (i.e., user hasn't already moved on)
+        // Null indicates initialized state, which is ok too
+        if(this._bFocused || (this._bFocused === null)) {
+            
+            //TODO: is this still necessary?
+            /*var isOpera = (YAHOO.env.ua.opera);
+            var contentStyle = this._elContent.style;
+            contentStyle.width = (!isOpera) ? null : "";
+            contentStyle.height = (!isOpera) ? null : "";*/
+        
+            // Store state for this interaction
+            var sCurQuery = decodeURIComponent(sQuery);
+            this._sCurQuery = sCurQuery;
+            this._bItemSelected = false;
+        
+            var allResults = oResponse.results,
+                nItemsToShow = Math.min(allResults.length,this.maxResultsDisplayed),
+                sMatchKey = (this.dataSource.responseSchema.fields) ? 
+                    (this.dataSource.responseSchema.fields[0].key || this.dataSource.responseSchema.fields[0]) : 0;
+            
+            if(nItemsToShow > 0) {
+                // Make sure container and helpers are ready to go
+                if(!this._elList || (this._elList.childNodes.length < nItemsToShow)) {
+                    this._initListEl();
+                }
+                this._initContainerHelperEls();
+                
+                var allListItemEls = this._elList.childNodes;
+                // Fill items with data from the bottom up
+                for(var i = nItemsToShow-1; i >= 0; i--) {
+                    var elListItem = allListItemEls[i],
+                    oResult = allResults[i];
+                    
+                    // Backward compatibility
+                    if(this.resultTypeList) {
+                        // Results need to be converted back to an array
+                        var aResult = [];
+                        // Match key is first
+                        aResult[0] = (YAHOO.lang.isString(oResult)) ? oResult : oResult[sMatchKey] || oResult[this.key];
+                        // Add additional data to the result array
+                        var fields = this.dataSource.responseSchema.fields;
+                        if(YAHOO.lang.isArray(fields) && (fields.length > 1)) {
+                            for(var k=1, len=fields.length; k<len; k++) {
+                                aResult[aResult.length] = oResult[fields[k].key || fields[k]];
+                            }
+                        }
+                        // No specific fields defined, so pass along entire data object
+                        else {
+                            // Already an array
+                            if(YAHOO.lang.isArray(oResult)) {
+                                aResult = oResult;
+                            }
+                            // Simple string 
+                            else if(YAHOO.lang.isString(oResult)) {
+                                aResult = [oResult];
+                            }
+                            // Object
+                            else {
+                                aResult[1] = oResult;
+                            }
+                        }
+                        oResult = aResult;
+                    }
+
+                    // The matching value, including backward compatibility for array format and safety net
+                    elListItem._sResultMatch = (YAHOO.lang.isString(oResult)) ? oResult : (YAHOO.lang.isArray(oResult)) ? oResult[0] : (oResult[sMatchKey] || "");
+                    elListItem._oResultData = oResult; // Additional data
+                    elListItem.innerHTML = this.formatResult(oResult, sCurQuery, elListItem._sResultMatch);
+                    elListItem.style.display = "";
+                }
+        
+                // Clear out extraneous items
+                if(nItemsToShow < allListItemEls.length) {
+                    var extraListItem;
+                    for(var j = allListItemEls.length-1; j >= nItemsToShow; j--) {
+                        extraListItem = allListItemEls[j];
+                        extraListItem.style.display = "none";
+                    }
+                }
+                
+                this._nDisplayedItems = nItemsToShow;
+                
+                this.containerPopulateEvent.fire(this, sQuery, allResults);
+                
+                // Highlight the first item
+                if(this.autoHighlight) {
+                    var elFirstListItem = this._elList.firstChild;
+                    this._toggleHighlight(elFirstListItem,"to");
+                    this.itemArrowToEvent.fire(this, elFirstListItem);
+                    this._typeAhead(elFirstListItem,sQuery);
+                }
+                // Unhighlight any previous time
+                else {
+                    this._toggleHighlight(this._elCurListItem,"from");
+                }
+        
+                // Expand the container
+                ok = this.doBeforeExpandContainer(this._elTextbox, this._elContainer, sQuery, allResults);
+                this._toggleContainer(ok);
+            }
+            else {
+                this._toggleContainer(false);
+            }
+
+            return;
+        }
+    }
+    // Error
+    else {
+        this.dataErrorEvent.fire(this, sQuery);
+    }
+        
+};
+
+/**
+ * When forceSelection is true and the user attempts
+ * leave the text input box without selecting an item from the query results,
+ * the user selection is cleared.
+ *
+ * @method _clearSelection
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._clearSelection = function() {
+    var sValue = this._elTextbox.value;
+    //TODO: need to check against all delimChars?
+    var sChar = (this.delimChar) ? this.delimChar[0] : null;
+    var nIndex = (sChar) ? sValue.lastIndexOf(sChar, sValue.length-2) : -1;
+    if(nIndex > -1) {
+        this._elTextbox.value = sValue.substring(0,nIndex);
+    }
+    else {
+         this._elTextbox.value = "";
+    }
+    this._sPastSelections = this._elTextbox.value;
+
+    // Fire custom event
+    this.selectionEnforceEvent.fire(this);
+};
+
+/**
+ * Whether or not user-typed value in the text input box matches any of the
+ * query results.
+ *
+ * @method _textMatchesOption
+ * @return {HTMLElement} Matching list item element if user-input text matches
+ * a result, null otherwise.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._textMatchesOption = function() {
+    var elMatch = null;
+
+    for(var i = this._nDisplayedItems-1; i >= 0 ; i--) {
+        var elListItem = this._elList.childNodes[i];
+        var sMatch = ("" + elListItem._sResultMatch).toLowerCase();
+        if(sMatch == this._sCurQuery.toLowerCase()) {
+            elMatch = elListItem;
+            break;
+        }
+    }
+    return(elMatch);
+};
+
+/**
+ * Updates in the text input box with the first query result as the user types,
+ * selecting the substring that the user has not typed.
+ *
+ * @method _typeAhead
+ * @param elListItem {HTMLElement} The &lt;li&gt; element item whose data populates the input field.
+ * @param sQuery {String} Query string.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._typeAhead = function(elListItem, sQuery) {
+    // Don't typeAhead if turned off or is backspace
+    if(!this.typeAhead || (this._nKeyCode == 8)) {
+        return;
+    }
+
+    var oSelf = this,
+        elTextbox = this._elTextbox;
+        
+    // Only if text selection is supported
+    if(elTextbox.setSelectionRange || elTextbox.createTextRange) {
+        // Set and store timeout for this typeahead
+        this._nTypeAheadDelayID = setTimeout(function() {
+                // Select the portion of text that the user has not typed
+                var nStart = elTextbox.value.length; // any saved queries plus what user has typed
+                oSelf._updateValue(elListItem);
+                var nEnd = elTextbox.value.length;
+                oSelf._selectText(elTextbox,nStart,nEnd);
+                var sPrefill = elTextbox.value.substr(nStart,nEnd);
+                oSelf.typeAheadEvent.fire(oSelf,sQuery,sPrefill);
+            },(this.typeAheadDelay*1000));            
+    }
+};
+
+/**
+ * Selects text in the input field.
+ *
+ * @method _selectText
+ * @param elTextbox {HTMLElement} Text input box element in which to select text.
+ * @param nStart {Number} Starting index of text string to select.
+ * @param nEnd {Number} Ending index of text selection.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._selectText = function(elTextbox, nStart, nEnd) {
+    if(elTextbox.setSelectionRange) { // For Mozilla
+        elTextbox.setSelectionRange(nStart,nEnd);
+    }
+    else if(elTextbox.createTextRange) { // For IE
+        var oTextRange = elTextbox.createTextRange();
+        oTextRange.moveStart("character", nStart);
+        oTextRange.moveEnd("character", nEnd-elTextbox.value.length);
+        oTextRange.select();
+    }
+    else {
+        elTextbox.select();
+    }
+};
+
+/**
+ * Syncs results container with its helpers.
+ *
+ * @method _toggleContainerHelpers
+ * @param bShow {Boolean} True if container is expanded, false if collapsed
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers = function(bShow) {
+    var width = this._elContent.offsetWidth + "px";
+    var height = this._elContent.offsetHeight + "px";
+
+    if(this.useIFrame && this._elIFrame) {
+    var elIFrame = this._elIFrame;
+        if(bShow) {
+            elIFrame.style.width = width;
+            elIFrame.style.height = height;
+            elIFrame.style.padding = "";
+        }
+        else {
+            elIFrame.style.width = 0;
+            elIFrame.style.height = 0;
+            elIFrame.style.padding = 0;
+        }
+    }
+    if(this.useShadow && this._elShadow) {
+    var elShadow = this._elShadow;
+        if(bShow) {
+            elShadow.style.width = width;
+            elShadow.style.height = height;
+        }
+        else {
+            elShadow.style.width = 0;
+            elShadow.style.height = 0;
+        }
+    }
+};
+
+/**
+ * Animates expansion or collapse of the container.
+ *
+ * @method _toggleContainer
+ * @param bShow {Boolean} True if container should be expanded, false if container should be collapsed
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) {
+    var elContainer = this._elContainer;
+
+    // If implementer has container always open and it's already open, don't mess with it
+    // Container is initialized with display "none" so it may need to be shown first time through
+    if(this.alwaysShowContainer && this._bContainerOpen) {
+        return;
+    }
+    
+    // Reset states
+    if(!bShow) {
+        this._toggleHighlight(this._elCurListItem,"from");
+        this._nDisplayedItems = 0;
+        this._sCurQuery = null;
+        
+        // Container is already closed, so don't bother with changing the UI
+        if(!this._bContainerOpen) {
+            this._elContent.style.display = "none";
+            return;
+        }
+    }
+
+    // If animation is enabled...
+    var oAnim = this._oAnim;
+    if(oAnim && oAnim.getEl() && (this.animHoriz || this.animVert)) {
+        if(oAnim.isAnimated()) {
+            oAnim.stop(true);
+        }
+
+        // Clone container to grab current size offscreen
+        var oClone = this._elContent.cloneNode(true);
+        elContainer.appendChild(oClone);
+        oClone.style.top = "-9000px";
+        oClone.style.width = "";
+        oClone.style.height = "";
+        oClone.style.display = "";
+
+        // Current size of the container is the EXPANDED size
+        var wExp = oClone.offsetWidth;
+        var hExp = oClone.offsetHeight;
+
+        // Calculate COLLAPSED sizes based on horiz and vert anim
+        var wColl = (this.animHoriz) ? 0 : wExp;
+        var hColl = (this.animVert) ? 0 : hExp;
+
+        // Set animation sizes
+        oAnim.attributes = (bShow) ?
+            {width: { to: wExp }, height: { to: hExp }} :
+            {width: { to: wColl}, height: { to: hColl }};
+
+        // If opening anew, set to a collapsed size...
+        if(bShow && !this._bContainerOpen) {
+            this._elContent.style.width = wColl+"px";
+            this._elContent.style.height = hColl+"px";
+        }
+        // Else, set it to its last known size.
+        else {
+            this._elContent.style.width = wExp+"px";
+            this._elContent.style.height = hExp+"px";
+        }
+
+        elContainer.removeChild(oClone);
+        oClone = null;
+
+    	var oSelf = this;
+    	var onAnimComplete = function() {
+            // Finish the collapse
+    		oAnim.onComplete.unsubscribeAll();
+
+            if(bShow) {
+                oSelf._toggleContainerHelpers(true);
+                oSelf._bContainerOpen = bShow;
+                oSelf.containerExpandEvent.fire(oSelf);
+            }
+            else {
+                oSelf._elContent.style.display = "none";
+                oSelf._bContainerOpen = bShow;
+                oSelf.containerCollapseEvent.fire(oSelf);
+            }
+     	};
+
+        // Display container and animate it
+        this._toggleContainerHelpers(false); // Bug 1424486: Be early to hide, late to show;
+        this._elContent.style.display = "";
+        oAnim.onComplete.subscribe(onAnimComplete);
+        oAnim.animate();
+    }
+    // Else don't animate, just show or hide
+    else {
+        if(bShow) {
+            this._elContent.style.display = "";
+            this._toggleContainerHelpers(true);
+            this._bContainerOpen = bShow;
+            this.containerExpandEvent.fire(this);
+        }
+        else {
+            this._toggleContainerHelpers(false);
+            this._elContent.style.display = "none";
+            this._bContainerOpen = bShow;
+            this.containerCollapseEvent.fire(this);
+        }
+   }
+
+};
+
+/**
+ * Toggles the highlight on or off for an item in the container, and also cleans
+ * up highlighting of any previous item.
+ *
+ * @method _toggleHighlight
+ * @param elNewListItem {HTMLElement} The &lt;li&gt; element item to receive highlight behavior.
+ * @param sType {String} Type "mouseover" will toggle highlight on, and "mouseout" will toggle highlight off.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._toggleHighlight = function(elNewListItem, sType) {
+    if(elNewListItem) {
+        var sHighlight = this.highlightClassName;
+        if(this._elCurListItem) {
+            // Remove highlight from old item
+            YAHOO.util.Dom.removeClass(this._elCurListItem, sHighlight);
+            this._elCurListItem = null;
+        }
+    
+        if((sType == "to") && sHighlight) {
+            // Apply highlight to new item
+            YAHOO.util.Dom.addClass(elNewListItem, sHighlight);
+            this._elCurListItem = elNewListItem;
+        }
+    }
+};
+
+/**
+ * Toggles the pre-highlight on or off for an item in the container.
+ *
+ * @method _togglePrehighlight
+ * @param elNewListItem {HTMLElement} The &lt;li&gt; element item to receive highlight behavior.
+ * @param sType {String} Type "mouseover" will toggle highlight on, and "mouseout" will toggle highlight off.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._togglePrehighlight = function(elNewListItem, sType) {
+    if(elNewListItem == this._elCurListItem) {
+        return;
+    }
+
+    var sPrehighlight = this.prehighlightClassName;
+    if((sType == "mouseover") && sPrehighlight) {
+        // Apply prehighlight to new item
+        YAHOO.util.Dom.addClass(elNewListItem, sPrehighlight);
+    }
+    else {
+        // Remove prehighlight from old item
+        YAHOO.util.Dom.removeClass(elNewListItem, sPrehighlight);
+    }
+};
+
+/**
+ * Updates the text input box value with selected query result. If a delimiter
+ * has been defined, then the value gets appended with the delimiter.
+ *
+ * @method _updateValue
+ * @param elListItem {HTMLElement} The &lt;li&gt; element item with which to update the value.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._updateValue = function(elListItem) {
+    if(!this.suppressInputUpdate) {    
+        var elTextbox = this._elTextbox;
+        var sDelimChar = (this.delimChar) ? (this.delimChar[0] || this.delimChar) : null;
+        var sResultMatch = elListItem._sResultMatch;
+    
+        // Calculate the new value
+        var sNewValue = "";
+        if(sDelimChar) {
+            // Preserve selections from past queries
+            sNewValue = this._sPastSelections;
+            // Add new selection plus delimiter
+            sNewValue += sResultMatch + sDelimChar;
+            if(sDelimChar != " ") {
+                sNewValue += " ";
+            }
+        }
+        else { 
+            sNewValue = sResultMatch;
+        }
+        
+        // Update input field
+        elTextbox.value = sNewValue;
+    
+        // Scroll to bottom of textarea if necessary
+        if(elTextbox.type == "textarea") {
+            elTextbox.scrollTop = elTextbox.scrollHeight;
+        }
+    
+        // Move cursor to end
+        var end = elTextbox.value.length;
+        this._selectText(elTextbox,end,end);
+    
+        this._elCurListItem = elListItem;
+    }
+};
+
+/**
+ * Selects a result item from the container
+ *
+ * @method _selectItem
+ * @param elListItem {HTMLElement} The selected &lt;li&gt; element item.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._selectItem = function(elListItem) {
+    this._bItemSelected = true;
+    this._updateValue(elListItem);
+    this._sPastSelections = this._elTextbox.value;
+    this._clearInterval();
+    this.itemSelectEvent.fire(this, elListItem, elListItem._oResultData);
+    this._toggleContainer(false);
+};
+
+/**
+ * If an item is highlighted in the container, the right arrow key jumps to the
+ * end of the textbox and selects the highlighted item, otherwise the container
+ * is closed.
+ *
+ * @method _jumpSelection
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._jumpSelection = function() {
+    if(this._elCurListItem) {
+        this._selectItem(this._elCurListItem);
+    }
+    else {
+        this._toggleContainer(false);
+    }
+};
+
+/**
+ * Triggered by up and down arrow keys, changes the current highlighted
+ * &lt;li&gt; element item. Scrolls container if necessary.
+ *
+ * @method _moveSelection
+ * @param nKeyCode {Number} Code of key pressed.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._moveSelection = function(nKeyCode) {
+    if(this._bContainerOpen) {
+        // Determine current item's id number
+        var elCurListItem = this._elCurListItem;
+        var nCurItemIndex = -1;
+
+        if(elCurListItem) {
+            nCurItemIndex = elCurListItem._nItemIndex;
+        }
+
+        var nNewItemIndex = (nKeyCode == 40) ?
+                (nCurItemIndex + 1) : (nCurItemIndex - 1);
+
+        // Out of bounds
+        if(nNewItemIndex < -2 || nNewItemIndex >= this._nDisplayedItems) {
+            return;
+        }
+
+        if(elCurListItem) {
+            // Unhighlight current item
+            this._toggleHighlight(elCurListItem, "from");
+            this.itemArrowFromEvent.fire(this, elCurListItem);
+        }
+        if(nNewItemIndex == -1) {
+           // Go back to query (remove type-ahead string)
+            if(this.delimChar) {
+                this._elTextbox.value = this._sPastSelections + this._sCurQuery;
+            }
+            else {
+                this._elTextbox.value = this._sCurQuery;
+            }
+            return;
+        }
+        if(nNewItemIndex == -2) {
+            // Close container
+            this._toggleContainer(false);
+            return;
+        }
+        
+        var elNewListItem = this._elList.childNodes[nNewItemIndex];
+
+        // Scroll the container if necessary
+        var elContent = this._elContent;
+        var scrollOn = ((YAHOO.util.Dom.getStyle(elContent,"overflow") == "auto") ||
+            (YAHOO.util.Dom.getStyle(elContent,"overflowY") == "auto"));
+        if(scrollOn && (nNewItemIndex > -1) &&
+        (nNewItemIndex < this._nDisplayedItems)) {
+            // User is keying down
+            if(nKeyCode == 40) {
+                // Bottom of selected item is below scroll area...
+                if((elNewListItem.offsetTop+elNewListItem.offsetHeight) > (elContent.scrollTop + elContent.offsetHeight)) {
+                    // Set bottom of scroll area to bottom of selected item
+                    elContent.scrollTop = (elNewListItem.offsetTop+elNewListItem.offsetHeight) - elContent.offsetHeight;
+                }
+                // Bottom of selected item is above scroll area...
+                else if((elNewListItem.offsetTop+elNewListItem.offsetHeight) < elContent.scrollTop) {
+                    // Set top of selected item to top of scroll area
+                    elContent.scrollTop = elNewListItem.offsetTop;
+
+                }
+            }
+            // User is keying up
+            else {
+                // Top of selected item is above scroll area
+                if(elNewListItem.offsetTop < elContent.scrollTop) {
+                    // Set top of scroll area to top of selected item
+                    this._elContent.scrollTop = elNewListItem.offsetTop;
+                }
+                // Top of selected item is below scroll area
+                else if(elNewListItem.offsetTop > (elContent.scrollTop + elContent.offsetHeight)) {
+                    // Set bottom of selected item to bottom of scroll area
+                    this._elContent.scrollTop = (elNewListItem.offsetTop+elNewListItem.offsetHeight) - elContent.offsetHeight;
+                }
+            }
+        }
+
+        this._toggleHighlight(elNewListItem, "to");
+        this.itemArrowToEvent.fire(this, elNewListItem);
+        if(this.typeAhead) {
+            this._updateValue(elNewListItem);
+        }
+    }
+};
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Private event handlers
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Handles &lt;li&gt; element mouseover events in the container.
+ *
+ * @method _onItemMouseover
+ * @param v {HTMLEvent} The mouseover event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+/*YAHOO.widget.AutoComplete.prototype._onItemMouseover = function(v,oSelf) {
+    if(oSelf.prehighlightClassName) {
+        oSelf._togglePrehighlight(this,"mouseover");
+    }
+    else {
+        oSelf._toggleHighlight(this,"to");
+    }
+
+    oSelf.itemMouseOverEvent.fire(oSelf, this);
+};*/
+
+/**
+ * Handles &lt;li&gt; element mouseout events in the container.
+ *
+ * @method _onItemMouseout
+ * @param v {HTMLEvent} The mouseout event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+/*YAHOO.widget.AutoComplete.prototype._onItemMouseout = function(v,oSelf) {
+    if(oSelf.prehighlightClassName) {
+        oSelf._togglePrehighlight(this,"mouseout");
+    }
+    else {
+        oSelf._toggleHighlight(this,"from");
+    }
+
+    oSelf.itemMouseOutEvent.fire(oSelf, this);
+};*/
+
+/**
+ * Handles &lt;li&gt; element click events in the container.
+ *
+ * @method _onItemMouseclick
+ * @param v {HTMLEvent} The click event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+/*YAHOO.widget.AutoComplete.prototype._onItemMouseclick = function(v,oSelf) {
+    // In case item has not been moused over
+    oSelf._toggleHighlight(this,"to");
+    oSelf._selectItem(this);
+};*/
+
+/**
+ * Handles container mouseover events.
+ *
+ * @method _onContainerMouseover
+ * @param v {HTMLEvent} The mouseover event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._onContainerMouseover = function(v,oSelf) {
+    var elTarget = YAHOO.util.Event.getTarget(v);
+    var elTag = elTarget.nodeName.toLowerCase();
+    while(elTarget && (elTag != "table")) {
+        switch(elTag) {
+            case "body":
+                return;
+            case "li":
+                if(oSelf.prehighlightClassName) {
+                    oSelf._togglePrehighlight(elTarget,"mouseover");
+                }
+                else {
+                    oSelf._toggleHighlight(elTarget,"to");
+                }
+            
+                oSelf.itemMouseOverEvent.fire(oSelf, elTarget);
+                break;
+            case "div":
+                if(YAHOO.util.Dom.hasClass(elTarget,"yui-ac-container")) {
+                    oSelf._bOverContainer = true;
+                    return;
+                }
+                break;
+            default:
+                break;
+        }
+        
+        elTarget = elTarget.parentNode;
+        if(elTarget) {
+            elTag = elTarget.nodeName.toLowerCase();
+        }
+    }
+};
+
+/**
+ * Handles container mouseout events.
+ *
+ * @method _onContainerMouseout
+ * @param v {HTMLEvent} The mouseout event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._onContainerMouseout = function(v,oSelf) {
+    var elTarget = YAHOO.util.Event.getTarget(v);
+    var elTag = elTarget.nodeName.toLowerCase();
+    while(elTarget && (elTag != "table")) {
+        switch(elTag) {
+            case "body":
+                return;
+            case "li":
+                if(oSelf.prehighlightClassName) {
+                    oSelf._togglePrehighlight(elTarget,"mouseout");
+                }
+                else {
+                    oSelf._toggleHighlight(elTarget,"from");
+                }
+            
+                oSelf.itemMouseOutEvent.fire(oSelf, elTarget);
+                break;
+            case "ul":
+                oSelf._toggleHighlight(oSelf._elCurListItem,"to");
+                break;
+            case "div":
+                if(YAHOO.util.Dom.hasClass(elTarget,"yui-ac-container")) {
+                    oSelf._bOverContainer = false;
+                    return;
+                }
+                break;
+            default:
+                break;
+        }
+
+        elTarget = elTarget.parentNode;
+        if(elTarget) {
+            elTag = elTarget.nodeName.toLowerCase();
+        }
+    }
+};
+
+/**
+ * Handles container click events.
+ *
+ * @method _onContainerClick
+ * @param v {HTMLEvent} The click event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._onContainerClick = function(v,oSelf) {
+    var elTarget = YAHOO.util.Event.getTarget(v);
+    var elTag = elTarget.nodeName.toLowerCase();
+    while(elTarget && (elTag != "table")) {
+        switch(elTag) {
+            case "body":
+                return;
+            case "li":
+                // In case item has not been moused over
+                oSelf._toggleHighlight(elTarget,"to");
+                oSelf._selectItem(elTarget);
+                return;
+            default:
+                break;
+        }
+
+        elTarget = elTarget.parentNode;
+        if(elTarget) {
+            elTag = elTarget.nodeName.toLowerCase();
+        }
+    }    
+};
+
+
+/**
+ * Handles container scroll events.
+ *
+ * @method _onContainerScroll
+ * @param v {HTMLEvent} The scroll event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._onContainerScroll = function(v,oSelf) {
+    oSelf._elTextbox.focus();
+};
+
+/**
+ * Handles container resize events.
+ *
+ * @method _onContainerResize
+ * @param v {HTMLEvent} The resize event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._onContainerResize = function(v,oSelf) {
+    oSelf._toggleContainerHelpers(oSelf._bContainerOpen);
+};
+
+
+/**
+ * Handles textbox keydown events of functional keys, mainly for UI behavior.
+ *
+ * @method _onTextboxKeyDown
+ * @param v {HTMLEvent} The keydown event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown = function(v,oSelf) {
+    var nKeyCode = v.keyCode;
+
+    // Clear timeout
+    if(oSelf._nTypeAheadDelayID != -1) {
+        clearTimeout(oSelf._nTypeAheadDelayID);
+    }
+    
+    switch (nKeyCode) {
+        case 9: // tab
+            if(!YAHOO.env.ua.opera && (navigator.userAgent.toLowerCase().indexOf("mac") == -1) || (YAHOO.env.ua.webkit>420)) {
+                // select an item or clear out
+                if(oSelf._elCurListItem) {
+                    if(oSelf.delimChar && (oSelf._nKeyCode != nKeyCode)) {
+                        if(oSelf._bContainerOpen) {
+                            YAHOO.util.Event.stopEvent(v);
+                        }
+                    }
+                    oSelf._selectItem(oSelf._elCurListItem);
+                }
+                else {
+                    oSelf._toggleContainer(false);
+                }
+            }
+            break;
+        case 13: // enter
+            if(!YAHOO.env.ua.opera && (navigator.userAgent.toLowerCase().indexOf("mac") == -1) || (YAHOO.env.ua.webkit>420)) {
+                if(oSelf._elCurListItem) {
+                    if(oSelf._nKeyCode != nKeyCode) {
+                        if(oSelf._bContainerOpen) {
+                            YAHOO.util.Event.stopEvent(v);
+                        }
+                    }
+                    oSelf._selectItem(oSelf._elCurListItem);
+                }
+                else {
+                    oSelf._toggleContainer(false);
+                }
+            }
+            break;
+        case 27: // esc
+            oSelf._toggleContainer(false);
+            return;
+        case 39: // right
+            

<TRUNCATED>

[26/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/prototype.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/prototype.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/prototype.js
new file mode 100644
index 0000000..5a22eab
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/prototype.js
@@ -0,0 +1,2520 @@
+/*  Prototype JavaScript framework, version 1.5.0
+ *  (c) 2005-2007 Sam Stephenson
+ *
+ *  Prototype is freely distributable under the terms of an MIT-style license.
+ *  For details, see the Prototype web site: http://prototype.conio.net/
+ *
+/*--------------------------------------------------------------------------*/
+
+var Prototype = {
+  Version: '1.5.0',
+  BrowserFeatures: {
+    XPath: !!document.evaluate
+  },
+
+  ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
+  emptyFunction: function() {},
+  K: function(x) { return x }
+}
+
+var Class = {
+  create: function() {
+    return function() {
+      this.initialize.apply(this, arguments);
+    }
+  }
+}
+
+var $A = Array.from = function(iterable) {
+  if (!iterable) return [];
+  if (iterable.toArray) {
+    return iterable.toArray();
+  } else {
+    var results = [];
+    for (var i = 0, length = iterable.length; i < length; i++)
+      results.push(iterable[i]);
+    return results;
+  }
+}
+
+
+var Abstract = new Object();
+
+Object.extend = function(destination, source) {
+  for (var property in source) {
+    destination[property] = source[property];
+  }
+  return destination;
+}
+
+Object.extend(Object, {
+  inspect: function(object) {
+    try {
+      if (object === undefined) return 'undefined';
+      if (object === null) return 'null';
+      return object.inspect ? object.inspect() : object.toString();
+    } catch (e) {
+      if (e instanceof RangeError) return '...';
+      throw e;
+    }
+  },
+
+  keys: function(object) {
+    var keys = [];
+    for (var property in object)
+      keys.push(property);
+    return keys;
+  },
+
+  values: function(object) {
+    var values = [];
+    for (var property in object)
+      values.push(object[property]);
+    return values;
+  },
+
+  clone: function(object) {
+    return Object.extend({}, object);
+  }
+});
+
+Function.prototype.bind = function() {
+  var __method = this, args = $A(arguments), object = args.shift();
+  return function() {
+  	if (typeof $A == "function")
+    return __method.apply(object, args.concat($A(arguments)));
+  }
+}
+
+Function.prototype.bindAsEventListener = function(object) {
+  var __method = this, args = $A(arguments), object = args.shift();
+  return function(event) {
+  
+  	if (typeof $A == "function")
+    return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments)));
+  }
+}
+
+Object.extend(Number.prototype, {
+  toColorPart: function() {
+    var digits = this.toString(16);
+    if (this < 16) return '0' + digits;
+    return digits;
+  },
+
+  succ: function() {
+    return this + 1;
+  },
+
+  times: function(iterator) {
+    $R(0, this, true).each(iterator);
+    return this;
+  }
+});
+
+var Try = {
+  these: function() {
+    var returnValue;
+
+    for (var i = 0, length = arguments.length; i < length; i++) {
+      var lambda = arguments[i];
+      try {
+        returnValue = lambda();
+        break;
+      } catch (e) {}
+    }
+
+    return returnValue;
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var PeriodicalExecuter = Class.create();
+PeriodicalExecuter.prototype = {
+  initialize: function(callback, frequency) {
+    this.callback = callback;
+    this.frequency = frequency;
+    this.currentlyExecuting = false;
+
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  stop: function() {
+    if (!this.timer) return;
+    clearInterval(this.timer);
+    this.timer = null;
+  },
+
+  onTimerEvent: function() {
+    if (!this.currentlyExecuting) {
+      try {
+        this.currentlyExecuting = true;
+        this.callback(this);
+      } finally {
+        this.currentlyExecuting = false;
+      }
+    }
+  }
+}
+String.interpret = function(value){
+  return value == null ? '' : String(value);
+}
+
+Object.extend(String.prototype, {
+  gsub: function(pattern, replacement) {
+    var result = '', source = this, match;
+    replacement = arguments.callee.prepareReplacement(replacement);
+
+    while (source.length > 0) {
+      if (match = source.match(pattern)) {
+        result += source.slice(0, match.index);
+        result += String.interpret(replacement(match));
+        source  = source.slice(match.index + match[0].length);
+      } else {
+        result += source, source = '';
+      }
+    }
+    return result;
+  },
+
+  sub: function(pattern, replacement, count) {
+    replacement = this.gsub.prepareReplacement(replacement);
+    count = count === undefined ? 1 : count;
+
+    return this.gsub(pattern, function(match) {
+      if (--count < 0) return match[0];
+      return replacement(match);
+    });
+  },
+
+  scan: function(pattern, iterator) {
+    this.gsub(pattern, iterator);
+    return this;
+  },
+
+  truncate: function(length, truncation) {
+    length = length || 30;
+    truncation = truncation === undefined ? '...' : truncation;
+    return this.length > length ?
+      this.slice(0, length - truncation.length) + truncation : this;
+  },
+
+  strip: function() {
+    return this.replace(/^\s+/, '').replace(/\s+$/, '');
+  },
+
+  stripTags: function() {
+    return this.replace(/<\/?[^>]+>/gi, '');
+  },
+
+  stripScripts: function() {
+    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+  },
+
+  extractScripts: function() {
+    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+    return (this.match(matchAll) || []).map(function(scriptTag) {
+      return (scriptTag.match(matchOne) || ['', ''])[1];
+    });
+  },
+
+  evalScripts: function() {
+    return this.extractScripts().map(function(script) { return eval(script) });
+  },
+
+  escapeHTML: function() {
+    var div = document.createElement('div');
+    var text = document.createTextNode(this);
+    div.appendChild(text);
+    return div.innerHTML;
+  },
+
+  unescapeHTML: function() {
+    var div = document.createElement('div');
+    div.innerHTML = this.stripTags();
+    return div.childNodes[0] ? (div.childNodes.length > 1 ?
+      $A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) :
+      div.childNodes[0].nodeValue) : '';
+  },
+
+  toQueryParams: function(separator) {
+    var match = this.strip().match(/([^?#]*)(#.*)?$/);
+    if (!match) return {};
+
+    return match[1].split(separator || '&').inject({}, function(hash, pair) {
+      if ((pair = pair.split('='))[0]) {
+        var name = decodeURIComponent(pair[0]);
+        var value = pair[1] ? decodeURIComponent(pair[1]) : undefined;
+
+        if (hash[name] !== undefined) {
+          if (hash[name].constructor != Array)
+            hash[name] = [hash[name]];
+          if (value) hash[name].push(value);
+        }
+        else hash[name] = value;
+      }
+      return hash;
+    });
+  },
+
+  toArray: function() {
+    return this.split('');
+  },
+
+  succ: function() {
+    return this.slice(0, this.length - 1) +
+      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
+  },
+
+  camelize: function() {
+    var parts = this.split('-'), len = parts.length;
+    if (len == 1) return parts[0];
+
+    var camelized = this.charAt(0) == '-'
+      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
+      : parts[0];
+
+    for (var i = 1; i < len; i++)
+      camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
+
+    return camelized;
+  },
+
+  capitalize: function(){
+    return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
+  },
+
+  underscore: function() {
+    return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
+  },
+
+  dasherize: function() {
+    return this.gsub(/_/,'-');
+  },
+
+  inspect: function(useDoubleQuotes) {
+    var escapedString = this.replace(/\\/g, '\\\\');
+    if (useDoubleQuotes)
+      return '"' + escapedString.replace(/"/g, '\\"') + '"';
+    else
+      return "'" + escapedString.replace(/'/g, '\\\'') + "'";
+  }
+});
+
+String.prototype.gsub.prepareReplacement = function(replacement) {
+  if (typeof replacement == 'function') return replacement;
+  var template = new Template(replacement);
+  return function(match) { return template.evaluate(match) };
+}
+
+String.prototype.parseQuery = String.prototype.toQueryParams;
+
+var Template = Class.create();
+Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
+Template.prototype = {
+  initialize: function(template, pattern) {
+    this.template = template.toString();
+    this.pattern  = pattern || Template.Pattern;
+  },
+
+  evaluate: function(object) {
+    return this.template.gsub(this.pattern, function(match) {
+      var before = match[1];
+      if (before == '\\') return match[2];
+      return before + String.interpret(object[match[3]]);
+    });
+  }
+}
+
+var $break    = new Object();
+var $continue = new Object();
+
+var Enumerable = {
+  each: function(iterator) {
+    var index = 0;
+    try {
+      this._each(function(value) {
+        try {
+          iterator(value, index++);
+        } catch (e) {
+          if (e != $continue) throw e;
+        }
+      });
+    } catch (e) {
+      if (e != $break) throw e;
+    }
+    return this;
+  },
+
+  eachSlice: function(number, iterator) {
+    var index = -number, slices = [], array = this.toArray();
+    while ((index += number) < array.length)
+      slices.push(array.slice(index, index+number));
+    return slices.map(iterator);
+  },
+
+  all: function(iterator) {
+    var result = true;
+    this.each(function(value, index) {
+      result = result && !!(iterator || Prototype.K)(value, index);
+      if (!result) throw $break;
+    });
+    return result;
+  },
+
+  any: function(iterator) {
+    var result = false;
+    this.each(function(value, index) {
+      if (result = !!(iterator || Prototype.K)(value, index))
+        throw $break;
+    });
+    return result;
+  },
+
+  collect: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push((iterator || Prototype.K)(value, index));
+    });
+    return results;
+  },
+
+  detect: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      if (iterator(value, index)) {
+        result = value;
+        throw $break;
+      }
+    });
+    return result;
+  },
+
+  findAll: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  grep: function(pattern, iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      var stringValue = value.toString();
+      if (stringValue.match(pattern))
+        results.push((iterator || Prototype.K)(value, index));
+    })
+    return results;
+  },
+
+  include: function(object) {
+    var found = false;
+    this.each(function(value) {
+      if (value == object) {
+        found = true;
+        throw $break;
+      }
+    });
+    return found;
+  },
+
+  inGroupsOf: function(number, fillWith) {
+    fillWith = fillWith === undefined ? null : fillWith;
+    return this.eachSlice(number, function(slice) {
+      while(slice.length < number) slice.push(fillWith);
+      return slice;
+    });
+  },
+
+  inject: function(memo, iterator) {
+    this.each(function(value, index) {
+      memo = iterator(memo, value, index);
+    });
+    return memo;
+  },
+
+  invoke: function(method) {
+    var args = $A(arguments).slice(1);
+    return this.map(function(value) {
+      return value[method].apply(value, args);
+    });
+  },
+
+  max: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (result == undefined || value >= result)
+        result = value;
+    });
+    return result;
+  },
+
+  min: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (result == undefined || value < result)
+        result = value;
+    });
+    return result;
+  },
+
+  partition: function(iterator) {
+    var trues = [], falses = [];
+    this.each(function(value, index) {
+      ((iterator || Prototype.K)(value, index) ?
+        trues : falses).push(value);
+    });
+    return [trues, falses];
+  },
+
+  pluck: function(property) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push(value[property]);
+    });
+    return results;
+  },
+
+  reject: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (!iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  sortBy: function(iterator) {
+    return this.map(function(value, index) {
+      return {value: value, criteria: iterator(value, index)};
+    }).sort(function(left, right) {
+      var a = left.criteria, b = right.criteria;
+      return a < b ? -1 : a > b ? 1 : 0;
+    }).pluck('value');
+  },
+
+  toArray: function() {
+    return this.map();
+  },
+
+  zip: function() {
+    var iterator = Prototype.K, args = $A(arguments);
+    if (typeof args.last() == 'function')
+      iterator = args.pop();
+
+    var collections = [this].concat(args).map($A);
+    return this.map(function(value, index) {
+      return iterator(collections.pluck(index));
+    });
+  },
+
+  size: function() {
+    return this.toArray().length;
+  },
+
+  inspect: function() {
+    return '#<Enumerable:' + this.toArray().inspect() + '>';
+  }
+}
+
+Object.extend(Enumerable, {
+  map:     Enumerable.collect,
+  find:    Enumerable.detect,
+  select:  Enumerable.findAll,
+  member:  Enumerable.include,
+  entries: Enumerable.toArray
+});
+
+Object.extend(Array.prototype, Enumerable);
+
+if (!Array.prototype._reverse)
+  Array.prototype._reverse = Array.prototype.reverse;
+
+Object.extend(Array.prototype, {
+  _each: function(iterator) {
+    for (var i = 0, length = this.length; i < length; i++)
+      iterator(this[i]);
+  },
+
+  clear: function() {
+    this.length = 0;
+    return this;
+  },
+
+  first: function() {
+    return this[0];
+  },
+
+  last: function() {
+    return this[this.length - 1];
+  },
+
+  compact: function() {
+    return this.select(function(value) {
+      return value != null;
+    });
+  },
+
+  flatten: function() {
+    return this.inject([], function(array, value) {
+      return array.concat(value && value.constructor == Array ?
+        value.flatten() : [value]);
+    });
+  },
+
+  without: function() {
+    var values = $A(arguments);
+    return this.select(function(value) {
+      return !values.include(value);
+    });
+  },
+
+  indexOf: function(object) {
+    for (var i = 0, length = this.length; i < length; i++)
+      if (this[i] == object) return i;
+    return -1;
+  },
+
+  reverse: function(inline) {
+    return (inline !== false ? this : this.toArray())._reverse();
+  },
+
+  reduce: function() {
+    return this.length > 1 ? this : this[0];
+  },
+
+  uniq: function() {
+    return this.inject([], function(array, value) {
+      return array.include(value) ? array : array.concat([value]);
+    });
+  },
+
+  clone: function() {
+    return [].concat(this);
+  },
+
+  size: function() {
+    return this.length;
+  },
+
+  inspect: function() {
+    return '[' + this.map(Object.inspect).join(', ') + ']';
+  }
+});
+
+Array.prototype.toArray = Array.prototype.clone;
+
+function $w(string){
+  string = string.strip();
+  return string ? string.split(/\s+/) : [];
+}
+
+if(window.opera){
+  Array.prototype.concat = function(){
+    var array = [];
+    for(var i = 0, length = this.length; i < length; i++) array.push(this[i]);
+    for(var i = 0, length = arguments.length; i < length; i++) {
+      if(arguments[i].constructor == Array) {
+        for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
+          array.push(arguments[i][j]);
+      } else {
+        array.push(arguments[i]);
+      }
+    }
+    return array;
+  }
+}
+var Hash = function(obj) {
+  Object.extend(this, obj || {});
+};
+
+Object.extend(Hash, {
+  toQueryString: function(obj) {
+    var parts = [];
+
+	  this.prototype._each.call(obj, function(pair) {
+      if (!pair.key) return;
+
+      if (pair.value && pair.value.constructor == Array) {
+        var values = pair.value.compact();
+        if (values.length < 2) pair.value = values.reduce();
+        else {
+        	key = encodeURIComponent(pair.key);
+          values.each(function(value) {
+            value = value != undefined ? encodeURIComponent(value) : '';
+            parts.push(key + '=' + encodeURIComponent(value));
+          });
+          return;
+        }
+      }
+      if (pair.value == undefined) pair[1] = '';
+      parts.push(pair.map(encodeURIComponent).join('='));
+	  });
+
+    return parts.join('&');
+  }
+});
+
+Object.extend(Hash.prototype, Enumerable);
+Object.extend(Hash.prototype, {
+  _each: function(iterator) {
+    for (var key in this) {
+      var value = this[key];
+      if (value && value == Hash.prototype[key]) continue;
+
+      var pair = [key, value];
+      pair.key = key;
+      pair.value = value;
+      iterator(pair);
+    }
+  },
+
+  keys: function() {
+    return this.pluck('key');
+  },
+
+  values: function() {
+    return this.pluck('value');
+  },
+
+  merge: function(hash) {
+    return $H(hash).inject(this, function(mergedHash, pair) {
+      mergedHash[pair.key] = pair.value;
+      return mergedHash;
+    });
+  },
+
+  remove: function() {
+    var result;
+    for(var i = 0, length = arguments.length; i < length; i++) {
+      var value = this[arguments[i]];
+      if (value !== undefined){
+        if (result === undefined) result = value;
+        else {
+          if (result.constructor != Array) result = [result];
+          result.push(value)
+        }
+      }
+      delete this[arguments[i]];
+    }
+    return result;
+  },
+
+  toQueryString: function() {
+    return Hash.toQueryString(this);
+  },
+
+  inspect: function() {
+    return '#<Hash:{' + this.map(function(pair) {
+      return pair.map(Object.inspect).join(': ');
+    }).join(', ') + '}>';
+  }
+});
+
+function $H(object) {
+  if (object && object.constructor == Hash) return object;
+  return new Hash(object);
+};
+ObjectRange = Class.create();
+Object.extend(ObjectRange.prototype, Enumerable);
+Object.extend(ObjectRange.prototype, {
+  initialize: function(start, end, exclusive) {
+    this.start = start;
+    this.end = end;
+    this.exclusive = exclusive;
+  },
+
+  _each: function(iterator) {
+    var value = this.start;
+    while (this.include(value)) {
+      iterator(value);
+      value = value.succ();
+    }
+  },
+
+  include: function(value) {
+    if (value < this.start)
+      return false;
+    if (this.exclusive)
+      return value < this.end;
+    return value <= this.end;
+  }
+});
+
+var $R = function(start, end, exclusive) {
+  return new ObjectRange(start, end, exclusive);
+}
+
+var Ajax = {
+  getTransport: function() {
+    return Try.these(
+      function() {return new XMLHttpRequest()},
+      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+      function() {return new ActiveXObject('Microsoft.XMLHTTP')}
+    ) || false;
+  },
+
+  activeRequestCount: 0
+}
+
+Ajax.Responders = {
+  responders: [],
+
+  _each: function(iterator) {
+    this.responders._each(iterator);
+  },
+
+  register: function(responder) {
+    if (!this.include(responder))
+      this.responders.push(responder);
+  },
+
+  unregister: function(responder) {
+    this.responders = this.responders.without(responder);
+  },
+
+  dispatch: function(callback, request, transport, json) {
+    this.each(function(responder) {
+      if (typeof responder[callback] == 'function') {
+        try {
+          responder[callback].apply(responder, [request, transport, json]);
+        } catch (e) {}
+      }
+    });
+  }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+  onCreate: function() {
+    Ajax.activeRequestCount++;
+  },
+  onComplete: function() {
+    Ajax.activeRequestCount--;
+  }
+});
+
+Ajax.Base = function() {};
+Ajax.Base.prototype = {
+  setOptions: function(options) {
+    this.options = {
+      method:       'post',
+      asynchronous: true,
+      contentType:  'application/x-www-form-urlencoded',
+      encoding:     'UTF-8',
+      parameters:   ''
+    }
+    Object.extend(this.options, options || {});
+
+    this.options.method = this.options.method.toLowerCase();
+    if (typeof this.options.parameters == 'string')
+      this.options.parameters = this.options.parameters.toQueryParams();
+  }
+}
+
+Ajax.Request = Class.create();
+Ajax.Request.Events =
+  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
+  _complete: false,
+
+  initialize: function(url, options) {
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+    this.request(url);
+  },
+
+  request: function(url) {
+    this.url = url;
+    this.method = this.options.method;
+    var params = this.options.parameters;
+
+    if (!['get', 'post'].include(this.method)) {
+      // simulate other verbs over post
+      params['_method'] = this.method;
+      this.method = 'post';
+    }
+
+    params = Hash.toQueryString(params);
+    if (params && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_='
+
+    // when GET, append parameters to URL
+    if (this.method == 'get' && params)
+      this.url += (this.url.indexOf('?') > -1 ? '&' : '?') + params;
+
+    try {
+      Ajax.Responders.dispatch('onCreate', this, this.transport);
+
+      this.transport.open(this.method.toUpperCase(), this.url,
+        this.options.asynchronous);
+
+      if (this.options.asynchronous)
+        setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);
+
+      this.transport.onreadystatechange = this.onStateChange.bind(this);
+      this.setRequestHeaders();
+
+      var body = this.method == 'post' ? (this.options.postBody || params) : null;
+
+      this.transport.send(body);
+
+      /* Force Firefox to handle ready state 4 for synchronous requests */
+      if (!this.options.asynchronous && this.transport.overrideMimeType)
+        this.onStateChange();
+
+    }
+    catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  onStateChange: function() {
+    var readyState = this.transport.readyState;
+    if (readyState > 1 && !((readyState == 4) && this._complete))
+      this.respondToReadyState(this.transport.readyState);
+  },
+
+  setRequestHeaders: function() {
+    var headers = {
+      'X-Requested-With': 'XMLHttpRequest',
+      'X-Prototype-Version': Prototype.Version,
+      'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
+    };
+
+    if (this.method == 'post') {
+      headers['Content-type'] = this.options.contentType +
+        (this.options.encoding ? '; charset=' + this.options.encoding : '');
+
+      /* Force "Connection: close" for older Mozilla browsers to work
+       * around a bug where XMLHttpRequest sends an incorrect
+       * Content-length header. See Mozilla Bugzilla #246651.
+       */
+      if (this.transport.overrideMimeType &&
+          (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
+            headers['Connection'] = 'close';
+    }
+
+    // user-defined headers
+    if (typeof this.options.requestHeaders == 'object') {
+      var extras = this.options.requestHeaders;
+
+      if (typeof extras.push == 'function')
+        for (var i = 0, length = extras.length; i < length; i += 2)
+          headers[extras[i]] = extras[i+1];
+      else
+        $H(extras).each(function(pair) { headers[pair.key] = pair.value });
+    }
+
+    for (var name in headers)
+      this.transport.setRequestHeader(name, headers[name]);
+  },
+
+  success: function() {
+    return !this.transport.status
+        || (this.transport.status >= 200 && this.transport.status < 300);
+  },
+
+  respondToReadyState: function(readyState) {
+    var state = Ajax.Request.Events[readyState];
+    var transport = this.transport, json = this.evalJSON();
+
+    if (state == 'Complete') {
+      try {
+        this._complete = true;
+        (this.options['on' + this.transport.status]
+         || this.options['on' + (this.success() ? 'Success' : 'Failure')]
+         || Prototype.emptyFunction)(transport, json);
+      } catch (e) {
+        this.dispatchException(e);
+      }
+
+      if ((this.getHeader('Content-type') || 'text/javascript').strip().
+        match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))
+          this.evalResponse();
+    }
+
+    try {
+      (this.options['on' + state] || Prototype.emptyFunction)(transport, json);
+      Ajax.Responders.dispatch('on' + state, this, transport, json);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+
+    if (state == 'Complete') {
+      // avoid memory leak in MSIE: clean up
+      this.transport.onreadystatechange = Prototype.emptyFunction;
+    }
+  },
+
+  getHeader: function(name) {
+    try {
+      return this.transport.getResponseHeader(name);
+    } catch (e) { return null }
+  },
+
+  evalJSON: function() {
+    try {
+      var json = this.getHeader('X-JSON');
+      return json ? eval('(' + json + ')') : null;
+    } catch (e) { return null }
+  },
+
+  evalResponse: function() {
+    try {
+      return eval(this.transport.responseText);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  dispatchException: function(exception) {
+    (this.options.onException || Prototype.emptyFunction)(this, exception);
+    Ajax.Responders.dispatch('onException', this, exception);
+  }
+});
+
+Ajax.Updater = Class.create();
+
+Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
+  initialize: function(container, url, options) {
+    this.container = {
+      success: (container.success || container),
+      failure: (container.failure || (container.success ? null : container))
+    }
+
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+
+    var onComplete = this.options.onComplete || Prototype.emptyFunction;
+    this.options.onComplete = (function(transport, param) {
+      this.updateContent();
+      onComplete(transport, param);
+    }).bind(this);
+
+    this.request(url);
+  },
+
+  updateContent: function() {
+    var receiver = this.container[this.success() ? 'success' : 'failure'];
+    var response = this.transport.responseText;
+
+    if (!this.options.evalScripts) response = response.stripScripts();
+
+    if (receiver = $(receiver)) {
+      if (this.options.insertion)
+        new this.options.insertion(receiver, response);
+      else
+        receiver.update(response);
+    }
+
+    if (this.success()) {
+      if (this.onComplete)
+        setTimeout(this.onComplete.bind(this), 10);
+    }
+  }
+});
+
+Ajax.PeriodicalUpdater = Class.create();
+Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
+  initialize: function(container, url, options) {
+    this.setOptions(options);
+    this.onComplete = this.options.onComplete;
+
+    this.frequency = (this.options.frequency || 2);
+    this.decay = (this.options.decay || 1);
+
+    this.updater = {};
+    this.container = container;
+    this.url = url;
+
+    this.start();
+  },
+
+  start: function() {
+    this.options.onComplete = this.updateComplete.bind(this);
+    this.onTimerEvent();
+  },
+
+  stop: function() {
+    this.updater.options.onComplete = undefined;
+    clearTimeout(this.timer);
+    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+  },
+
+  updateComplete: function(request) {
+    if (this.options.decay) {
+      this.decay = (request.responseText == this.lastText ?
+        this.decay * this.options.decay : 1);
+
+      this.lastText = request.responseText;
+    }
+    this.timer = setTimeout(this.onTimerEvent.bind(this),
+      this.decay * this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    this.updater = new Ajax.Updater(this.container, this.url, this.options);
+  }
+});
+function $(element) {
+  if (arguments.length > 1) {
+    for (var i = 0, elements = [], length = arguments.length; i < length; i++)
+      elements.push($(arguments[i]));
+    return elements;
+  }
+  if (typeof element == 'string')
+    element = document.getElementById(element);
+  return Element.extend(element);
+}
+
+if (Prototype.BrowserFeatures.XPath) {
+  document._getElementsByXPath = function(expression, parentElement) {
+    var results = [];
+    var query = document.evaluate(expression, $(parentElement) || document,
+      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    for (var i = 0, length = query.snapshotLength; i < length; i++)
+      results.push(query.snapshotItem(i));
+    return results;
+  };
+}
+
+document.getElementsByClassName = function(className, parentElement) {
+  if (Prototype.BrowserFeatures.XPath) {
+    var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]";
+    return document._getElementsByXPath(q, parentElement);
+  } else {
+    var children = ($(parentElement) || document.body).getElementsByTagName('*');
+    var elements = [], child;
+    for (var i = 0, length = children.length; i < length; i++) {
+      child = children[i];
+      if (Element.hasClassName(child, className))
+        elements.push(Element.extend(child));
+    }
+    return elements;
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Element)
+  var Element = new Object();
+
+Element.extend = function(element) {
+  if (!element || _nativeExtensions || element.nodeType == 3) return element;
+
+  if (!element._extended && element.tagName && element != window) {
+    var methods = Object.clone(Element.Methods), cache = Element.extend.cache;
+
+    if (element.tagName == 'FORM')
+      Object.extend(methods, Form.Methods);
+    if (['INPUT', 'TEXTAREA', 'SELECT'].include(element.tagName))
+      Object.extend(methods, Form.Element.Methods);
+
+    Object.extend(methods, Element.Methods.Simulated);
+
+    for (var property in methods) {
+      var value = methods[property];
+      if (typeof value == 'function' && !(property in element))
+        element[property] = cache.findOrStore(value);
+    }
+  }
+
+  element._extended = true;
+  return element;
+};
+
+Element.extend.cache = {
+  findOrStore: function(value) {
+    return this[value] = this[value] || function() {
+      return value.apply(null, [this].concat($A(arguments)));
+    }
+  }
+};
+
+Element.Methods = {
+  visible: function(element) {
+    return $(element).style.display != 'none';
+  },
+
+  toggle: function(element) {
+    element = $(element);
+    Element[Element.visible(element) ? 'hide' : 'show'](element);
+    return element;
+  },
+
+  hide: function(element) {
+    $(element).style.display = 'none';
+    return element;
+  },
+
+  show: function(element) {
+    $(element).style.display = '';
+    return element;
+  },
+
+  remove: function(element) {
+    element = $(element);
+    element.parentNode.removeChild(element);
+    return element;
+  },
+
+  update: function(element, html) {
+    html = typeof html == 'undefined' ? '' : html.toString();
+    $(element).innerHTML = html.stripScripts();
+    setTimeout(function() {html.evalScripts()}, 10);
+    return element;
+  },
+
+  replace: function(element, html) {
+    element = $(element);
+    html = typeof html == 'undefined' ? '' : html.toString();
+    if (element.outerHTML) {
+      element.outerHTML = html.stripScripts();
+    } else {
+      var range = element.ownerDocument.createRange();
+      range.selectNodeContents(element);
+      element.parentNode.replaceChild(
+        range.createContextualFragment(html.stripScripts()), element);
+    }
+    setTimeout(function() {html.evalScripts()}, 10);
+    return element;
+  },
+
+  inspect: function(element) {
+    element = $(element);
+    var result = '<' + element.tagName.toLowerCase();
+    $H({'id': 'id', 'className': 'class'}).each(function(pair) {
+      var property = pair.first(), attribute = pair.last();
+      var value = (element[property] || '').toString();
+      if (value) result += ' ' + attribute + '=' + value.inspect(true);
+    });
+    return result + '>';
+  },
+
+  recursivelyCollect: function(element, property) {
+    element = $(element);
+    var elements = [];
+    while (element = element[property])
+      if (element.nodeType == 1)
+        elements.push(Element.extend(element));
+    return elements;
+  },
+
+  ancestors: function(element) {
+    return $(element).recursivelyCollect('parentNode');
+  },
+
+  descendants: function(element) {
+    return $A($(element).getElementsByTagName('*'));
+  },
+
+  immediateDescendants: function(element) {
+    if (!(element = $(element).firstChild)) return [];
+    while (element && element.nodeType != 1) element = element.nextSibling;
+    if (element) return [element].concat($(element).nextSiblings());
+    return [];
+  },
+
+  previousSiblings: function(element) {
+    return $(element).recursivelyCollect('previousSibling');
+  },
+
+  nextSiblings: function(element) {
+    return $(element).recursivelyCollect('nextSibling');
+  },
+
+  siblings: function(element) {
+    element = $(element);
+    return element.previousSiblings().reverse().concat(element.nextSiblings());
+  },
+
+  match: function(element, selector) {
+    if (typeof selector == 'string')
+      selector = new Selector(selector);
+    return selector.match($(element));
+  },
+
+  up: function(element, expression, index) {
+    return Selector.findElement($(element).ancestors(), expression, index);
+  },
+
+  down: function(element, expression, index) {
+    return Selector.findElement($(element).descendants(), expression, index);
+  },
+
+  previous: function(element, expression, index) {
+    return Selector.findElement($(element).previousSiblings(), expression, index);
+  },
+
+  next: function(element, expression, index) {
+    return Selector.findElement($(element).nextSiblings(), expression, index);
+  },
+
+  getElementsBySelector: function() {
+    var args = $A(arguments), element = $(args.shift());
+    return Selector.findChildElements(element, args);
+  },
+
+  getElementsByClassName: function(element, className) {
+    return document.getElementsByClassName(className, element);
+  },
+
+  readAttribute: function(element, name) {
+    element = $(element);
+    if (document.all && !window.opera) {
+      var t = Element._attributeTranslations;
+      if (t.values[name]) return t.values[name](element, name);
+      if (t.names[name])  name = t.names[name];
+      var attribute = element.attributes[name];
+      if(attribute) return attribute.nodeValue;
+    }
+    return element.getAttribute(name);
+  },
+
+  getHeight: function(element) {
+    return $(element).getDimensions().height;
+  },
+
+  getWidth: function(element) {
+    return $(element).getDimensions().width;
+  },
+
+  classNames: function(element) {
+    return new Element.ClassNames(element);
+  },
+
+  hasClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    var elementClassName = element.className;
+    if (elementClassName.length == 0) return false;
+    if (elementClassName == className ||
+        elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
+      return true;
+    return false;
+  },
+
+  addClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    Element.classNames(element).add(className);
+    return element;
+  },
+
+  removeClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    Element.classNames(element).remove(className);
+    return element;
+  },
+
+  toggleClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className);
+    return element;
+  },
+
+  observe: function() {
+    Event.observe.apply(Event, arguments);
+    return $A(arguments).first();
+  },
+
+  stopObserving: function() {
+    Event.stopObserving.apply(Event, arguments);
+    return $A(arguments).first();
+  },
+
+  // removes whitespace-only text node children
+  cleanWhitespace: function(element) {
+    element = $(element);
+    var node = element.firstChild;
+    while (node) {
+      var nextNode = node.nextSibling;
+      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+        element.removeChild(node);
+      node = nextNode;
+    }
+    return element;
+  },
+
+  empty: function(element) {
+    return $(element).innerHTML.match(/^\s*$/);
+  },
+
+  descendantOf: function(element, ancestor) {
+    element = $(element), ancestor = $(ancestor);
+    while (element = element.parentNode)
+      if (element == ancestor) return true;
+    return false;
+  },
+
+  scrollTo: function(element) {
+    element = $(element);
+    var pos = Position.cumulativeOffset(element);
+    window.scrollTo(pos[0], pos[1]);
+    return element;
+  },
+
+  getStyle: function(element, style) {
+    element = $(element);
+    if (['float','cssFloat'].include(style))
+      style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat');
+    style = style.camelize();
+    var value = element.style[style];
+    if (!value) {
+      if (document.defaultView && document.defaultView.getComputedStyle) {
+        var css = document.defaultView.getComputedStyle(element, null);
+        value = css ? css[style] : null;
+      } else if (element.currentStyle) {
+        value = element.currentStyle[style];
+      }
+    }
+
+    if((value == 'auto') && ['width','height'].include(style) && (element.getStyle('display') != 'none'))
+      value = element['offset'+style.capitalize()] + 'px';
+
+    if (window.opera && ['left', 'top', 'right', 'bottom'].include(style))
+      if (Element.getStyle(element, 'position') == 'static') value = 'auto';
+    if(style == 'opacity') {
+      if(value) return parseFloat(value);
+      if(value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
+        if(value[1]) return parseFloat(value[1]) / 100;
+      return 1.0;
+    }
+    return value == 'auto' ? null : value;
+  },
+
+  setStyle: function(element, style) {
+    element = $(element);
+    for (var name in style) {
+      var value = style[name];
+      if(name == 'opacity') {
+        if (value == 1) {
+          value = (/Gecko/.test(navigator.userAgent) &&
+            !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0;
+          if(/MSIE/.test(navigator.userAgent) && !window.opera)
+            element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
+        } else if(value === '') {
+          if(/MSIE/.test(navigator.userAgent) && !window.opera)
+            element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
+        } else {
+          if(value < 0.00001) value = 0;
+          if(/MSIE/.test(navigator.userAgent) && !window.opera)
+            element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') +
+              'alpha(opacity='+value*100+')';
+        }
+      } else if(['float','cssFloat'].include(name)) name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat';
+      element.style[name.camelize()] = value;
+    }
+    return element;
+  },
+
+  getDimensions: function(element) {
+    element = $(element);
+    var display = $(element).getStyle('display');
+    if (display != 'none' && display != null) // Safari bug
+      return {width: element.offsetWidth, height: element.offsetHeight};
+
+    // All *Width and *Height properties give 0 on elements with display none,
+    // so enable the element temporarily
+    var els = element.style;
+    var originalVisibility = els.visibility;
+    var originalPosition = els.position;
+    var originalDisplay = els.display;
+    els.visibility = 'hidden';
+    els.position = 'absolute';
+    els.display = 'block';
+    var originalWidth = element.clientWidth;
+    var originalHeight = element.clientHeight;
+    els.display = originalDisplay;
+    els.position = originalPosition;
+    els.visibility = originalVisibility;
+    return {width: originalWidth, height: originalHeight};
+  },
+
+  makePositioned: function(element) {
+    element = $(element);
+    var pos = Element.getStyle(element, 'position');
+    if (pos == 'static' || !pos) {
+      element._madePositioned = true;
+      element.style.position = 'relative';
+      // Opera returns the offset relative to the positioning context, when an
+      // element is position relative but top and left have not been defined
+      if (window.opera) {
+        element.style.top = 0;
+        element.style.left = 0;
+      }
+    }
+    return element;
+  },
+
+  undoPositioned: function(element) {
+    element = $(element);
+    if (element._madePositioned) {
+      element._madePositioned = undefined;
+      element.style.position =
+        element.style.top =
+        element.style.left =
+        element.style.bottom =
+        element.style.right = '';
+    }
+    return element;
+  },
+
+  makeClipping: function(element) {
+    element = $(element);
+    if (element._overflow) return element;
+    element._overflow = element.style.overflow || 'auto';
+    if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
+      element.style.overflow = 'hidden';
+    return element;
+  },
+
+  undoClipping: function(element) {
+    element = $(element);
+    if (!element._overflow) return element;
+    element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
+    element._overflow = null;
+    return element;
+  }
+};
+
+Object.extend(Element.Methods, {childOf: Element.Methods.descendantOf});
+
+Element._attributeTranslations = {};
+
+Element._attributeTranslations.names = {
+  colspan:   "colSpan",
+  rowspan:   "rowSpan",
+  valign:    "vAlign",
+  datetime:  "dateTime",
+  accesskey: "accessKey",
+  tabindex:  "tabIndex",
+  enctype:   "encType",
+  maxlength: "maxLength",
+  readonly:  "readOnly",
+  longdesc:  "longDesc"
+};
+
+Element._attributeTranslations.values = {
+  _getAttr: function(element, attribute) {
+    return element.getAttribute(attribute, 2);
+  },
+
+  _flag: function(element, attribute) {
+    return $(element).hasAttribute(attribute) ? attribute : null;
+  },
+
+  style: function(element) {
+    return element.style.cssText.toLowerCase();
+  },
+
+  title: function(element) {
+    var node = element.getAttributeNode('title');
+    return node.specified ? node.nodeValue : null;
+  }
+};
+
+Object.extend(Element._attributeTranslations.values, {
+  href: Element._attributeTranslations.values._getAttr,
+  src:  Element._attributeTranslations.values._getAttr,
+  disabled: Element._attributeTranslations.values._flag,
+  checked:  Element._attributeTranslations.values._flag,
+  readonly: Element._attributeTranslations.values._flag,
+  multiple: Element._attributeTranslations.values._flag
+});
+
+Element.Methods.Simulated = {
+  hasAttribute: function(element, attribute) {
+    var t = Element._attributeTranslations;
+    attribute = t.names[attribute] || attribute;
+    return $(element).getAttributeNode(attribute).specified;
+  }
+};
+
+// IE is missing .innerHTML support for TABLE-related elements
+if (document.all && !window.opera){
+  Element.Methods.update = function(element, html) {
+    element = $(element);
+    html = typeof html == 'undefined' ? '' : html.toString();
+    var tagName = element.tagName.toUpperCase();
+    if (['THEAD','TBODY','TR','TD'].include(tagName)) {
+      var div = document.createElement('div');
+      switch (tagName) {
+        case 'THEAD':
+        case 'TBODY':
+          div.innerHTML = '<table><tbody>' +  html.stripScripts() + '</tbody></table>';
+          depth = 2;
+          break;
+        case 'TR':
+          div.innerHTML = '<table><tbody><tr>' +  html.stripScripts() + '</tr></tbody></table>';
+          depth = 3;
+          break;
+        case 'TD':
+          div.innerHTML = '<table><tbody><tr><td>' +  html.stripScripts() + '</td></tr></tbody></table>';
+          depth = 4;
+      }
+      $A(element.childNodes).each(function(node){
+        element.removeChild(node)
+      });
+      depth.times(function(){ div = div.firstChild });
+
+      $A(div.childNodes).each(
+        function(node){ element.appendChild(node) });
+    } else {
+      element.innerHTML = html.stripScripts();
+    }
+    setTimeout(function() {html.evalScripts()}, 10);
+    return element;
+  }
+};
+
+Object.extend(Element, Element.Methods);
+
+var _nativeExtensions = false;
+
+if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
+  ['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) {
+    var className = 'HTML' + tag + 'Element';
+    if(window[className]) return;
+    var klass = window[className] = {};
+    klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__;
+  });
+
+Element.addMethods = function(methods) {
+  Object.extend(Element.Methods, methods || {});
+
+  function copy(methods, destination, onlyIfAbsent) {
+    onlyIfAbsent = onlyIfAbsent || false;
+    var cache = Element.extend.cache;
+    for (var property in methods) {
+      var value = methods[property];
+      if (!onlyIfAbsent || !(property in destination))
+        destination[property] = cache.findOrStore(value);
+    }
+  }
+
+  if (typeof HTMLElement != 'undefined') {
+    copy(Element.Methods, HTMLElement.prototype);
+    copy(Element.Methods.Simulated, HTMLElement.prototype, true);
+    copy(Form.Methods, HTMLFormElement.prototype);
+    [HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) {
+      copy(Form.Element.Methods, klass.prototype);
+    });
+    _nativeExtensions = true;
+  }
+}
+
+var Toggle = new Object();
+Toggle.display = Element.toggle;
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.Insertion = function(adjacency) {
+  this.adjacency = adjacency;
+}
+
+Abstract.Insertion.prototype = {
+  initialize: function(element, content) {
+    this.element = $(element);
+    this.content = content.stripScripts();
+
+    if (this.adjacency && this.element.insertAdjacentHTML) {
+      try {
+        this.element.insertAdjacentHTML(this.adjacency, this.content);
+      } catch (e) {
+        var tagName = this.element.tagName.toUpperCase();
+        if (['TBODY', 'TR'].include(tagName)) {
+          this.insertContent(this.contentFromAnonymousTable());
+        } else {
+          throw e;
+        }
+      }
+    } else {
+      this.range = this.element.ownerDocument.createRange();
+      if (this.initializeRange) this.initializeRange();
+      this.insertContent([this.range.createContextualFragment(this.content)]);
+    }
+
+    setTimeout(function() {content.evalScripts()}, 10);
+  },
+
+  contentFromAnonymousTable: function() {
+    var div = document.createElement('div');
+    div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
+    return $A(div.childNodes[0].childNodes[0].childNodes);
+  }
+}
+
+var Insertion = new Object();
+
+Insertion.Before = Class.create();
+Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
+  initializeRange: function() {
+    this.range.setStartBefore(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.parentNode.insertBefore(fragment, this.element);
+    }).bind(this));
+  }
+});
+
+Insertion.Top = Class.create();
+Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(true);
+  },
+
+  insertContent: function(fragments) {
+    fragments.reverse(false).each((function(fragment) {
+      this.element.insertBefore(fragment, this.element.firstChild);
+    }).bind(this));
+  }
+});
+
+Insertion.Bottom = Class.create();
+Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.appendChild(fragment);
+    }).bind(this));
+  }
+});
+
+Insertion.After = Class.create();
+Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
+  initializeRange: function() {
+    this.range.setStartAfter(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.parentNode.insertBefore(fragment,
+        this.element.nextSibling);
+    }).bind(this));
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Element.ClassNames = Class.create();
+Element.ClassNames.prototype = {
+  initialize: function(element) {
+    this.element = $(element);
+  },
+
+  _each: function(iterator) {
+    this.element.className.split(/\s+/).select(function(name) {
+      return name.length > 0;
+    })._each(iterator);
+  },
+
+  set: function(className) {
+    this.element.className = className;
+  },
+
+  add: function(classNameToAdd) {
+    if (this.include(classNameToAdd)) return;
+    this.set($A(this).concat(classNameToAdd).join(' '));
+  },
+
+  remove: function(classNameToRemove) {
+    if (!this.include(classNameToRemove)) return;
+    this.set($A(this).without(classNameToRemove).join(' '));
+  },
+
+  toString: function() {
+    return $A(this).join(' ');
+  }
+};
+
+Object.extend(Element.ClassNames.prototype, Enumerable);
+var Selector = Class.create();
+Selector.prototype = {
+  initialize: function(expression) {
+    this.params = {classNames: []};
+    this.expression = expression.toString().strip();
+    this.parseExpression();
+    this.compileMatcher();
+  },
+
+  parseExpression: function() {
+    function abort(message) { throw 'Parse error in selector: ' + message; }
+
+    if (this.expression == '')  abort('empty expression');
+
+    var params = this.params, expr = this.expression, match, modifier, clause, rest;
+    while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) {
+      params.attributes = params.attributes || [];
+      params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''});
+      expr = match[1];
+    }
+
+    if (expr == '*') return this.params.wildcard = true;
+
+    while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) {
+      modifier = match[1], clause = match[2], rest = match[3];
+      switch (modifier) {
+        case '#':       params.id = clause; break;
+        case '.':       params.classNames.push(clause); break;
+        case '':
+        case undefined: params.tagName = clause.toUpperCase(); break;
+        default:        abort(expr.inspect());
+      }
+      expr = rest;
+    }
+
+    if (expr.length > 0) abort(expr.inspect());
+  },
+
+  buildMatchExpression: function() {
+    var params = this.params, conditions = [], clause;
+
+    if (params.wildcard)
+      conditions.push('true');
+    if (clause = params.id)
+      conditions.push('element.readAttribute("id") == ' + clause.inspect());
+    if (clause = params.tagName)
+      conditions.push('element.tagName.toUpperCase() == ' + clause.inspect());
+    if ((clause = params.classNames).length > 0)
+      for (var i = 0, length = clause.length; i < length; i++)
+        conditions.push('element.hasClassName(' + clause[i].inspect() + ')');
+    if (clause = params.attributes) {
+      clause.each(function(attribute) {
+        var value = 'element.readAttribute(' + attribute.name.inspect() + ')';
+        var splitValueBy = function(delimiter) {
+          return value + ' && ' + value + '.split(' + delimiter.inspect() + ')';
+        }
+
+        switch (attribute.operator) {
+          case '=':       conditions.push(value + ' == ' + attribute.value.inspect()); break;
+          case '~=':      conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break;
+          case '|=':      conditions.push(
+                            splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect()
+                          ); break;
+          case '!=':      conditions.push(value + ' != ' + attribute.value.inspect()); break;
+          case '':
+          case undefined: conditions.push('element.hasAttribute(' + attribute.name.inspect() + ')'); break;
+          default:        throw 'Unknown operator ' + attribute.operator + ' in selector';
+        }
+      });
+    }
+
+    return conditions.join(' && ');
+  },
+
+  compileMatcher: function() {
+    this.match = new Function('element', 'if (!element.tagName) return false; \
+      element = $(element); \
+      return ' + this.buildMatchExpression());
+  },
+
+  findElements: function(scope) {
+    var element;
+
+    if (element = $(this.params.id))
+      if (this.match(element))
+        if (!scope || Element.childOf(element, scope))
+          return [element];
+
+    scope = (scope || document).getElementsByTagName(this.params.tagName || '*');
+
+    var results = [];
+    for (var i = 0, length = scope.length; i < length; i++)
+      if (this.match(element = scope[i]))
+        results.push(Element.extend(element));
+
+    return results;
+  },
+
+  toString: function() {
+    return this.expression;
+  }
+}
+
+Object.extend(Selector, {
+  matchElements: function(elements, expression) {
+    var selector = new Selector(expression);
+    return elements.select(selector.match.bind(selector)).map(Element.extend);
+  },
+
+  findElement: function(elements, expression, index) {
+    if (typeof expression == 'number') index = expression, expression = false;
+    return Selector.matchElements(elements, expression || '*')[index || 0];
+  },
+
+  findChildElements: function(element, expressions) {
+    return expressions.map(function(expression) {
+      return expression.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null], function(results, expr) {
+        var selector = new Selector(expr);
+        return results.inject([], function(elements, result) {
+          return elements.concat(selector.findElements(result || element));
+        });
+      });
+    }).flatten();
+  }
+});
+
+function $$() {
+  return Selector.findChildElements(document, $A(arguments));
+}
+var Form = {
+  reset: function(form) {
+    $(form).reset();
+    return form;
+  },
+
+  serializeElements: function(elements, getHash) {
+    var data = elements.inject({}, function(result, element) {
+      if (!element.disabled && element.name) {
+        var key = element.name, value = $(element).getValue();
+        if (value != undefined) {
+          if (result[key]) {
+            if (result[key].constructor != Array) result[key] = [result[key]];
+            result[key].push(value);
+          }
+          else result[key] = value;
+        }
+      }
+      return result;
+    });
+
+    return getHash ? data : Hash.toQueryString(data);
+  }
+};
+
+Form.Methods = {
+  serialize: function(form, getHash) {
+    return Form.serializeElements(Form.getElements(form), getHash);
+  },
+
+  getElements: function(form) {
+    return $A($(form).getElementsByTagName('*')).inject([],
+      function(elements, child) {
+        if (Form.Element.Serializers[child.tagName.toLowerCase()])
+          elements.push(Element.extend(child));
+        return elements;
+      }
+    );
+  },
+
+  getInputs: function(form, typeName, name) {
+    form = $(form);
+    var inputs = form.getElementsByTagName('input');
+
+    if (!typeName && !name) return $A(inputs).map(Element.extend);
+
+    for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
+      var input = inputs[i];
+      if ((typeName && input.type != typeName) || (name && input.name != name))
+        continue;
+      matchingInputs.push(Element.extend(input));
+    }
+
+    return matchingInputs;
+  },
+
+  disable: function(form) {
+    form = $(form);
+    form.getElements().each(function(element) {
+      element.blur();
+      element.disabled = 'true';
+    });
+    return form;
+  },
+
+  enable: function(form) {
+    form = $(form);
+    form.getElements().each(function(element) {
+      element.disabled = '';
+    });
+    return form;
+  },
+
+  findFirstElement: function(form) {
+    return $(form).getElements().find(function(element) {
+      return element.type != 'hidden' && !element.disabled &&
+        ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
+    });
+  },
+
+  focusFirstElement: function(form) {
+    form = $(form);
+    form.findFirstElement().activate();
+    return form;
+  }
+}
+
+Object.extend(Form, Form.Methods);
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element = {
+  focus: function(element) {
+    $(element).focus();
+    return element;
+  },
+
+  select: function(element) {
+    $(element).select();
+    return element;
+  }
+}
+
+Form.Element.Methods = {
+  serialize: function(element) {
+    element = $(element);
+    if (!element.disabled && element.name) {
+      var value = element.getValue();
+      if (value != undefined) {
+        var pair = {};
+        pair[element.name] = value;
+        return Hash.toQueryString(pair);
+      }
+    }
+    return '';
+  },
+
+  getValue: function(element) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    return Form.Element.Serializers[method](element);
+  },
+
+  clear: function(element) {
+    $(element).value = '';
+    return element;
+  },
+
+  present: function(element) {
+    return $(element).value != '';
+  },
+
+  activate: function(element) {
+    element = $(element);
+    element.focus();
+    if (element.select && ( element.tagName.toLowerCase() != 'input' ||
+      !['button', 'reset', 'submit'].include(element.type) ) )
+      element.select();
+    return element;
+  },
+
+  disable: function(element) {
+    element = $(element);
+    element.disabled = true;
+    return element;
+  },
+
+  enable: function(element) {
+    element = $(element);
+    element.blur();
+    element.disabled = false;
+    return element;
+  }
+}
+
+Object.extend(Form.Element, Form.Element.Methods);
+var Field = Form.Element;
+var $F = Form.Element.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element.Serializers = {
+  input: function(element) {
+    switch (element.type.toLowerCase()) {
+      case 'checkbox':
+      case 'radio':
+        return Form.Element.Serializers.inputSelector(element);
+      default:
+        return Form.Element.Serializers.textarea(element);
+    }
+  },
+
+  inputSelector: function(element) {
+    return element.checked ? element.value : null;
+  },
+
+  textarea: function(element) {
+    return element.value;
+  },
+
+  select: function(element) {
+    return this[element.type == 'select-one' ?
+      'selectOne' : 'selectMany'](element);
+  },
+
+  selectOne: function(element) {
+    var index = element.selectedIndex;
+    return index >= 0 ? this.optionValue(element.options[index]) : null;
+  },
+
+  selectMany: function(element) {
+    var values, length = element.length;
+    if (!length) return null;
+
+    for (var i = 0, values = []; i < length; i++) {
+      var opt = element.options[i];
+      if (opt.selected) values.push(this.optionValue(opt));
+    }
+    return values;
+  },
+
+  optionValue: function(opt) {
+    // extend element because hasAttribute may not be native
+    return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.TimedObserver = function() {}
+Abstract.TimedObserver.prototype = {
+  initialize: function(element, frequency, callback) {
+    this.frequency = frequency;
+    this.element   = $(element);
+    this.callback  = callback;
+
+    this.lastValue = this.getValue();
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    var value = this.getValue();
+    var changed = ('string' == typeof this.lastValue && 'string' == typeof value
+      ? this.lastValue != value : String(this.lastValue) != String(value));
+    if (changed) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  }
+}
+
+Form.Element.Observer = Class.create();
+Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.Observer = Class.create();
+Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = function() {}
+Abstract.EventObserver.prototype = {
+  initialize: function(element, callback) {
+    this.element  = $(element);
+    this.callback = callback;
+
+    this.lastValue = this.getValue();
+    if (this.element.tagName.toLowerCase() == 'form')
+      this.registerFormCallbacks();
+    else
+      this.registerCallback(this.element);
+  },
+
+  onElementEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  },
+
+  registerFormCallbacks: function() {
+    Form.getElements(this.element).each(this.registerCallback.bind(this));
+  },
+
+  registerCallback: function(element) {
+    if (element.type) {
+      switch (element.type.toLowerCase()) {
+        case 'checkbox':
+        case 'radio':
+          Event.observe(element, 'click', this.onElementEvent.bind(this));
+          break;
+        default:
+          Event.observe(element, 'change', this.onElementEvent.bind(this));
+          break;
+      }
+    }
+  }
+}
+
+Form.Element.EventObserver = Class.create();
+Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.EventObserver = Class.create();
+Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+if (!window.Event) {
+  var Event = new Object();
+}
+
+Object.extend(Event, {
+  KEY_BACKSPACE: 8,
+  KEY_TAB:       9,
+  KEY_RETURN:   13,
+  KEY_ESC:      27,
+  KEY_LEFT:     37,
+  KEY_UP:       38,
+  KEY_RIGHT:    39,
+  KEY_DOWN:     40,
+  KEY_DELETE:   46,
+  KEY_HOME:     36,
+  KEY_END:      35,
+  KEY_PAGEUP:   33,
+  KEY_PAGEDOWN: 34,
+
+  element: function(event) {
+    return event.target || event.srcElement;
+  },
+
+  isLeftClick: function(event) {
+    return (((event.which) && (event.which == 1)) ||
+            ((event.button) && (event.button == 1)));
+  },
+
+  pointerX: function(event) {
+    return event.pageX || (event.clientX +
+      (document.documentElement.scrollLeft || document.body.scrollLeft));
+  },
+
+  pointerY: function(event) {
+    return event.pageY || (event.clientY +
+      (document.documentElement.scrollTop || document.body.scrollTop));
+  },
+
+  stop: function(event) {
+    if (event.preventDefault) {
+      event.preventDefault();
+      event.stopPropagation();
+    } else {
+      event.returnValue = false;
+      event.cancelBubble = true;
+    }
+  },
+
+  // find the first node with the given tagName, starting from the
+  // node the event was triggered on; traverses the DOM upwards
+  findElement: function(event, tagName) {
+    var element = Event.element(event);
+    while (element.parentNode && (!element.tagName ||
+        (element.tagName.toUpperCase() != tagName.toUpperCase())))
+      element = element.parentNode;
+    return element;
+  },
+
+  observers: false,
+
+  _observeAndCache: function(element, name, observer, useCapture) {
+    if (!this.observers) this.observers = [];
+    if (element.addEventListener) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.addEventListener(name, observer, useCapture);
+    } else if (element.attachEvent) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.attachEvent('on' + name, observer);
+    }
+  },
+
+  unloadCache: function() {
+    if (!Event.observers) return;
+    for (var i = 0, length = Event.observers.length; i < length; i++) {
+      Event.stopObserving.apply(this, Event.observers[i]);
+      Event.observers[i][0] = null;
+    }
+    Event.observers = false;
+  },
+
+  observe: function(element, name, observer, useCapture) {
+    element = $(element);
+    useCapture = useCapture || false;
+
+    if (name == 'keypress' &&
+        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+        || element.attachEvent))
+      name = 'keydown';
+
+    Event._observeAndCache(element, name, observer, useCapture);
+  },
+
+  stopObserving: function(element, name, observer, useCapture) {
+    element = $(element);
+    useCapture = useCapture || false;
+
+    if (name == 'keypress' &&
+        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+        || element.detachEvent))
+      name = 'keydown';
+
+    if (element.removeEventListener) {
+      element.removeEventListener(name, observer, useCapture);
+    } else if (element.detachEvent) {
+      try {
+        element.detachEvent('on' + name, observer);
+      } catch (e) {}
+    }
+  }
+});
+
+/* prevent memory leaks in IE */
+if (navigator.appVersion.match(/\bMSIE\b/))
+  Event.observe(window, 'unload', Event.unloadCache, false);
+var Position = {
+  // set to true if needed, warning: firefox performance problems
+  // NOT neeeded for page scrolling, only if draggable contained in
+  // scrollable elements
+  includeScrollOffsets: false,
+
+  // must be called before calling withinIncludingScrolloffset, every time the
+  // page is scrolled
+  prepare: function() {
+    this.deltaX =  window.pageXOffset
+                || document.documentElement.scrollLeft
+                || document.body.scrollLeft
+                || 0;
+    this.deltaY =  window.pageYOffset
+                || document.documentElement.scrollTop
+                || document.body.scrollTop
+                || 0;
+  },
+
+  realOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.scrollTop  || 0;
+      valueL += element.scrollLeft || 0;
+      element = element.parentNode;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  cumulativeOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  positionedOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+      if (element) {
+        if(element.tagName=='BODY') break;
+        var p = Element.getStyle(element, 'position');
+        if (p == 'relative' || p == 'absolute') break;
+      }
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  offsetParent: function(element) {
+    if (element.offsetParent) return element.offsetParent;
+    if (element == document.body) return element;
+
+    while ((element = element.parentNode) && element != document.body)
+      if (Element.getStyle(element, 'position') != 'static')
+        return element;
+
+    return document.body;
+  },
+
+  // caches x/y coordinate pair to use with overlap
+  within: function(element, x, y) {
+    if (this.includeScrollOffsets)
+      return this.withinIncludingScrolloffsets(element, x, y);
+    this.xcomp = x;
+    this.ycomp = y;
+    this.offset = this.cumulativeOffset(element);
+
+    return (y >= this.offset[1] &&
+            y <  this.offset[1] + element.offsetHeight &&
+            x >= this.offset[0] &&
+            x <  this.offset[0] + element.offsetWidth);
+  },
+
+  withinIncludingScrolloffsets: function(element, x, y) {
+    var offsetcache = this.realOffset(element);
+
+    this.xcomp = x + offsetcache[0] - this.deltaX;
+    this.ycomp = y + offsetcache[1] - this.deltaY;
+    this.offset = this.cumulativeOffset(element);
+
+    return (this.ycomp >= this.offset[1] &&
+            this.ycomp <  this.offset[1] + element.offsetHeight &&
+            this.xcomp >= this.offset[0] &&
+            this.xcomp <  this.offset[0] + element.offsetWidth);
+  },
+
+  // within must be called directly before
+  overlap: function(mode, element) {
+    if (!mode) return 0;
+    if (mode == 'vertical')
+      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
+        element.offsetHeight;
+    if (mode == 'horizontal')
+      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
+        element.offsetWidth;
+  },
+
+  page: function(forElement) {
+    var valueT = 0, valueL = 0;
+
+    var element = forElement;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+
+      // Safari fix
+      if (element.offsetParent==document.body)
+        if (Element.getStyle(element,'position')=='absolute') break;
+
+    } while (element = element.offsetParent);
+
+    element = forElement;
+    do {
+      if (!window.opera || element.tagName=='BODY') {
+        valueT -= element.scrollTop  || 0;
+        valueL -= element.scrollLeft || 0;
+      }
+    } while (element = element.parentNode);
+
+    return [valueL, valueT];
+  },
+
+  clone: function(source, target) {
+    var options = Object.extend({
+      setLeft:    true,
+      setTop:     true,
+      setWidth:   true,
+      setHeight:  true,
+      offsetTop:  0,
+      offsetLeft: 0
+    }, arguments[2] || {})
+
+    // find page position of source
+    source = $(source);
+    var p = Position.page(source);
+
+    // find coordinate system to use
+    target = $(target);
+    var delta = [0, 0];
+    var parent = null;
+    // delta [0,0] will do fine with position: fixed elements,
+    // position:absolute needs offsetParent deltas
+    if (Element.getStyle(target,'position') == 'absolute') {
+      parent = Position.offsetParent(target);
+      delta = Position.page(parent);
+    }
+
+    // correct by body offsets (fixes Safari)
+    if (parent == document.body) {
+      delta[0] -= document.body.offsetLeft;
+      delta[1] -= document.body.offsetTop;
+    }
+
+    // set position
+    if(options.setLeft)   target.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
+    if(options.setTop)    target.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
+    if(options.setWidth)  target.style.width = source.offsetWidth + 'px';
+    if(options.setHeight) target.style.height = source.offsetHeight + 'px';
+  },
+
+  absolutize: function(element) {
+    element = $(element);
+    if (element.style.position == 'absolute') return;
+    Position.prepare();
+
+    var offsets = Position.positionedOffset(element);
+    var top     = offsets[1];
+    var left    = offsets[0];
+    var width   = element.clientWidth;
+    var height  = element.clientHeight;
+
+    element._originalLeft   = left - parseFloat(element.style.left  || 0);
+    element._originalTop    = top  - parseFloat(element.style.top || 0);
+    element._originalWidth  = element.style.width;
+    element._originalHeight = element.style.height;
+
+    element.style.position = 'absolute';
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.width  = width + 'px';
+    element.style.height = height + 'px';
+  },
+
+  relativize: function(element) {
+    element = $(element);
+    if (element.style.position == 'relative') return;
+    Position.prepare();
+
+    element.style.position = 'relative';
+    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
+    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.height = element._originalHeight;
+    element.style.width  = element._originalWidth;
+  }
+}
+
+// Safari returns margins on body which is incorrect if the child is absolutely
+// positioned.  For performance reasons, redefine Position.cumulativeOffset for
+// KHTML/WebKit only.
+if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) {
+  Position.cumulativeOffset = function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      if (element.offsetParent == document.body)
+        if (Element.getStyle(element, 'position') == 'absolute') break;
+
+      element = element.offsetParent;
+    } while (element);
+
+    return [valueL, valueT];
+  }
+}
+
+Element.addMethods();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/readme.txt
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/readme.txt b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/readme.txt
new file mode 100644
index 0000000..f3747c5
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/readme.txt
@@ -0,0 +1,20 @@
+Include example
+
+  <script type="text/javascript" src="<%=request.getContextPath()%>/js/prototype.js"></script>
+  <script type="text/javascript" src="<%=request.getContextPath()%>/js/scriptaculous/scriptaculous.js"></script>
+  <script type="text/javascript" src="<%=request.getContextPath()%>/js/overlibmws/overlibmws.js"></script>
+  <script type="text/javascript" src="<%=request.getContextPath()%>/js/overlibmws/overlibmws_crossframe.js"></script>
+  <script type="text/javascript" src="<%=request.getContextPath()%>/js/overlibmws/overlibmws_iframe.js"></script>
+  <script type="text/javascript" src="<%=request.getContextPath()%>/js/overlibmws/overlibmws_hide.js"></script>
+  <script type="text/javascript" src="<%=request.getContextPath()%>/js/overlibmws/overlibmws_shadow.js"></script>
+  <script type="text/javascript" src="<%=request.getContextPath()%>/js/ajax/ajaxtags.js"></script>
+ <script type="text/javascript" src="<%=request.getContextPath()%>/js/ajax/ajaxtags_controls.js"></script>
+ <script type="text/javascript" src="<%=request.getContextPath()%>/js/ajax/ajaxtags_parser.js"></script>
+ 
+  <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/ajaxtags.css" />
+  <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/displaytag.css" />
+
+  
+  #http://www.macridesweb.com/oltest/
+  
+  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/builder.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/builder.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/builder.js
new file mode 100644
index 0000000..199afc1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/builder.js
@@ -0,0 +1,131 @@
+// script.aculo.us builder.js v1.7.0, Fri Jan 19 19:16:36 CET 2007
+
+// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+var Builder = {
+  NODEMAP: {
+    AREA: 'map',
+    CAPTION: 'table',
+    COL: 'table',
+    COLGROUP: 'table',
+    LEGEND: 'fieldset',
+    OPTGROUP: 'select',
+    OPTION: 'select',
+    PARAM: 'object',
+    TBODY: 'table',
+    TD: 'table',
+    TFOOT: 'table',
+    TH: 'table',
+    THEAD: 'table',
+    TR: 'table'
+  },
+  // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
+  //       due to a Firefox bug
+  node: function(elementName) {
+    elementName = elementName.toUpperCase();
+    
+    // try innerHTML approach
+    var parentTag = this.NODEMAP[elementName] || 'div';
+    var parentElement = document.createElement(parentTag);
+    try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
+      parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
+    } catch(e) {}
+    var element = parentElement.firstChild || null;
+      
+    // see if browser added wrapping tags
+    if(element && (element.tagName.toUpperCase() != elementName))
+      element = element.getElementsByTagName(elementName)[0];
+    
+    // fallback to createElement approach
+    if(!element) element = document.createElement(elementName);
+    
+    // abort if nothing could be created
+    if(!element) return;
+
+    // attributes (or text)
+    if(arguments[1])
+      if(this._isStringOrNumber(arguments[1]) ||
+        (arguments[1] instanceof Array)) {
+          this._children(element, arguments[1]);
+        } else {
+          var attrs = this._attributes(arguments[1]);
+          if(attrs.length) {
+            try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
+              parentElement.innerHTML = "<" +elementName + " " +
+                attrs + "></" + elementName + ">";
+            } catch(e) {}
+            element = parentElement.firstChild || null;
+            // workaround firefox 1.0.X bug
+            if(!element) {
+              element = document.createElement(elementName);
+              for(attr in arguments[1]) 
+                element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
+            }
+            if(element.tagName.toUpperCase() != elementName)
+              element = parentElement.getElementsByTagName(elementName)[0];
+            }
+        } 
+
+    // text, or array of children
+    if(arguments[2])
+      this._children(element, arguments[2]);
+
+     return element;
+  },
+  _text: function(text) {
+     return document.createTextNode(text);
+  },
+
+  ATTR_MAP: {
+    'className': 'class',
+    'htmlFor': 'for'
+  },
+
+  _attributes: function(attributes) {
+    var attrs = [];
+    for(attribute in attributes)
+      attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) +
+          '="' + attributes[attribute].toString().escapeHTML() + '"');
+    return attrs.join(" ");
+  },
+  _children: function(element, children) {
+    if(typeof children=='object') { // array can hold nodes and text
+      children.flatten().each( function(e) {
+        if(typeof e=='object')
+          element.appendChild(e)
+        else
+          if(Builder._isStringOrNumber(e))
+            element.appendChild(Builder._text(e));
+      });
+    } else
+      if(Builder._isStringOrNumber(children)) 
+         element.appendChild(Builder._text(children));
+  },
+  _isStringOrNumber: function(param) {
+    return(typeof param=='string' || typeof param=='number');
+  },
+  build: function(html) {
+    var element = this.node('div');
+    $(element).update(html.strip());
+    return element.down();
+  },
+  dump: function(scope) { 
+    if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope 
+  
+    var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
+      "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
+      "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
+      "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
+      "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
+      "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
+  
+    tags.each( function(tag){ 
+      scope[tag] = function() { 
+        return Builder.node.apply(Builder, [tag].concat($A(arguments)));  
+      } 
+    });
+  }
+}


[23/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/gecko.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/gecko.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/gecko.js
new file mode 100644
index 0000000..a9e38a9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/gecko.js
@@ -0,0 +1,293 @@
+/*
+ * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/
+ * 
+ * Copyright (C) 2007 Fernando M.A.d.S. <fe...@gmail.com>
+ *
+ * Developers:
+ *		Fernando M.A.d.S. <fe...@gmail.com>
+ *		Michael Hurni <mi...@gmail.com>
+ * Contributors: 	
+ *		Martin D. Kirk
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the 
+ * GNU Lesser General Public License as published by the Free Software Foundation.
+ * 
+ * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php
+ */
+
+CodePress = {
+	scrolling : false,
+	autocomplete : true,
+
+	// set initial vars and start sh
+	initialize : function() {
+		if(typeof(editor)=='undefined' && !arguments[0]) return;
+		body = document.getElementsByTagName('body')[0];
+		body.innerHTML = body.innerHTML.replace(/\n/g,"");
+		chars = '|32|46|62|8|'; // charcodes that trigger syntax highlighting
+		cc = '\u2009'; // carret char
+		editor = document.getElementsByTagName('pre')[0];
+		document.designMode = 'on';
+		document.addEventListener('keypress', this.keyHandler, true);
+		window.addEventListener('scroll', function() { if(!CodePress.scrolling) CodePress.syntaxHighlight('scroll') }, false);
+		completeChars = this.getCompleteChars();
+		completeEndingChars =  this.getCompleteEndingChars();
+	},
+
+	// treat key bindings
+	keyHandler : function(evt) {
+    	keyCode = evt.keyCode;	
+		charCode = evt.charCode;
+		fromChar = String.fromCharCode(charCode);
+
+		if((evt.ctrlKey || evt.metaKey) && evt.shiftKey && charCode!=90)  { // shortcuts = ctrl||appleKey+shift+key!=z(undo) 
+			CodePress.shortcuts(charCode?charCode:keyCode);
+		}
+		else if( (completeEndingChars.indexOf('|'+fromChar+'|')!= -1 || completeChars.indexOf('|'+fromChar+'|')!=-1) && CodePress.autocomplete) { // auto complete
+			if(!CodePress.completeEnding(fromChar))
+			     CodePress.complete(fromChar);
+		}
+	    else if(chars.indexOf('|'+charCode+'|')!=-1||keyCode==13) { // syntax highlighting
+			top.setTimeout(function(){CodePress.syntaxHighlight('generic');},100);
+		}
+		else if(keyCode==9 || evt.tabKey) {  // snippets activation (tab)
+			CodePress.snippets(evt);
+		}
+		else if(keyCode==46||keyCode==8) { // save to history when delete or backspace pressed
+		 	CodePress.actions.history[CodePress.actions.next()] = editor.innerHTML;
+		}
+		else if((charCode==122||charCode==121||charCode==90) && evt.ctrlKey) { // undo and redo
+			(charCode==121||evt.shiftKey) ? CodePress.actions.redo() :  CodePress.actions.undo(); 
+			evt.preventDefault();
+		}
+		else if(charCode==118 && evt.ctrlKey)  { // handle paste
+		 	top.setTimeout(function(){CodePress.syntaxHighlight('generic');},100);
+		}
+		else if(charCode==99 && evt.ctrlKey)  { // handle cut
+		 	//alert(window.getSelection().getRangeAt(0).toString().replace(/\t/g,'FFF'));
+		}
+
+	},
+
+	// put cursor back to its original position after every parsing
+	findString : function() {
+		if(self.find(cc))
+			window.getSelection().getRangeAt(0).deleteContents();
+	},
+	
+	// split big files, highlighting parts of it
+	split : function(code,flag) {
+		if(flag=='scroll') {
+			this.scrolling = true;
+			return code;
+		}
+		else {
+			this.scrolling = false;
+			mid = code.indexOf(cc);
+			if(mid-2000<0) {ini=0;end=4000;}
+			else if(mid+2000>code.length) {ini=code.length-4000;end=code.length;}
+			else {ini=mid-2000;end=mid+2000;}
+			code = code.substring(ini,end);
+			return code;
+		}
+	},
+	
+	getEditor : function() {
+		if(!document.getElementsByTagName('pre')[0]) {
+			body = document.getElementsByTagName('body')[0];
+			if(!body.innerHTML) return body;
+			if(body.innerHTML=="<br>") body.innerHTML = "<pre> </pre>";
+			else body.innerHTML = "<pre>"+body.innerHTML+"</pre>";
+		}
+		return document.getElementsByTagName('pre')[0];
+	},
+	
+	// syntax highlighting parser
+	syntaxHighlight : function(flag) {
+		//if(document.designMode=='off') document.designMode='on'
+		if(flag != 'init') { window.getSelection().getRangeAt(0).insertNode(document.createTextNode(cc));}
+		editor = CodePress.getEditor();
+		o = editor.innerHTML;
+		o = o.replace(/<br>/g,'\n');
+		o = o.replace(/<.*?>/g,'');
+		x = z = this.split(o,flag);
+		x = x.replace(/\n/g,'<br>');
+
+		if(arguments[1]&&arguments[2]) x = x.replace(arguments[1],arguments[2]);
+	
+		for(i=0;i<Language.syntax.length;i++) 
+			x = x.replace(Language.syntax[i].input,Language.syntax[i].output);
+
+		editor.innerHTML = this.actions.history[this.actions.next()] = (flag=='scroll') ? x : o.split(z).join(x);
+		if(flag!='init') this.findString();
+	},
+	
+	getLastWord : function() {
+		var rangeAndCaret = CodePress.getRangeAndCaret();
+		words = rangeAndCaret[0].substring(rangeAndCaret[1]-40,rangeAndCaret[1]);
+		words = words.replace(/[\s\n\r\);\W]/g,'\n').split('\n');
+		return words[words.length-1].replace(/[\W]/gi,'').toLowerCase();
+	},
+	
+	snippets : function(evt) {
+		var snippets = Language.snippets;	
+		var trigger = this.getLastWord();
+		for (var i=0; i<snippets.length; i++) {
+			if(snippets[i].input == trigger) {
+				var content = snippets[i].output.replace(/</g,'&lt;');
+				content = content.replace(/>/g,'&gt;');
+				if(content.indexOf('$0')<0) content += cc;
+				else content = content.replace(/\$0/,cc);
+				content = content.replace(/\n/g,'<br>');
+				var pattern = new RegExp(trigger+cc,'gi');
+				evt.preventDefault(); // prevent the tab key from being added
+				this.syntaxHighlight('snippets',pattern,content);
+			}
+		}
+	},
+	
+	readOnly : function() {
+		document.designMode = (arguments[0]) ? 'off' : 'on';
+	},
+
+	complete : function(trigger) {
+		window.getSelection().getRangeAt(0).deleteContents();
+		var complete = Language.complete;
+		for (var i=0; i<complete.length; i++) {
+			if(complete[i].input == trigger) {
+				var pattern = new RegExp('\\'+trigger+cc);
+				var content = complete[i].output.replace(/\$0/g,cc);
+				parent.setTimeout(function () { CodePress.syntaxHighlight('complete',pattern,content)},0); // wait for char to appear on screen
+			}
+		}
+	},
+
+	getCompleteChars : function() {
+		var cChars = '';
+		for(var i=0;i<Language.complete.length;i++)
+			cChars += '|'+Language.complete[i].input;
+		return cChars+'|';
+	},
+	
+	getCompleteEndingChars : function() {
+		var cChars = '';
+		for(var i=0;i<Language.complete.length;i++)
+			cChars += '|'+Language.complete[i].output.charAt(Language.complete[i].output.length-1);
+		return cChars+'|';
+	},
+	
+	completeEnding : function(trigger) {
+		var range = window.getSelection().getRangeAt(0);
+		try {
+			range.setEnd(range.endContainer, range.endOffset+1)
+		}
+		catch(e) {
+			return false;
+		}
+		var next_character = range.toString()
+		range.setEnd(range.endContainer, range.endOffset-1)
+		if(next_character != trigger) return false;
+		else {
+			range.setEnd(range.endContainer, range.endOffset+1)
+			range.deleteContents();
+			return true;
+		}
+	},
+	
+	shortcuts : function() {
+		var cCode = arguments[0];
+		if(cCode==13) cCode = '[enter]';
+		else if(cCode==32) cCode = '[space]';
+		else cCode = '['+String.fromCharCode(charCode).toLowerCase()+']';
+		for(var i=0;i<Language.shortcuts.length;i++)
+			if(Language.shortcuts[i].input == cCode)
+				this.insertCode(Language.shortcuts[i].output,false);
+	},
+	
+	getRangeAndCaret : function() {	
+		var range = window.getSelection().getRangeAt(0);
+		var range2 = range.cloneRange();
+		var node = range.endContainer;			
+		var caret = range.endOffset;
+		range2.selectNode(node);	
+		return [range2.toString(),caret];
+	},
+	
+	insertCode : function(code,replaceCursorBefore) {
+		var range = window.getSelection().getRangeAt(0);
+		var node = window.document.createTextNode(code);
+		var selct = window.getSelection();
+		var range2 = range.cloneRange();
+		// Insert text at cursor position
+		selct.removeAllRanges();
+		range.deleteContents();
+		range.insertNode(node);
+		// Move the cursor to the end of text
+		range2.selectNode(node);		
+		range2.collapse(replaceCursorBefore);
+		selct.removeAllRanges();
+		selct.addRange(range2);
+	},
+	
+	// get code from editor
+	getCode : function() {
+		if(!document.getElementsByTagName('pre')[0] || editor.innerHTML == '')
+			editor = CodePress.getEditor();
+		var code = editor.innerHTML;
+		code = code.replace(/<br>/g,'\n');
+		code = code.replace(/\u2009/g,'');
+		code = code.replace(/<.*?>/g,'');
+		code = code.replace(/&lt;/g,'<');
+		code = code.replace(/&gt;/g,'>');
+		code = code.replace(/&amp;/gi,'&');
+		return code;
+	},
+
+	// put code inside editor
+	setCode : function() {
+		var code = arguments[0];
+		code = code.replace(/\u2009/gi,'');
+		code = code.replace(/&/gi,'&amp;');
+		code = code.replace(/</g,'&lt;');
+		code = code.replace(/>/g,'&gt;');
+		editor.innerHTML = code;
+		if (code == '')
+			document.getElementsByTagName('body')[0].innerHTML = '';
+	},
+
+	// undo and redo methods
+	actions : {
+		pos : -1, // actual history position
+		history : [], // history vector
+		
+		undo : function() {
+			editor = CodePress.getEditor();
+			if(editor.innerHTML.indexOf(cc)==-1){
+				if(editor.innerHTML != " ")
+					window.getSelection().getRangeAt(0).insertNode(document.createTextNode(cc));
+				this.history[this.pos] = editor.innerHTML;
+			}
+			this.pos --;
+			if(typeof(this.history[this.pos])=='undefined') this.pos ++;
+			editor.innerHTML = this.history[this.pos];
+			if(editor.innerHTML.indexOf(cc)>-1) editor.innerHTML+=cc;
+			CodePress.findString();
+		},
+		
+		redo : function() {
+			// editor = CodePress.getEditor();
+			this.pos++;
+			if(typeof(this.history[this.pos])=='undefined') this.pos--;
+			editor.innerHTML = this.history[this.pos];
+			CodePress.findString();
+		},
+		
+		next : function() { // get next vector position and clean old ones
+			if(this.pos>20) this.history[this.pos-21] = undefined;
+			return ++this.pos;
+		}
+	}
+}
+
+Language={};
+window.addEventListener('load', function() { CodePress.initialize('new'); }, true);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/khtml.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/khtml.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/khtml.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/msie.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/msie.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/msie.js
new file mode 100644
index 0000000..fd609b2
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/msie.js
@@ -0,0 +1,304 @@
+/*
+ * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/
+ * 
+ * Copyright (C) 2007 Fernando M.A.d.S. <fe...@gmail.com>
+ *
+ * Developers:
+ *		Fernando M.A.d.S. <fe...@gmail.com>
+ *		Michael Hurni <mi...@gmail.com>
+ * Contributors: 	
+ *		Martin D. Kirk
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the 
+ * GNU Lesser General Public License as published by the Free Software Foundation.
+ * 
+ * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php
+ */
+
+CodePress = {
+	scrolling : false,
+	autocomplete : true,
+	
+	// set initial vars and start sh
+	initialize : function() {
+		if(typeof(editor)=='undefined' && !arguments[0]) return;
+		chars = '|32|46|62|'; // charcodes that trigger syntax highlighting
+		cc = '\u2009'; // carret char
+		editor = document.getElementsByTagName('pre')[0];
+		editor.contentEditable = 'true';
+		document.getElementsByTagName('body')[0].onfocus = function() {editor.focus();}
+		document.attachEvent('onkeydown', this.metaHandler);
+		document.attachEvent('onkeypress', this.keyHandler);
+		window.attachEvent('onscroll', function() { if(!CodePress.scrolling) setTimeout(function(){CodePress.syntaxHighlight('scroll')},1)});
+		completeChars = this.getCompleteChars();
+		completeEndingChars =  this.getCompleteEndingChars();
+		setTimeout(function() { window.scroll(0,0) },50); // scroll IE to top
+	},
+	
+	// treat key bindings
+	keyHandler : function(evt) {
+		charCode = evt.keyCode;
+		fromChar = String.fromCharCode(charCode);
+		
+		if( (completeEndingChars.indexOf('|'+fromChar+'|')!= -1 || completeChars.indexOf('|'+fromChar+'|')!=-1  )&& CodePress.autocomplete) { // auto complete
+			if(!CodePress.completeEnding(fromChar))
+			     CodePress.complete(fromChar);
+		}
+	    else if(chars.indexOf('|'+charCode+'|')!=-1||charCode==13) { // syntax highlighting
+		 	CodePress.syntaxHighlight('generic');
+		}
+	},
+
+	metaHandler : function(evt) {
+		keyCode = evt.keyCode;
+		
+		if(keyCode==9 || evt.tabKey) { 
+			CodePress.snippets();
+		}
+		else if((keyCode==122||keyCode==121||keyCode==90) && evt.ctrlKey) { // undo and redo
+			(keyCode==121||evt.shiftKey) ? CodePress.actions.redo() :  CodePress.actions.undo(); 
+			evt.returnValue = false;
+		}
+		else if(keyCode==34||keyCode==33) { // handle page up/down for IE
+			self.scrollBy(0, (keyCode==34) ? 200 : -200); 
+			evt.returnValue = false;
+		}
+		else if(keyCode==46||keyCode==8) { // save to history when delete or backspace pressed
+		 	CodePress.actions.history[CodePress.actions.next()] = editor.innerHTML;
+		}
+		else if((evt.ctrlKey || evt.metaKey) && evt.shiftKey && keyCode!=90)  { // shortcuts = ctrl||appleKey+shift+key!=z(undo) 
+			CodePress.shortcuts(keyCode);
+			evt.returnValue = false;
+		}
+		else if(keyCode==86 && evt.ctrlKey)  { // handle paste
+			window.clipboardData.setData('Text',window.clipboardData.getData('Text').replace(/\t/g,'\u2008'));
+		 	top.setTimeout(function(){CodePress.syntaxHighlight('paste');},10);
+		}
+		else if(keyCode==67 && evt.ctrlKey)  { // handle cut
+			// window.clipboardData.setData('Text',x[0]);
+			// code = window.clipboardData.getData('Text');
+		}
+	},
+
+	// put cursor back to its original position after every parsing
+	
+	
+	findString : function() {
+		range = self.document.body.createTextRange();
+		if(range.findText(cc)){
+			range.select();
+			range.text = '';
+		}
+	},
+	
+	// split big files, highlighting parts of it
+	split : function(code,flag) {
+		if(flag=='scroll') {
+			this.scrolling = true;
+			return code;
+		}
+		else {
+			this.scrolling = false;
+			mid = code.indexOf(cc);
+			if(mid-2000<0) {ini=0;end=4000;}
+			else if(mid+2000>code.length) {ini=code.length-4000;end=code.length;}
+			else {ini=mid-2000;end=mid+2000;}
+			code = code.substring(ini,end);
+			return code.substring(code.indexOf('<P>'),code.lastIndexOf('</P>')+4);
+		}
+	},
+	
+	// syntax highlighting parser
+	syntaxHighlight : function(flag) {
+		if(flag!='init') document.selection.createRange().text = cc;
+		o = editor.innerHTML;
+		if(flag=='paste') { // fix pasted text
+			o = o.replace(/<BR>/g,'\r\n'); 
+			o = o.replace(/\u2008/g,'\t');
+		}
+		o = o.replace(/<P>/g,'\n');
+		o = o.replace(/<\/P>/g,'\r');
+		o = o.replace(/<.*?>/g,'');
+		o = o.replace(/&nbsp;/g,'');			
+		o = '<PRE><P>'+o+'</P></PRE>';
+		o = o.replace(/\n\r/g,'<P></P>');
+		o = o.replace(/\n/g,'<P>');
+		o = o.replace(/\r/g,'<\/P>');
+		o = o.replace(/<P>(<P>)+/,'<P>');
+		o = o.replace(/<\/P>(<\/P>)+/,'</P>');
+		o = o.replace(/<P><\/P>/g,'<P><BR/></P>');
+		x = z = this.split(o,flag);
+
+		if(arguments[1]&&arguments[2]) x = x.replace(arguments[1],arguments[2]);
+	
+		for(i=0;i<Language.syntax.length;i++) 
+			x = x.replace(Language.syntax[i].input,Language.syntax[i].output);
+			
+		editor.innerHTML = this.actions.history[this.actions.next()] = (flag=='scroll') ? x : o.replace(z,x);
+		if(flag!='init') this.findString();
+	},
+
+	snippets : function(evt) {
+		var snippets = Language.snippets;
+		var trigger = this.getLastWord();
+		for (var i=0; i<snippets.length; i++) {
+			if(snippets[i].input == trigger) {
+				var content = snippets[i].output.replace(/</g,'&lt;');
+				content = content.replace(/>/g,'&gt;');
+				if(content.indexOf('$0')<0) content += cc;
+				else content = content.replace(/\$0/,cc);
+				content = content.replace(/\n/g,'</P><P>');
+				var pattern = new RegExp(trigger+cc,"gi");
+				this.syntaxHighlight('snippets',pattern,content);
+			}
+		}
+	},
+	
+	readOnly : function() {
+		editor.contentEditable = (arguments[0]) ? 'false' : 'true';
+	},
+	
+	complete : function(trigger) {
+		var complete = Language.complete;
+		for (var i=0; i<complete.length; i++) {
+			if(complete[i].input == trigger) {
+				var pattern = new RegExp('\\'+trigger+cc);
+				var content = complete[i].output.replace(/\$0/g,cc);
+				setTimeout(function () { CodePress.syntaxHighlight('complete',pattern,content)},0); // wait for char to appear on screen
+			}
+		}
+	},
+	
+	getCompleteChars : function() {
+		var cChars = '';
+		for(var i=0;i<Language.complete.length;i++)
+			cChars += '|'+Language.complete[i].input;
+		return cChars+'|';
+	},
+
+	getCompleteEndingChars : function() {
+		var cChars = '';
+		for(var i=0;i<Language.complete.length;i++)
+			cChars += '|'+Language.complete[i].output.charAt(Language.complete[i].output.length-1);
+		return cChars+'|';
+	},
+
+	completeEnding : function(trigger) {
+		var range = document.selection.createRange();
+		try {
+			range.moveEnd('character', 1)
+		}
+		catch(e) {
+			return false;
+		}
+		var next_character = range.text
+		range.moveEnd('character', -1)
+		if(next_character != trigger )  return false;
+		else {
+			range.moveEnd('character', 1)
+			range.text=''
+			return true;
+		}
+	},	
+
+	shortcuts : function() {
+		var cCode = arguments[0];
+		if(cCode==13) cCode = '[enter]';
+		else if(cCode==32) cCode = '[space]';
+		else cCode = '['+String.fromCharCode(keyCode).toLowerCase()+']';
+		for(var i=0;i<Language.shortcuts.length;i++)
+			if(Language.shortcuts[i].input == cCode)
+				this.insertCode(Language.shortcuts[i].output,false);
+	},
+	
+	getLastWord : function() {
+		var rangeAndCaret = CodePress.getRangeAndCaret();
+		words = rangeAndCaret[0].substring(rangeAndCaret[1]-40,rangeAndCaret[1]);
+		words = words.replace(/[\s\n\r\);\W]/g,'\n').split('\n');
+		return words[words.length-1].replace(/[\W]/gi,'').toLowerCase();
+	}, 
+
+	getRangeAndCaret : function() {	
+		var range = document.selection.createRange();
+		var caret = Math.abs(range.moveStart('character', -1000000)+1);
+		range = this.getCode();
+		range = range.replace(/\n\r/gi,'  ');
+		range = range.replace(/\n/gi,'');
+		return [range.toString(),caret];
+	},
+	
+	insertCode : function(code,replaceCursorBefore) {
+		var repdeb = '';
+		var repfin = '';
+		
+		if(replaceCursorBefore) { repfin = code; }
+		else { repdeb = code; }
+		
+		if(typeof document.selection != 'undefined') {
+			var range = document.selection.createRange();
+			range.text = repdeb + repfin;
+			range = document.selection.createRange();
+			range.move('character', -repfin.length);
+			range.select();	
+		}	
+	},
+
+	// get code from editor	
+	getCode : function() {
+		var code = editor.innerHTML;
+		code = code.replace(/<br>/g,'\n');
+		code = code.replace(/<\/p>/gi,'\r');
+		code = code.replace(/<p>/i,''); // IE first line fix
+		code = code.replace(/<p>/gi,'\n');
+		code = code.replace(/&nbsp;/gi,'');
+		code = code.replace(/\u2009/g,'');
+		code = code.replace(/<.*?>/g,'');
+		code = code.replace(/&lt;/g,'<');
+		code = code.replace(/&gt;/g,'>');
+		code = code.replace(/&amp;/gi,'&');
+		return code;
+	},
+
+	// put code inside editor
+	setCode : function() {
+		var code = arguments[0];
+		code = code.replace(/\u2009/gi,'');
+		code = code.replace(/&/gi,'&amp;');		
+       	code = code.replace(/</g,'&lt;');
+        code = code.replace(/>/g,'&gt;');
+		editor.innerHTML = '<pre>'+code+'</pre>';
+	},
+
+	
+	// undo and redo methods
+	actions : {
+		pos : -1, // actual history position
+		history : [], // history vector
+		
+		undo : function() {
+			if(editor.innerHTML.indexOf(cc)==-1){
+				document.selection.createRange().text = cc;
+			 	this.history[this.pos] = editor.innerHTML;
+			}
+			this.pos--;
+			if(typeof(this.history[this.pos])=='undefined') this.pos++;
+			editor.innerHTML = this.history[this.pos];
+			CodePress.findString();
+		},
+		
+		redo : function() {
+			this.pos++;
+			if(typeof(this.history[this.pos])=='undefined') this.pos--;
+			editor.innerHTML = this.history[this.pos];
+			CodePress.findString();
+		},
+		
+		next : function() { // get next vector position and clean old ones
+			if(this.pos>20) this.history[this.pos-21] = undefined;
+			return ++this.pos;
+		}
+	}
+}
+
+Language={};
+window.attachEvent('onload', function() { CodePress.initialize('new');});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/older.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/older.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/older.js
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/opera.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/opera.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/opera.js
new file mode 100644
index 0000000..152c763
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/opera.js
@@ -0,0 +1,260 @@
+/*
+ * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/
+ * 
+ * Copyright (C) 2007 Fernando M.A.d.S. <fe...@gmail.com>
+ *
+ * Contributors :
+ *
+ * 	Michael Hurni <mi...@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the 
+ * GNU Lesser General Public License as published by the Free Software Foundation.
+ * 
+ * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php
+ */
+
+
+CodePress = {
+	scrolling : false,
+	autocomplete : true,
+
+	// set initial vars and start sh
+	initialize : function() {
+		if(typeof(editor)=='undefined' && !arguments[0]) return;
+		chars = '|32|46|62|'; // charcodes that trigger syntax highlighting
+		cc = '\u2009'; // control char
+		editor = document.getElementsByTagName('body')[0];
+		document.designMode = 'on';
+		document.addEventListener('keyup', this.keyHandler, true);
+		window.addEventListener('scroll', function() { if(!CodePress.scrolling) CodePress.syntaxHighlight('scroll') }, false);
+		completeChars = this.getCompleteChars();
+//		CodePress.syntaxHighlight('init');
+	},
+
+	// treat key bindings
+	keyHandler : function(evt) {
+    	keyCode = evt.keyCode;	
+		charCode = evt.charCode;
+
+		if((evt.ctrlKey || evt.metaKey) && evt.shiftKey && charCode!=90)  { // shortcuts = ctrl||appleKey+shift+key!=z(undo) 
+			CodePress.shortcuts(charCode?charCode:keyCode);
+		}
+		else if(completeChars.indexOf('|'+String.fromCharCode(charCode)+'|')!=-1 && CodePress.autocomplete) { // auto complete
+			CodePress.complete(String.fromCharCode(charCode));
+		}
+	    else if(chars.indexOf('|'+charCode+'|')!=-1||keyCode==13) { // syntax highlighting
+		 	CodePress.syntaxHighlight('generic');
+		}
+		else if(keyCode==9 || evt.tabKey) {  // snippets activation (tab)
+			CodePress.snippets(evt);
+		}
+		else if(keyCode==46||keyCode==8) { // save to history when delete or backspace pressed
+		 	CodePress.actions.history[CodePress.actions.next()] = editor.innerHTML;
+		}
+		else if((charCode==122||charCode==121||charCode==90) && evt.ctrlKey) { // undo and redo
+			(charCode==121||evt.shiftKey) ? CodePress.actions.redo() :  CodePress.actions.undo(); 
+			evt.preventDefault();
+		}
+		else if(keyCode==86 && evt.ctrlKey)  { // paste
+			// TODO: pasted text should be parsed and highlighted
+		}
+	},
+
+	// put cursor back to its original position after every parsing
+	findString : function() {
+		var sel = window.getSelection();
+		var range = window.document.createRange();
+		var span = window.document.getElementsByTagName('span')[0];
+			
+		range.selectNode(span);
+		sel.removeAllRanges();
+		sel.addRange(range);
+		span.parentNode.removeChild(span);
+		//if(self.find(cc))
+		//window.getSelection().getRangeAt(0).deleteContents();
+	},
+	
+	// split big files, highlighting parts of it
+	split : function(code,flag) {
+		if(flag=='scroll') {
+			this.scrolling = true;
+			return code;
+		}
+		else {
+			this.scrolling = false;
+			mid = code.indexOf('<SPAN>');
+			if(mid-2000<0) {ini=0;end=4000;}
+			else if(mid+2000>code.length) {ini=code.length-4000;end=code.length;}
+			else {ini=mid-2000;end=mid+2000;}
+			code = code.substring(ini,end);
+			return code;
+		}
+	},
+	
+	// syntax highlighting parser
+	syntaxHighlight : function(flag) {
+		//if(document.designMode=='off') document.designMode='on'
+		if(flag!='init') {
+			var span = document.createElement('span');
+			window.getSelection().getRangeAt(0).insertNode(span);
+		}
+
+		o = editor.innerHTML;
+//		o = o.replace(/<br>/g,'\r\n');
+//		o = o.replace(/<(b|i|s|u|a|em|tt|ins|big|cite|strong)?>/g,'');
+		//alert(o)
+		o = o.replace(/<(?!span|\/span|br).*?>/gi,'');
+//		alert(o)
+//		x = o;
+		x = z = this.split(o,flag);
+		//alert(z)
+//		x = x.replace(/\r\n/g,'<br>');
+		x = x.replace(/\t/g, '        ');
+
+
+		if(arguments[1]&&arguments[2]) x = x.replace(arguments[1],arguments[2]);
+	
+		for(i=0;i<Language.syntax.length;i++) 
+			x = x.replace(Language.syntax[i].input,Language.syntax[i].output);
+
+		editor.innerHTML = this.actions.history[this.actions.next()] = (flag=='scroll') ? x : o.split(z).join(x); 
+
+		if(flag!='init') this.findString();
+	},
+	
+	getLastWord : function() {
+		var rangeAndCaret = CodePress.getRangeAndCaret();
+		words = rangeAndCaret[0].substring(rangeAndCaret[1]-40,rangeAndCaret[1]);
+		words = words.replace(/[\s\n\r\);\W]/g,'\n').split('\n');
+		return words[words.length-1].replace(/[\W]/gi,'').toLowerCase();
+	}, 
+	
+	snippets : function(evt) {
+		var snippets = Language.snippets;	
+		var trigger = this.getLastWord();
+		for (var i=0; i<snippets.length; i++) {
+			if(snippets[i].input == trigger) {
+				var content = snippets[i].output.replace(/</g,'&lt;');
+				content = content.replace(/>/g,'&gt;');
+				if(content.indexOf('$0')<0) content += cc;
+				else content = content.replace(/\$0/,cc);
+				content = content.replace(/\n/g,'<br>');
+				var pattern = new RegExp(trigger+cc,'gi');
+				evt.preventDefault(); // prevent the tab key from being added
+				this.syntaxHighlight('snippets',pattern,content);
+			}
+		}
+	},
+	
+	readOnly : function() {
+		document.designMode = (arguments[0]) ? 'off' : 'on';
+	},
+
+	complete : function(trigger) {
+		window.getSelection().getRangeAt(0).deleteContents();
+		var complete = Language.complete;
+		for (var i=0; i<complete.length; i++) {
+			if(complete[i].input == trigger) {
+				var pattern = new RegExp('\\'+trigger+cc);
+				var content = complete[i].output.replace(/\$0/g,cc);
+				parent.setTimeout(function () { CodePress.syntaxHighlight('complete',pattern,content)},0); // wait for char to appear on screen
+			}
+		}
+	},
+
+	getCompleteChars : function() {
+		var cChars = '';
+		for(var i=0;i<Language.complete.length;i++)
+			cChars += '|'+Language.complete[i].input;
+		return cChars+'|';
+	},
+
+	shortcuts : function() {
+		var cCode = arguments[0];
+		if(cCode==13) cCode = '[enter]';
+		else if(cCode==32) cCode = '[space]';
+		else cCode = '['+String.fromCharCode(charCode).toLowerCase()+']';
+		for(var i=0;i<Language.shortcuts.length;i++)
+			if(Language.shortcuts[i].input == cCode)
+				this.insertCode(Language.shortcuts[i].output,false);
+	},
+	
+	getRangeAndCaret : function() {	
+		var range = window.getSelection().getRangeAt(0);
+		var range2 = range.cloneRange();
+		var node = range.endContainer;			
+		var caret = range.endOffset;
+		range2.selectNode(node);	
+		return [range2.toString(),caret];
+	},
+	
+	insertCode : function(code,replaceCursorBefore) {
+		var range = window.getSelection().getRangeAt(0);
+		var node = window.document.createTextNode(code);
+		var selct = window.getSelection();
+		var range2 = range.cloneRange();
+		// Insert text at cursor position
+		selct.removeAllRanges();
+		range.deleteContents();
+		range.insertNode(node);
+		// Move the cursor to the end of text
+		range2.selectNode(node);		
+		range2.collapse(replaceCursorBefore);
+		selct.removeAllRanges();
+		selct.addRange(range2);
+	},
+	
+	// get code from editor
+	getCode : function() {
+		var code = editor.innerHTML;
+		code = code.replace(/<br>/g,'\n');
+		code = code.replace(/\u2009/g,'');
+		code = code.replace(/<.*?>/g,'');
+		code = code.replace(/&lt;/g,'<');
+		code = code.replace(/&gt;/g,'>');
+		code = code.replace(/&amp;/gi,'&');
+		return code;
+	},
+
+	// put code inside editor
+	setCode : function() {
+		var code = arguments[0];
+		code = code.replace(/\u2009/gi,'');
+		code = code.replace(/&/gi,'&amp;');
+       	code = code.replace(/</g,'&lt;');
+        code = code.replace(/>/g,'&gt;');
+		editor.innerHTML = code;
+	},
+
+	// undo and redo methods
+	actions : {
+		pos : -1, // actual history position
+		history : [], // history vector
+		
+		undo : function() {
+			if(editor.innerHTML.indexOf(cc)==-1){
+				window.getSelection().getRangeAt(0).insertNode(document.createTextNode(cc));
+			 	this.history[this.pos] = editor.innerHTML;
+			}
+			this.pos--;
+			if(typeof(this.history[this.pos])=='undefined') this.pos++;
+			editor.innerHTML = this.history[this.pos];
+			CodePress.findString();
+		},
+		
+		redo : function() {
+			this.pos++;
+			if(typeof(this.history[this.pos])=='undefined') this.pos--;
+			editor.innerHTML = this.history[this.pos];
+			CodePress.findString();
+		},
+		
+		next : function() { // get next vector position and clean old ones
+			if(this.pos>20) this.history[this.pos-21] = undefined;
+			return ++this.pos;
+		}
+	}
+}
+
+Language={};
+window.addEventListener('load', function() { CodePress.initialize('new'); }, true);

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/webkit.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/webkit.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/webkit.js
new file mode 100644
index 0000000..1da3a0f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/engines/webkit.js
@@ -0,0 +1,297 @@
+/*
+ * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/
+ * 
+ * Copyright (C) 2007 Fernando M.A.d.S. <fe...@gmail.com>
+ *
+ * Developers:
+ *		Fernando M.A.d.S. <fe...@gmail.com>
+ *		Michael Hurni <mi...@gmail.com>
+ * Contributors: 	
+ *		Martin D. Kirk
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the 
+ * GNU Lesser General Public License as published by the Free Software Foundation.
+ * 
+ * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php
+ */
+
+CodePress = {
+	scrolling : false,
+	autocomplete : true,
+
+	// set initial vars and start sh
+	initialize : function() {
+
+		if(typeof(editor)=='undefined' && !arguments[0]) return;
+		body = document.getElementsByTagName('body')[0];
+		body.innerHTML = body.innerHTML.replace(/\n/g,"");
+		chars = '|32|46|62|8|'; // charcodes that trigger syntax highlighting
+		cc = '\u2009'; // carret char
+		
+		editor = document.getElementsByTagName('pre')[0];
+		document.designMode = 'on';
+		
+		document.addEventListener('keypress', this.keyHandler, true);
+		window.addEventListener('scroll', function() { if(!CodePress.scrolling) CodePress.syntaxHighlight('scroll') }, false);
+		completeChars = this.getCompleteChars();
+		completeEndingChars =  this.getCompleteEndingChars();
+	},
+
+	// treat key bindings
+	keyHandler : function(evt) {
+    	keyCode = evt.keyCode;	
+		charCode = evt.charCode;
+		fromChar = String.fromCharCode(charCode);
+
+		if((evt.ctrlKey || evt.metaKey) && evt.shiftKey && charCode!=90)  { // shortcuts = ctrl||appleKey+shift+key!=z(undo) 
+			CodePress.shortcuts(charCode?charCode:keyCode);
+		}
+		else if( (completeEndingChars.indexOf('|'+fromChar+'|')!= -1 || completeChars.indexOf('|'+fromChar+'|')!=-1) && CodePress.autocomplete) { // auto complete
+			if(!CodePress.completeEnding(fromChar))
+			     CodePress.complete(fromChar);
+		}
+	    else if(chars.indexOf('|'+charCode+'|')!=-1||keyCode==13) { // syntax highlighting
+			top.setTimeout(function(){CodePress.syntaxHighlight('generic');},100);
+		}
+		else if(keyCode==9 || evt.tabKey) {  // snippets activation (tab)
+			CodePress.snippets(evt);
+		}
+		else if(keyCode==46||keyCode==8) { // save to history when delete or backspace pressed
+		 	CodePress.actions.history[CodePress.actions.next()] = editor.innerHTML;
+		}
+		else if((charCode==122||charCode==121||charCode==90) && evt.ctrlKey) { // undo and redo
+			(charCode==121||evt.shiftKey) ? CodePress.actions.redo() :  CodePress.actions.undo(); 
+			evt.preventDefault();
+		}
+		else if(charCode==118 && evt.ctrlKey)  { // handle paste
+		 	top.setTimeout(function(){CodePress.syntaxHighlight('generic');},100);
+		}
+		else if(charCode==99 && evt.ctrlKey)  { // handle cut
+		 	//alert(window.getSelection().getRangeAt(0).toString().replace(/\t/g,'FFF'));
+		}
+
+	},
+
+	// put cursor back to its original position after every parsing
+	findString : function() {
+		if(self.find(cc))
+			window.getSelection().getRangeAt(0).deleteContents();
+	},
+	
+	// split big files, highlighting parts of it
+	split : function(code,flag) {
+		if(flag=='scroll') {
+			this.scrolling = true;
+			return code;
+		}
+		else {
+			this.scrolling = false;
+			mid = code.indexOf(cc);
+			if(mid-2000<0) {ini=0;end=4000;}
+			else if(mid+2000>code.length) {ini=code.length-4000;end=code.length;}
+			else {ini=mid-2000;end=mid+2000;}
+			code = code.substring(ini,end);
+			return code;
+		}
+	},
+	
+	getEditor : function() {
+		if(!document.getElementsByTagName('pre')[0]) {
+			body = document.getElementsByTagName('body')[0];
+			if(!body.innerHTML) return body;
+			if(body.innerHTML=="<br>") body.innerHTML = "<pre> </pre>";
+			else body.innerHTML = "<pre>"+body.innerHTML+"</pre>";
+		}
+		return document.getElementsByTagName('pre')[0];
+	},
+	
+	// syntax highlighting parser
+	syntaxHighlight : function(flag) {
+		//if(document.designMode=='off') document.designMode='on'
+		if(flag != 'init') { window.getSelection().getRangeAt(0).insertNode(document.createTextNode(cc));}
+		editor = CodePress.getEditor();
+		o = editor.innerHTML;
+		o = o.replace(/<br>/g,'\n');
+		o = o.replace(/<.*?>/g,'');
+		x = z = this.split(o,flag);
+		x = x.replace(/\n/g,'<br>');
+
+		if(arguments[1]&&arguments[2]) x = x.replace(arguments[1],arguments[2]);
+	
+		for(i=0;i<Language.syntax.length;i++) 
+			x = x.replace(Language.syntax[i].input,Language.syntax[i].output);
+
+		editor.innerHTML = this.actions.history[this.actions.next()] = (flag=='scroll') ? x : o.split(z).join(x);
+		if(flag!='init') this.findString();
+	},
+	
+	getLastWord : function() {
+		var rangeAndCaret = CodePress.getRangeAndCaret();
+		words = rangeAndCaret[0].substring(rangeAndCaret[1]-40,rangeAndCaret[1]);
+		words = words.replace(/[\s\n\r\);\W]/g,'\n').split('\n');
+		return words[words.length-1].replace(/[\W]/gi,'').toLowerCase();
+	},
+	
+	snippets : function(evt) {
+		var snippets = Language.snippets;	
+		var trigger = this.getLastWord();
+		for (var i=0; i<snippets.length; i++) {
+			if(snippets[i].input == trigger) {
+				var content = snippets[i].output.replace(/</g,'&lt;');
+				content = content.replace(/>/g,'&gt;');
+				if(content.indexOf('$0')<0) content += cc;
+				else content = content.replace(/\$0/,cc);
+				content = content.replace(/\n/g,'<br>');
+				var pattern = new RegExp(trigger+cc,'gi');
+				evt.preventDefault(); // prevent the tab key from being added
+				this.syntaxHighlight('snippets',pattern,content);
+			}
+		}
+	},
+	
+	readOnly : function() {
+		document.designMode = (arguments[0]) ? 'off' : 'on';
+	},
+
+	complete : function(trigger) {
+		window.getSelection().getRangeAt(0).deleteContents();
+		var complete = Language.complete;
+		for (var i=0; i<complete.length; i++) {
+			if(complete[i].input == trigger) {
+				var pattern = new RegExp('\\'+trigger+cc);
+				var content = complete[i].output.replace(/\$0/g,cc);
+				parent.setTimeout(function () { CodePress.syntaxHighlight('complete',pattern,content)},0); // wait for char to appear on screen
+			}
+		}
+	},
+
+	getCompleteChars : function() {
+		var cChars = '';
+		for(var i=0;i<Language.complete.length;i++)
+			cChars += '|'+Language.complete[i].input;
+		return cChars+'|';
+	},
+	
+	getCompleteEndingChars : function() {
+		var cChars = '';
+		for(var i=0;i<Language.complete.length;i++)
+			cChars += '|'+Language.complete[i].output.charAt(Language.complete[i].output.length-1);
+		return cChars+'|';
+	},
+	
+	completeEnding : function(trigger) {
+		var range = window.getSelection().getRangeAt(0);
+		try {
+			range.setEnd(range.endContainer, range.endOffset+1)
+		}
+		catch(e) {
+			return false;
+		}
+		var next_character = range.toString()
+		range.setEnd(range.endContainer, range.endOffset-1)
+		if(next_character != trigger) return false;
+		else {
+			range.setEnd(range.endContainer, range.endOffset+1)
+			range.deleteContents();
+			return true;
+		}
+	},
+	
+	shortcuts : function() {
+		var cCode = arguments[0];
+		if(cCode==13) cCode = '[enter]';
+		else if(cCode==32) cCode = '[space]';
+		else cCode = '['+String.fromCharCode(charCode).toLowerCase()+']';
+		for(var i=0;i<Language.shortcuts.length;i++)
+			if(Language.shortcuts[i].input == cCode)
+				this.insertCode(Language.shortcuts[i].output,false);
+	},
+	
+	getRangeAndCaret : function() {	
+		var range = window.getSelection().getRangeAt(0);
+		var range2 = range.cloneRange();
+		var node = range.endContainer;			
+		var caret = range.endOffset;
+		range2.selectNode(node);	
+		return [range2.toString(),caret];
+	},
+	
+	insertCode : function(code,replaceCursorBefore) {
+		var range = window.getSelection().getRangeAt(0);
+		var node = window.document.createTextNode(code);
+		var selct = window.getSelection();
+		var range2 = range.cloneRange();
+		// Insert text at cursor position
+		selct.removeAllRanges();
+		range.deleteContents();
+		range.insertNode(node);
+		// Move the cursor to the end of text
+		range2.selectNode(node);		
+		range2.collapse(replaceCursorBefore);
+		selct.removeAllRanges();
+		selct.addRange(range2);
+	},
+	
+	// get code from editor
+	getCode : function() {
+		if(!document.getElementsByTagName('pre')[0] || editor.innerHTML == '')
+			editor = CodePress.getEditor();
+		var code = editor.innerHTML;
+		code = code.replace(/<br>/g,'\n');
+		code = code.replace(/\u2009/g,'');
+		code = code.replace(/<.*?>/g,'');
+		code = code.replace(/&lt;/g,'<');
+		code = code.replace(/&gt;/g,'>');
+		code = code.replace(/&amp;/gi,'&');
+		return code;
+	},
+
+	// put code inside editor
+	setCode : function() {
+		var code = arguments[0];
+		code = code.replace(/\u2009/gi,'');
+		code = code.replace(/&/gi,'&amp;');
+		code = code.replace(/</g,'&lt;');
+		code = code.replace(/>/g,'&gt;');
+		
+		editor.innerHTML = code;
+		if (code == '')
+			document.getElementsByTagName('body')[0].innerHTML = '';
+	},
+
+	// undo and redo methods
+	actions : {
+		pos : -1, // actual history position
+		history : [], // history vector
+		
+		undo : function() {
+			editor = CodePress.getEditor();
+			if(editor.innerHTML.indexOf(cc)==-1){
+				if(editor.innerHTML != " ")
+					window.getSelection().getRangeAt(0).insertNode(document.createTextNode(cc));
+				this.history[this.pos] = editor.innerHTML;
+			}
+			this.pos --;
+			if(typeof(this.history[this.pos])=='undefined') this.pos ++;
+			editor.innerHTML = this.history[this.pos];
+			if(editor.innerHTML.indexOf(cc)>-1) editor.innerHTML+=cc;
+			CodePress.findString();
+		},
+		
+		redo : function() {
+			// editor = CodePress.getEditor();
+			this.pos++;
+			if(typeof(this.history[this.pos])=='undefined') this.pos--;
+			editor.innerHTML = this.history[this.pos];
+			CodePress.findString();
+		},
+		
+		next : function() { // get next vector position and clean old ones
+			if(this.pos>20) this.history[this.pos-21] = undefined;
+			return ++this.pos;
+		}
+	}
+}
+
+Language={};
+window.addEventListener('load', function() { CodePress.initialize('new'); }, true);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/images/line-numbers.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/images/line-numbers.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/images/line-numbers.png
new file mode 100644
index 0000000..ffea4e6
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/images/line-numbers.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/asp.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/asp.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/asp.css
new file mode 100644
index 0000000..87af390
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/asp.css
@@ -0,0 +1,71 @@
+/*
+ * CodePress color styles for ASP-VB syntax highlighting
+ * By Martin D. Kirk
+ */
+/* tags */
+
+b {
+	color:#000080;
+} 
+/* comments */
+big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {
+	color:gray;
+	font-weight:normal;
+}
+/* ASP comments */
+strong dfn, strong dfn a,strong dfn var, strong dfn a u, strong dfn u{
+	color:gray;
+	font-weight:normal;
+}
+ /* attributes */ 
+s, s b, span s u, span s cite, strong span s {
+	color:#5656fa ;
+	font-weight:normal;
+}
+ /* strings */ 
+strong s,strong s b, strong s u, strong s cite {
+	color:#009900;
+	font-weight:normal;
+}
+strong ins{
+	color:#000000;
+	font-weight:bold;
+}
+ /* Syntax */
+strong a, strong a u {
+	color:#0000FF;
+	font-weight:;
+}
+ /* Native Keywords */
+strong u {
+	color:#990099;
+	font-weight:bold;
+}
+/* Numbers */
+strong var{
+	color:#FF0000;
+}
+/* ASP Language */
+span{
+	color:#990000;
+	font-weight:bold;
+}
+strong i,strong a i, strong u i {
+	color:#009999;
+}
+/* style */
+em {
+	color:#800080;
+	font-style:normal;
+}
+ /* script */ 
+ins {
+	color:#800000;
+	font-weight:bold;
+}
+
+/* <?php and ?> */
+cite, s cite {
+	color:red;
+	font-weight:bold;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/asp.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/asp.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/asp.js
new file mode 100644
index 0000000..7439539
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/asp.js
@@ -0,0 +1,117 @@
+/*
+ * CodePress regular expressions for ASP-vbscript syntax highlighting
+ */
+
+// ASP VBScript
+Language.syntax = [
+// all tags
+	{ input : /(&lt;[^!%|!%@]*?&gt;)/g, output : '<b>$1</b>' }, 
+// style tags	
+	{ input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, 
+// script tags	
+	{ input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' }, 
+// strings "" and attributes
+	{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, 
+// ASP Comment
+	{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<dfn>\'$1$2</dfn>'}, 
+// <%.*
+	{ input : /(&lt;%)/g, output : '<strong>$1' }, 
+// .*%>	
+	{ input : /(%&gt;)/g, output : '$1</strong>' }, 
+// <%@...%>	
+	{ input : /(&lt;%@)(.+?)(%&gt;)/gi, output : '$1<span>$2</span>$3' }, 
+//Numbers	
+	{ input : /\b([\d]+)\b/g, output : '<var>$1</var>' }, 
+// Reserved Words 1 (Blue)
+	{ input : /\b(And|As|ByRef|ByVal|Call|Case|Class|Const|Dim|Do|Each|Else|ElseIf|Empty|End|Eqv|Exit|False|For|Function)\b/gi, output : '<a>$1</a>' }, 
+	{ input : /\b(Get|GoTo|If|Imp|In|Is|Let|Loop|Me|Mod|Enum|New|Next|Not|Nothing|Null|On|Option|Or|Private|Public|ReDim|Rem)\b/gi, output : '<a>$1</a>' }, 
+	{ input : /\b(Resume|Select|Set|Stop|Sub|Then|To|True|Until|Wend|While|With|Xor|Execute|Randomize|Erase|ExecuteGlobal|Explicit|step)\b/gi, output : '<a>$1</a>' }, 
+// Reserved Words 2 (Purple)	
+	{ input : /\b(Abandon|Abs|AbsolutePage|AbsolutePosition|ActiveCommand|ActiveConnection|ActualSize|AddHeader|AddNew|AppendChunk)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(AppendToLog|Application|Array|Asc|Atn|Attributes|BeginTrans|BinaryRead|BinaryWrite|BOF|Bookmark|Boolean|Buffer|Byte)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(CacheControl|CacheSize|Cancel|CancelBatch|CancelUpdate|CBool|CByte|CCur|CDate|CDbl|Charset|Chr|CInt|Clear)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(ClientCertificate|CLng|Clone|Close|CodePage|CommandText|CommandType|CommandTimeout|CommitTrans|CompareBookmarks|ConnectionString|ConnectionTimeout)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(Contents|ContentType|Cookies|Cos|CreateObject|CreateParameter|CSng|CStr|CursorLocation|CursorType|DataMember|DataSource|Date|DateAdd|DateDiff)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(DatePart|DateSerial|DateValue|Day|DefaultDatabase|DefinedSize|Delete|Description|Double|EditMode|Eof|EOF|err|Error)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(Exp|Expires|ExpiresAbsolute|Filter|Find|Fix|Flush|Form|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(GetChunk|GetLastError|GetRows|GetString|Global|HelpContext|HelpFile|Hex|Hour|HTMLEncode|IgnoreCase|Index|InStr|InStrRev)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(Int|Integer|IsArray|IsClientConnected|IsDate|IsolationLevel|Join|LBound|LCase|LCID|Left|Len|Lock|LockType|Log|Long|LTrim)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(MapPath|MarshalOptions|MaxRecords|Mid|Minute|Mode|Month|MonthName|Move|MoveFirst|MoveLast|MoveNext|MovePrevious|Name|NextRecordset)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(Now|Number|NumericScale|ObjectContext|Oct|Open|OpenSchema|OriginalValue|PageCount|PageSize|Pattern|PICS|Precision|Prepared|Property)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(Provider|QueryString|RecordCount|Redirect|RegExp|Remove|RemoveAll|Replace|Requery|Request|Response|Resync|Right|Rnd)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(RollbackTrans|RTrim|Save|ScriptTimeout|Second|Seek|Server|ServerVariables|Session|SessionID|SetAbort|SetComplete|Sgn)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(Sin|Size|Sort|Source|Space|Split|Sqr|State|StaticObjects|Status|StayInSync|StrComp|String|StrReverse|Supports|Tan|Time)\b/gi, output : '<u>$1</u>' },
+	{ input : /\b(Timeout|Timer|TimeSerial|TimeValue|TotalBytes|Transfer|Trim|Type|Type|UBound|UCase|UnderlyingValue|UnLock|Update|UpdateBatch)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(URLEncode|Value|Value|Version|Weekday|WeekdayName|Write|Year)\b/gi, output : '<u>$1</u>' }, 
+// Reserved Words 3 (Turquis)
+	{ input : /\b(vbBlack|vbRed|vbGreen|vbYellow|vbBlue|vbMagenta|vbCyan|vbWhite|vbBinaryCompare|vbTextCompare)\b/gi, output : '<i>$1</i>' }, 
+  	{ input : /\b(vbSunday|vbMonday|vbTuesday|vbWednesday|vbThursday|vbFriday|vbSaturday|vbUseSystemDayOfWeek)\b/gi, output : '<i>$1</i>' }, 
+	{ input : /\b(vbFirstJan1|vbFirstFourDays|vbFirstFullWeek|vbGeneralDate|vbLongDate|vbShortDate|vbLongTime|vbShortTime)\b/gi, output : '<i>$1</i>' }, 
+	{ input : /\b(vbObjectError|vbCr|VbCrLf|vbFormFeed|vbLf|vbNewLine|vbNullChar|vbNullString|vbTab|vbVerticalTab|vbUseDefault|vbTrue)\b/gi, output : '<i>$1</i>' }, 
+	{ input : /\b(vbFalse|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant)\b/gi, output : '<i>$1</i>' }, 
+	{ input : /\b(vbDataObject|vbDecimal|vbByte|vbArray)\b/gi, output : '<i>$1</i>' },
+// html comments
+	{ input : /(&lt;!--.*?--&gt.)/g, output : '<big>$1</big>' } 
+]
+
+Language.Functions = [ 
+  	// Output at index 0, must be the desired tagname surrounding a $1
+	// Name is the index from the regex that marks the functionname
+	{input : /(function|sub)([ ]*?)(\w+)([ ]*?\()/gi , output : '<ins>$1</ins>', name : '$3'}
+]
+
+Language.snippets = [
+//Conditional
+	{ input : 'if', output : 'If $0 Then\n\t\nEnd If' },
+	{ input : 'ifelse', output : 'If $0 Then\n\t\n\nElse\n\t\nEnd If' },
+	{ input : 'case', output : 'Select Case $0\n\tCase ?\n\tCase Else\nEnd Select'},
+//Response
+	{ input : 'rw', output : 'Response.Write( $0 )' },
+	{ input : 'resc', output : 'Response.Cookies( $0 )' },
+	{ input : 'resb', output : 'Response.Buffer'},
+	{ input : 'resflu', output : 'Response.Flush()'},
+	{ input : 'resend', output : 'Response.End'},
+//Request
+	{ input : 'reqc', output : 'Request.Cookies( $0 )' },
+	{ input : 'rq', output : 'Request.Querystring("$0")' },
+	{ input : 'rf', output : 'Request.Form("$0")' },
+//FSO
+	{ input : 'fso', output : 'Set fso = Server.CreateObject("Scripting.FileSystemObject")\n$0' },
+	{ input : 'setfo', output : 'Set fo = fso.getFolder($0)' },
+	{ input : 'setfi', output : 'Set fi = fso.getFile($0)' },
+	{ input : 'twr', output : 'Set f = fso.CreateTextFile($0,true)\'overwrite\nf.WriteLine()\nf.Close'},
+	{ input : 'tre', output : 'Set f = fso.OpenTextFile($0, 1)\nf.ReadAll\nf.Close'},
+//Server
+	{ input : 'mapp', output : 'Server.Mappath($0)' },
+//Loops
+	{ input : 'foreach', output : 'For Each $0 in ?\n\t\nNext' },
+	{ input : 'for', output : 'For $0 to ? step ?\n\t\nNext' },
+	{ input : 'do', output : 'Do While($0)\n\t\nLoop' },
+	{ input : 'untilrs', output : 'do until rs.eof\n\t\nrs.movenext\nloop' },
+//ADO
+	{ input : 'adorec', output : 'Set rs = Server.CreateObject("ADODB.Recordset")' },
+	{ input : 'adocon', output : 'Set Conn = Server.CreateObject("ADODB.Connection")' },
+	{ input : 'adostr', output : 'Set oStr = Server.CreateObject("ADODB.Stream")' },
+//Http Request
+	{ input : 'xmlhttp', output : 'Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")\nxmlHttp.open("GET", $0, false)\nxmlHttp.send()\n?=xmlHttp.responseText' },
+	{ input : 'xmldoc', output : 'Set xmldoc = Server.CreateObject("Microsoft.XMLDOM")\nxmldoc.async=false\nxmldoc.load(request)'},
+//Functions
+	{ input : 'func', output : 'Function $0()\n\t\n\nEnd Function'},
+	{ input : 'sub', output : 'Sub $0()\n\t\nEnd Sub'}
+
+]
+
+Language.complete = [
+	//{ input : '\'', output : '\'$0\'' },
+	{ input : '"', output : '"$0"' },
+	{ input : '(', output : '\($0\)' },
+	{ input : '[', output : '\[$0\]' },
+	{ input : '{', output : '{\n\t$0\n}' }		
+]
+
+Language.shortcuts = [
+	{ input : '[space]', output : '&nbsp;' },
+	{ input : '[enter]', output : '<br />' } ,
+	{ input : '[j]', output : 'testing' },
+	{ input : '[7]', output : '&amp;' }
+]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/autoit.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/autoit.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/autoit.css
new file mode 100644
index 0000000..953ed86
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/autoit.css
@@ -0,0 +1,13 @@
+/**
+ * CodePress color styles for AutoIt syntax highlighting
+ */
+
+u {font-style:normal;color:#000090;font-weight:bold;font-family:Monospace;}
+var {color:#AA0000;font-weight:bold;font-style:normal;}
+em {color:#FF33FF;}
+ins {color:#AC00A9;}
+i {color:#F000FF;}
+b {color:#FF0000;}
+a {color:#0080FF;font-weight:bold;}
+s, s u, s b {color:#9999CC;font-weight:normal;}
+cite, cite *{color:#009933;font-weight:normal;}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/autoit.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/autoit.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/autoit.js
new file mode 100644
index 0000000..c34ecc6
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/autoit.js
@@ -0,0 +1,32 @@
+/**
+ * CodePress regular expressions for AutoIt syntax highlighting
+ * @author: James Brooks, Michael HURNI
+ */ 
+ 
+// AutoIt 
+Language.syntax = [  
+    { input : /({|}|\(|\))/g, output : '<b>$1</b>' }, // Brackets
+	{ input : /(\*|\+|-)/g, output : '<b>$1</b>' }, // Operator
+	{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : "<s>\"$1$2</s>" }, // strings double 
+	{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single  
+	{ input : /\b([\d]+)\b/g, output : '<ins>$1</ins>' }, // Numbers 
+	{ input : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' }, // Directives and Includes 
+	{ input : /(\$[\w\.]*)/g, output : '<var>$1</var>' }, // vars
+	{ input : /(_[\w\.]*)/g, output : '<a>$1</a>' }, // underscored word
+	{ input : /(\@[\w\.]*)/g, output : '<em>$1</em>' }, // Macros
+	{ input : /\b(Abs|ACos|AdlibDisable|AdlibEnable|Asc|AscW|ASin|Assign|ATan|AutoItSetOption|AutoItWinGetTitle|AutoItWinSetTitle|Beep|Binary|BinaryLen|BinaryMid|BinaryToString|BitAND|BitNOT|BitOR|BitSHIFT|BitXOR|BlockInput|Break|Call|CDTray|Ceiling|Chr|ChrW|ClipGet|ClipPut|ConsoleRead|ConsoleWrite|ConsoleWriteError|ControlClick|ControlCommand|ControlDisable|ControlEnable|ControlFocus|ControlGetFocus|ControlGetHandle|ControlGetPos|ControlGetText|ControlHide|ControlListView|ControlMove|ControlSend|ControlSetText|ControlShow|Cos|Dec|DirCopy|DirCreate|DirGetSize|DirMove|DirRemove|DllCall|DllCall|DllClose|DllOpen|DllStructCreate|DllStructGetData|DllStructGetPtr|DllStructGetSize|DllStructSetData|DriveGetDrive|DriveGetFileSystem|DriveGetLabel|DriveGetSerial|DriveGetType|DriveMapAdd|DriveMapDel|DriveMapGet|DriveSetLabel|DriveSpaceFree|DriveSpaceTotal|DriveStatus|EnvGet|EnvSet|EnvUpdate|Eval|Execute|Exp|FileChangeDir|FileClose|FileCopy|FileCreateNTFS|FileCreateShortcut|FileDelete|FileExists|Fi
 leFindFirstFile|FileFindNextFile|FileGetAttrib|FileGetLongName|FileGetShortcut|FileGetShortName|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileOpen|FileOpenDialog|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileSaveDialog|FileSelectFolder|FileSetAttrib|FileSetTime|FileWrite|FileWriteLine|Floor|FtpSetProxy|GuiCreate|GuiCtrlCreateAvi|GuiCtrlCreateButton|GuiCtrlCreateCheckbox|GuiCtrlCreateCombo|GuiCtrlCreateContextMenu|GuiCtrlCreateDate|GuiCtrlCreateDummy|GuiCtrlCreateEdit|GuiCtrlCreateGraphic|GuiCtrlCreateGroup|GuiCtrlCreateIcon|GuiCtrlCreateInput|GuiCtrlCreateLabel|GuiCtrlCreateList|GuiCtrlCreateListView|GuiCtrlCreateListViewItem|GuiCtrlCreateMenu|GuiCtrlCreateMenuItem|GuiCtrlCreateMonthCal|GuiCtrlCreateObj|GuiCtrlCreatePic|GuiCtrlCreateProgress|GuiCtrlCreateRadio|GuiCtrlCreateSlider|GuiCtrlCreateTab|GuiCtrlCreateTabItem|GuiCtrlCreateUpdown|GuiCtrlDelete|GuiCtrlGetHandle|GuiCtrlGetState|GuiCtrlRead|GuiCtrlRecvMsg|GuiCtrlSentMsg|GuiCtrlSendToDummy|GuiCtrlSetBkC
 olor|GuiCtrlSetColor|GuiCtrlSetCursor|GuiCtrlSetData|GuiCtrlSetFont|GuiCtrlSetGraphic|GuiCtrlSetImage|GuiCtrlSetLimit|GuiCtrlSetOnEvent|GuiCtrlSetPos|GuiCtrlResizing|GuiCtrlSetState|GuiCtrlSetTip|GuiDelete|GuiGetCursorInfo|GuiGetMsg|GuiGetStyle|GuiRegisterMsg|GuiSetBkColor|GuiSetCoord|GuiSetCursor|GuiSetFont|GuiSetHelp|GuiSetIcon|GuiSetOnEvent|GuiSetStat|GuiSetStyle|GuiStartGroup|GuiSwitch|Hex|HotKeySet|HttpSetProxy|HWnd|InetGet|InetGetSize|IniDelete|IniRead|IniReadSection|IniReadSectionNames|IniRenameSection|IniWrite|IniWriteSection|InputBox|Int|IsAdmin|IsArray|IsBinary|IsBool|IsDeclared|IsDllStruct|IsFloat|IsHWnd|IsInt|IsKeyword|IsNumber|IsObj|IsString|Log|MemGetStats|Mod|MouseClick|MouseClickDrag|MouseDown|MouseGetCursor|MouseGetPos|MouseMove|MouseUp|MouseWheel|MsgBox|Number|ObjCreate|ObjEvent|ObjGet|ObjName|Ping|PixelCheckSum|PixelGetColor|PixelSearch|ProcessClose|ProcessExists|ProcessList|ProcessSetPriority|ProcessWait|ProcessWaitClose|ProgressOff|ProcessOn|ProgressSet|Random|R
 egDelete|RegEnumKey|RegEnumVal|RegRead|RegWrite|Round|Run|RunAsSet|RunWait|Send|SetError|SetExtended|ShellExecute|ShellExecuteWait|Shutdown|Sin|Sleep|SoundPlay|SoundSetWaveVolume|SplashImageOn|SplashOff|SplashTextOn|Sqrt|SRandom|StatusbarGetText|StderrRead|StdinWrite|StdoutRead|String|StringAddCR|StringCompare|StringFormat|StringInStr|StringIsAlNum|StringIsAlpha|StringIsASCII|StringIsDigit|StringIsFloat|StringIsInt|StringIsLower|StringIsSpace|StringIsUpper|StringIsXDigit|StringLeft|StringLen|StringLower|StringMid|StringRegExp|StringRegExpReplace|StringReplace|StringRight|StringSplit|StringStripCR|StringStripWS|StringToBinary|StringTrimLeft|StringTrimRight|StringUpper|Tan|TCPAccept|TCPCloseSocket|TCPConnect|TCPListen|TCPNameToIP|TCPrecv|TCPSend|TCPShutdown|TCPStartup|TimerDiff|TimerInit|ToolTip|TrayCreateItem|TrayCreateMenu|TrayGetMenu|TrayGetMsg|TrayItemDelete|TrayItemGetHandle|TrayItemGetState|TrayItemGetText|TrayItemSetOnEvent|TrayItemSetState|TrayItemSetText|TraySetClick|TraySetI
 con|TraySetOnEvent|TraySetPauseIcon|TraySetState|TraySetToolTip|TrayTip|UBound|UDPBind|UDPCloseSocket|UDPOpen|UDPRecv|UDPSend|WinActivate|WinActive|WinClose|WinExists|WinFlash|WinGetCaretPos|WinGetClassList|WinGetClientSize|WinGetHandle|WinGetPos|WinGetProcess|WinGetState|WinGetText|WinGetTitle|WinKill|WinList|WinMenuSelectItem|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinSetOnTop|WinSetState|WinSetTitle|WinSetTrans|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/g, output : '<u>$1</u>' } ,// reserved words
+	{ input : /\B;(.*?)(<br>|<\/P>)/g, output : '<cite>;$1</cite>$2' }, // comments 
+	{ input : /#CS(.*?)#CE/g, output : '<cite>#CS$1#CE</cite>' } // Block Comments
+] 
+ 
+Language.snippets = [] 
+ 
+Language.complete = [ 
+{ input : '\'',output : '\'$0\'' }, 
+{ input : '"', output : '"$0"' }, 
+{ input : '(', output : '\($0\)' }, 
+{ input : '[', output : '\[$0\]' }, 
+{ input : '{', output : '{\n\t$0\n}' } 
+] 
+ 
+Language.shortcuts = [] 

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/csharp.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/csharp.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/csharp.css
new file mode 100644
index 0000000..6415d65
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/csharp.css
@@ -0,0 +1,9 @@
+/*
+ * CodePress color styles for Java syntax highlighting
+ * By Edwin de Jonge
+ */
+
+b {color:#7F0055;font-weight:bold;font-style:normal;} /* reserved words */
+a {color:#2A0088;font-weight:bold;font-style:normal;} /* types */
+i, i b, i s {color:#3F7F5F;font-weight:bold;} /* comments */
+s, s b {color:#2A00FF;font-weight:normal;} /* strings */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/csharp.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/csharp.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/csharp.js
new file mode 100644
index 0000000..20fdd91
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/csharp.js
@@ -0,0 +1,25 @@
+/*
+ * CodePress regular expressions for C# syntax highlighting
+ * By Edwin de Jonge
+ */
+ 
+Language.syntax = [ // C#
+	{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
+	{ input : /\'(.?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote 
+	{ input : /\b(abstract|as|base|break|case|catch|checked|continue|default|delegate|do|else|event|explicit|extern|false|finally|fixed|for|foreach|get|goto|if|implicit|in|interface|internal|is|lock|namespace|new|null|object|operator|out|override|params|partial|private|protected|public|readonly|ref|return|set|sealed|sizeof|static|stackalloc|switch|this|throw|true|try|typeof|unchecked|unsafe|using|value|virtual|while)\b/g, output : '<b>$1</b>' }, // reserved words
+	{ input : /\b(bool|byte|char|class|double|float|int|interface|long|string|struct|void)\b/g, output : '<a>$1</a>' }, // types
+	{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //	
+	{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
+];
+
+Language.snippets = [];
+
+Language.complete = [ // Auto complete only for 1 character
+	{input : '\'',output : '\'$0\'' },
+	{input : '"', output : '"$0"' },
+	{input : '(', output : '\($0\)' },
+	{input : '[', output : '\[$0\]' },
+	{input : '{', output : '{\n\t$0\n}' }		
+];
+
+Language.shortcuts = [];
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/css.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/css.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/css.css
new file mode 100644
index 0000000..64778d2
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/css.css
@@ -0,0 +1,10 @@
+/*
+ * CodePress color styles for CSS syntax highlighting
+ */
+
+b, b a, b u {color:#000080;} /* tags, ids, classes */
+i, i b, i s, i a, i u {color:gray;} /* comments */
+s, s b {color:#a0a0dd;} /* parameters */
+a {color:#0000ff;} /* keys */
+u {color:red;} /* values */
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/css.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/css.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/css.js
new file mode 100644
index 0000000..00dcce0
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/css.js
@@ -0,0 +1,23 @@
+/*
+ * CodePress regular expressions for CSS syntax highlighting
+ */
+
+// CSS
+Language.syntax = [
+	{ input : /(.*?){(.*?)}/g,output : '<b>$1</b>{<u>$2</u>}' }, // tags, ids, classes, values
+	{ input : /([\w-]*?):([^\/])/g,output : '<a>$1</a>:$2' }, // keys
+	{ input : /\((.*?)\)/g,output : '(<s>$1</s>)' }, // parameters
+	{ input : /\/\*(.*?)\*\//g,output : '<i>/*$1*/</i>'} // comments
+]
+
+Language.snippets = []
+
+Language.complete = [
+	{ input : '\'',output : '\'$0\'' },
+	{ input : '"', output : '"$0"' },
+	{ input : '(', output : '\($0\)' },
+	{ input : '[', output : '\[$0\]' },
+	{ input : '{', output : '{\n\t$0\n}' }		
+]
+
+Language.shortcuts = []

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/generic.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/generic.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/generic.css
new file mode 100644
index 0000000..3d52b6b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/generic.css
@@ -0,0 +1,9 @@
+/*
+ * CodePress color styles for generic syntax highlighting
+ */
+
+b {color:#7F0055;font-weight:bold;} /* reserved words */
+u {color:darkblue;font-weight:bold;} /* special words */
+i, i b, i s, i u, i em {color:green;font-weight:normal;} /* comments */
+s, s b, s em {color:#2A00FF;font-weight:normal;} /* strings */
+em {font-weight:bold;} /* special chars */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/generic.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/generic.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/generic.js
new file mode 100644
index 0000000..8289da0
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/generic.js
@@ -0,0 +1,25 @@
+/*
+ * CodePress regular expressions for generic syntax highlighting
+ */
+ 
+// generic languages
+Language.syntax = [
+	{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
+	{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
+	{ input : /\b(abstract|continue|for|new|switch|default|goto|boolean|do|if|private|this|break|double|protected|throw|byte|else|import|public|throws|case|return|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|const|float|while|function|label)\b/g, output : '<b>$1</b>' }, // reserved words
+	{ input : /([\(\){}])/g, output : '<em>$1</em>' }, // special chars;
+	{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //
+	{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
+]
+
+Language.snippets = []
+
+Language.complete = [
+	{ input : '\'', output : '\'$0\'' },
+	{ input : '"', output : '"$0"' },
+	{ input : '(', output : '\($0\)' },
+	{ input : '[', output : '\[$0\]' },
+	{ input : '{', output : '{\n\t$0\n}' }		
+]
+
+Language.shortcuts = []

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/html.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/html.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/html.css
new file mode 100644
index 0000000..35617cb
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/html.css
@@ -0,0 +1,13 @@
+/*
+ * CodePress color styles for HTML syntax highlighting
+ */
+
+b {color:#000080;} /* tags */
+ins, ins b, ins s, ins em {color:gray;} /* comments */
+s, s b {color:#7777e4;} /* attribute values */
+a {color:green;} /* links */
+u {color:#E67300;} /* forms */
+big {color:#db0000;} /* images */
+em, em b {color:#800080;} /* style */
+strong {color:#800000;} /* script */
+tt i {color:darkblue;font-weight:bold;} /* script reserved words */

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/html.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/html.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/html.js
new file mode 100644
index 0000000..94469b4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/html.js
@@ -0,0 +1,59 @@
+/*
+ * CodePress regular expressions for HTML syntax highlighting
+ */
+
+// HTML
+Language.syntax = [
+	{ input : /(&lt;[^!]*?&gt;)/g, output : '<b>$1</b>'	}, // all tags
+	{ input : /(&lt;a .*?&gt;|&lt;\/a&gt;)/g, output : '<a>$1</a>' }, // links
+	{ input : /(&lt;img .*?&gt;)/g, output : '<big>$1</big>' }, // images
+	{ input : /(&lt;\/?(button|textarea|form|input|select|option|label).*?&gt;)/g, output : '<u>$1</u>' }, // forms
+	{ input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // style tags
+	{ input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g, output : '<strong>$1</strong><tt>$2</tt><strong>$3</strong>' }, // script tags
+	{ input : /=(".*?")/g, output : '=<s>$1</s>' }, // atributes double quote
+	{ input : /=('.*?')/g, output : '=<s>$1</s>' }, // atributes single quote
+	{ input : /(&lt;!--.*?--&gt.)/g, output : '<ins>$1</ins>' }, // comments 
+	{ input : /\b(alert|window|document|break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g, output : '<i>$1</i>' } // script reserved words 
+]
+
+Language.snippets = [
+	{ input : 'aref', output : '<a href="$0"></a>' },
+	{ input : 'h1', output : '<h1>$0</h1>' },
+	{ input : 'h2', output : '<h2>$0</h2>' },
+	{ input : 'h3', output : '<h3>$0</h3>' },
+	{ input : 'h4', output : '<h4>$0</h4>' },
+	{ input : 'h5', output : '<h5>$0</h5>' },
+	{ input : 'h6', output : '<h6>$0</h6>' },
+	{ input : 'html', output : '<html>\n\t$0\n</html>' },
+	{ input : 'head', output : '<head>\n\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\t<title>$0</title>\n\t\n</head>' },
+	{ input : 'img', output : '<img src="$0" alt="" />' },
+	{ input : 'input', output : '<input name="$0" id="" type="" value="" />' },
+	{ input : 'label', output : '<label for="$0"></label>' },
+	{ input : 'legend', output : '<legend>\n\t$0\n</legend>' },
+	{ input : 'link', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },		
+	{ input : 'base', output : '<base href="$0" />' }, 
+	{ input : 'body', output : '<body>\n\t$0\n</body>' }, 
+	{ input : 'css', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
+	{ input : 'div', output : '<div>\n\t$0\n</div>' },
+	{ input : 'divid', output : '<div id="$0">\n\t\n</div>' },
+	{ input : 'dl', output : '<dl>\n\t<dt>\n\t\t$0\n\t</dt>\n\t<dd></dd>\n</dl>' },
+	{ input : 'fieldset', output : '<fieldset>\n\t$0\n</fieldset>' },
+	{ input : 'form', output : '<form action="$0" method="" name="">\n\t\n</form>' },
+	{ input : 'meta', output : '<meta name="$0" content="" />' },
+	{ input : 'p', output : '<p>$0</p>' },
+	{ input : 'script', output : '<script type="text/javascript" language="javascript" charset="utf-8">\n\t$0\t\n</script>' },
+	{ input : 'scriptsrc', output : '<script src="$0" type="text/javascript" language="javascript" charset="utf-8"></script>' },
+	{ input : 'span', output : '<span>$0</span>' },
+	{ input : 'table', output : '<table border="$0" cellspacing="" cellpadding="">\n\t<tr><th></th></tr>\n\t<tr><td></td></tr>\n</table>' },
+	{ input : 'style', output : '<style type="text/css" media="screen">\n\t$0\n</style>' }
+]
+	
+Language.complete = [
+	{ input : '\'',output : '\'$0\'' },
+	{ input : '"', output : '"$0"' },
+	{ input : '(', output : '\($0\)' },
+	{ input : '[', output : '\[$0\]' },
+	{ input : '{', output : '{\n\t$0\n}' }		
+]
+
+Language.shortcuts = []

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/java.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/java.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/java.css
new file mode 100644
index 0000000..2339ded
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/java.css
@@ -0,0 +1,7 @@
+/*
+ * CodePress color styles for Java syntax highlighting
+ */
+
+b {color:#7F0055;font-weight:bold;font-style:normal;} /* reserved words */
+i, i b, i s {color:#3F7F5F;font-weight:bold;} /* comments */
+s, s b {color:#2A00FF;font-weight:normal;} /* strings */

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/java.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/java.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/java.js
new file mode 100644
index 0000000..61e9a06
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/java.js
@@ -0,0 +1,24 @@
+/*
+ * CodePress regular expressions for Java syntax highlighting
+ */
+ 
+// Java
+Language.syntax = [
+	{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>'}, // strings double quote
+	{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>'}, // strings single quote
+	{ input : /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/g, output : '<b>$1</b>'}, // reserved words
+	{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3'}, // comments //	
+	{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' }// comments /* */
+]
+
+Language.snippets = []
+
+Language.complete = [
+	{ input : '\'',output : '\'$0\'' },
+	{ input : '"', output : '"$0"' },
+	{ input : '(', output : '\($0\)' },
+	{ input : '[', output : '\[$0\]' },
+	{ input : '{', output : '{\n\t$0\n}' }		
+]
+
+Language.shortcuts = []

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/javascript.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/javascript.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/javascript.css
new file mode 100644
index 0000000..8cb9092
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/javascript.css
@@ -0,0 +1,8 @@
+/*
+ * CodePress color styles for JavaScript syntax highlighting
+ */
+
+b {color:#7F0055;font-weight:bold;} /* reserved words */
+u {color:darkblue;font-weight:bold;} /* special words */
+i, i b, i s, i u {color:green;font-weight:normal;} /* comments */
+s, s b, s u {color:#2A00FF;font-weight:normal;} /* strings */

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/javascript.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/javascript.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/javascript.js
new file mode 100644
index 0000000..08cdea4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/javascript.js
@@ -0,0 +1,30 @@
+/*
+ * CodePress regular expressions for JavaScript syntax highlighting
+ */
+ 
+// JavaScript
+Language.syntax = [ 
+	{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
+	{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
+	{ input : /\b(break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g, output : '<b>$1</b>' }, // reserved words
+	{ input : /\b(alert|isNaN|parent|Array|parseFloat|parseInt|blur|clearTimeout|prompt|prototype|close|confirm|length|Date|location|Math|document|element|name|self|elements|setTimeout|navigator|status|String|escape|Number|submit|eval|Object|event|onblur|focus|onerror|onfocus|onclick|top|onload|toString|onunload|unescape|open|valueOf|window|onmouseover)\b/g, output : '<u>$1</u>' }, // special words
+	{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //
+	{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
+]
+
+Language.snippets = [
+	{ input : 'dw', output : 'document.write(\'$0\');' },
+	{ input : 'getid', output : 'document.getElementById(\'$0\')' },
+	{ input : 'fun', output : 'function $0(){\n\t\n}' },
+	{ input : 'func', output : 'function $0(){\n\t\n}' }
+]
+
+Language.complete = [
+	{ input : '\'',output : '\'$0\'' },
+	{ input : '"', output : '"$0"' },
+	{ input : '(', output : '\($0\)' },
+	{ input : '[', output : '\[$0\]' },
+	{ input : '{', output : '{\n\t$0\n}' }		
+]
+
+Language.shortcuts = []

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/perl.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/perl.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/perl.css
new file mode 100644
index 0000000..d9bce85
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/perl.css
@@ -0,0 +1,11 @@
+/*
+ * CodePress color styles for Perl syntax highlighting
+ * By J. Nick Koston
+ */
+
+b {color:#7F0055;font-weight:bold;} /* reserved words */
+i, i b, i s, i em, i a, i u {color:gray;font-weight:normal;} /* comments */
+s, s b, s a, s em, s u {color:#2A00FF;font-weight:normal;} /* strings */
+a {color:#006700;font-weight:bold;} /* variables */
+em {color:darkblue;font-weight:bold;} /* functions */
+u {font-weight:bold;} /* special chars */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/perl.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/perl.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/perl.js
new file mode 100644
index 0000000..5026e5d
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/perl.js
@@ -0,0 +1,27 @@
+/*
+ * CodePress regular expressions for Perl syntax highlighting
+ * By J. Nick Koston
+ */
+
+// Perl
+Language.syntax = [ 
+	{ input  : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
+	{ input  : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
+	{ input  : /([\$\@\%][\w\.]*)/g, output : '<a>$1</a>' }, // vars
+	{ input  : /(sub\s+)([\w\.]*)/g, output : '$1<em>$2</em>' }, // functions
+	{ input  : /\b(abs|accept|alarm|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|connect|continue|cos|crypt|dbmclose|dbmopen|defined|delete|die|do|dump|each|else|elsif|endgrent|endhostent|endnetent|endprotoent|endpwent|eof|eval|exec|exists|exit|fcntl|fileno|find|flock|for|foreach|fork|format|formlinegetc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyaddr|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|goto|grep|hex|hostname|if|import|index|int|ioctl|join|keys|kill|last|lc|lcfirst|length|link|listen|LoadExternals|local|localtime|log|lstat|map|mkdir|msgctl|msgget|msgrcv|msgsnd|my|next|no|oct|open|opendir|ordpack|package|pipe|pop|pos|print|printf|push|pwd|qq|quotemeta|qw|rand|read|readdir|readlink|recv|redo|ref|rename|require|reset|return|r
 everse|rewinddir|rindex|rmdir|scalar|seek|seekdir|select|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|stty|study|sub|substr|symlink|syscall|sysopen|sysread|system|syswritetell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unless|unlink|until|unpack|unshift|untie|use|utime|values|vec|waitpid|wantarray|warn|while|write)\b/g, output : '<b>$1</b>' }, // reserved words
+	{ input  : /([\(\){}])/g, output : '<u>$1</u>' }, // special chars
+	{ input  : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' } // comments
+]
+
+Language.snippets = []
+
+Language.complete = [
+	{ input : '\'',output : '\'$0\'' },
+	{ input : '"', output : '"$0"' },
+	{ input : '(', output : '\($0\)' },
+	{ input : '[', output : '\[$0\]' },
+	{ input : '{', output : '{\n\t$0\n}' }		
+]
+
+Language.shortcuts = []

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/php.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/php.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/php.css
new file mode 100644
index 0000000..b20a35c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/php.css
@@ -0,0 +1,12 @@
+/*
+ * CodePress color styles for PHP syntax highlighting
+ */
+
+b {color:#000080;} /* tags */
+big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {color:gray;font-weight:normal;} /* comments */
+s, s b, strong s u, strong s cite {color:#5656fa;font-weight:normal;} /* attributes and strings */
+strong a, strong a u {color:#006700;font-weight:bold;} /* variables */
+em {color:#800080;font-style:normal;} /* style */
+ins {color:#800000;} /* script */
+strong u {color:#7F0055;font-weight:bold;} /* reserved words */
+cite, s cite {color:red;font-weight:bold;} /* <?php and ?> */

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/php.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/php.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/php.js
new file mode 100644
index 0000000..c7640ba
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/php.js
@@ -0,0 +1,61 @@
+/*
+ * CodePress regular expressions for PHP syntax highlighting
+ */
+
+// PHP
+Language.syntax = [
+	{ input : /(&lt;[^!\?]*?&gt;)/g, output : '<b>$1</b>' }, // all tags
+	{ input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // style tags
+	{ input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' }, // script tags
+	{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
+	{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>'}, // strings single quote
+	{ input : /(&lt;\?)/g, output : '<strong>$1' }, // <?.*
+	{ input : /(\?&gt;)/g, output : '$1</strong>' }, // .*?>
+	{ input : /(&lt;\?php|&lt;\?=|&lt;\?|\?&gt;)/g, output : '<cite>$1</cite>' }, // php tags
+	{ input : /(\$[\w\.]*)/g, output : '<a>$1</a>' }, // vars
+	{ input : /\b(false|true|and|or|xor|__FILE__|exception|__LINE__|array|as|break|case|class|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|for|foreach|function|global|if|include|include_once|isset|list|new|print|require|require_once|return|static|switch|unset|use|while|__FUNCTION__|__CLASS__|__METHOD__|final|php_user_filter|interface|implements|extends|public|private|protected|abstract|clone|try|catch|throw|this)\b/g, output : '<u>$1</u>' }, // reserved words
+	{ input : /([^:])\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // php comments //
+	{ input : /([^:])#(.*?)(<br|<\/P)/g, output : '$1<i>#$2</i>$3' }, // php comments #
+	{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' }, // php comments /* */
+	{ input : /(&lt;!--.*?--&gt.)/g, output : '<big>$1</big>' } // html comments
+]
+
+Language.snippets = [
+	{ input : 'if', output : 'if($0){\n\t\n}' },
+	{ input : 'ifelse', output : 'if($0){\n\t\n}\nelse{\n\t\n}' },
+	{ input : 'else', output : '}\nelse {\n\t' },
+	{ input : 'elseif', output : '}\nelseif($0) {\n\t' },
+	{ input : 'do', output : 'do{\n\t$0\n}\nwhile();' },
+	{ input : 'inc', output : 'include_once("$0");' },
+	{ input : 'fun', output : 'function $0(){\n\t\n}' },	
+	{ input : 'func', output : 'function $0(){\n\t\n}' },	
+	{ input : 'while', output : 'while($0){\n\t\n}' },
+	{ input : 'for', output : 'for($0,,){\n\t\n}' },
+	{ input : 'fore', output : 'foreach($0 as ){\n\t\n}' },
+	{ input : 'foreach', output : 'foreach($0 as ){\n\t\n}' },
+	{ input : 'echo', output : 'echo \'$0\';' },
+	{ input : 'switch', output : 'switch($0) {\n\tcase "": break;\n\tdefault: ;\n}' },
+	{ input : 'case', output : 'case "$0" : break;' },
+	{ input : 'ret0', output : 'return false;' },
+	{ input : 'retf', output : 'return false;' },
+	{ input : 'ret1', output : 'return true;' },
+	{ input : 'rett', output : 'return true;' },
+	{ input : 'ret', output : 'return $0;' },
+	{ input : 'def', output : 'define(\'$0\',\'\');' },
+	{ input : '<?', output : 'php\n$0\n?>' }
+]
+
+Language.complete = [
+	{ input : '\'', output : '\'$0\'' },
+	{ input : '"', output : '"$0"' },
+	{ input : '(', output : '\($0\)' },
+	{ input : '[', output : '\[$0\]' },
+	{ input : '{', output : '{\n\t$0\n}' }		
+]
+
+Language.shortcuts = [
+	{ input : '[space]', output : '&nbsp;' },
+	{ input : '[enter]', output : '<br />' } ,
+	{ input : '[j]', output : 'testing' },
+	{ input : '[7]', output : '&amp;' }
+]
\ No newline at end of file


[27/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/all.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/all.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/all.js
new file mode 100644
index 0000000..e7b5a00
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/all.js
@@ -0,0 +1,4474 @@
+/*  Prototype JavaScript framework, version 1.5.0
+ *  (c) 2005-2007 Sam Stephenson
+ *
+ *  Prototype is freely distributable under the terms of an MIT-style license.
+ *  For details, see the Prototype web site: http://prototype.conio.net/
+ *
+/*--------------------------------------------------------------------------*/
+
+var Prototype = {
+  Version: '1.5.0',
+  BrowserFeatures: {
+    XPath: !!document.evaluate
+  },
+
+  ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
+  emptyFunction: function() {},
+  K: function(x) { return x }
+}
+
+var Class = {
+  create: function() {
+    return function() {
+      this.initialize.apply(this, arguments);
+    }
+  }
+}
+
+var $A = Array.from = function(iterable) {
+  if (!iterable) return [];
+  if (iterable.toArray) {
+    return iterable.toArray();
+  } else {
+    var results = [];
+    for (var i = 0, length = iterable.length; i < length; i++)
+      results.push(iterable[i]);
+    return results;
+  }
+}
+
+
+var Abstract = new Object();
+
+Object.extend = function(destination, source) {
+  for (var property in source) {
+    destination[property] = source[property];
+  }
+  return destination;
+}
+
+Object.extend(Object, {
+  inspect: function(object) {
+    try {
+      if (object === undefined) return 'undefined';
+      if (object === null) return 'null';
+      return object.inspect ? object.inspect() : object.toString();
+    } catch (e) {
+      if (e instanceof RangeError) return '...';
+      throw e;
+    }
+  },
+
+  keys: function(object) {
+    var keys = [];
+    for (var property in object)
+      keys.push(property);
+    return keys;
+  },
+
+  values: function(object) {
+    var values = [];
+    for (var property in object)
+      values.push(object[property]);
+    return values;
+  },
+
+  clone: function(object) {
+    return Object.extend({}, object);
+  }
+});
+
+Function.prototype.bind = function() {
+  var __method = this, args = $A(arguments), object = args.shift();
+  return function() {
+  	if (typeof $A == "function")
+    return __method.apply(object, args.concat($A(arguments)));
+  }
+}
+
+Function.prototype.bindAsEventListener = function(object) {
+  var __method = this, args = $A(arguments), object = args.shift();
+  return function(event) {
+
+  	if (typeof $A == "function")
+    return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments)));
+  }
+}
+
+Object.extend(Number.prototype, {
+  toColorPart: function() {
+    var digits = this.toString(16);
+    if (this < 16) return '0' + digits;
+    return digits;
+  },
+
+  succ: function() {
+    return this + 1;
+  },
+
+  times: function(iterator) {
+    $R(0, this, true).each(iterator);
+    return this;
+  }
+});
+
+var Try = {
+  these: function() {
+    var returnValue;
+
+    for (var i = 0, length = arguments.length; i < length; i++) {
+      var lambda = arguments[i];
+      try {
+        returnValue = lambda();
+        break;
+      } catch (e) {}
+    }
+
+    return returnValue;
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var PeriodicalExecuter = Class.create();
+PeriodicalExecuter.prototype = {
+  initialize: function(callback, frequency) {
+    this.callback = callback;
+    this.frequency = frequency;
+    this.currentlyExecuting = false;
+
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  stop: function() {
+    if (!this.timer) return;
+    clearInterval(this.timer);
+    this.timer = null;
+  },
+
+  onTimerEvent: function() {
+    if (!this.currentlyExecuting) {
+      try {
+        this.currentlyExecuting = true;
+        this.callback(this);
+      } finally {
+        this.currentlyExecuting = false;
+      }
+    }
+  }
+}
+String.interpret = function(value){
+  return value == null ? '' : String(value);
+}
+
+Object.extend(String.prototype, {
+  gsub: function(pattern, replacement) {
+    var result = '', source = this, match;
+    replacement = arguments.callee.prepareReplacement(replacement);
+
+    while (source.length > 0) {
+      if (match = source.match(pattern)) {
+        result += source.slice(0, match.index);
+        result += String.interpret(replacement(match));
+        source  = source.slice(match.index + match[0].length);
+      } else {
+        result += source, source = '';
+      }
+    }
+    return result;
+  },
+
+  sub: function(pattern, replacement, count) {
+    replacement = this.gsub.prepareReplacement(replacement);
+    count = count === undefined ? 1 : count;
+
+    return this.gsub(pattern, function(match) {
+      if (--count < 0) return match[0];
+      return replacement(match);
+    });
+  },
+
+  scan: function(pattern, iterator) {
+    this.gsub(pattern, iterator);
+    return this;
+  },
+
+  truncate: function(length, truncation) {
+    length = length || 30;
+    truncation = truncation === undefined ? '...' : truncation;
+    return this.length > length ?
+      this.slice(0, length - truncation.length) + truncation : this;
+  },
+
+  strip: function() {
+    return this.replace(/^\s+/, '').replace(/\s+$/, '');
+  },
+
+  stripTags: function() {
+    return this.replace(/<\/?[^>]+>/gi, '');
+  },
+
+  stripScripts: function() {
+    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+  },
+
+  extractScripts: function() {
+    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+    return (this.match(matchAll) || []).map(function(scriptTag) {
+      return (scriptTag.match(matchOne) || ['', ''])[1];
+    });
+  },
+
+  evalScripts: function() {
+    return this.extractScripts().map(function(script) { return eval(script) });
+  },
+
+  escapeHTML: function() {
+    var div = document.createElement('div');
+    var text = document.createTextNode(this);
+    div.appendChild(text);
+    return div.innerHTML;
+  },
+
+  unescapeHTML: function() {
+    var div = document.createElement('div');
+    div.innerHTML = this.stripTags();
+    return div.childNodes[0] ? (div.childNodes.length > 1 ?
+      $A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) :
+      div.childNodes[0].nodeValue) : '';
+  },
+
+  toQueryParams: function(separator) {
+    var match = this.strip().match(/([^?#]*)(#.*)?$/);
+    if (!match) return {};
+
+    return match[1].split(separator || '&').inject({}, function(hash, pair) {
+      if ((pair = pair.split('='))[0]) {
+        var name = decodeURIComponent(pair[0]);
+        var value = pair[1] ? decodeURIComponent(pair[1]) : undefined;
+
+        if (hash[name] !== undefined) {
+          if (hash[name].constructor != Array)
+            hash[name] = [hash[name]];
+          if (value) hash[name].push(value);
+        }
+        else hash[name] = value;
+      }
+      return hash;
+    });
+  },
+
+  toArray: function() {
+    return this.split('');
+  },
+
+  succ: function() {
+    return this.slice(0, this.length - 1) +
+      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
+  },
+
+  camelize: function() {
+    var parts = this.split('-'), len = parts.length;
+    if (len == 1) return parts[0];
+
+    var camelized = this.charAt(0) == '-'
+      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
+      : parts[0];
+
+    for (var i = 1; i < len; i++)
+      camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
+
+    return camelized;
+  },
+
+  capitalize: function(){
+    return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
+  },
+
+  underscore: function() {
+    return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
+  },
+
+  dasherize: function() {
+    return this.gsub(/_/,'-');
+  },
+
+  inspect: function(useDoubleQuotes) {
+    var escapedString = this.replace(/\\/g, '\\\\');
+    if (useDoubleQuotes)
+      return '"' + escapedString.replace(/"/g, '\\"') + '"';
+    else
+      return "'" + escapedString.replace(/'/g, '\\\'') + "'";
+  }
+});
+
+String.prototype.gsub.prepareReplacement = function(replacement) {
+  if (typeof replacement == 'function') return replacement;
+  var template = new Template(replacement);
+  return function(match) { return template.evaluate(match) };
+}
+
+String.prototype.parseQuery = String.prototype.toQueryParams;
+
+var Template = Class.create();
+Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
+Template.prototype = {
+  initialize: function(template, pattern) {
+    this.template = template.toString();
+    this.pattern  = pattern || Template.Pattern;
+  },
+
+  evaluate: function(object) {
+    return this.template.gsub(this.pattern, function(match) {
+      var before = match[1];
+      if (before == '\\') return match[2];
+      return before + String.interpret(object[match[3]]);
+    });
+  }
+}
+
+var $break    = new Object();
+var $continue = new Object();
+
+var Enumerable = {
+  each: function(iterator) {
+    var index = 0;
+    try {
+      this._each(function(value) {
+        try {
+          iterator(value, index++);
+        } catch (e) {
+          if (e != $continue) throw e;
+        }
+      });
+    } catch (e) {
+      if (e != $break) throw e;
+    }
+    return this;
+  },
+
+  eachSlice: function(number, iterator) {
+    var index = -number, slices = [], array = this.toArray();
+    while ((index += number) < array.length)
+      slices.push(array.slice(index, index+number));
+    return slices.map(iterator);
+  },
+
+  all: function(iterator) {
+    var result = true;
+    this.each(function(value, index) {
+      result = result && !!(iterator || Prototype.K)(value, index);
+      if (!result) throw $break;
+    });
+    return result;
+  },
+
+  any: function(iterator) {
+    var result = false;
+    this.each(function(value, index) {
+      if (result = !!(iterator || Prototype.K)(value, index))
+        throw $break;
+    });
+    return result;
+  },
+
+  collect: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push((iterator || Prototype.K)(value, index));
+    });
+    return results;
+  },
+
+  detect: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      if (iterator(value, index)) {
+        result = value;
+        throw $break;
+      }
+    });
+    return result;
+  },
+
+  findAll: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  grep: function(pattern, iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      var stringValue = value.toString();
+      if (stringValue.match(pattern))
+        results.push((iterator || Prototype.K)(value, index));
+    })
+    return results;
+  },
+
+  include: function(object) {
+    var found = false;
+    this.each(function(value) {
+      if (value == object) {
+        found = true;
+        throw $break;
+      }
+    });
+    return found;
+  },
+
+  inGroupsOf: function(number, fillWith) {
+    fillWith = fillWith === undefined ? null : fillWith;
+    return this.eachSlice(number, function(slice) {
+      while(slice.length < number) slice.push(fillWith);
+      return slice;
+    });
+  },
+
+  inject: function(memo, iterator) {
+    this.each(function(value, index) {
+      memo = iterator(memo, value, index);
+    });
+    return memo;
+  },
+
+  invoke: function(method) {
+    var args = $A(arguments).slice(1);
+    return this.map(function(value) {
+      return value[method].apply(value, args);
+    });
+  },
+
+  max: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (result == undefined || value >= result)
+        result = value;
+    });
+    return result;
+  },
+
+  min: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (result == undefined || value < result)
+        result = value;
+    });
+    return result;
+  },
+
+  partition: function(iterator) {
+    var trues = [], falses = [];
+    this.each(function(value, index) {
+      ((iterator || Prototype.K)(value, index) ?
+        trues : falses).push(value);
+    });
+    return [trues, falses];
+  },
+
+  pluck: function(property) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push(value[property]);
+    });
+    return results;
+  },
+
+  reject: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (!iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  sortBy: function(iterator) {
+    return this.map(function(value, index) {
+      return {value: value, criteria: iterator(value, index)};
+    }).sort(function(left, right) {
+      var a = left.criteria, b = right.criteria;
+      return a < b ? -1 : a > b ? 1 : 0;
+    }).pluck('value');
+  },
+
+  toArray: function() {
+    return this.map();
+  },
+
+  zip: function() {
+    var iterator = Prototype.K, args = $A(arguments);
+    if (typeof args.last() == 'function')
+      iterator = args.pop();
+
+    var collections = [this].concat(args).map($A);
+    return this.map(function(value, index) {
+      return iterator(collections.pluck(index));
+    });
+  },
+
+  size: function() {
+    return this.toArray().length;
+  },
+
+  inspect: function() {
+    return '#<Enumerable:' + this.toArray().inspect() + '>';
+  }
+}
+
+Object.extend(Enumerable, {
+  map:     Enumerable.collect,
+  find:    Enumerable.detect,
+  select:  Enumerable.findAll,
+  member:  Enumerable.include,
+  entries: Enumerable.toArray
+});
+
+Object.extend(Array.prototype, Enumerable);
+
+if (!Array.prototype._reverse)
+  Array.prototype._reverse = Array.prototype.reverse;
+
+Object.extend(Array.prototype, {
+  _each: function(iterator) {
+    for (var i = 0, length = this.length; i < length; i++)
+      iterator(this[i]);
+  },
+
+  clear: function() {
+    this.length = 0;
+    return this;
+  },
+
+  first: function() {
+    return this[0];
+  },
+
+  last: function() {
+    return this[this.length - 1];
+  },
+
+  compact: function() {
+    return this.select(function(value) {
+      return value != null;
+    });
+  },
+
+  flatten: function() {
+    return this.inject([], function(array, value) {
+      return array.concat(value && value.constructor == Array ?
+        value.flatten() : [value]);
+    });
+  },
+
+  without: function() {
+    var values = $A(arguments);
+    return this.select(function(value) {
+      return !values.include(value);
+    });
+  },
+
+  indexOf: function(object) {
+    for (var i = 0, length = this.length; i < length; i++)
+      if (this[i] == object) return i;
+    return -1;
+  },
+
+  reverse: function(inline) {
+    return (inline !== false ? this : this.toArray())._reverse();
+  },
+
+  reduce: function() {
+    return this.length > 1 ? this : this[0];
+  },
+
+  uniq: function() {
+    return this.inject([], function(array, value) {
+      return array.include(value) ? array : array.concat([value]);
+    });
+  },
+
+  clone: function() {
+    return [].concat(this);
+  },
+
+  size: function() {
+    return this.length;
+  },
+
+  inspect: function() {
+    return '[' + this.map(Object.inspect).join(', ') + ']';
+  }
+});
+
+Array.prototype.toArray = Array.prototype.clone;
+
+function $w(string){
+  string = string.strip();
+  return string ? string.split(/\s+/) : [];
+}
+
+if(window.opera){
+  Array.prototype.concat = function(){
+    var array = [];
+    for(var i = 0, length = this.length; i < length; i++) array.push(this[i]);
+    for(var i = 0, length = arguments.length; i < length; i++) {
+      if(arguments[i].constructor == Array) {
+        for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
+          array.push(arguments[i][j]);
+      } else {
+        array.push(arguments[i]);
+      }
+    }
+    return array;
+  }
+}
+var Hash = function(obj) {
+  Object.extend(this, obj || {});
+};
+
+Object.extend(Hash, {
+  toQueryString: function(obj) {
+    var parts = [];
+
+	  this.prototype._each.call(obj, function(pair) {
+      if (!pair.key) return;
+
+      if (pair.value && pair.value.constructor == Array) {
+        var values = pair.value.compact();
+        if (values.length < 2) pair.value = values.reduce();
+        else {
+        	key = encodeURIComponent(pair.key);
+          values.each(function(value) {
+            value = value != undefined ? encodeURIComponent(value) : '';
+            parts.push(key + '=' + encodeURIComponent(value));
+          });
+          return;
+        }
+      }
+      if (pair.value == undefined) pair[1] = '';
+      parts.push(pair.map(encodeURIComponent).join('='));
+	  });
+
+    return parts.join('&');
+  }
+});
+
+Object.extend(Hash.prototype, Enumerable);
+Object.extend(Hash.prototype, {
+  _each: function(iterator) {
+    for (var key in this) {
+      var value = this[key];
+      if (value && value == Hash.prototype[key]) continue;
+
+      var pair = [key, value];
+      pair.key = key;
+      pair.value = value;
+      iterator(pair);
+    }
+  },
+
+  keys: function() {
+    return this.pluck('key');
+  },
+
+  values: function() {
+    return this.pluck('value');
+  },
+
+  merge: function(hash) {
+    return $H(hash).inject(this, function(mergedHash, pair) {
+      mergedHash[pair.key] = pair.value;
+      return mergedHash;
+    });
+  },
+
+  remove: function() {
+    var result;
+    for(var i = 0, length = arguments.length; i < length; i++) {
+      var value = this[arguments[i]];
+      if (value !== undefined){
+        if (result === undefined) result = value;
+        else {
+          if (result.constructor != Array) result = [result];
+          result.push(value)
+        }
+      }
+      delete this[arguments[i]];
+    }
+    return result;
+  },
+
+  toQueryString: function() {
+    return Hash.toQueryString(this);
+  },
+
+  inspect: function() {
+    return '#<Hash:{' + this.map(function(pair) {
+      return pair.map(Object.inspect).join(': ');
+    }).join(', ') + '}>';
+  }
+});
+
+function $H(object) {
+  if (object && object.constructor == Hash) return object;
+  return new Hash(object);
+};
+ObjectRange = Class.create();
+Object.extend(ObjectRange.prototype, Enumerable);
+Object.extend(ObjectRange.prototype, {
+  initialize: function(start, end, exclusive) {
+    this.start = start;
+    this.end = end;
+    this.exclusive = exclusive;
+  },
+
+  _each: function(iterator) {
+    var value = this.start;
+    while (this.include(value)) {
+      iterator(value);
+      value = value.succ();
+    }
+  },
+
+  include: function(value) {
+    if (value < this.start)
+      return false;
+    if (this.exclusive)
+      return value < this.end;
+    return value <= this.end;
+  }
+});
+
+var $R = function(start, end, exclusive) {
+  return new ObjectRange(start, end, exclusive);
+}
+
+var Ajax = {
+  getTransport: function() {
+    return Try.these(
+      function() {return new XMLHttpRequest()},
+      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+      function() {return new ActiveXObject('Microsoft.XMLHTTP')}
+    ) || false;
+  },
+
+  activeRequestCount: 0
+}
+
+Ajax.Responders = {
+  responders: [],
+
+  _each: function(iterator) {
+    this.responders._each(iterator);
+  },
+
+  register: function(responder) {
+    if (!this.include(responder))
+      this.responders.push(responder);
+  },
+
+  unregister: function(responder) {
+    this.responders = this.responders.without(responder);
+  },
+
+  dispatch: function(callback, request, transport, json) {
+    this.each(function(responder) {
+      if (typeof responder[callback] == 'function') {
+        try {
+          responder[callback].apply(responder, [request, transport, json]);
+        } catch (e) {}
+      }
+    });
+  }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+  onCreate: function() {
+    Ajax.activeRequestCount++;
+  },
+  onComplete: function() {
+    Ajax.activeRequestCount--;
+  }
+});
+
+Ajax.Base = function() {};
+Ajax.Base.prototype = {
+  setOptions: function(options) {
+    this.options = {
+      method:       'post',
+      asynchronous: true,
+      contentType:  'application/x-www-form-urlencoded',
+      encoding:     'UTF-8',
+      parameters:   ''
+    }
+    Object.extend(this.options, options || {});
+
+    this.options.method = this.options.method.toLowerCase();
+    if (typeof this.options.parameters == 'string')
+      this.options.parameters = this.options.parameters.toQueryParams();
+  }
+}
+
+Ajax.Request = Class.create();
+Ajax.Request.Events =
+  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
+  _complete: false,
+
+  initialize: function(url, options) {
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+    this.request(url);
+  },
+
+  request: function(url) {
+    this.url = url;
+    this.method = this.options.method;
+    var params = this.options.parameters;
+
+    if (!['get', 'post'].include(this.method)) {
+      // simulate other verbs over post
+      params['_method'] = this.method;
+      this.method = 'post';
+    }
+
+    params = Hash.toQueryString(params);
+    if (params && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_='
+
+    // when GET, append parameters to URL
+    if (this.method == 'get' && params)
+      this.url += (this.url.indexOf('?') > -1 ? '&' : '?') + params;
+
+    try {
+      Ajax.Responders.dispatch('onCreate', this, this.transport);
+
+      this.transport.open(this.method.toUpperCase(), this.url,
+        this.options.asynchronous);
+
+      if (this.options.asynchronous)
+        setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);
+
+      this.transport.onreadystatechange = this.onStateChange.bind(this);
+      this.setRequestHeaders();
+
+      var body = this.method == 'post' ? (this.options.postBody || params) : null;
+
+      this.transport.send(body);
+
+      /* Force Firefox to handle ready state 4 for synchronous requests */
+      if (!this.options.asynchronous && this.transport.overrideMimeType)
+        this.onStateChange();
+
+    }
+    catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  onStateChange: function() {
+    var readyState = this.transport.readyState;
+    if (readyState > 1 && !((readyState == 4) && this._complete))
+      this.respondToReadyState(this.transport.readyState);
+  },
+
+  setRequestHeaders: function() {
+    var headers = {
+      'X-Requested-With': 'XMLHttpRequest',
+      'X-Prototype-Version': Prototype.Version,
+      'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
+    };
+
+    if (this.method == 'post') {
+      headers['Content-type'] = this.options.contentType +
+        (this.options.encoding ? '; charset=' + this.options.encoding : '');
+
+      /* Force "Connection: close" for older Mozilla browsers to work
+       * around a bug where XMLHttpRequest sends an incorrect
+       * Content-length header. See Mozilla Bugzilla #246651.
+       */
+      if (this.transport.overrideMimeType &&
+          (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
+            headers['Connection'] = 'close';
+    }
+
+    // user-defined headers
+    if (typeof this.options.requestHeaders == 'object') {
+      var extras = this.options.requestHeaders;
+
+      if (typeof extras.push == 'function')
+        for (var i = 0, length = extras.length; i < length; i += 2)
+          headers[extras[i]] = extras[i+1];
+      else
+        $H(extras).each(function(pair) { headers[pair.key] = pair.value });
+    }
+
+    for (var name in headers)
+      this.transport.setRequestHeader(name, headers[name]);
+  },
+
+  success: function() {
+    return !this.transport.status
+        || (this.transport.status >= 200 && this.transport.status < 300);
+  },
+
+  respondToReadyState: function(readyState) {
+    var state = Ajax.Request.Events[readyState];
+    var transport = this.transport, json = this.evalJSON();
+
+    if (state == 'Complete') {
+      try {
+        this._complete = true;
+        (this.options['on' + this.transport.status]
+         || this.options['on' + (this.success() ? 'Success' : 'Failure')]
+         || Prototype.emptyFunction)(transport, json);
+      } catch (e) {
+        this.dispatchException(e);
+      }
+
+      if ((this.getHeader('Content-type') || 'text/javascript').strip().
+        match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))
+          this.evalResponse();
+    }
+
+    try {
+      (this.options['on' + state] || Prototype.emptyFunction)(transport, json);
+      Ajax.Responders.dispatch('on' + state, this, transport, json);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+
+    if (state == 'Complete') {
+      // avoid memory leak in MSIE: clean up
+      this.transport.onreadystatechange = Prototype.emptyFunction;
+    }
+  },
+
+  getHeader: function(name) {
+    try {
+      return this.transport.getResponseHeader(name);
+    } catch (e) { return null }
+  },
+
+  evalJSON: function() {
+    try {
+      var json = this.getHeader('X-JSON');
+      return json ? eval('(' + json + ')') : null;
+    } catch (e) { return null }
+  },
+
+  evalResponse: function() {
+    try {
+      return eval(this.transport.responseText);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  dispatchException: function(exception) {
+    (this.options.onException || Prototype.emptyFunction)(this, exception);
+    Ajax.Responders.dispatch('onException', this, exception);
+  }
+});
+
+Ajax.Updater = Class.create();
+
+Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
+  initialize: function(container, url, options) {
+    this.container = {
+      success: (container.success || container),
+      failure: (container.failure || (container.success ? null : container))
+    }
+
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+
+    var onComplete = this.options.onComplete || Prototype.emptyFunction;
+    this.options.onComplete = (function(transport, param) {
+      this.updateContent();
+      onComplete(transport, param);
+    }).bind(this);
+
+    this.request(url);
+  },
+
+  updateContent: function() {
+    var receiver = this.container[this.success() ? 'success' : 'failure'];
+    var response = this.transport.responseText;
+
+    if (!this.options.evalScripts) response = response.stripScripts();
+
+    if (receiver = $(receiver)) {
+      if (this.options.insertion)
+        new this.options.insertion(receiver, response);
+      else
+        receiver.update(response);
+    }
+
+    if (this.success()) {
+      if (this.onComplete)
+        setTimeout(this.onComplete.bind(this), 10);
+    }
+  }
+});
+
+Ajax.PeriodicalUpdater = Class.create();
+Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
+  initialize: function(container, url, options) {
+    this.setOptions(options);
+    this.onComplete = this.options.onComplete;
+
+    this.frequency = (this.options.frequency || 2);
+    this.decay = (this.options.decay || 1);
+
+    this.updater = {};
+    this.container = container;
+    this.url = url;
+
+    this.start();
+  },
+
+  start: function() {
+    this.options.onComplete = this.updateComplete.bind(this);
+    this.onTimerEvent();
+  },
+
+  stop: function() {
+    this.updater.options.onComplete = undefined;
+    clearTimeout(this.timer);
+    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+  },
+
+  updateComplete: function(request) {
+    if (this.options.decay) {
+      this.decay = (request.responseText == this.lastText ?
+        this.decay * this.options.decay : 1);
+
+      this.lastText = request.responseText;
+    }
+    this.timer = setTimeout(this.onTimerEvent.bind(this),
+      this.decay * this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    this.updater = new Ajax.Updater(this.container, this.url, this.options);
+  }
+});
+function $(element) {
+  if (arguments.length > 1) {
+    for (var i = 0, elements = [], length = arguments.length; i < length; i++)
+      elements.push($(arguments[i]));
+    return elements;
+  }
+  if (typeof element == 'string')
+    element = document.getElementById(element);
+  return Element.extend(element);
+}
+
+if (Prototype.BrowserFeatures.XPath) {
+  document._getElementsByXPath = function(expression, parentElement) {
+    var results = [];
+    var query = document.evaluate(expression, $(parentElement) || document,
+      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    for (var i = 0, length = query.snapshotLength; i < length; i++)
+      results.push(query.snapshotItem(i));
+    return results;
+  };
+}
+
+document.getElementsByClassName = function(className, parentElement) {
+  if (Prototype.BrowserFeatures.XPath) {
+    var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]";
+    return document._getElementsByXPath(q, parentElement);
+  } else {
+    var children = ($(parentElement) || document.body).getElementsByTagName('*');
+    var elements = [], child;
+    for (var i = 0, length = children.length; i < length; i++) {
+      child = children[i];
+      if (Element.hasClassName(child, className))
+        elements.push(Element.extend(child));
+    }
+    return elements;
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Element)
+  var Element = new Object();
+
+Element.extend = function(element) {
+  if (!element || _nativeExtensions || element.nodeType == 3) return element;
+
+  if (!element._extended && element.tagName && element != window) {
+    var methods = Object.clone(Element.Methods), cache = Element.extend.cache;
+
+    if (element.tagName == 'FORM')
+      Object.extend(methods, Form.Methods);
+    if (['INPUT', 'TEXTAREA', 'SELECT'].include(element.tagName))
+      Object.extend(methods, Form.Element.Methods);
+
+    Object.extend(methods, Element.Methods.Simulated);
+
+    for (var property in methods) {
+      var value = methods[property];
+      if (typeof value == 'function' && !(property in element))
+        element[property] = cache.findOrStore(value);
+    }
+  }
+
+  element._extended = true;
+  return element;
+};
+
+Element.extend.cache = {
+  findOrStore: function(value) {
+    return this[value] = this[value] || function() {
+      return value.apply(null, [this].concat($A(arguments)));
+    }
+  }
+};
+
+Element.Methods = {
+  visible: function(element) {
+    return $(element).style.display != 'none';
+  },
+
+  toggle: function(element) {
+    element = $(element);
+    Element[Element.visible(element) ? 'hide' : 'show'](element);
+    return element;
+  },
+
+  hide: function(element) {
+    $(element).style.display = 'none';
+    return element;
+  },
+
+  show: function(element) {
+    $(element).style.display = '';
+    return element;
+  },
+
+  remove: function(element) {
+    element = $(element);
+    element.parentNode.removeChild(element);
+    return element;
+  },
+
+  update: function(element, html) {
+    html = typeof html == 'undefined' ? '' : html.toString();
+    $(element).innerHTML = html.stripScripts();
+    setTimeout(function() {html.evalScripts()}, 10);
+    return element;
+  },
+
+  replace: function(element, html) {
+    element = $(element);
+    html = typeof html == 'undefined' ? '' : html.toString();
+    if (element.outerHTML) {
+      element.outerHTML = html.stripScripts();
+    } else {
+      var range = element.ownerDocument.createRange();
+      range.selectNodeContents(element);
+      element.parentNode.replaceChild(
+        range.createContextualFragment(html.stripScripts()), element);
+    }
+    setTimeout(function() {html.evalScripts()}, 10);
+    return element;
+  },
+
+  inspect: function(element) {
+    element = $(element);
+    var result = '<' + element.tagName.toLowerCase();
+    $H({'id': 'id', 'className': 'class'}).each(function(pair) {
+      var property = pair.first(), attribute = pair.last();
+      var value = (element[property] || '').toString();
+      if (value) result += ' ' + attribute + '=' + value.inspect(true);
+    });
+    return result + '>';
+  },
+
+  recursivelyCollect: function(element, property) {
+    element = $(element);
+    var elements = [];
+    while (element = element[property])
+      if (element.nodeType == 1)
+        elements.push(Element.extend(element));
+    return elements;
+  },
+
+  ancestors: function(element) {
+    return $(element).recursivelyCollect('parentNode');
+  },
+
+  descendants: function(element) {
+    return $A($(element).getElementsByTagName('*'));
+  },
+
+  immediateDescendants: function(element) {
+    if (!(element = $(element).firstChild)) return [];
+    while (element && element.nodeType != 1) element = element.nextSibling;
+    if (element) return [element].concat($(element).nextSiblings());
+    return [];
+  },
+
+  previousSiblings: function(element) {
+    return $(element).recursivelyCollect('previousSibling');
+  },
+
+  nextSiblings: function(element) {
+    return $(element).recursivelyCollect('nextSibling');
+  },
+
+  siblings: function(element) {
+    element = $(element);
+    return element.previousSiblings().reverse().concat(element.nextSiblings());
+  },
+
+  match: function(element, selector) {
+    if (typeof selector == 'string')
+      selector = new Selector(selector);
+    return selector.match($(element));
+  },
+
+  up: function(element, expression, index) {
+    return Selector.findElement($(element).ancestors(), expression, index);
+  },
+
+  down: function(element, expression, index) {
+    return Selector.findElement($(element).descendants(), expression, index);
+  },
+
+  previous: function(element, expression, index) {
+    return Selector.findElement($(element).previousSiblings(), expression, index);
+  },
+
+  next: function(element, expression, index) {
+    return Selector.findElement($(element).nextSiblings(), expression, index);
+  },
+
+  getElementsBySelector: function() {
+    var args = $A(arguments), element = $(args.shift());
+    return Selector.findChildElements(element, args);
+  },
+
+  getElementsByClassName: function(element, className) {
+    return document.getElementsByClassName(className, element);
+  },
+
+  readAttribute: function(element, name) {
+    element = $(element);
+    if (document.all && !window.opera) {
+      var t = Element._attributeTranslations;
+      if (t.values[name]) return t.values[name](element, name);
+      if (t.names[name])  name = t.names[name];
+      var attribute = element.attributes[name];
+      if(attribute) return attribute.nodeValue;
+    }
+    return element.getAttribute(name);
+  },
+
+  getHeight: function(element) {
+    return $(element).getDimensions().height;
+  },
+
+  getWidth: function(element) {
+    return $(element).getDimensions().width;
+  },
+
+  classNames: function(element) {
+    return new Element.ClassNames(element);
+  },
+
+  hasClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    var elementClassName = element.className;
+    if (elementClassName.length == 0) return false;
+    if (elementClassName == className ||
+        elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
+      return true;
+    return false;
+  },
+
+  addClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    Element.classNames(element).add(className);
+    return element;
+  },
+
+  removeClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    Element.classNames(element).remove(className);
+    return element;
+  },
+
+  toggleClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className);
+    return element;
+  },
+
+  observe: function() {
+    Event.observe.apply(Event, arguments);
+    return $A(arguments).first();
+  },
+
+  stopObserving: function() {
+    Event.stopObserving.apply(Event, arguments);
+    return $A(arguments).first();
+  },
+
+  // removes whitespace-only text node children
+  cleanWhitespace: function(element) {
+    element = $(element);
+    var node = element.firstChild;
+    while (node) {
+      var nextNode = node.nextSibling;
+      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+        element.removeChild(node);
+      node = nextNode;
+    }
+    return element;
+  },
+
+  empty: function(element) {
+    return $(element).innerHTML.match(/^\s*$/);
+  },
+
+  descendantOf: function(element, ancestor) {
+    element = $(element), ancestor = $(ancestor);
+    while (element = element.parentNode)
+      if (element == ancestor) return true;
+    return false;
+  },
+
+  scrollTo: function(element) {
+    element = $(element);
+    var pos = Position.cumulativeOffset(element);
+    window.scrollTo(pos[0], pos[1]);
+    return element;
+  },
+
+  getStyle: function(element, style) {
+    element = $(element);
+    if (['float','cssFloat'].include(style))
+      style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat');
+    style = style.camelize();
+    var value = element.style[style];
+    if (!value) {
+      if (document.defaultView && document.defaultView.getComputedStyle) {
+        var css = document.defaultView.getComputedStyle(element, null);
+        value = css ? css[style] : null;
+      } else if (element.currentStyle) {
+        value = element.currentStyle[style];
+      }
+    }
+
+    if((value == 'auto') && ['width','height'].include(style) && (element.getStyle('display') != 'none'))
+      value = element['offset'+style.capitalize()] + 'px';
+
+    if (window.opera && ['left', 'top', 'right', 'bottom'].include(style))
+      if (Element.getStyle(element, 'position') == 'static') value = 'auto';
+    if(style == 'opacity') {
+      if(value) return parseFloat(value);
+      if(value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
+        if(value[1]) return parseFloat(value[1]) / 100;
+      return 1.0;
+    }
+    return value == 'auto' ? null : value;
+  },
+
+  setStyle: function(element, style) {
+    element = $(element);
+    for (var name in style) {
+      var value = style[name];
+      if(name == 'opacity') {
+        if (value == 1) {
+          value = (/Gecko/.test(navigator.userAgent) &&
+            !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0;
+          if(/MSIE/.test(navigator.userAgent) && !window.opera)
+            element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
+        } else if(value === '') {
+          if(/MSIE/.test(navigator.userAgent) && !window.opera)
+            element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
+        } else {
+          if(value < 0.00001) value = 0;
+          if(/MSIE/.test(navigator.userAgent) && !window.opera)
+            element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') +
+              'alpha(opacity='+value*100+')';
+        }
+      } else if(['float','cssFloat'].include(name)) name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat';
+      element.style[name.camelize()] = value;
+    }
+    return element;
+  },
+
+  getDimensions: function(element) {
+    element = $(element);
+    var display = $(element).getStyle('display');
+    if (display != 'none' && display != null) // Safari bug
+      return {width: element.offsetWidth, height: element.offsetHeight};
+
+    // All *Width and *Height properties give 0 on elements with display none,
+    // so enable the element temporarily
+    var els = element.style;
+    var originalVisibility = els.visibility;
+    var originalPosition = els.position;
+    var originalDisplay = els.display;
+    els.visibility = 'hidden';
+    els.position = 'absolute';
+    els.display = 'block';
+    var originalWidth = element.clientWidth;
+    var originalHeight = element.clientHeight;
+    els.display = originalDisplay;
+    els.position = originalPosition;
+    els.visibility = originalVisibility;
+    return {width: originalWidth, height: originalHeight};
+  },
+
+  makePositioned: function(element) {
+    element = $(element);
+    var pos = Element.getStyle(element, 'position');
+    if (pos == 'static' || !pos) {
+      element._madePositioned = true;
+      element.style.position = 'relative';
+      // Opera returns the offset relative to the positioning context, when an
+      // element is position relative but top and left have not been defined
+      if (window.opera) {
+        element.style.top = 0;
+        element.style.left = 0;
+      }
+    }
+    return element;
+  },
+
+  undoPositioned: function(element) {
+    element = $(element);
+    if (element._madePositioned) {
+      element._madePositioned = undefined;
+      element.style.position =
+        element.style.top =
+        element.style.left =
+        element.style.bottom =
+        element.style.right = '';
+    }
+    return element;
+  },
+
+  makeClipping: function(element) {
+    element = $(element);
+    if (element._overflow) return element;
+    element._overflow = element.style.overflow || 'auto';
+    if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
+      element.style.overflow = 'hidden';
+    return element;
+  },
+
+  undoClipping: function(element) {
+    element = $(element);
+    if (!element._overflow) return element;
+    element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
+    element._overflow = null;
+    return element;
+  }
+};
+
+Object.extend(Element.Methods, {childOf: Element.Methods.descendantOf});
+
+Element._attributeTranslations = {};
+
+Element._attributeTranslations.names = {
+  colspan:   "colSpan",
+  rowspan:   "rowSpan",
+  valign:    "vAlign",
+  datetime:  "dateTime",
+  accesskey: "accessKey",
+  tabindex:  "tabIndex",
+  enctype:   "encType",
+  maxlength: "maxLength",
+  readonly:  "readOnly",
+  longdesc:  "longDesc"
+};
+
+Element._attributeTranslations.values = {
+  _getAttr: function(element, attribute) {
+    return element.getAttribute(attribute, 2);
+  },
+
+  _flag: function(element, attribute) {
+    return $(element).hasAttribute(attribute) ? attribute : null;
+  },
+
+  style: function(element) {
+    return element.style.cssText.toLowerCase();
+  },
+
+  title: function(element) {
+    var node = element.getAttributeNode('title');
+    return node.specified ? node.nodeValue : null;
+  }
+};
+
+Object.extend(Element._attributeTranslations.values, {
+  href: Element._attributeTranslations.values._getAttr,
+  src:  Element._attributeTranslations.values._getAttr,
+  disabled: Element._attributeTranslations.values._flag,
+  checked:  Element._attributeTranslations.values._flag,
+  readonly: Element._attributeTranslations.values._flag,
+  multiple: Element._attributeTranslations.values._flag
+});
+
+Element.Methods.Simulated = {
+  hasAttribute: function(element, attribute) {
+    var t = Element._attributeTranslations;
+    attribute = t.names[attribute] || attribute;
+    return $(element).getAttributeNode(attribute).specified;
+  }
+};
+
+// IE is missing .innerHTML support for TABLE-related elements
+if (document.all && !window.opera){
+  Element.Methods.update = function(element, html) {
+    element = $(element);
+    html = typeof html == 'undefined' ? '' : html.toString();
+    var tagName = element.tagName.toUpperCase();
+    if (['THEAD','TBODY','TR','TD'].include(tagName)) {
+      var div = document.createElement('div');
+      switch (tagName) {
+        case 'THEAD':
+        case 'TBODY':
+          div.innerHTML = '<table><tbody>' +  html.stripScripts() + '</tbody></table>';
+          depth = 2;
+          break;
+        case 'TR':
+          div.innerHTML = '<table><tbody><tr>' +  html.stripScripts() + '</tr></tbody></table>';
+          depth = 3;
+          break;
+        case 'TD':
+          div.innerHTML = '<table><tbody><tr><td>' +  html.stripScripts() + '</td></tr></tbody></table>';
+          depth = 4;
+      }
+      $A(element.childNodes).each(function(node){
+        element.removeChild(node)
+      });
+      depth.times(function(){ div = div.firstChild });
+
+      $A(div.childNodes).each(
+        function(node){ element.appendChild(node) });
+    } else {
+      element.innerHTML = html.stripScripts();
+    }
+    setTimeout(function() {html.evalScripts()}, 10);
+    return element;
+  }
+};
+
+Object.extend(Element, Element.Methods);
+
+var _nativeExtensions = false;
+
+if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
+  ['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) {
+    var className = 'HTML' + tag + 'Element';
+    if(window[className]) return;
+    var klass = window[className] = {};
+    klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__;
+  });
+
+Element.addMethods = function(methods) {
+  Object.extend(Element.Methods, methods || {});
+
+  function copy(methods, destination, onlyIfAbsent) {
+    onlyIfAbsent = onlyIfAbsent || false;
+    var cache = Element.extend.cache;
+    for (var property in methods) {
+      var value = methods[property];
+      if (!onlyIfAbsent || !(property in destination))
+        destination[property] = cache.findOrStore(value);
+    }
+  }
+
+  if (typeof HTMLElement != 'undefined') {
+    copy(Element.Methods, HTMLElement.prototype);
+    copy(Element.Methods.Simulated, HTMLElement.prototype, true);
+    copy(Form.Methods, HTMLFormElement.prototype);
+    [HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) {
+      copy(Form.Element.Methods, klass.prototype);
+    });
+    _nativeExtensions = true;
+  }
+}
+
+var Toggle = new Object();
+Toggle.display = Element.toggle;
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.Insertion = function(adjacency) {
+  this.adjacency = adjacency;
+}
+
+Abstract.Insertion.prototype = {
+  initialize: function(element, content) {
+    this.element = $(element);
+    this.content = content.stripScripts();
+
+    if (this.adjacency && this.element.insertAdjacentHTML) {
+      try {
+        this.element.insertAdjacentHTML(this.adjacency, this.content);
+      } catch (e) {
+        var tagName = this.element.tagName.toUpperCase();
+        if (['TBODY', 'TR'].include(tagName)) {
+          this.insertContent(this.contentFromAnonymousTable());
+        } else {
+          throw e;
+        }
+      }
+    } else {
+      this.range = this.element.ownerDocument.createRange();
+      if (this.initializeRange) this.initializeRange();
+      this.insertContent([this.range.createContextualFragment(this.content)]);
+    }
+
+    setTimeout(function() {content.evalScripts()}, 10);
+  },
+
+  contentFromAnonymousTable: function() {
+    var div = document.createElement('div');
+    div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
+    return $A(div.childNodes[0].childNodes[0].childNodes);
+  }
+}
+
+var Insertion = new Object();
+
+Insertion.Before = Class.create();
+Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
+  initializeRange: function() {
+    this.range.setStartBefore(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.parentNode.insertBefore(fragment, this.element);
+    }).bind(this));
+  }
+});
+
+Insertion.Top = Class.create();
+Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(true);
+  },
+
+  insertContent: function(fragments) {
+    fragments.reverse(false).each((function(fragment) {
+      this.element.insertBefore(fragment, this.element.firstChild);
+    }).bind(this));
+  }
+});
+
+Insertion.Bottom = Class.create();
+Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.appendChild(fragment);
+    }).bind(this));
+  }
+});
+
+Insertion.After = Class.create();
+Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
+  initializeRange: function() {
+    this.range.setStartAfter(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.parentNode.insertBefore(fragment,
+        this.element.nextSibling);
+    }).bind(this));
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Element.ClassNames = Class.create();
+Element.ClassNames.prototype = {
+  initialize: function(element) {
+    this.element = $(element);
+  },
+
+  _each: function(iterator) {
+    this.element.className.split(/\s+/).select(function(name) {
+      return name.length > 0;
+    })._each(iterator);
+  },
+
+  set: function(className) {
+    this.element.className = className;
+  },
+
+  add: function(classNameToAdd) {
+    if (this.include(classNameToAdd)) return;
+    this.set($A(this).concat(classNameToAdd).join(' '));
+  },
+
+  remove: function(classNameToRemove) {
+    if (!this.include(classNameToRemove)) return;
+    this.set($A(this).without(classNameToRemove).join(' '));
+  },
+
+  toString: function() {
+    return $A(this).join(' ');
+  }
+};
+
+Object.extend(Element.ClassNames.prototype, Enumerable);
+var Selector = Class.create();
+Selector.prototype = {
+  initialize: function(expression) {
+    this.params = {classNames: []};
+    this.expression = expression.toString().strip();
+    this.parseExpression();
+    this.compileMatcher();
+  },
+
+  parseExpression: function() {
+    function abort(message) { throw 'Parse error in selector: ' + message; }
+
+    if (this.expression == '')  abort('empty expression');
+
+    var params = this.params, expr = this.expression, match, modifier, clause, rest;
+    while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) {
+      params.attributes = params.attributes || [];
+      params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''});
+      expr = match[1];
+    }
+
+    if (expr == '*') return this.params.wildcard = true;
+
+    while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) {
+      modifier = match[1], clause = match[2], rest = match[3];
+      switch (modifier) {
+        case '#':       params.id = clause; break;
+        case '.':       params.classNames.push(clause); break;
+        case '':
+        case undefined: params.tagName = clause.toUpperCase(); break;
+        default:        abort(expr.inspect());
+      }
+      expr = rest;
+    }
+
+    if (expr.length > 0) abort(expr.inspect());
+  },
+
+  buildMatchExpression: function() {
+    var params = this.params, conditions = [], clause;
+
+    if (params.wildcard)
+      conditions.push('true');
+    if (clause = params.id)
+      conditions.push('element.readAttribute("id") == ' + clause.inspect());
+    if (clause = params.tagName)
+      conditions.push('element.tagName.toUpperCase() == ' + clause.inspect());
+    if ((clause = params.classNames).length > 0)
+      for (var i = 0, length = clause.length; i < length; i++)
+        conditions.push('element.hasClassName(' + clause[i].inspect() + ')');
+    if (clause = params.attributes) {
+      clause.each(function(attribute) {
+        var value = 'element.readAttribute(' + attribute.name.inspect() + ')';
+        var splitValueBy = function(delimiter) {
+          return value + ' && ' + value + '.split(' + delimiter.inspect() + ')';
+        }
+
+        switch (attribute.operator) {
+          case '=':       conditions.push(value + ' == ' + attribute.value.inspect()); break;
+          case '~=':      conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break;
+          case '|=':      conditions.push(
+                            splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect()
+                          ); break;
+          case '!=':      conditions.push(value + ' != ' + attribute.value.inspect()); break;
+          case '':
+          case undefined: conditions.push('element.hasAttribute(' + attribute.name.inspect() + ')'); break;
+          default:        throw 'Unknown operator ' + attribute.operator + ' in selector';
+        }
+      });
+    }
+
+    return conditions.join(' && ');
+  },
+
+  compileMatcher: function() {
+    this.match = new Function('element', 'if (!element.tagName) return false; \
+      element = $(element); \
+      return ' + this.buildMatchExpression());
+  },
+
+  findElements: function(scope) {
+    var element;
+
+    if (element = $(this.params.id))
+      if (this.match(element))
+        if (!scope || Element.childOf(element, scope))
+          return [element];
+
+    scope = (scope || document).getElementsByTagName(this.params.tagName || '*');
+
+    var results = [];
+    for (var i = 0, length = scope.length; i < length; i++)
+      if (this.match(element = scope[i]))
+        results.push(Element.extend(element));
+
+    return results;
+  },
+
+  toString: function() {
+    return this.expression;
+  }
+}
+
+Object.extend(Selector, {
+  matchElements: function(elements, expression) {
+    var selector = new Selector(expression);
+    return elements.select(selector.match.bind(selector)).map(Element.extend);
+  },
+
+  findElement: function(elements, expression, index) {
+    if (typeof expression == 'number') index = expression, expression = false;
+    return Selector.matchElements(elements, expression || '*')[index || 0];
+  },
+
+  findChildElements: function(element, expressions) {
+    return expressions.map(function(expression) {
+      return expression.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null], function(results, expr) {
+        var selector = new Selector(expr);
+        return results.inject([], function(elements, result) {
+          return elements.concat(selector.findElements(result || element));
+        });
+      });
+    }).flatten();
+  }
+});
+
+function $$() {
+  return Selector.findChildElements(document, $A(arguments));
+}
+var Form = {
+  reset: function(form) {
+    $(form).reset();
+    return form;
+  },
+
+  serializeElements: function(elements, getHash) {
+    var data = elements.inject({}, function(result, element) {
+      if (!element.disabled && element.name) {
+        var key = element.name, value = $(element).getValue();
+        if (value != undefined) {
+          if (result[key]) {
+            if (result[key].constructor != Array) result[key] = [result[key]];
+            result[key].push(value);
+          }
+          else result[key] = value;
+        }
+      }
+      return result;
+    });
+
+    return getHash ? data : Hash.toQueryString(data);
+  }
+};
+
+Form.Methods = {
+  serialize: function(form, getHash) {
+    return Form.serializeElements(Form.getElements(form), getHash);
+  },
+
+  getElements: function(form) {
+    return $A($(form).getElementsByTagName('*')).inject([],
+      function(elements, child) {
+        if (Form.Element.Serializers[child.tagName.toLowerCase()])
+          elements.push(Element.extend(child));
+        return elements;
+      }
+    );
+  },
+
+  getInputs: function(form, typeName, name) {
+    form = $(form);
+    var inputs = form.getElementsByTagName('input');
+
+    if (!typeName && !name) return $A(inputs).map(Element.extend);
+
+    for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
+      var input = inputs[i];
+      if ((typeName && input.type != typeName) || (name && input.name != name))
+        continue;
+      matchingInputs.push(Element.extend(input));
+    }
+
+    return matchingInputs;
+  },
+
+  disable: function(form) {
+    form = $(form);
+    form.getElements().each(function(element) {
+      element.blur();
+      element.disabled = 'true';
+    });
+    return form;
+  },
+
+  enable: function(form) {
+    form = $(form);
+    form.getElements().each(function(element) {
+      element.disabled = '';
+    });
+    return form;
+  },
+
+  findFirstElement: function(form) {
+    return $(form).getElements().find(function(element) {
+      return element.type != 'hidden' && !element.disabled &&
+        ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
+    });
+  },
+
+  focusFirstElement: function(form) {
+    form = $(form);
+    form.findFirstElement().activate();
+    return form;
+  }
+}
+
+Object.extend(Form, Form.Methods);
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element = {
+  focus: function(element) {
+    $(element).focus();
+    return element;
+  },
+
+  select: function(element) {
+    $(element).select();
+    return element;
+  }
+}
+
+Form.Element.Methods = {
+  serialize: function(element) {
+    element = $(element);
+    if (!element.disabled && element.name) {
+      var value = element.getValue();
+      if (value != undefined) {
+        var pair = {};
+        pair[element.name] = value;
+        return Hash.toQueryString(pair);
+      }
+    }
+    return '';
+  },
+
+  getValue: function(element) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    return Form.Element.Serializers[method](element);
+  },
+
+  clear: function(element) {
+    $(element).value = '';
+    return element;
+  },
+
+  present: function(element) {
+    return $(element).value != '';
+  },
+
+  activate: function(element) {
+    element = $(element);
+    element.focus();
+    if (element.select && ( element.tagName.toLowerCase() != 'input' ||
+      !['button', 'reset', 'submit'].include(element.type) ) )
+      element.select();
+    return element;
+  },
+
+  disable: function(element) {
+    element = $(element);
+    element.disabled = true;
+    return element;
+  },
+
+  enable: function(element) {
+    element = $(element);
+    element.blur();
+    element.disabled = false;
+    return element;
+  }
+}
+
+Object.extend(Form.Element, Form.Element.Methods);
+var Field = Form.Element;
+var $F = Form.Element.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element.Serializers = {
+  input: function(element) {
+    switch (element.type.toLowerCase()) {
+      case 'checkbox':
+      case 'radio':
+        return Form.Element.Serializers.inputSelector(element);
+      default:
+        return Form.Element.Serializers.textarea(element);
+    }
+  },
+
+  inputSelector: function(element) {
+    return element.checked ? element.value : null;
+  },
+
+  textarea: function(element) {
+    return element.value;
+  },
+
+  select: function(element) {
+    return this[element.type == 'select-one' ?
+      'selectOne' : 'selectMany'](element);
+  },
+
+  selectOne: function(element) {
+    var index = element.selectedIndex;
+    return index >= 0 ? this.optionValue(element.options[index]) : null;
+  },
+
+  selectMany: function(element) {
+    var values, length = element.length;
+    if (!length) return null;
+
+    for (var i = 0, values = []; i < length; i++) {
+      var opt = element.options[i];
+      if (opt.selected) values.push(this.optionValue(opt));
+    }
+    return values;
+  },
+
+  optionValue: function(opt) {
+    // extend element because hasAttribute may not be native
+    return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.TimedObserver = function() {}
+Abstract.TimedObserver.prototype = {
+  initialize: function(element, frequency, callback) {
+    this.frequency = frequency;
+    this.element   = $(element);
+    this.callback  = callback;
+
+    this.lastValue = this.getValue();
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    var value = this.getValue();
+    var changed = ('string' == typeof this.lastValue && 'string' == typeof value
+      ? this.lastValue != value : String(this.lastValue) != String(value));
+    if (changed) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  }
+}
+
+Form.Element.Observer = Class.create();
+Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.Observer = Class.create();
+Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = function() {}
+Abstract.EventObserver.prototype = {
+  initialize: function(element, callback) {
+    this.element  = $(element);
+    this.callback = callback;
+
+    this.lastValue = this.getValue();
+    if (this.element.tagName.toLowerCase() == 'form')
+      this.registerFormCallbacks();
+    else
+      this.registerCallback(this.element);
+  },
+
+  onElementEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  },
+
+  registerFormCallbacks: function() {
+    Form.getElements(this.element).each(this.registerCallback.bind(this));
+  },
+
+  registerCallback: function(element) {
+    if (element.type) {
+      switch (element.type.toLowerCase()) {
+        case 'checkbox':
+        case 'radio':
+          Event.observe(element, 'click', this.onElementEvent.bind(this));
+          break;
+        default:
+          Event.observe(element, 'change', this.onElementEvent.bind(this));
+          break;
+      }
+    }
+  }
+}
+
+Form.Element.EventObserver = Class.create();
+Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.EventObserver = Class.create();
+Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+if (!window.Event) {
+  var Event = new Object();
+}
+
+Object.extend(Event, {
+  KEY_BACKSPACE: 8,
+  KEY_TAB:       9,
+  KEY_RETURN:   13,
+  KEY_ESC:      27,
+  KEY_LEFT:     37,
+  KEY_UP:       38,
+  KEY_RIGHT:    39,
+  KEY_DOWN:     40,
+  KEY_DELETE:   46,
+  KEY_HOME:     36,
+  KEY_END:      35,
+  KEY_PAGEUP:   33,
+  KEY_PAGEDOWN: 34,
+
+  element: function(event) {
+    return event.target || event.srcElement;
+  },
+
+  isLeftClick: function(event) {
+    return (((event.which) && (event.which == 1)) ||
+            ((event.button) && (event.button == 1)));
+  },
+
+  pointerX: function(event) {
+    return event.pageX || (event.clientX +
+      (document.documentElement.scrollLeft || document.body.scrollLeft));
+  },
+
+  pointerY: function(event) {
+    return event.pageY || (event.clientY +
+      (document.documentElement.scrollTop || document.body.scrollTop));
+  },
+
+  stop: function(event) {
+    if (event.preventDefault) {
+      event.preventDefault();
+      event.stopPropagation();
+    } else {
+      event.returnValue = false;
+      event.cancelBubble = true;
+    }
+  },
+
+  // find the first node with the given tagName, starting from the
+  // node the event was triggered on; traverses the DOM upwards
+  findElement: function(event, tagName) {
+    var element = Event.element(event);
+    while (element.parentNode && (!element.tagName ||
+        (element.tagName.toUpperCase() != tagName.toUpperCase())))
+      element = element.parentNode;
+    return element;
+  },
+
+  observers: false,
+
+  _observeAndCache: function(element, name, observer, useCapture) {
+    if (!this.observers) this.observers = [];
+    if (element.addEventListener) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.addEventListener(name, observer, useCapture);
+    } else if (element.attachEvent) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.attachEvent('on' + name, observer);
+    }
+  },
+
+  unloadCache: function() {
+    if (!Event.observers) return;
+    for (var i = 0, length = Event.observers.length; i < length; i++) {
+      Event.stopObserving.apply(this, Event.observers[i]);
+      Event.observers[i][0] = null;
+    }
+    Event.observers = false;
+  },
+
+  observe: function(element, name, observer, useCapture) {
+    element = $(element);
+    useCapture = useCapture || false;
+
+    if (name == 'keypress' &&
+        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+        || element.attachEvent))
+      name = 'keydown';
+
+    Event._observeAndCache(element, name, observer, useCapture);
+  },
+
+  stopObserving: function(element, name, observer, useCapture) {
+    element = $(element);
+    useCapture = useCapture || false;
+
+    if (name == 'keypress' &&
+        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+        || element.detachEvent))
+      name = 'keydown';
+
+    if (element.removeEventListener) {
+      element.removeEventListener(name, observer, useCapture);
+    } else if (element.detachEvent) {
+      try {
+        element.detachEvent('on' + name, observer);
+      } catch (e) {}
+    }
+  }
+});
+
+/* prevent memory leaks in IE */
+if (navigator.appVersion.match(/\bMSIE\b/))
+  Event.observe(window, 'unload', Event.unloadCache, false);
+var Position = {
+  // set to true if needed, warning: firefox performance problems
+  // NOT neeeded for page scrolling, only if draggable contained in
+  // scrollable elements
+  includeScrollOffsets: false,
+
+  // must be called before calling withinIncludingScrolloffset, every time the
+  // page is scrolled
+  prepare: function() {
+    this.deltaX =  window.pageXOffset
+                || document.documentElement.scrollLeft
+                || document.body.scrollLeft
+                || 0;
+    this.deltaY =  window.pageYOffset
+                || document.documentElement.scrollTop
+                || document.body.scrollTop
+                || 0;
+  },
+
+  realOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.scrollTop  || 0;
+      valueL += element.scrollLeft || 0;
+      element = element.parentNode;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  cumulativeOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  positionedOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+      if (element) {
+        if(element.tagName=='BODY') break;
+        var p = Element.getStyle(element, 'position');
+        if (p == 'relative' || p == 'absolute') break;
+      }
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  offsetParent: function(element) {
+    if (element.offsetParent) return element.offsetParent;
+    if (element == document.body) return element;
+
+    while ((element = element.parentNode) && element != document.body)
+      if (Element.getStyle(element, 'position') != 'static')
+        return element;
+
+    return document.body;
+  },
+
+  // caches x/y coordinate pair to use with overlap
+  within: function(element, x, y) {
+    if (this.includeScrollOffsets)
+      return this.withinIncludingScrolloffsets(element, x, y);
+    this.xcomp = x;
+    this.ycomp = y;
+    this.offset = this.cumulativeOffset(element);
+
+    return (y >= this.offset[1] &&
+            y <  this.offset[1] + element.offsetHeight &&
+            x >= this.offset[0] &&
+            x <  this.offset[0] + element.offsetWidth);
+  },
+
+  withinIncludingScrolloffsets: function(element, x, y) {
+    var offsetcache = this.realOffset(element);
+
+    this.xcomp = x + offsetcache[0] - this.deltaX;
+    this.ycomp = y + offsetcache[1] - this.deltaY;
+    this.offset = this.cumulativeOffset(element);
+
+    return (this.ycomp >= this.offset[1] &&
+            this.ycomp <  this.offset[1] + element.offsetHeight &&
+            this.xcomp >= this.offset[0] &&
+            this.xcomp <  this.offset[0] + element.offsetWidth);
+  },
+
+  // within must be called directly before
+  overlap: function(mode, element) {
+    if (!mode) return 0;
+    if (mode == 'vertical')
+      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
+        element.offsetHeight;
+    if (mode == 'horizontal')
+      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
+        element.offsetWidth;
+  },
+
+  page: function(forElement) {
+    var valueT = 0, valueL = 0;
+
+    var element = forElement;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+
+      // Safari fix
+      if (element.offsetParent==document.body)
+        if (Element.getStyle(element,'position')=='absolute') break;
+
+    } while (element = element.offsetParent);
+
+    element = forElement;
+    do {
+      if (!window.opera || element.tagName=='BODY') {
+        valueT -= element.scrollTop  || 0;
+        valueL -= element.scrollLeft || 0;
+      }
+    } while (element = element.parentNode);
+
+    return [valueL, valueT];
+  },
+
+  clone: function(source, target) {
+    var options = Object.extend({
+      setLeft:    true,
+      setTop:     true,
+      setWidth:   true,
+      setHeight:  true,
+      offsetTop:  0,
+      offsetLeft: 0
+    }, arguments[2] || {})
+
+    // find page position of source
+    source = $(source);
+    var p = Position.page(source);
+
+    // find coordinate system to use
+    target = $(target);
+    var delta = [0, 0];
+    var parent = null;
+    // delta [0,0] will do fine with position: fixed elements,
+    // position:absolute needs offsetParent deltas
+    if (Element.getStyle(target,'position') == 'absolute') {
+      parent = Position.offsetParent(target);
+      delta = Position.page(parent);
+    }
+
+    // correct by body offsets (fixes Safari)
+    if (parent == document.body) {
+      delta[0] -= document.body.offsetLeft;
+      delta[1] -= document.body.offsetTop;
+    }
+
+    // set position
+    if(options.setLeft)   target.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
+    if(options.setTop)    target.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
+    if(options.setWidth)  target.style.width = source.offsetWidth + 'px';
+    if(options.setHeight) target.style.height = source.offsetHeight + 'px';
+  },
+
+  absolutize: function(element) {
+    element = $(element);
+    if (element.style.position == 'absolute') return;
+    Position.prepare();
+
+    var offsets = Position.positionedOffset(element);
+    var top     = offsets[1];
+    var left    = offsets[0];
+    var width   = element.clientWidth;
+    var height  = element.clientHeight;
+
+    element._originalLeft   = left - parseFloat(element.style.left  || 0);
+    element._originalTop    = top  - parseFloat(element.style.top || 0);
+    element._originalWidth  = element.style.width;
+    element._originalHeight = element.style.height;
+
+    element.style.position = 'absolute';
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.width  = width + 'px';
+    element.style.height = height + 'px';
+  },
+
+  relativize: function(element) {
+    element = $(element);
+    if (element.style.position == 'relative') return;
+    Position.prepare();
+
+    element.style.position = 'relative';
+    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
+    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.height = element._originalHeight;
+    element.style.width  = element._originalWidth;
+  }
+}
+
+// Safari returns margins on body which is incorrect if the child is absolutely
+// positioned.  For performance reasons, redefine Position.cumulativeOffset for
+// KHTML/WebKit only.
+if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) {
+  Position.cumulativeOffset = function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      if (element.offsetParent == document.body)
+        if (Element.getStyle(element, 'position') == 'absolute') break;
+
+      element = element.offsetParent;
+    } while (element);
+
+    return [valueL, valueT];
+  }
+}
+
+Element.addMethods();
+
+// script.aculo.us scriptaculous.js v1.7.0, Fri Jan 19 19:16:36 CET 2007
+
+// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+var Scriptaculous = {
+  Version: '1.7.0',
+  require: function(libraryName) {
+    // inserting via DOM fails in Safari 2.0, so brute force approach
+    document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
+  },
+  load: function() {
+    if((typeof Prototype=='undefined') ||
+       (typeof Element == 'undefined') ||
+       (typeof Element.Methods=='undefined') ||
+       parseFloat(Prototype.Version.split(".")[0] + "." +
+                  Prototype.Version.split(".")[1]) < 1.5)
+       throw("script.aculo.us requires the Prototype JavaScript framework >= 1.5.0");
+
+    $A(document.getElementsByTagName("script")).findAll( function(s) {
+      return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
+    }).each( function(s) {
+      var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
+      var includes = s.src.match(/\?.*load=([a-z,]*)/);
+      (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each(
+       function(include) { Scriptaculous.require(path+include+'.js') });
+    });
+  }
+}
+
+Scriptaculous.load();
+
+
+/**
+ * Copyright 2005 Darren L. Spurgeon
+ * Copyright 2007 Jens Kapitza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var AjaxJspTag = {
+  Version: '1.3'
+};
+
+/**
+ * AjaxTags
+ */
+
+AjaxJspTag.Base = function() {};
+AjaxJspTag.Base.prototype = {
+
+  resolveParameters: function() {
+    // Strip URL of querystring and append it to parameters
+    var qs = delimitQueryString(extractQueryString(this.url));
+    if (this.options.parameters) {
+      this.options.parameters += ',' + qs;
+    } else {
+      this.options.parameters = qs;
+    }
+    this.url = trimQueryString(this.url);
+
+    if ((this.options.parameters.length > 0 ) && (this.options.parameters.charAt(this.options.parameters.length - 1) === ',')) {
+      this.options.parameters = this.options.parameters.substr(0,this.options.parameters.length-1);
+    }
+  }
+
+};
+
+/**
+ * Prefunction Invoke Ajax.Update TAG
+ */
+AjaxJspTag.PreFunctionUpdateInvoke = Class.create();
+AjaxJspTag.PreFunctionUpdateInvoke.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(ajaxupdateData) {
+  this.preFunction = ajaxupdateData.preFunction;
+  if (isFunction(this.preFunction))
+  {
+  	this.preFunction();
+  }
+  if (this.cancelExecution) {
+	    	this.cancelExecution = false;
+	    	return ;
+      	}
+  var thisCall = new Ajax.Updater(ajaxupdateData.id,ajaxupdateData.href,{onComplete: ajaxupdateData.postFunction});
+  }
+
+
+});
+
+
+/**
+ * UPDATEFIELD TAG
+ */
+AjaxJspTag.UpdateField = Class.create();
+AjaxJspTag.UpdateField.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+    this.setListeners();
+    addAjaxListener(this);
+  },
+  reload: function () {
+    this.setListeners();
+  },
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameters: options.parameters || '',
+      doPost: options.doPost || false,
+      valueUpdateByName:  options.valueUpdateByName || false,
+      eventType: options.eventType ? options.eventType : "click",
+      parser: options.parser ? options.parser :  ( options.valueUpdateByName ? new ResponseXmlParser(): new ResponseTextParser()),
+      handler: options.handler ? options.handler : this.handler
+    }, options || {});
+  },
+
+  setListeners: function() {
+    eval("$(this.options.action).on"+this.options.eventType+" = this.execute.bindAsEventListener(this)");
+  },
+
+  execute: function(e) {
+    if (isFunction(this.options.preFunction))
+    {
+    	this.options.preFunction();
+	}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+    // parse parameters and do replacements
+    var params = buildParameterString(this.options.parameters);
+
+    // parse targets
+    var targetList = this.options.target.split(',');
+
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    var setFunc = this.setField;
+    var aj = new Ajax.Request(this.url, {
+      asynchronous: true,
+      method: obj.options.doPost ? 'post':'get',
+      evalScripts: true,
+      parameters: params,
+      onSuccess: function(request) {
+        obj.options.parser.load(request);
+        var results = obj.options.parser.itemList;
+        obj.options.handler(request, {targets: targetList, items: results});
+      },
+      onFailure: function(request) {
+        if (isFunction(obj.options.errorFunction)){
+         obj.options.errorFunction(request,obj.options.parser);
+     	}
+      },
+      onComplete: function(request) {
+        if (isFunction(obj.options.postFunction)) { obj.options.postFunction(); }
+      }
+    });
+  },
+
+  handler: function(request, optionsArr) {
+  // this points to options
+    for (var i=0; i<optionsArr.targets.length && i<optionsArr.items.length; i++) {
+   	namedIndex = i;
+   	if (this.valueUpdateByName) {
+    	for (j=0; j <optionsArr.items.length; j++) {
+    		if (optionsArr.targets[i]  ===  optionsArr.items[j][0]) {
+    			namedIndex = j;
+    		}
+    	}
+    }
+    $(optionsArr.targets[i]).value = optionsArr.items[namedIndex][1];
+    }
+  }
+
+});
+
+
+
+/**
+ * CALLBACK TAG
+ */
+AjaxJspTag.Callback = Class.create();
+AjaxJspTag.Callback.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+    this.errorCount = 0;
+    addOnLoadEvent(this );
+  },
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameters: options.parameters || '',
+      parser: options.parser ? options.parser : new ResponseCallBackXmlParser(),
+      plainText: options.plainText ?   true : false ,
+      handler: options.handler ? options.handler : this.handler
+    }, options || {});
+  },
+  onload: function(){
+  	this.run();
+  },
+  run: function(){
+  // wenn fehler kommen den client veranlassen eben nicht mehr versuchen sich anzumelden
+    if (!this.isRunning && this.errorCount < 100) {
+      this.execute();
+    }
+  },
+  execute: function(e) {
+    if (isFunction(this.options.preFunction)) { this.options.preFunction();}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+    // parse parameters and do replacements
+    //var params = buildParameterString(this.options.parameters);
+
+    // parse targets
+    this.isRunning = true;
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    var aj = new Ajax.Request(this.url, {
+      asynchronous: true,
+      method:  'post',
+      evalScripts: true,
+      onSuccess: function(request) {
+        obj.options.parser.load(request);
+        obj.options.list = obj.options.parser.items;
+        obj.errorCount = 0;
+
+      },
+      onFailure: function(request) {
+        if (isFunction(obj.options.errorFunction)) {obj.options.errorFunction();}
+        obj.isRunning = false;
+        obj.errorCount++;
+      },
+      onComplete: function(request) {
+      	// nun this.list kann mit der antwor alles gemacht werden was man will
+        if (isFunction(obj.options.postFunction)) {obj.options.postFunction();}
+        obj.isRunning = false;
+        obj.run();
+      }
+    });
+  }
+});
+/// callback -- ende
+
+
+
+
+
+/**
+ * SELECT TAG
+ */
+AjaxJspTag.Select = Class.create();
+AjaxJspTag.Select.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+    this.setListeners();
+
+    if (parseBoolean(this.options.executeOnLoad)) {
+      this.execute();
+    }
+   addAjaxListener(this);
+  },
+  reload: function () {
+    this.setListeners();
+  },
+
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameters: options.parameters || '',
+      doPost: options.doPost || false,
+      emptyOptionValue: options.emptyOptionValue || '',
+      emptyOptionName:  options.emptyOptionName || '',
+      eventType: options.eventType ? options.eventType : "change",
+      parser: options.parser ? options.parser : new ResponseXmlParser(),
+      handler: options.handler ? options.handler : this.handler
+    }, options || {});
+  },
+
+  setListeners: function() {
+  $(this.options.source).ajaxSelect = this;
+
+    Event.observe($(this.options.source),
+      this.options.eventType,
+      this.execute.bindAsEventListener(this),
+      false);
+    eval("$(this.options.source).on"+this.options.eventType+" = function(){return false;};");
+  },
+
+  execute: function(e) {
+    if (isFunction(this.options.preFunction)) {this.options.preFunction();}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+    // parse parameters and do replacements
+    var params = buildParameterString(this.options.parameters);
+
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    var aj = new Ajax.Request(this.url, {
+      asynchronous: true,
+      method: obj.options.doPost ? 'post':'get',
+      evalScripts: true,
+      parameters: params,
+      onSuccess: function(request) {
+        obj.options.parser.load(request);
+        var results = obj.options.parser.itemList;
+        obj.options.handler(request, {target: obj.options.target,
+                                      items: results });
+      },
+      onFailure: function(request) {
+        if (isFunction(obj.options.errorFunction)){ obj.options.errorFunction();}
+      },
+      onComplete: function(request) {
+        if (isFunction(obj.options.postFunction)) {obj.options.postFunction();}
+      }
+    });
+  },
+
+  handler: function(request, options) {
+    // build an array of option values to be set as selected
+
+    $(options.target).options.length = 0;
+    $(options.target).disabled = false;
+    for (var i=0; i<options.items.length; i++) {
+      var newOption = new Option(options.items[i][0], options.items[i][1]);
+      //$(options.target).options[i] = new Option(options.items[i][0], options.items[i][1]);
+      // set the option as selected if it is in the default list
+      if ( newOption.selected == false && options.items[i].length == 3 && parseBoolean(options.items[i][2]) ){
+           newOption.selected = true;
+      }
+      $(options.target).options[i] = newOption;
+    }
+
+
+    if (options.items.length == 0)
+    {
+      $(options.target).options[i] = new Option(this.emptyOptionName, this.emptyOptionValue);
+    	$(options.target).disabled = true;
+    }
+    // auch ein SELECT TAG ?
+   	if ($(options.target).ajaxSelect && $(options.target).ajaxSelect.execute)
+   	{
+   		$(options.target).ajaxSelect.execute();
+   	}
+  }
+
+});
+
+
+/**
+ * HTMLCONTENT TAG
+ */
+AjaxJspTag.HtmlContent = Class.create();
+AjaxJspTag.HtmlContent.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+    this.setListeners();
+    addAjaxListener(this);
+
+  },
+  reload: function(){
+  	this.setListeners();
+  },
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameterName: options.parameterName ? options.parameterName : AJAX_DEFAULT_PARAMETER,
+      parameters: options.parameters || '',
+      doPost: options.doPost || false,
+
+      preFunctionParameter:options.preFunctionParameter || null,
+      errorFunctionParameter:  options.errorFunctionParameter || null,
+      postFunctionParameter: options.postFunctionParameter || null,
+
+      eventType: options.eventType ? options.eventType : "click",
+      parser: options.parser ? options.parser : new ResponseHtmlParser(),
+      handler: options.handler ? options.handler : this.handler
+    }, options || {});
+  },
+
+  setListeners: function() {
+    if (this.options.source) {
+      eval("$(this.options.source).on"+this.options.eventType+" = this.execute.bindAsEventListener(this)");
+    } else if (this.options.sourceClass) {
+      var elementArray = document.getElementsByClassName(this.options.sourceClass);
+      for (var i=0; i<elementArray.length; i++) {
+        eval("elementArray[i].on"+this.options.eventType+" = this.execute.bindAsEventListener(this)");
+      }
+    }
+  },
+
+  execute: function(e) {
+  	this.options.preFunctionParameters = evalJScriptParameters(  this.options.preFunctionParameter);
+
+    if (isFunction(this.options.preFunction)) {this.options.preFunction();}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+    // replace default parameter with value/content of source element selected
+    var ajaxParameters = this.options.parameters;
+    if (this.options.sourceClass) {
+      var re = new RegExp("(\\{"+this.options.parameterName+"\\})", 'g');
+      var elem = Event.element(e);
+      if (elem.type) {
+        ajaxParameters = ajaxParameters.replace(re, $F(elem));
+      } else {
+        ajaxParameters = ajaxParameters.replace(re, elem.innerHTML);
+      }
+    }
+
+    // parse parameters and do replacements
+    var params = buildParameterString(ajaxParameters);
+
+    var obj = t

<TRUNCATED>

[10/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/popup.html
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/popup.html b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/popup.html
new file mode 100644
index 0000000..4b549db
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/popup.html
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+<head>
+<title>{$charmap_title}</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="css/charmap.css" />
+<script language="Javascript" type="text/javascript" src="jscripts/map.js">
+</script>
+</head>
+<body onload='map_load()'>
+<div id='preview_code' class='preview'></div>
+<div id='preview_char' class='preview'></div>
+<h1>{$charmap_title}:</h1>
+<select id='select_range' onchange='renderCharMapHTML()' title='{$charmap_choose_block}'>
+</select>
+<div id='char_list'>
+
+</div>
+
+
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/css/test.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/css/test.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/css/test.css
new file mode 100644
index 0000000..01245eb
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/css/test.css
@@ -0,0 +1,3 @@
+select#test_select{
+	background-color: #FF0000;
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/images/Thumbs.db
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/images/Thumbs.db b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/images/Thumbs.db
new file mode 100644
index 0000000..863ae41
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/images/Thumbs.db differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/images/test.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/images/test.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/images/test.gif
new file mode 100644
index 0000000..1ab5da4
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/images/test.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/bg.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/bg.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/bg.js
new file mode 100644
index 0000000..56e049e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/bg.js
@@ -0,0 +1,10 @@
+/*
+ *	Bulgarian translation
+ *	Author:		Valentin Hristov
+ *	Company:	SOFTKIT Bulgarian
+ *	Site:		http://www.softkit-bg.com
+ */
+editArea.add_lang("bg",{
+test_select: "избери таг",
+test_but: "тествай копието"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/cs.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/cs.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/cs.js
new file mode 100644
index 0000000..026ef04
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/cs.js
@@ -0,0 +1,4 @@
+editArea.add_lang("cs",{
+test_select: "select tag",
+test_but: "test button"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/de.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/de.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/de.js
new file mode 100644
index 0000000..bd0857c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/de.js
@@ -0,0 +1,4 @@
+editArea.add_lang("de",{
+test_select: "Tag ausw&auml;hlen",
+test_but: "Test Button"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/dk.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/dk.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/dk.js
new file mode 100644
index 0000000..e765cf9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/dk.js
@@ -0,0 +1,4 @@
+editArea.add_lang("dk",{
+test_select: "select tag",
+test_but: "test button"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/en.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/en.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/en.js
new file mode 100644
index 0000000..7d5d157
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/en.js
@@ -0,0 +1,4 @@
+editArea.add_lang("en",{
+test_select: "select tag",
+test_but: "test button"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/eo.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/eo.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/eo.js
new file mode 100644
index 0000000..8b4914f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/eo.js
@@ -0,0 +1,4 @@
+editArea.add_lang("eo",{
+test_select:"elekto de marko",
+test_but: "provo-butono"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/es.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/es.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/es.js
new file mode 100644
index 0000000..73e30f1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/es.js
@@ -0,0 +1,4 @@
+editArea.add_lang("es",{
+test_select: "select tag",
+test_but: "test button"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/fr.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/fr.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/fr.js
new file mode 100644
index 0000000..ea08a93
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/fr.js
@@ -0,0 +1,4 @@
+editArea.add_lang("fr",{
+test_select:"choix balise",
+test_but: "bouton de test"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/hr.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/hr.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/hr.js
new file mode 100644
index 0000000..fbffd98
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/hr.js
@@ -0,0 +1,4 @@
+editArea.add_lang("hr",{
+test_select: "Odaberi tag",
+test_but: "Probna tipka"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/it.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/it.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/it.js
new file mode 100644
index 0000000..90926fe
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/it.js
@@ -0,0 +1,4 @@
+editArea.add_lang("it",{
+test_select: "seleziona tag",
+test_but: "pulsante di test"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/ja.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/ja.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/ja.js
new file mode 100644
index 0000000..2eb856c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/ja.js
@@ -0,0 +1,4 @@
+editArea.add_lang("ja",{
+test_select: "select tag",
+test_but: "test button"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/mk.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/mk.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/mk.js
new file mode 100644
index 0000000..058ad4b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/mk.js
@@ -0,0 +1,4 @@
+editArea.add_lang("mk",{
+test_select: "select tag",
+test_but: "test button"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/nl.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/nl.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/nl.js
new file mode 100644
index 0000000..3217c35
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/nl.js
@@ -0,0 +1,4 @@
+editArea.add_lang("nl",{
+test_select: "select tag",
+test_but: "test button"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/pl.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/pl.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/pl.js
new file mode 100644
index 0000000..5c73732
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/pl.js
@@ -0,0 +1,4 @@
+editArea.add_lang("pl",{
+test_select: "wybierz tag",
+test_but: "test"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/pt.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/pt.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/pt.js
new file mode 100644
index 0000000..7f85172
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/pt.js
@@ -0,0 +1,4 @@
+editArea.add_lang("pt",{
+test_select: "select tag",
+test_but: "test button"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/ru.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/ru.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/ru.js
new file mode 100644
index 0000000..0aaf542
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/ru.js
@@ -0,0 +1,4 @@
+editArea.add_lang("ru",{
+test_select: "выбрать тэг",
+test_but: "тестировать кнопку"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/sk.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/sk.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/sk.js
new file mode 100644
index 0000000..fe0a727
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/sk.js
@@ -0,0 +1,4 @@
+editArea.add_lang("sk",{
+test_select: "vyber tag",
+test_but: "testovacie tlačidlo"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/zh.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/zh.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/zh.js
new file mode 100644
index 0000000..798d175
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/langs/zh.js
@@ -0,0 +1,4 @@
+editArea.add_lang("zh",{
+test_select: "选择标签",
+test_but: "测试按钮"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/test.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/test.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/test.js
new file mode 100644
index 0000000..46e71ef
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/test.js
@@ -0,0 +1,110 @@
+/**
+ * Plugin designed for test prupose. It add a button (that manage an alert) and a select (that allow to insert tags) in the toolbar.
+ * This plugin also disable the "f" key in the editarea, and load a CSS and a JS file
+ */  
+var EditArea_test= {
+	/**
+	 * Get called once this file is loaded (editArea still not initialized)
+	 *
+	 * @return nothing	 
+	 */	 	 	
+	init: function(){	
+		//	alert("test init: "+ this._someInternalFunction(2, 3));
+		editArea.load_css(this.baseURL+"css/test.css");
+		editArea.load_script(this.baseURL+"test2.js");
+	}
+	/**
+	 * Returns the HTML code for a specific control string or false if this plugin doesn't have that control.
+	 * A control can be a button, select list or any other HTML item to present in the EditArea user interface.
+	 * Language variables such as {$lang_somekey} will also be replaced with contents from
+	 * the language packs.
+	 * 
+	 * @param {string} ctrl_name: the name of the control to add	  
+	 * @return HTML code for a specific control or false.
+	 * @type string	or boolean
+	 */	
+	,get_control_html: function(ctrl_name){
+		switch(ctrl_name){
+			case "test_but":
+				// Control id, button img, command
+				return parent.editAreaLoader.get_button_html('test_but', 'test.gif', 'test_cmd', false, this.baseURL);
+			case "test_select":
+				html= "<select id='test_select' onchange='javascript:editArea.execCommand(\"test_select_change\")' fileSpecific='no'>"
+					+"			<option value='-1'>{$test_select}</option>"
+					+"			<option value='h1'>h1</option>"
+					+"			<option value='h2'>h2</option>"
+					+"			<option value='h3'>h3</option>"
+					+"			<option value='h4'>h4</option>"
+					+"			<option value='h5'>h5</option>"
+					+"			<option value='h6'>h6</option>"
+					+"		</select>";
+				return html;
+		}
+		return false;
+	}
+	/**
+	 * Get called once EditArea is fully loaded and initialised
+	 *	 
+	 * @return nothing
+	 */	 	 	
+	,onload: function(){ 
+		alert("test load");
+	}
+	
+	/**
+	 * Is called each time the user touch a keyboard key.
+	 *	 
+	 * @param (event) e: the keydown event
+	 * @return true - pass to next handler in chain, false - stop chain execution
+	 * @type boolean	 
+	 */
+	,onkeydown: function(e){
+		var str= String.fromCharCode(e.keyCode);
+		// desactivate the "f" character
+		if(str.toLowerCase()=="f"){
+			return true;
+		}
+		return false;
+	}
+	
+	/**
+	 * Executes a specific command, this function handles plugin commands.
+	 *
+	 * @param {string} cmd: the name of the command being executed
+	 * @param {unknown} param: the parameter of the command	 
+	 * @return true - pass to next handler in chain, false - stop chain execution
+	 * @type boolean	
+	 */
+	,execCommand: function(cmd, param){
+		// Handle commands
+		switch(cmd){
+			case "test_select_change":
+				var val= document.getElementById("test_select").value;
+				if(val!=-1)
+					parent.editAreaLoader.insertTags(editArea.id, "<"+val+">", "</"+val+">");
+				document.getElementById("test_select").options[0].selected=true; 
+				return false;
+			case "test_cmd":
+				alert("user clicked on test_cmd");
+				return false;
+		}
+		// Pass to next handler in chain
+		return true;
+	}
+	
+	/**
+	 * This is just an internal plugin method, prefix all internal methods with a _ character.
+	 * The prefix is needed so they doesn't collide with future EditArea callback functions.
+	 *
+	 * @param {string} a Some arg1.
+	 * @param {string} b Some arg2.
+	 * @return Some return.
+	 * @type unknown
+	 */
+	,_someInternalFunction : function(a, b) {
+		return a+b;
+	}
+};
+
+// Adds the plugin class to the list of available EditArea plugins
+editArea.add_plugin("test", EditArea_test);

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/test2.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/test2.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/test2.js
new file mode 100644
index 0000000..9a1ce51
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/test/test2.js
@@ -0,0 +1 @@
+alert("test2.js is loaded from test plugin");

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax.js
new file mode 100644
index 0000000..11518cc
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax.js
@@ -0,0 +1,166 @@
+	EditAreaLoader.prototype.get_regexp= function(text_array){
+		//res="( |=|\\n|\\r|\\[|\\(|µ|)(";
+		res="(\\b)(";
+		for(i=0; i<text_array.length; i++){
+			if(i>0)
+				res+="|";
+			//res+="("+ tab_text[i] +")";
+			//res+=tab_text[i].replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\{|\})/g, "\\$1");
+			res+=this.get_escaped_regexp(text_array[i]);
+		}
+		//res+=")( |\\.|:|\\{|\\(|\\)|\\[|\\]|\'|\"|\\r|\\n|\\t|$)";
+		res+=")(\\b)";
+		reg= new RegExp(res);
+		
+		return res;
+	};
+	
+	
+	EditAreaLoader.prototype.get_escaped_regexp= function(str){
+		return str.toString().replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g, "\\$1");
+	};
+	
+	EditAreaLoader.prototype.init_syntax_regexp= function(){
+		var lang_style= {};	
+		for(var lang in this.load_syntax){
+			if(!this.syntax[lang])	// init the regexp if not already initialized
+			{
+				this.syntax[lang]= {};
+				this.syntax[lang]["keywords_reg_exp"]= {};
+				this.keywords_reg_exp_nb=0;
+			
+				if(this.load_syntax[lang]['KEYWORDS']){
+					param="g";
+					if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false)
+						param+="i";
+					for(var i in this.load_syntax[lang]['KEYWORDS']){
+						if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function") continue;
+						this.syntax[lang]["keywords_reg_exp"][i]= new RegExp(this.get_regexp( this.load_syntax[lang]['KEYWORDS'][i] ), param);
+						this.keywords_reg_exp_nb++;
+					}
+				}
+				
+				if(this.load_syntax[lang]['OPERATORS']){
+					var str="";
+					var nb=0;
+					for(var i in this.load_syntax[lang]['OPERATORS']){
+						if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function") continue;
+						if(nb>0)
+							str+="|";				
+						str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);
+						nb++;
+					}
+					if(str.length>0)
+						this.syntax[lang]["operators_reg_exp"]= new RegExp("("+str+")","g");
+				}
+				
+				if(this.load_syntax[lang]['DELIMITERS']){
+					var str="";
+					var nb=0;
+					for(var i in this.load_syntax[lang]['DELIMITERS']){
+						if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function") continue;
+						if(nb>0)
+							str+="|";
+						str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);
+						nb++;
+					}
+					if(str.length>0)
+						this.syntax[lang]["delimiters_reg_exp"]= new RegExp("("+str+")","g");
+				}
+				
+				
+		//		/(("(\\"|[^"])*"?)|('(\\'|[^'])*'?)|(//(.|\r|\t)*\n)|(/\*(.|\n|\r|\t)*\*/)|(<!--(.|\n|\r|\t)*-->))/gi
+				var syntax_trace=[];
+				
+		//		/("(?:[^"\\]*(\\\\)*(\\"?)?)*("|$))/g
+				
+				this.syntax[lang]["quotes"]={};
+				var quote_tab= [];
+				if(this.load_syntax[lang]['QUOTEMARKS']){
+					for(var i in this.load_syntax[lang]['QUOTEMARKS']){	
+						if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function") continue;			
+						var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);
+						this.syntax[lang]["quotes"][x]=x;
+						//quote_tab[quote_tab.length]="("+x+"(?:\\\\"+x+"|[^"+x+"])*("+x+"|$))";
+						//previous working : quote_tab[quote_tab.length]="("+x+"(?:[^"+x+"\\\\]*(\\\\\\\\)*(\\\\"+x+"?)?)*("+x+"|$))";
+						quote_tab[quote_tab.length]="("+ x +"(\\\\.|[^"+ x +"])*(?:"+ x +"|$))";
+						
+						syntax_trace.push(x);			
+					}			
+				}
+						
+				this.syntax[lang]["comments"]={};
+				if(this.load_syntax[lang]['COMMENT_SINGLE']){
+					for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){	
+						if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function") continue;						
+						var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);
+						quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";
+						syntax_trace.push(x);
+						this.syntax[lang]["comments"][x]="\n";
+					}			
+				}		
+				// (/\*(.|[\r\n])*?\*/)
+				if(this.load_syntax[lang]['COMMENT_MULTI']){
+					for(var i in this.load_syntax[lang]['COMMENT_MULTI']){
+						if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function") continue;							
+						var start=this.get_escaped_regexp(i);
+						var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);
+						quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";
+						syntax_trace.push(start);
+						syntax_trace.push(end);
+						this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];
+					}			
+				}		
+				if(quote_tab.length>0)
+					this.syntax[lang]["comment_or_quote_reg_exp"]= new RegExp("("+quote_tab.join("|")+")","gi");
+				
+				if(syntax_trace.length>0) //   /((.|\n)*?)(\\*("|'|\/\*|\*\/|\/\/|$))/g
+					this.syntax[lang]["syntax_trace_regexp"]= new RegExp("((.|\n)*?)(\\\\*("+ syntax_trace.join("|") +"|$))", "gmi");
+				
+				if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){
+					this.syntax[lang]["script_delimiters"]= {};
+					for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){
+						if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function") continue;							
+						this.syntax[lang]["script_delimiters"][i]= this.load_syntax[lang]['SCRIPT_DELIMITERS'];
+					}			
+				}
+				
+				this.syntax[lang]["custom_regexp"]= {};
+				if(this.load_syntax[lang]['REGEXPS']){
+					for(var i in this.load_syntax[lang]['REGEXPS']){
+						if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function") continue;
+						var val= this.load_syntax[lang]['REGEXPS'][i];
+						if(!this.syntax[lang]["custom_regexp"][val['execute']])
+							this.syntax[lang]["custom_regexp"][val['execute']]= {};
+						this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp' : new RegExp(val['search'], val['modifiers'])
+																			, 'class' : val['class']};
+					}
+				}
+				
+				if(this.load_syntax[lang]['STYLES']){							
+					lang_style[lang]= {};
+					for(var i in this.load_syntax[lang]['STYLES']){
+						if(typeof(this.load_syntax[lang]['STYLES'][i])=="function") continue;
+						if(typeof(this.load_syntax[lang]['STYLES'][i]) != "string"){
+							for(var j in this.load_syntax[lang]['STYLES'][i]){							
+								lang_style[lang][j]= this.load_syntax[lang]['STYLES'][i][j];
+							}
+						}else{
+							lang_style[lang][i]= this.load_syntax[lang]['STYLES'][i];
+						}
+					}
+				}
+				// build style string
+				var style="";		
+				for(var i in lang_style[lang]){
+					if(lang_style[lang][i].length>0){
+						style+= "."+ lang +" ."+ i.toLowerCase() +" span{"+lang_style[lang][i]+"}\n";
+						style+= "."+ lang +" ."+ i.toLowerCase() +"{"+lang_style[lang][i]+"}\n";				
+					}
+				}
+				this.syntax[lang]["styles"]=style;
+			}
+		}				
+	};
+	
+	editAreaLoader.waiting_loading["reg_syntax.js"]= "loaded";

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/basic.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/basic.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/basic.js
new file mode 100644
index 0000000..d8082f7
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/basic.js
@@ -0,0 +1,70 @@
+editAreaLoader.load_syntax["basic"] = {
+	'DISPLAY_NAME' : 'Basic'
+	,'COMMENT_SINGLE' : {1 : "'", 2 : 'rem'}
+	,'COMMENT_MULTI' : { }
+	,'QUOTEMARKS' : {1: '"'}
+	,'KEYWORD_CASE_SENSITIVE' : false
+	,'KEYWORDS' : {
+		'statements' : [
+			'if','then','for','wend','while',
+			'else','elseif','select','case','end select',
+			'until','next','step','to','end if', 'call'
+		]
+		,'keywords' : [
+			'sub', 'end sub', 'function', 'end function', 'exit',
+			'exit function', 'dim', 'redim', 'shared', 'const',
+			'is', 'absolute', 'access', 'any', 'append', 'as',
+			'base', 'beep', 'binary', 'bload', 'bsave', 'chain',
+			'chdir', 'circle', 'clear', 'close', 'cls', 'color',
+			'com', 'common', 'data', 'date', 'declare', 'def',
+			'defdbl', 'defint', 'deflng', 'defsng', 'defstr',
+			'double', 'draw', 'environ', 'erase', 'error', 'field',
+			'files', 'fn', 'get', 'gosub', 'goto', 'integer', 'key',
+			'kill', 'let', 'line', 'list', 'locate', 'lock', 'long',
+			'lprint', 'lset', 'mkdir', 'name', 'off', 'on', 'open',
+			'option', 'out', 'output', 'paint', 'palette', 'pcopy',
+			'poke', 'preset', 'print', 'pset', 'put', 'random',
+			'randomize', 'read', 'reset', 'restore', 'resume',
+			'return', 'rmdir', 'rset', 'run', 'screen', 'seg',
+			'shell', 'single', 'sleep', 'sound', 'static', 'stop',
+			'strig', 'string', 'swap', 'system', 'time', 'timer',
+			'troff', 'tron', 'type', 'unlock', 'using', 'view',
+			'wait', 'width', 'window', 'write'
+	        ]
+		,'functions' : [
+			'abs', 'asc', 'atn', 'cdbl', 'chr', 'cint', 'clng',
+			'cos', 'csng', 'csrlin', 'cvd', 'cvdmbf', 'cvi', 'cvl',
+			'cvs', 'cvsmbf', 'eof', 'erdev', 'erl', 'err', 'exp',
+			'fileattr', 'fix', 'fre', 'freefile', 'hex', 'inkey',
+			'inp', 'input', 'instr', 'int', 'ioctl', 'lbound',
+			'lcase', 'left', 'len', 'loc', 'lof', 'log', 'lpos',
+			'ltrim', 'mid', 'mkd', 'mkdmbf', 'mki', 'mkl', 'mks',
+			'mksmbf', 'oct', 'peek', 'pen', 'play', 'pmap', 'point',
+			'pos', 'right', 'rnd', 'rtrim', 'seek', 'sgn', 'sin',
+			'space', 'spc', 'sqr', 'stick', 'str', 'tab', 'tan',
+			'ubound', 'ucase', 'val', 'varptr', 'varseg'
+		]
+		,'operators' : [
+			'and', 'eqv', 'imp', 'mod', 'not', 'or', 'xor'
+		]
+	}
+	,'OPERATORS' :[
+		'+', '-', '/', '*', '=', '<', '>', '!', '&'
+	]
+	,'DELIMITERS' :[
+		'(', ')', '[', ']', '{', '}'
+	]
+	,'STYLES' : {
+		'COMMENTS': 'color: #99CC00;'
+		,'QUOTESMARKS': 'color: #333399;'
+		,'KEYWORDS' : {
+			'keywords' : 'color: #3366FF;'
+			,'functions' : 'color: #0000FF;'
+			,'statements' : 'color: #3366FF;'
+			,'operators' : 'color: #FF0000;'
+			}
+		,'OPERATORS' : 'color: #FF0000;'
+		,'DELIMITERS' : 'color: #0000FF;'
+
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/brainfuck.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/brainfuck.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/brainfuck.js
new file mode 100644
index 0000000..6f8f063
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/brainfuck.js
@@ -0,0 +1,45 @@
+editAreaLoader.load_syntax["brainfuck"] = {
+	'DISPLAY_NAME' : 'Brainfuck'
+	,'COMMENT_SINGLE' : {}
+	,'COMMENT_MULTI' : {}
+	,'QUOTEMARKS' : {}
+	,'KEYWORD_CASE_SENSITIVE' : true
+	,'OPERATORS' :[
+		'+', '-'
+	]
+	,'DELIMITERS' :[
+		'[', ']'
+	]
+	,'REGEXPS' : {
+		'bfispis' : {
+			'search' : '()(\\.)()'
+			,'class' : 'bfispis'
+			,'modifiers' : 'g'
+			,'execute' : 'before'
+		}
+		,'bfupis' : {
+			'search' : '()(\\,)()'
+			,'class' : 'bfupis'
+			,'modifiers' : 'g'
+			,'execute' : 'before'
+		}
+		,'bfmemory' : {
+			'search' : '()([<>])()'
+			,'class' : 'bfmemory'
+			,'modifiers' : 'g'
+			,'execute' : 'before'
+		}
+	}
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #6381F8;'
+		,'OPERATORS' : 'color: #88AA00;'
+		,'DELIMITERS' : 'color: #00C138;'
+		,'REGEXPS' : {
+			'bfispis' : 'color: #EE0000;'
+			,'bfupis' : 'color: #4455ee;'
+			,'bfmemory' : 'color: #DD00DD;'
+		}
+	}
+};
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/c.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/c.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/c.js
new file mode 100644
index 0000000..0e0f843
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/c.js
@@ -0,0 +1,63 @@
+editAreaLoader.load_syntax["c"] = {
+	'DISPLAY_NAME' : 'C'
+	,'COMMENT_SINGLE' : {1 : '//'}
+	,'COMMENT_MULTI' : {'/*' : '*/'}
+	,'QUOTEMARKS' : {1: "'", 2: '"'}
+	,'KEYWORD_CASE_SENSITIVE' : true
+	,'KEYWORDS' : {
+		'constants' : [
+			'NULL', 'false', 'stdin', 'stdout', 'stderr', 'true'
+		]
+		,'types' : [
+			'FILE', 'auto', 'char', 'const', 'double',
+			'extern', 'float', 'inline', 'int', 'long', 'register',
+			'short', 'signed', 'size_t', 'static', 'struct',
+			'time_t', 'typedef', 'union', 'unsigned', 'void',
+			'volatile'
+		]
+		,'statements' : [
+			'do', 'else', 'enum', 'for', 'goto', 'if', 'sizeof',
+			'switch', 'while'
+		]
+ 		,'keywords' : [
+			'break', 'case', 'continue', 'default', 'delete',
+			'return'
+		]
+	}
+	,'OPERATORS' :[
+		'+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
+	]
+	,'DELIMITERS' :[
+		'(', ')', '[', ']', '{', '}'
+	]
+	,'REGEXPS' : {
+		'precompiler' : {
+			'search' : '()(#[^\r\n]*)()'
+			,'class' : 'precompiler'
+			,'modifiers' : 'g'
+			,'execute' : 'before'
+		}
+/*		,'precompilerstring' : {
+			'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])'
+			,'class' : 'precompilerstring'
+			,'modifiers' : 'g'
+			,'execute' : 'before'
+		}*/
+	}
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #6381F8;'
+		,'KEYWORDS' : {
+			'constants' : 'color: #EE0000;'
+			,'types' : 'color: #0000EE;'
+			,'statements' : 'color: #60CA00;'
+			,'keywords' : 'color: #48BDDF;'
+		}
+		,'OPERATORS' : 'color: #FF00FF;'
+		,'DELIMITERS' : 'color: #0038E1;'
+		,'REGEXPS' : {
+			'precompiler' : 'color: #009900;'
+			,'precompilerstring' : 'color: #994400;'
+		}
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/coldfusion.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/coldfusion.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/coldfusion.js
new file mode 100644
index 0000000..792f10b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/coldfusion.js
@@ -0,0 +1,120 @@
+editAreaLoader.load_syntax["coldfusion"] = {
+	'DISPLAY_NAME' : 'Coldfusion'
+	,'COMMENT_SINGLE' : {1 : '//', 2 : '#'}
+	,'COMMENT_MULTI' : {'<!--' : '-->'}
+	,'COMMENT_MULTI2' : {'<!---' : '--->'}
+	,'QUOTEMARKS' : {1: "'", 2: '"'}
+	,'KEYWORD_CASE_SENSITIVE' : false
+		,'KEYWORDS' : {
+		'statements' : [
+			'include', 'require', 'include_once', 'require_once',
+			'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile',
+            'endif', 'switch', 'case', 'endswitch',
+			'return', 'break', 'continue'
+		]
+		,'reserved' : [
+			'AND', 'break', 'case', 'CONTAIN', 'CONTAINS', 'continue', 'default', 'do', 
+			'DOES', 'else', 'EQ', 'EQUAL', 'EQUALTO', 'EQV', 'FALSE', 'for', 'GE', 
+			'GREATER', 'GT', 'GTE', 'if', 'IMP', 'in', 'IS', 'LE', 'LESS', 'LT', 'LTE', 
+			'MOD', 'NEQ', 'NOT', 'OR', 'return', 'switch', 'THAN', 'TO', 'TRUE', 'var', 
+			'while', 'XOR'
+		]
+		,'functions' : [
+			'Abs', 'ACos', 'ArrayAppend', 'ArrayAvg', 'ArrayClear', 'ArrayDeleteAt', 'ArrayInsertAt', 
+			'ArrayIsEmpty', 'ArrayLen', 'ArrayMax', 'ArrayMin', 'ArrayNew', 'ArrayPrepend', 'ArrayResize', 
+			'ArraySet', 'ArraySort', 'ArraySum', 'ArraySwap', 'ArrayToList', 'Asc', 'ASin', 'Atn', 'AuthenticatedContext', 
+			'AuthenticatedUser', 'BitAnd', 'BitMaskClear', 'BitMaskRead', 'BitMaskSet', 'BitNot', 'BitOr', 
+			'BitSHLN', 'BitSHRN', 'BitXor', 'Ceiling', 'Chr', 'CJustify', 'Compare', 'CompareNoCase', 'Cos', 
+			'CreateDate', 'CreateDateTime', 'CreateODBCDate', 'CreateODBCDateTime', 'CreateODBCTime', 
+			'CreateTime', 'CreateTimeSpan', 'DateAdd', 'DateCompare', 'DateConvert', 'DateDiff', 
+			'DateFormat', 'DatePart', 'Day', 'DayOfWeek', 'DayOfWeekAsString', 'DayOfYear', 'DaysInMonth', 
+			'DaysInYear', 'DE', 'DecimalFormat', 'DecrementValue', 'Decrypt', 'DeleteClientVariable', 
+			'DirectoryExists', 'DollarFormat', 'Duplicate', 'Encrypt', 'Evaluate', 'Exp', 'ExpandPath', 
+			'FileExists', 'Find', 'FindNoCase', 'FindOneOf', 'FirstDayOfMonth', 'Fix', 'FormatBaseN', 
+			'GetBaseTagData', 'GetBaseTagList', 'GetBaseTemplatePath', 'GetClientVariablesList', 
+			'GetCurrentTemplatePath', 'GetDirectoryFromPath', 'GetException', 'GetFileFromPath', 
+			'GetFunctionList', 'GetHttpTimeString', 'GetHttpRequestData', 'GetLocale', 'GetMetricData', 
+			'GetProfileString', 'GetTempDirectory', 'GetTempFile', 'GetTemplatePath', 'GetTickCount', 
+			'GetTimeZoneInfo', 'GetToken', 'Hash', 'Hour', 'HTMLCodeFormat', 'HTMLEditFormat', 'IIf', 
+			'IncrementValue', 'InputBaseN', 'Insert', 'Int', 'IsArray', 'IsAuthenticated', 'IsAuthorized', 
+			'IsBoolean', 'IsBinary', 'IsCustomFunction', 'IsDate', 'IsDebugMode', 'IsDefined', 'IsLeapYear', 
+			'IsNumeric', 'IsNumericDate', 'IsProtected', 'IsQuery', 'IsSimpleValue', 'IsStruct', 'IsWDDX', 
+			'JavaCast', 'JSStringFormat', 'LCase', 'Left', 'Len', 'ListAppend', 'ListChangeDelims', 
+			'ListContains', 'ListContainsNoCase', 'ListDeleteAt', 'ListFind', 'ListFindNoCase', 'ListFirst', 
+			'ListGetAt', 'ListInsertAt', 'ListLast', 'ListLen', 'ListPrepend', 'ListQualify', 'ListRest', 
+			'ListSetAt', 'ListSort', 'ListToArray', 'ListValueCount', 'ListValueCountNoCase', 'LJustify', 
+			'Log', 'Log10', 'LSCurrencyFormat', 'LSDateFormat', 'LSEuroCurrencyFormat', 'LSIsCurrency', 
+			'LSIsDate', 'LSIsNumeric', 'LSNumberFormat', 'LSParseCurrency', 'LSParseDateTime', 'LSParseNumber', 
+			'LSTimeFormat', 'LTrim', 'Max', 'Mid', 'Min', 'Minute', 'Month', 'MonthAsString', 'Now', 'NumberFormat', 
+			'ParagraphFormat', 'ParameterExists', 'ParseDateTime', 'Pi', 'PreserveSingleQuotes', 'Quarter', 
+			'QueryAddRow', 'QueryNew', 'QuerySetCell', 'QuotedValueList', 'Rand', 'Randomize', 'RandRange', 
+			'REFind', 'REFindNoCase', 'RemoveChars', 'RepeatString', 'Replace', 'ReplaceList', 'ReplaceNoCase', 
+			'REReplace', 'REReplaceNoCase', 'Reverse', 'Right', 'RJustify', 'Round', 'RTrim', 'Second', 'SetLocale', 
+			'SetProfileString', 'SetVariable', 'Sgn', 'Sin', 'SpanExcluding', 'SpanIncluding', 'Sqr', 'StripCR', 
+			'StructAppend', 'StructClear', 'StructCopy', 'StructCount', 'StructDelete', 'StructFind', 'StructFindKey', 
+			'StructFindValue', 'StructGet', 'StructInsert', 'StructIsEmpty', 'StructKeyArray', 'StructKeyExists', 
+			'StructKeyList', 'StructNew', 'StructSort', 'StructUpdate', 'Tan', 'TimeFormat', 'ToBase64', 'ToBinary', 
+			'ToString', 'Trim', 'UCase', 'URLDecode', 'URLEncodedFormat', 'Val', 'ValueList', 'Week', 'WriteOutput', 
+			'XMLFormat', 'Year', 'YesNoFormat'
+		]
+	}
+	,'OPERATORS' :[
+		'+', '-', '/', '*', '%', '!', '&&', '||'
+	]
+	,'DELIMITERS' :[
+		'(', ')', '[', ']', '{', '}'
+	]
+	,'REGEXPS' : {
+		'doctype' : {
+			'search' : '()(<!DOCTYPE[^>]*>)()'
+			,'class' : 'doctype'
+			,'modifiers' : ''
+			,'execute' : 'before' // before or after
+		}
+		,'cftags' : {
+			'search' : '(<)(/cf[a-z][^ \r\n\t>]*)([^>]*>)'
+			,'class' : 'cftags'
+			,'modifiers' : 'gi'
+			,'execute' : 'before' // before or after
+		}
+		,'cftags2' : {
+			'search' : '(<)(cf[a-z][^ \r\n\t>]*)([^>]*>)'
+			,'class' : 'cftags2'
+			,'modifiers' : 'gi'
+			,'execute' : 'before' // before or after
+		}
+		,'tags' : {
+			'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
+			,'class' : 'tags'
+			,'modifiers' : 'gi'
+			,'execute' : 'before' // before or after
+		}
+		,'attributes' : {
+			'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
+			,'class' : 'attributes'
+			,'modifiers' : 'g'
+			,'execute' : 'before' // before or after
+		}
+	}
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #6381F8;'
+		,'KEYWORDS' : {
+			'reserved' : 'color: #48BDDF;'
+			,'functions' : 'color: #0000FF;'
+			,'statements' : 'color: #60CA00;'
+			}
+		,'OPERATORS' : 'color: #E775F0;'
+		,'DELIMITERS' : ''
+		,'REGEXPS' : {
+			'attributes': 'color: #990033;'
+			,'cftags': 'color: #990033;'
+			,'cftags2': 'color: #990033;'
+			,'tags': 'color: #000099;'
+			,'doctype': 'color: #8DCFB5;'
+			,'test': 'color: #00FF00;'
+		}	
+	}		
+};
+
+ 	  	 

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/cpp.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/cpp.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/cpp.js
new file mode 100644
index 0000000..6b176e8
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/cpp.js
@@ -0,0 +1,66 @@
+editAreaLoader.load_syntax["cpp"] = {
+	'DISPLAY_NAME' : 'CPP'
+	,'COMMENT_SINGLE' : {1 : '//'}
+	,'COMMENT_MULTI' : {'/*' : '*/'}
+	,'QUOTEMARKS' : {1: "'", 2: '"'}
+	,'KEYWORD_CASE_SENSITIVE' : true
+	,'KEYWORDS' : {
+		'constants' : [
+			'NULL', 'false', 'std', 'stdin', 'stdout', 'stderr',
+			'true'
+		]
+		,'types' : [
+			'FILE', 'auto', 'char', 'class', 'const', 'double',
+			'extern', 'float', 'friend', 'inline', 'int',
+			'iterator', 'long', 'map', 'operator', 'queue',
+			'register', 'short', 'signed', 'size_t', 'stack',
+			'static', 'string', 'struct', 'time_t', 'typedef',
+			'union', 'unsigned', 'vector', 'void', 'volatile'
+		]
+		,'statements' : [
+			'catch', 'do', 'else', 'enum', 'for', 'goto', 'if',
+			'sizeof', 'switch', 'this', 'throw', 'try', 'while'
+		]
+ 		,'keywords' : [
+			'break', 'case', 'continue', 'default', 'delete',
+			'namespace', 'new', 'private', 'protected', 'public',
+			'return', 'using'
+		]
+	}
+	,'OPERATORS' :[
+		'+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
+	]
+	,'DELIMITERS' :[
+		'(', ')', '[', ']', '{', '}'
+	]
+	,'REGEXPS' : {
+		'precompiler' : {
+			'search' : '()(#[^\r\n]*)()'
+			,'class' : 'precompiler'
+			,'modifiers' : 'g'
+			,'execute' : 'before'
+		}
+/*		,'precompilerstring' : {
+			'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])'
+			,'class' : 'precompilerstring'
+			,'modifiers' : 'g'
+			,'execute' : 'before'
+		}*/
+	}
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #6381F8;'
+		,'KEYWORDS' : {
+			'constants' : 'color: #EE0000;'
+			,'types' : 'color: #0000EE;'
+			,'statements' : 'color: #60CA00;'
+			,'keywords' : 'color: #48BDDF;'
+		}
+		,'OPERATORS' : 'color: #FF00FF;'
+		,'DELIMITERS' : 'color: #0038E1;'
+		,'REGEXPS' : {
+			'precompiler' : 'color: #009900;'
+			,'precompilerstring' : 'color: #994400;'
+		}
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/css.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/css.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/css.js
new file mode 100644
index 0000000..087186b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/css.js
@@ -0,0 +1,85 @@
+editAreaLoader.load_syntax["css"] = {
+	'DISPLAY_NAME' : 'CSS'
+	,'COMMENT_SINGLE' : {1 : '@'}
+	,'COMMENT_MULTI' : {'/*' : '*/'}
+	,'QUOTEMARKS' : ['"', "'"]
+	,'KEYWORD_CASE_SENSITIVE' : false
+	,'KEYWORDS' : {
+		'attributes' : [
+			'aqua', 'azimuth', 'background-attachment', 'background-color',
+			'background-image', 'background-position', 'background-repeat',
+			'background', 'border-bottom-color', 'border-bottom-style',
+			'border-bottom-width', 'border-left-color', 'border-left-style',
+			'border-left-width', 'border-right', 'border-right-color',
+			'border-right-style', 'border-right-width', 'border-top-color',
+			'border-top-style', 'border-top-width','border-bottom', 'border-collapse',
+			'border-left', 'border-width', 'border-color', 'border-spacing',
+			'border-style', 'border-top', 'border',  'caption-side',
+			'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset',
+			'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',
+			'elevation', 'empty-cells', 'float', 'font-family', 'font-size',
+			'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
+			'font-weight', 'font', 'height', 'letter-spacing', 'line-height',
+			'list-style', 'list-style-image', 'list-style-position', 'list-style-type',
+			'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin',
+			'marker-offset', 'marks', 'max-height', 'max-width', 'min-height',
+			'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style',
+			'outline-width', 'overflow', 'padding-bottom', 'padding-left',
+			'padding-right', 'padding-top', 'padding', 'page', 'page-break-after',
+			'page-break-before', 'page-break-inside', 'pause-after', 'pause-before',
+			'pause', 'pitch', 'pitch-range',  'play-during', 'position', 'quotes',
+			'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation',
+			'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration',
+			'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi',
+			'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows',
+			'width', 'word-spacing', 'z-index', 'bottom', 'left'
+		]
+		,'values' : [
+			'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid',
+			'baseline', 'behind', 'below', 'bidi-override', 'black', 'blue', 'blink', 'block', 'bold', 'bolder', 'both',
+			'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic', 
+            'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive',
+			'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double',
+			'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded',
+			'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia',
+			'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher',
+			'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline',
+			'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana',
+			'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low',
+			'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace',
+			'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize',
+			'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline',
+			'pointer', 'portrait', 'purple', 'px',
+			'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards',
+			's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square',
+			'static', 'status-bar', 'super', 'sw-resize',
+			'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent',
+			'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url',
+			'visible',
+			'w-resize', 'wait', 'white', 'wider',
+			'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small',
+			'yellow', 'yes'
+		]
+		,'specials' : [
+			'important'
+		]
+	}
+	,'OPERATORS' :[
+		':', ';', '!', '.', '#'
+	]
+	,'DELIMITERS' :[
+		'{', '}'
+	]
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #6381F8;'
+		,'KEYWORDS' : {
+			'attributes' : 'color: #48BDDF;'
+			,'values' : 'color: #2B60FF;'
+			,'specials' : 'color: #FF0000;'
+			}
+		,'OPERATORS' : 'color: #FF00FF;'
+		,'DELIMITERS' : 'color: #60CA00;'
+				
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/html.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/html.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/html.js
new file mode 100644
index 0000000..defab6b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/html.js
@@ -0,0 +1,51 @@
+/*
+* last update: 2006-08-24
+*/
+
+editAreaLoader.load_syntax["html"] = {
+	'DISPLAY_NAME' : 'HTML'
+	,'COMMENT_SINGLE' : {}
+	,'COMMENT_MULTI' : {'<!--' : '-->'}
+	,'QUOTEMARKS' : {1: "'", 2: '"'}
+	,'KEYWORD_CASE_SENSITIVE' : false
+	,'KEYWORDS' : {
+	}
+	,'OPERATORS' :[
+	]
+	,'DELIMITERS' :[
+	]
+	,'REGEXPS' : {
+		'doctype' : {
+			'search' : '()(<!DOCTYPE[^>]*>)()'
+			,'class' : 'doctype'
+			,'modifiers' : ''
+			,'execute' : 'before' // before or after
+		}
+		,'tags' : {
+			'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
+			,'class' : 'tags'
+			,'modifiers' : 'gi'
+			,'execute' : 'before' // before or after
+		}
+		,'attributes' : {
+			'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
+			,'class' : 'attributes'
+			,'modifiers' : 'g'
+			,'execute' : 'before' // before or after
+		}
+	}
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #6381F8;'
+		,'KEYWORDS' : {
+			}
+		,'OPERATORS' : 'color: #E775F0;'
+		,'DELIMITERS' : ''
+		,'REGEXPS' : {
+			'attributes': 'color: #B1AC41;'
+			,'tags': 'color: #E62253;'
+			,'doctype': 'color: #8DCFB5;'
+			,'test': 'color: #00FF00;'
+		}	
+	}		
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/java.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/java.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/java.js
new file mode 100644
index 0000000..2c01928
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/java.js
@@ -0,0 +1,57 @@
+editAreaLoader.load_syntax["java"] = {
+	'DISPLAY_NAME' : 'Java'
+	,'COMMENT_SINGLE': { 1: '//', 2: '@' }
+	, 'COMMENT_MULTI': { '/*': '*/' }
+	, 'QUOTEMARKS': { 1: "'", 2: '"' }
+	, 'KEYWORD_CASE_SENSITIVE': true
+	, 'KEYWORDS': {
+	    'constants': [
+			'null', 'false', 'true'
+		]
+		, 'types': [
+			'String', 'int', 'short', 'long', 'char', 'double', 'byte',
+			'float', 'static', 'void', 'private', 'boolean', 'protected',
+			'public', 'const', 'class', 'final', 'abstract', 'volatile',
+			'enum', 'transient', 'interface'
+		]
+		, 'statements': [
+            'this', 'extends', 'if', 'do', 'while', 'try', 'catch', 'finally',
+            'throw', 'throws', 'else', 'for', 'switch', 'continue', 'implements',
+            'break', 'case', 'default', 'goto'
+		]
+ 		, 'keywords': [
+           'new', 'return', 'import', 'native', 'super', 'package', 'assert', 'synchronized',
+           'instanceof', 'strictfp'
+		]
+	}
+	, 'OPERATORS': [
+		'+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
+	]
+	, 'DELIMITERS': [
+		'(', ')', '[', ']', '{', '}'
+	]
+	, 'REGEXPS': {
+	    'precompiler': {
+	        'search': '()(#[^\r\n]*)()'
+			, 'class': 'precompiler'
+			, 'modifiers': 'g'
+			, 'execute': 'before'
+	    }
+	}
+	, 'STYLES': {
+	    'COMMENTS': 'color: #AAAAAA;'
+		, 'QUOTESMARKS': 'color: #6381F8;'
+		, 'KEYWORDS': {
+		    'constants': 'color: #EE0000;'
+			, 'types': 'color: #0000EE;'
+			, 'statements': 'color: #60CA00;'
+			, 'keywords': 'color: #48BDDF;'
+		}
+		, 'OPERATORS': 'color: #FF00FF;'
+		, 'DELIMITERS': 'color: #0038E1;'
+		, 'REGEXPS': {
+		    'precompiler': 'color: #009900;'
+			, 'precompilerstring': 'color: #994400;'
+		}
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/js.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/js.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/js.js
new file mode 100644
index 0000000..cf7533a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/js.js
@@ -0,0 +1,94 @@
+editAreaLoader.load_syntax["js"] = {
+	'DISPLAY_NAME' : 'Javascript'
+	,'COMMENT_SINGLE' : {1 : '//'}
+	,'COMMENT_MULTI' : {'/*' : '*/'}
+	,'QUOTEMARKS' : {1: "'", 2: '"'}
+	,'KEYWORD_CASE_SENSITIVE' : false
+	,'KEYWORDS' : {
+		'statements' : [
+			'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
+			'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
+			'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
+			'while', 'write', 'with'
+		]
+ 		,'keywords' : [
+			'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
+			'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
+			'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document',		
+			// the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice
+			'Link ', 'outerHeight ', 'Anchor', 'FileUpload', 
+			'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self', 
+			'arguments', 'locationbar', 'pageXoffset', 'Form', 
+			'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status', 
+			'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy', 
+			'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden', 
+			'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents', 
+			'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text', 
+			'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity', 
+			'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed', 
+			'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents', 
+			'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus', 
+			'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document', 
+			'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window', 
+			'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy'			
+		]
+    	,'functions' : [
+			// common functions for Window object
+			'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home',
+			'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
+			'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status',
+			'stop' 
+		]
+	}
+	,'OPERATORS' :[
+		'+', '-', '/', '*', '=', '<', '>', '%', '!'
+	]
+	,'DELIMITERS' :[
+		'(', ')', '[', ']', '{', '}'
+	]
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #6381F8;'
+		,'KEYWORDS' : {
+			'statements' : 'color: #60CA00;'
+			,'keywords' : 'color: #48BDDF;'
+			,'functions' : 'color: #2B60FF;'
+		}
+		,'OPERATORS' : 'color: #FF00FF;'
+		,'DELIMITERS' : 'color: #0038E1;'
+				
+	}
+	,'AUTO_COMPLETION' :  {
+		"default": {	// the name of this definition group. It's posisble to have different rules inside the same definition file
+			"REGEXP": { "before_word": "[^a-zA-Z0-9_]|^"	// \\s|\\.|
+						,"possible_words_letters": "[a-zA-Z0-9_]+"
+						,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
+						,"prefix_separator": "\\."
+					}
+			,"CASE_SENSITIVE": true
+			,"MAX_TEXT_LENGTH": 100		// the maximum length of the text being analyzed before the cursor position
+			,"KEYWORDS": {
+				'': [	// the prefix of thoses items
+						/**
+						 * 0 : the keyword the user is typing
+						 * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous )
+						 * 		If empty the keyword will be displayed
+						 * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed)
+						 */
+						 ['Array', '§()', '']
+			    		,['alert', '§({@})', 'alert(String message)']
+			    		,['document']
+			    		,['window']
+			    	]
+		    	,'window' : [
+			    		 ['location']
+			    		,['document']
+			    		,['scrollTo', 'scrollTo({@})', 'scrollTo(Int x,Int y)']
+					]
+		    	,'location' : [
+			    		 ['href']
+					]
+			}
+		}
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/pas.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/pas.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/pas.js
new file mode 100644
index 0000000..0efaed9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/pas.js
@@ -0,0 +1,83 @@
+editAreaLoader.load_syntax["pas"] = {
+	'DISPLAY_NAME' : 'Pascal'
+	,'COMMENT_SINGLE' : {}
+	,'COMMENT_MULTI' : {'{' : '}', '(*':'*)'}
+	,'QUOTEMARKS' : {1: '"', 2: "'"}
+	,'KEYWORD_CASE_SENSITIVE' : false
+	,'KEYWORDS' : {
+		'constants' : [
+			'Blink', 'Black', 'Blue', 'Green', 'Cyan', 'Red',
+			'Magenta', 'Brown', 'LightGray', 'DarkGray',
+			'LightBlue', 'LightGreen', 'LightCyan', 'LightRed',
+			'LightMagenta', 'Yellow', 'White', 'MaxSIntValue',
+			'MaxUIntValue', 'maxint', 'maxLongint', 'maxSmallint',
+			'erroraddr', 'errorcode', 'LineEnding'
+		]
+		,'keywords' : [
+			'in', 'or', 'div', 'mod', 'and', 'shl', 'shr', 'xor',
+			'pow', 'is', 'not','Absolute', 'And_then', 'Array',
+			'Begin', 'Bindable', 'Case', 'Const', 'Do', 'Downto',
+			'Else', 'End', 'Export', 'File', 'For', 'Function',
+			'Goto', 'If', 'Import', 'Implementation', 'Inherited',
+			'Inline', 'Interface', 'Label', 'Module', 'Nil',
+			'Object', 'Of', 'Only', 'Operator', 'Or_else',
+			'Otherwise', 'Packed', 'Procedure', 'Program',
+			'Protected', 'Qualified', 'Record', 'Repeat',
+			'Restricted', 'Set', 'Then', 'To', 'Type', 'Unit',
+			'Until', 'Uses', 'Value', 'Var', 'Virtual', 'While',
+			'With'
+		]
+		,'functions' : [
+			'Abs', 'Addr', 'Append', 'Arctan', 'Assert', 'Assign',
+			'Assigned', 'BinStr', 'Blockread', 'Blockwrite',
+			'Break', 'Chdir', 'Chr', 'Close', 'CompareByte',
+			'CompareChar', 'CompareDWord', 'CompareWord', 'Concat',
+			'Continue', 'Copy', 'Cos', 'CSeg', 'Dec', 'Delete',
+			'Dispose', 'DSeg', 'Eof', 'Eoln', 'Erase', 'Exclude',
+			'Exit', 'Exp', 'Filepos', 'Filesize', 'FillByte',
+			'Fillchar', 'FillDWord', 'Fillword', 'Flush', 'Frac',
+			'Freemem', 'Getdir', 'Getmem', 'GetMemoryManager',
+			'Halt', 'HexStr', 'Hi', 'High', 'Inc', 'Include',
+			'IndexByte', 'IndexChar', 'IndexDWord', 'IndexWord',
+			'Insert', 'IsMemoryManagerSet', 'Int', 'IOresult',
+			'Length', 'Ln', 'Lo', 'LongJmp', 'Low', 'Lowercase',
+			'Mark', 'Maxavail', 'Memavail', 'Mkdir', 'Move',
+			'MoveChar0', 'New', 'Odd', 'OctStr', 'Ofs', 'Ord',
+			'Paramcount', 'Paramstr', 'Pi', 'Pos', 'Power', 'Pred',
+			'Ptr', 'Random', 'Randomize', 'Read', 'Readln',
+			'Real2Double', 'Release', 'Rename', 'Reset', 'Rewrite',
+			'Rmdir', 'Round', 'Runerror', 'Seek', 'SeekEof',
+			'SeekEoln', 'Seg', 'SetMemoryManager', 'SetJmp',
+			'SetLength', 'SetString', 'SetTextBuf', 'Sin', 'SizeOf',
+			'Sptr', 'Sqr', 'Sqrt', 'SSeg', 'Str', 'StringOfChar',
+			'Succ', 'Swap', 'Trunc', 'Truncate', 'Upcase', 'Val',
+			'Write', 'WriteLn'
+		]
+		,'types' : [
+			'Integer', 'Shortint', 'SmallInt', 'Longint',
+			'Longword', 'Int64', 'Byte', 'Word', 'Cardinal',
+			'QWord', 'Boolean', 'ByteBool', 'LongBool', 'Char',
+			'Real', 'Single', 'Double', 'Extended', 'Comp',
+			'String', 'ShortString', 'AnsiString', 'PChar'
+		]
+	}
+	,'OPERATORS' :[
+		'@', '*', '+', '-', '/', '^', ':=', '<', '=', '>'
+	]
+	,'DELIMITERS' :[
+		'(', ')', '[', ']'
+	]
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #6381F8;'
+		,'KEYWORDS' : {
+			'specials' : 'color: #EE0000;'
+			,'constants' : 'color: #654321;'
+			,'keywords' : 'color: #48BDDF;'
+			,'functions' : 'color: #449922;'
+			,'types' : 'color: #2B60FF;'
+			}
+		,'OPERATORS' : 'color: #FF00FF;'
+		,'DELIMITERS' : 'color: #60CA00;'
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/perl.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/perl.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/perl.js
new file mode 100644
index 0000000..d9cc0b6
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/perl.js
@@ -0,0 +1,88 @@
+/***************************************************************************
+ * (c) 2008 - file created by Christoph Pinkel, MTC Infomedia OHG.
+ *
+ * You may choose any license of the current release or any future release
+ * of editarea to use, modify and/or redistribute this file.
+ *
+ * This language specification file supports for syntax checking on
+ * a large subset of Perl 5.x.
+ * The basic common syntax of Perl is fully supported, but as for
+ * the highlighting of built-in operations, it's mainly designed
+ * to support for hightlighting Perl code in a Safe environment (compartment)
+ * as used by CoMaNet for evaluation of administrative scripts. This Safe
+ * compartment basically allows for all of Opcode's :default operations,
+ * but little others. See http://perldoc.perl.org/Opcode.html to learn
+ * more.
+ ***************************************************************************/
+
+editAreaLoader.load_syntax["perl"] = {
+	'DISPLAY_NAME' : 'Perl',
+	'COMMENT_SINGLE' : {1 : '#'},
+	'QUOTEMARKS' : {1: "'", 2: '"'},
+	'KEYWORD_CASE_SENSITIVE' : true,
+	'KEYWORDS' :
+	{
+		'core' :
+			[ "if", "else", "elsif", "while", "for", "each", "foreach",
+				"next", "last", "goto", "exists", "delete", "undef",
+				"my", "our", "local", "use", "require", "package", "keys", "values",
+				"sub", "bless", "ref", "return" ],
+		'functions' :
+			[
+				//from :base_core
+				"int", "hex", "oct", "abs", "substr", "vec", "study", "pos",
+				"length", "index", "rindex", "ord", "chr", "ucfirst", "lcfirst",
+				"uc", "lc", "quotemeta", "chop", "chomp", "split", "list", "splice",
+				"push", "pop", "shift", "unshift", "reverse", "and", "or", "dor",
+				"xor", "warn", "die", "prototype",
+				//from :base_mem
+				"concat", "repeat", "join", "range",
+				//none from :base_loop, as we'll see them as basic statements...
+				//from :base_orig
+				"sprintf", "crypt", "tie", "untie", "select", "localtime", "gmtime",
+				//others
+				"print", "open", "close"
+			]
+	},
+	'OPERATORS' :
+		[ '+', '-', '/', '*', '=', '<', '>', '!', '||', '.', '&&',
+			' eq ', ' ne ', '=~' ],
+	'DELIMITERS' :
+		[ '(', ')', '[', ']', '{', '}' ],
+	'REGEXPS' :
+	{
+		'packagedecl' : { 'search': '(package )([^ \r\n\t#;]*)()',
+			'class' : 'scopingnames',
+			'modifiers' : 'g', 'execute' : 'before' },
+		'subdecl' : { 'search': '(sub )([^ \r\n\t#]*)()',
+			'class' : 'scopingnames',
+			'modifiers' : 'g', 'execute' : 'before' },
+		'scalars' : { 'search': '()(\\\$[a-zA-Z0-9_:]*)()',
+			'class' : 'vars',
+			'modifiers' : 'g', 'execute' : 'after' },
+		'arrays' : { 'search': '()(@[a-zA-Z0-9_:]*)()',
+			'class' : 'vars',
+			'modifiers' : 'g', 'execute' : 'after' },
+		'hashs' : { 'search': '()(%[a-zA-Z0-9_:]*)()',
+			'class' : 'vars',
+			'modifiers' : 'g', 'execute' : 'after' },
+	},
+
+	'STYLES' :
+	{
+		'COMMENTS': 'color: #AAAAAA;',
+		'QUOTESMARKS': 'color: #DC0000;',
+		'KEYWORDS' :
+		{
+			'core' : 'color: #8aca00;',
+			'functions' : 'color: #2B60FF;'
+		},
+		'OPERATORS' : 'color: #8aca00;',
+		'DELIMITERS' : 'color: #0038E1;',
+		'REGEXPS':
+		{
+			'scopingnames' : 'color: #ff0000;',
+			'vars' : 'color: #00aaaa;',
+		}
+	} //'STYLES'
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/php.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/php.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/php.js
new file mode 100644
index 0000000..1d35ddb
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/php.js
@@ -0,0 +1,157 @@
+editAreaLoader.load_syntax["php"] = {
+	'DISPLAY_NAME' : 'Php'
+	,'COMMENT_SINGLE' : {1 : '//', 2 : '#'}
+	,'COMMENT_MULTI' : {'/*' : '*/'}
+	,'QUOTEMARKS' : {1: "'", 2: '"'}
+	,'KEYWORD_CASE_SENSITIVE' : false
+	,'KEYWORDS' : {
+		'statements' : [
+			'include', 'require', 'include_once', 'require_once',
+			'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile',
+            'endif', 'switch', 'case', 'endswitch',
+			'return', 'break', 'continue'
+		]
+		,'reserved' : [
+			'_GET', '_POST', '_SESSION', '_SERVER', '_FILES', '_ENV', '_COOKIE', '_REQUEST',
+			'null', '__LINE__', '__FILE__',
+			'false', '&lt;?php', '?&gt;', '&lt;?',
+			'&lt;script language', '&lt;/script&gt;',
+			'true', 'var', 'default',
+			'function', 'class', 'new', '&amp;new', 'this',
+			'__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION',
+			'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR',
+			'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR',
+			'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT',
+			'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE',
+			'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR',
+			'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL'
+			
+		]
+		,'functions' : [
+			'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined',
+			'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions',
+			'extension_loaded', 'get_extension_funcs', 'debug_backtrace',
+			'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv',
+			'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime',
+			'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar',
+			'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewi
 nddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown',
+			'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists
 ', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate',
+			'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode',
+			'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_i
 nsert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat',
+			'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_fi
 eld_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from',
+			'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport',
+			'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die'
+
+		]
+	}
+	,'OPERATORS' :[
+		'+', '-', '/', '*', '=', '<', '>', '%', '!', '&&', '||'
+	]
+	,'DELIMITERS' :[
+		'(', ')', '[', ']', '{', '}'
+	]
+	,'REGEXPS' : {
+		// highlight all variables ($...)
+		'variables' : {
+			'search' : '()(\\$\\w+)()'
+			,'class' : 'variables'
+			,'modifiers' : 'g'
+			,'execute' : 'before' // before or after
+		}
+	}
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #879EFA;'
+		,'KEYWORDS' : {
+			'reserved' : 'color: #48BDDF;'
+			,'functions' : 'color: #0040FD;'
+			,'statements' : 'color: #60CA00;'
+			}
+		,'OPERATORS' : 'color: #FF00FF;'
+		,'DELIMITERS' : 'color: #2B60FF;'
+		,'REGEXPS' : {
+			'variables' : 'color: #E0BD54;'
+		}		
+	}
+	,'AUTO_COMPLETION' :  {
+		"default": {	// the name of this definition group. It's posisble to have different rules inside the same definition file
+			"REGEXP": { "before_word": "[^a-zA-Z0-9_]|^"	// \\s|\\.|
+						,"possible_words_letters": "[a-zA-Z0-9_\$]+"
+						,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
+						,"prefix_separator": "\\-\\>|\\:\\:"
+					}
+			,"CASE_SENSITIVE": true
+			,"MAX_TEXT_LENGTH": 100		// the maximum length of the text being analyzed before the cursor position
+			,"KEYWORDS": {
+					'': [	// the prefix of thoses items
+						/**
+						 * 0 : the keyword the user is typing
+						 * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous )
+						 * 		If empty the keyword will be displayed
+						 * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed)
+						 */
+						 ['$_POST']
+			    		,['$_GET']
+			    		,['$_SESSION']
+			    		,['$_SERVER']
+			    		,['$_FILES']
+			    		,['$_ENV']
+			    		,['$_COOKIE']
+			    		,['$_REQUEST']
+			    		// magic methods
+			    		,['__construct', '§( {@} )']
+			    		,['__destruct', '§( {@} )']
+			    		,['__sleep', '§( {@} )']
+			    		,['__wakeup', '§( {@} )']
+			    		,['__toString', '§( {@} )']
+			    		// include
+			    		,['include', '§ "{@}";']
+			    		,['include_once', '§ "{@}";']
+			    		,['require', '§ "{@}";']
+			    		,['require_once', '§ "{@}";']
+			    		// statements
+			    		,['for', '§( {@} )']
+			    		,['foreach', '§( {@} )']
+			    		,['if', '§( {@} )']
+			    		,['elseif', '§( {@} )']
+			    		,['while', '§( {@} )']
+			    		,['switch', '§( {@} )']
+			    		,['break']
+			    		,['case']
+			    		,['continue']
+			    		,['do']
+			    		,['else']
+			    		,['endif']
+			    		,['endswitch']
+			    		,['endwhile']
+			    		,['return']
+			    		// function
+			    		,['unset', '§( {@} )']
+					]
+				}
+			}
+		,"live": {	
+			
+			// class NAME: /class\W+([a-z]+)\W+/gi
+			// method: /^(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi
+			// static: /^(public|private|protected)?\s+static\s+(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi 
+			// attributes: /(\$this\-\>|(?:var|public|protected|private)\W+\$)([a-z0-9\_]+)(?!\()\b/gi 
+			// 		v1 : /(\$this\-\>|var\W+|public\W+|protected\W+|private\W+)([a-z0-9\_]+)\W*(=|;)/gi 
+			// var type: /(\$(this\-\>)?[a-z0-9\_]+)\s*\=\s*new\s+([a-z0-9\_])+/gi 
+			
+			
+			"REGEXP": { "before_word": "[^a-zA-Z0-9_]|^"	// \\s|\\.|
+						,"possible_words_letters": "[a-zA-Z0-9_\$]+"
+						,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
+						,"prefix_separator": "\\-\\>"
+					}
+			,"CASE_SENSITIVE": true
+			,"MAX_TEXT_LENGTH": 100		// the maximum length of the text being analyzed before the cursor position
+			,"KEYWORDS": {
+					'$this': [	// the prefix of thoses items
+						['test']
+					]
+				}
+			}
+	}
+};


[29/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/template.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/template.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/template.js
new file mode 100644
index 0000000..3481706
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/template.js
@@ -0,0 +1,462 @@
+/*
+ * Copyright 2005,2007 WSO2, Inc. http://wso2.com
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//Javascript for collapsible menu
+var oneYear = 1000 * 60 * 60 * 24 * 365;
+var cookie_date = new Date();  // current date & time
+cookie_date.setTime(cookie_date.getTime() + oneYear);
+var onMenuSlide = new YAHOO.util.CustomEvent("onMenuSlide");
+
+function nextObject(obj) {
+    var n = obj;
+    do n = n.nextSibling;
+    while (n && n.nodeType != 1);
+    return n;
+}
+function mainMenuCollapse(img) {
+    var theLi = img.parentNode;
+    var nextLi = nextObject(theLi);
+    var attributes = "";
+    if (nextLi.style.display == "none") {
+        //remember the state
+        document.cookie = img.id + "=visible;path=/;expires=" + cookie_date.toGMTString();
+        var ver = getInternetExplorerVersion();
+
+        if (ver > -1)
+        {
+            if (ver >= 8.0) {
+                attributes = {
+                    opacity: { to: 1 }
+                };
+                var anim = new YAHOO.util.Anim(nextLi, attributes);
+                anim.animate();
+                nextLi.style.display = "";
+                nextLi.style.height = "auto";
+            } else {
+                nextLi.style.display = "";
+            }
+        } else
+        {
+            attributes = {
+                opacity: { to: 1 }
+            };
+            var anim = new YAHOO.util.Anim(nextLi, attributes);
+            anim.animate();
+            nextLi.style.display = "";
+            nextLi.style.height = "auto";
+        }
+        img.src = "../admin/images/up-arrow.gif";
+
+    } else {
+        //remember the state
+        document.cookie = img.id + "=none;path=/;expires=" + cookie_date.toGMTString();
+        var ver = getInternetExplorerVersion();
+
+        if (ver > -1)
+        {
+            if (ver >= 8.0) {
+                attributes = {
+                    opacity: { to: 0 }
+                };
+                anim = new YAHOO.util.Anim(nextLi, attributes);
+                anim.duration = 0.3;
+                anim.onComplete.subscribe(hideTreeItem, nextLi);
+
+                anim.animate();
+            } else {
+                nextLi.style.display = "none";
+            }
+        } else {
+            attributes = {
+                opacity: { to: 0 }
+            };
+            anim = new YAHOO.util.Anim(nextLi, attributes);
+            anim.duration = 0.3;
+            anim.onComplete.subscribe(hideTreeItem, nextLi);
+
+            anim.animate();
+        }
+        img.src = "../admin/images/down-arrow.gif";
+
+    }
+}
+
+function hideTreeItem(state, opts, item) {
+    item.style.display = "none";
+}
+
+//YAHOO.util.Event.onDOMReady(setMainMenus);
+function setMainMenus() {
+    var els = YAHOO.util.Dom.getElementsByClassName('mMenuHeaders', 'img');
+       
+    for (var i = 0; i < els.length; i++) {
+        var theLi = els[i].parentNode;
+        var nextLi = nextObject(theLi);
+        var cookieName = els[i].id;
+        var nextLiState = get_cookie(cookieName);
+        if(nextLiState == "visible"){
+            nextLiState = "";
+        }
+        if (nextLiState != null) {
+            if (get_cookie('menuPanelType') == null || get_cookie('menuPanelType') == "main") { //Set the menu to main
+
+                if(theLi.id == "region4_monitor_menu"){
+                    nextLi.style.display = "none";        
+                }else if(theLi.id == "region1_configure_menu"){
+                    nextLi.style.display = "none";
+                }else if(theLi.id == "region5_tools_menu"){
+                    nextLi.style.display = "none";
+                }else if(theLi.id == "region3_extensions_menu"){
+                    nextLi.style.display = "none";
+                } else{
+                    nextLi.style.display = nextLiState;
+                }
+            }else if(get_cookie('menuPanelType') == "monitor"){
+                if(theLi.id == "region4_monitor_menu"){
+                    nextLi.style.display = "";
+                }
+            }else if(get_cookie('menuPanelType') == "main"){
+                if(theLi.id == "region1_configure_menu"){
+                    nextLi.style.display = "";
+                }
+            }else if(get_cookie('menuPanelType') == "tools"){
+                if(theLi.id == "region5_tools_menu"){
+                    nextLi.style.display = "";
+                }
+            }else if(get_cookie('menuPanelType') == "extensions"){
+                if(theLi.id == "region3_extensions_menu"){
+                    nextLi.style.display = "";
+                }
+            }
+
+        }
+        if (nextLiState == "none") {
+            els[i].src = "../admin/images/down-arrow.gif";
+        } else {
+            els[i].src = "../admin/images/up-arrow.gif";
+        }
+    }
+}
+
+function get_cookie(check_name) {
+    // first we'll split this cookie up into name/value pairs
+    // note: document.cookie only returns name=value, not the other components
+    var a_all_cookies = document.cookie.split(';');
+    var a_temp_cookie = '';
+    var cookie_name = '';
+    var cookie_value = '';
+    var b_cookie_found = false; // set boolean t/f default f
+
+    for (i = 0; i < a_all_cookies.length; i++)
+    {
+        a_temp_cookie = a_all_cookies[i].split('=');
+        cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
+        if (cookie_name == check_name)
+        {
+            b_cookie_found = true;
+            if (a_temp_cookie.length > 1)
+            {
+                cookie_value = unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g, ''));
+            }
+            return cookie_value;
+            break;
+        }
+        a_temp_cookie = null;
+        cookie_name = '';
+    }
+    if (!b_cookie_found)
+    {
+        return null;
+    }
+}
+function getInternetExplorerVersion()
+    // Returns the version of Internet Explorer or a -1
+    // (indicating the use of another browser).
+{
+    var rv = -1; // Return value assumes failure.
+    if (navigator.appName == 'Microsoft Internet Explorer')
+    {
+        var ua = navigator.userAgent;
+        var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
+        if (re.exec(ua) != null)
+            rv = parseFloat(RegExp.$1);
+    }
+    return rv;
+}
+YAHOO.util.Event.onAvailable('menu-panel-button_dummy',
+        function() {
+        //disable left menu depending on the browser version
+	    if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
+	 	var ffversion=new Number(RegExp.$1); // capture x.x portion and store as a number 	
+		 if (parseFloat(ffversion)<3.5){
+		  	document.getElementById('vertical-menu-container').style.display = "none";
+	        	return;	 	
+		 }
+	    }
+	    if(document.getElementById('loginbox') != null){
+	        document.getElementById('vertical-menu-container').style.display = "none";
+	        return;
+	    }
+
+            
+            document.getElementById('vertical-menu-container').style.display = "";
+            var menuSliderTxt1 = "<span>Main</span>";
+            var menuSliderTxt2 = "<span>Monitor</span>";
+            var menuSliderTxt3 = "<span>Configure</span>";
+            var menuSliderTxt4 = "<span>Tools</span>";
+            var menuSliderTxt5 = "<span>Extensions</span>";
+            if(getInternetExplorerVersion()!=-1){
+                menuSliderTxt1 = '<span class="ie">Main</span>';
+                menuSliderTxt2 = '<span class="ie">Monitor</span>';
+                menuSliderTxt3 = '<span class="ie">Configure</span>';
+                menuSliderTxt4 = '<span class="ie">Tools</span>';
+                menuSliderTxt5 = '<span class="ie">Extensions</span>';
+            }
+            var menuSlider0 = document.getElementById('menu-panel-button0');
+            var menuSlider1 = document.getElementById('menu-panel-button1');
+            var menuSlider2 = document.getElementById('menu-panel-button2');
+            var menuSlider3 = document.getElementById('menu-panel-button3');
+            var menuSlider4 = document.getElementById('menu-panel-button4');
+            var menuSlider5 = document.getElementById('menu-panel-button5');
+            var menuPanel = document.getElementById('menu-panel');
+            
+            if(document.getElementById('region4_monitor_menu') == null){
+            	menuSlider2.style.display = "none";
+            }
+            if(document.getElementById('region1_configure_menu') == null){
+            	menuSlider3.style.display = "none";		
+            }
+            if(document.getElementById('region5_tools_menu') == null){
+            	menuSlider4.style.display = "none";
+            }
+            if(document.getElementById('region3_extensions_menu') == null){
+                menuSlider5.style.display = "none";
+            }
+
+            menuSlider1.innerHTML = menuSliderTxt1;
+            menuSlider2.innerHTML = menuSliderTxt2;
+            menuSlider3.innerHTML = menuSliderTxt3;
+            menuSlider4.innerHTML = menuSliderTxt4;
+            menuSlider5.innerHTML = menuSliderTxt5;
+            if (get_cookie('menuPanel') == null || get_cookie('menuPanel') == "visible") {
+                menuPanel.style.display = "";
+
+                YAHOO.util.Dom.removeClass(menuSlider0, 'hiddenToShow');
+                YAHOO.util.Dom.addClass(menuSlider0, 'showToHidden');
+            } else {
+                menuPanel.style.display = "none";
+
+                YAHOO.util.Dom.removeClass(menuSlider0, 'showToHidden');
+                YAHOO.util.Dom.addClass(menuSlider0, 'hiddenToShow');
+            }
+             if (get_cookie('menuPanelType') == null || get_cookie('menuPanelType') == "main") { //Set the menu to main
+                //show the main section
+                var elmsX = YAHOO.util.Selector.query("#menu-table ul.main > li");
+                 for(var i=0;i<elmsX.length;i++){
+                     elmsX[i].style.display = "";
+                 }
+                 hideSection("region1_configure_menu");
+                 hideSection("region4_monitor_menu");
+                 hideSection("region5_tools_menu");
+                 hideSection("region3_extensions_menu");
+                 selectTab(menuSlider1);
+
+             }else if(get_cookie('menuPanelType') == "monitor"){
+                //hide the config section
+                 var elmsX = YAHOO.util.Selector.query("#menu-table ul.main > li");
+                 for(var i=0;i<elmsX.length;i++){
+                     elmsX[i].style.display = "none";
+                 }
+                 showSection("region4_monitor_menu");
+                 hideSection("region1_configure_menu");
+                 hideSection("region5_tools_menu");
+                 hideSection("region3_extensions_menu");
+                 selectTab(menuSlider2);
+             }else if(get_cookie('menuPanelType') == "config"){
+                //hide the config section
+                 var elmsX = YAHOO.util.Selector.query("#menu-table ul.main > li");
+                 for(var i=0;i<elmsX.length;i++){
+                     elmsX[i].style.display = "none";
+                 }
+                 showSection("region1_configure_menu");
+                 hideSection("region4_monitor_menu");
+                 hideSection("region5_tools_menu");
+                 hideSection("region3_extensions_menu");
+                 selectTab(menuSlider3);
+             }else if(get_cookie('menuPanelType') == "tools"){
+                //hide the config section
+                 var elmsX = YAHOO.util.Selector.query("#menu-table ul.main > li");
+                 for(var i=0;i<elmsX.length;i++){
+                     elmsX[i].style.display = "none";
+                 }
+                 showSection("region5_tools_menu");
+                 hideSection("region1_configure_menu");
+                 hideSection("region4_monitor_menu");
+                 hideSection("region3_extensions_menu");
+                 selectTab(menuSlider4);                 
+             }else if(get_cookie('menuPanelType') == "extensions"){
+                //hide the config section
+                 var elmsX = YAHOO.util.Selector.query("#menu-table ul.main > li");
+                 for(var i=0;i<elmsX.length;i++){
+                     elmsX[i].style.display = "none";
+                 }
+                 showSection("region3_extensions_menu");
+                 hideSection("region1_configure_menu");
+                 hideSection("region4_monitor_menu");
+                 hideSection("region5_tools_menu");
+                 selectTab(menuSlider5);
+             }
+            YAHOO.util.Event.on(menuSlider0, "click", function(e) { //arrow click
+                if (menuPanel.style.display == "") {
+                    menuPanel.style.display = "none";
+                    YAHOO.util.Dom.removeClass(menuSlider0, 'showToHidden');
+                    YAHOO.util.Dom.addClass(menuSlider0, 'hiddenToShow');
+                    document.cookie = "menuPanel=none;path=/;expires=" + cookie_date.toGMTString();
+                    onMenuSlide.fire('invisible');
+                } else {
+                    menuPanel.style.display = "";
+                    YAHOO.util.Dom.removeClass(menuSlider0, 'hiddenToShow');
+                    YAHOO.util.Dom.addClass(menuSlider0, 'showToHidden');
+                    document.cookie = "menuPanel=visible;path=/;expires=" + cookie_date.toGMTString();
+                    onMenuSlide.fire('visible');
+                }
+            });
+            YAHOO.util.Event.on(menuSlider1, "click", function(e) {    //Handle click for main menu
+                menuPanel.style.display = "";
+                YAHOO.util.Dom.removeClass(menuSlider0, 'hiddenToShow');
+                YAHOO.util.Dom.addClass(menuSlider0, 'showToHidden');
+                document.cookie = "menuPanel=visible;path=/;expires=" + cookie_date.toGMTString();
+                document.cookie = "menuPanelType=main;path=/;expires=" + cookie_date.toGMTString();
+                onMenuSlide.fire('visible');
+
+                //show the main section
+                var elmsX = YAHOO.util.Selector.query("#menu-table ul.main > li");
+                 for(var i=0;i<elmsX.length;i++){
+                     elmsX[i].style.display = "";
+                 }
+                hideSection('region4_monitor_menu');
+                hideSection('region1_configure_menu');
+                hideSection('region5_tools_menu');
+                hideSection('region3_extensions_menu');
+
+                setMainMenus();
+                selectTab(menuSlider1);
+
+            });
+            YAHOO.util.Event.on(menuSlider2, "click", function(e) {     //Handle click for Monitor menu
+                menuPanel.style.display = "";
+                YAHOO.util.Dom.removeClass(menuSlider0, 'hiddenToShow');
+                YAHOO.util.Dom.addClass(menuSlider0, 'showToHidden');
+                document.cookie = "menuPanel=visible;path=/;expires=" + cookie_date.toGMTString();
+                document.cookie = "menuPanelType=monitor;path=/;expires=" + cookie_date.toGMTString();
+                onMenuSlide.fire('visible');
+
+                //hide the config section
+                 var elmsX = YAHOO.util.Selector.query("#menu-table ul.main > li");
+                 for(var i=0;i<elmsX.length;i++){
+                     elmsX[i].style.display = "none";
+                 }
+                showSection('region4_monitor_menu');
+
+                setMainMenus();
+                selectTab(menuSlider2);
+
+            });
+            YAHOO.util.Event.on(menuSlider3, "click", function(e) {     //Handle click for config menu
+                menuPanel.style.display = "";
+                YAHOO.util.Dom.removeClass(menuSlider0, 'hiddenToShow');
+                YAHOO.util.Dom.addClass(menuSlider0, 'showToHidden');
+                document.cookie = "menuPanel=visible;path=/;expires=" + cookie_date.toGMTString();
+                document.cookie = "menuPanelType=config;path=/;expires=" + cookie_date.toGMTString();
+                onMenuSlide.fire('visible');
+
+                //hide the config section
+                 var elmsX = YAHOO.util.Selector.query("#menu-table ul.main > li");
+                 for(var i=0;i<elmsX.length;i++){
+                     elmsX[i].style.display = "none";
+                 }
+                showSection('region1_configure_menu');
+                setMainMenus();
+                selectTab(menuSlider3);
+            });
+            YAHOO.util.Event.on(menuSlider4, "click", function(e) {     //Handle click for tools menu
+                menuPanel.style.display = "";
+                YAHOO.util.Dom.removeClass(menuSlider0, 'hiddenToShow');
+                YAHOO.util.Dom.addClass(menuSlider0, 'showToHidden');
+                document.cookie = "menuPanel=visible;path=/;expires=" + cookie_date.toGMTString();
+                document.cookie = "menuPanelType=tools;path=/;expires=" + cookie_date.toGMTString();
+                onMenuSlide.fire('visible');
+
+                //hide the config section
+                 var elmsX = YAHOO.util.Selector.query("#menu-table ul.main > li");
+                 for(var i=0;i<elmsX.length;i++){
+                     elmsX[i].style.display = "none";
+                 }
+                showSection('region5_tools_menu');
+
+                setMainMenus();
+                selectTab(menuSlider4);                                 
+
+            });
+            YAHOO.util.Event.on(menuSlider5, "click", function(e) {     //Handle click for extensions menu
+                menuPanel.style.display = "";
+                YAHOO.util.Dom.removeClass(menuSlider0, 'hiddenToShow');
+                YAHOO.util.Dom.addClass(menuSlider0, 'showToHidden');
+                document.cookie = "menuPanel=visible;path=/;expires=" + cookie_date.toGMTString();
+                document.cookie = "menuPanelType=extensions;path=/;expires=" + cookie_date.toGMTString();
+                onMenuSlide.fire('visible');
+
+                //hide the config section
+                 var elmsX = YAHOO.util.Selector.query("#menu-table ul.main > li");
+                 for(var i=0;i<elmsX.length;i++){
+                     elmsX[i].style.display = "none";
+                 }
+                showSection('region3_extensions_menu');
+
+                setMainMenus();
+                selectTab(menuSlider5);
+
+            });
+            setMainMenus();            
+        }
+);
+function hideSection(sectionId) {
+    if(sectionId !=null && document.getElementById(sectionId)!=null){
+    document.getElementById(sectionId).style.display = "none";
+    nextObject(document.getElementById(sectionId)).style.display = "none";
+    }
+}
+function showSection(sectionId) {
+    if(sectionId !=null && document.getElementById(sectionId)!=null){
+    document.getElementById(sectionId).style.display = "";
+    nextObject(document.getElementById(sectionId)).style.display = "";
+    }
+}
+function selectTab(tab){
+    var elmsX = YAHOO.util.Selector.query(".vertical-menu-container > div");
+    for(var i = 0; i<elmsX.length;i++){
+        YAHOO.util.Dom.removeClass(elmsX[i], 'selected');
+    }
+    YAHOO.util.Dom.addClass(tab, 'selected');            
+}
+jQuery(document).ready(
+  function() {
+      if (jQuery('#menu-table li a').length <= 1) {
+          document.getElementById('vertical-menu-container').style.display = "none";
+          document.getElementById('menu-panel').style.display = "none";
+      }
+
+  }
+);

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/widgets.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/widgets.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/widgets.js
new file mode 100644
index 0000000..5e673ee
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/widgets.js
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2005,2007 WSO2, Inc. http://wso2.com
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var previousPanel = null;
+function showTooltip(anchorObj, panelContent) {
+    var timeout;
+    var delay = 250;
+    var panel = document.createElement("DIV");
+    panel.className = "panelClass";
+
+    if (previousPanel != null) {
+        document.getElementById(previousPanel).parentNode.removeChild(document.getElementById(previousPanel));
+    }
+    previousPanel = 'panelId' + Math.floor(Math.random() * 2000);
+    panel.id = previousPanel;
+
+    document.getElementById("workArea").appendChild(panel);
+    panel.innerHTML = panelContent;
+    var yuiPanel = new YAHOO.widget.Panel(panel, {
+        context: [anchorObj, ,"tr","br"],
+        draggable: false,
+        visible: false,
+        close: false,
+        constraintoviewport:true,
+        underlay: "shadow"
+    });
+
+    yuiPanel.align("tr", "br"); // re-align in case page resized
+    yuiPanel.show();
+    if (timeout) clearTimeout(timeout);
+    var timeoutFunc = function() {
+        yuiPanel.hide();
+    };
+    YAHOO.util.Event.addListener(panel, "mouseover", function(e) {
+        if (timeout) clearTimeout(timeout);
+    });
+    YAHOO.util.Event.addListener(anchorObj, "mouseout", function(e) {
+        if (timeout) clearTimeout(timeout);
+        timeout = setTimeout(timeoutFunc, delay);
+    });
+
+    YAHOO.util.Event.addListener(panel, "mouseout", function(e) {
+        if (timeout) clearTimeout(timeout);
+        timeout = setTimeout(timeoutFunc, delay);
+    });
+}
+
+function enableDefaultText(textBoxId) {
+    YAHOO.util.Event.onDOMReady(
+            function(inobj) {
+                if (arguments.length > 2) {
+                    inobj = arguments[2];
+                }
+                var txtBox = document.getElementById(inobj);
+                if (txtBox.value.replace(/^\s\s*/, '').replace(/\s\s*$/, '') == "" || txtBox.value == txtBox.getAttribute('alt')) {
+                    txtBox.value = txtBox.getAttribute('alt');
+                    YAHOO.util.Dom.addClass(txtBox, 'defaultText');
+                }else{
+                    YAHOO.util.Dom.removeClass(txtBox, 'defaultText');                                    
+                }
+                YAHOO.util.Event.on(txtBox, "focus", function(e) {
+                    if (this.value == this.getAttribute('alt')) {
+                        this.value = '';
+                        YAHOO.util.Dom.removeClass(this, 'defaultText');
+                    }
+                });
+                YAHOO.util.Event.on(txtBox, "blur", function(e) {
+                    if (this.value == '') {
+                        this.value = this.getAttribute('alt');
+                        YAHOO.util.Dom.addClass(this, 'defaultText');
+                    }
+                });
+            },
+            textBoxId
+            );
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp
new file mode 100644
index 0000000..3138c06
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp
@@ -0,0 +1,253 @@
+<%--
+ * Copyright 2008 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+--%>
+<%@ page import="org.apache.axiom.om.OMElement" %>
+<%@ page import="org.apache.axiom.om.OMNamespace" %>
+<%@ page import="org.apache.axiom.om.impl.llom.util.AXIOMUtil" %>
+<%@ page import="org.apache.axiom.om.util.Base64" %>
+<%@ page import="org.apache.axiom.soap.SOAP11Constants" %>
+<%@ page import="org.apache.axiom.soap.SOAP12Constants"%>
+<%@ page import="org.apache.axiom.soap.SOAPEnvelope"%>
+<%@ page import="org.apache.axis2.AxisFault"%>
+<%@ page import="org.apache.axis2.Constants"%>
+<%@ page import="org.apache.axis2.addressing.EndpointReference"%>
+<%@ page import="org.apache.axis2.client.Options"%>
+<%@ page import="org.apache.axis2.client.ServiceClient"%>
+<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
+<%@ page import="org.apache.axis2.context.MessageContext"%>
+<%@ page import="org.apache.axis2.context.OperationContext"%>
+<%@ page import="org.apache.axis2.description.WSDL2Constants"%>
+<%@ page import="org.apache.axis2.util.JavaUtils"%>
+<%@ page import="org.apache.neethi.PolicyEngine"%>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page import="org.wso2.carbon.utils.ServerConstants"%>
+<%@ page import="org.apache.axis2.transport.http.HTTPConstants"%>
+<%@ page import="java.util.Enumeration" %>
+<%@ page import="java.util.ArrayList" %>
+<%@ page import="java.util.List" %>
+<%@ page import="org.apache.commons.httpclient.Header" %>
+<%@ page import="org.wso2.carbon.ui.util.CharacterEncoder" %>
+<%!
+
+    public static String decode(String s) throws Exception {
+        if ("~".equals(s)) return null;
+        return new String(Base64.decode(s), "UTF-8");
+    }
+
+%><%
+    boolean useWSS = false;
+    String policy = "<wsp:Policy wsu:Id=\"UTOverTransport\"\n" +
+"            xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\"\n" +
+"            xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\n" +
+"    <wsp:ExactlyOne>\n" +
+"        <wsp:All>\n" +
+"            <sp:TransportBinding xmlns:sp=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy\">\n" +
+"                <wsp:Policy>\n" +
+"                    <sp:TransportToken>\n" +
+"                        <wsp:Policy>\n" +
+"                            <sp:HttpsToken RequireClientCertificate=\"false\"/>\n" +
+"                        </wsp:Policy>\n" +
+"                    </sp:TransportToken>\n" +
+"                    <sp:AlgorithmSuite>\n" +
+"                        <wsp:Policy>\n" +
+"                            <sp:Basic256/>\n" +
+"                        </wsp:Policy>\n" +
+"                    </sp:AlgorithmSuite>\n" +
+"                    <sp:Layout>\n" +
+"                        <wsp:Policy>\n" +
+"                            <sp:Lax/>\n" +
+"                        </wsp:Policy>\n" +
+"                    </sp:Layout>\n" +
+"                    <sp:IncludeTimestamp/>\n" +
+"                </wsp:Policy>\n" +
+"            </sp:TransportBinding>\n" +
+"            <sp:SignedSupportingTokens\n" +
+"                    xmlns:sp=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy\">\n" +
+"                <wsp:Policy>\n" +
+"                    <sp:UsernameToken\n" +
+"                            sp:IncludeToken=\"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient\"/>\n" +
+"                </wsp:Policy>\n" +
+"            </sp:SignedSupportingTokens>\n" +
+"        </wsp:All>\n" +
+"    </wsp:ExactlyOne>\n" +
+"</wsp:Policy>";
+
+    // Extract and decode all the parameters used to call WSRequest
+    String uri, pattern, username, password, payload;
+    try {
+        uri = decode(request.getParameter("uri"));
+		pattern = decode(request.getParameter("pattern"));
+        username = decode(request.getParameter("username"));
+        password = decode(request.getParameter("password"));
+        payload = decode(request.getParameter("payload"));
+    } catch (Exception e) {
+    %>
+    location.href = '../error.jsp?errorMsg=<%=e.getMessage()%>';
+    <%
+        return;
+    }
+
+    Options opts = new Options();
+    //stops automatic retrying of the SC
+    /*HttpMethodParams methodParams = new HttpMethodParams();
+       methodParams.setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(0, false));
+       opts.setProperty(HTTPConstants.HTTP_METHOD_PARAMS, methodParams);*/
+    opts.setProperty(HTTPConstants.SO_TIMEOUT, 60 * 1000);
+    opts.setProperty(HTTPConstants.CONNECTION_TIMEOUT, 60 * 1000);
+
+    opts.setTo(new EndpointReference(uri));
+    String optionsString = CharacterEncoder.getSafeText(request.getParameter("options"));
+    if(optionsString != null) {
+        String[] options = optionsString.split(",");
+        for(String option : options){
+            String decoded;
+            try {
+                decoded = decode(option);
+            } catch (Exception e) {
+            %>
+            location.href = '../error.jsp?errorMsg=<%=e.getMessage()%>'
+            <%
+            return;
+            }
+            String optionName = decoded.split(":")[0];
+            String optionValue = decoded.substring(optionName.length() + 1);
+
+            if ("action".equals(optionName)) {
+                opts.setAction(optionValue);
+            } else if ("useBinding".equals(optionName)) {
+                if (optionValue.equalsIgnoreCase("SOAP 1.1")) {
+                    opts.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+                } else if (optionValue.equalsIgnoreCase("SOAP 1.2")) {
+                    opts.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+                } else if (optionValue.equalsIgnoreCase("HTTP")) {
+                    opts.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
+                }
+            } else if ("useSOAP".equals(optionName)) {
+                if (optionValue.equalsIgnoreCase("1.1")) {
+                    opts.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+                } else if ((optionValue.equalsIgnoreCase("1.2")) || (optionValue.equalsIgnoreCase("true"))) {
+                    opts.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+                } else if (optionValue.equalsIgnoreCase("false")) {
+                    opts.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
+                }
+            } else if ("HTTPInputSerialization".equals(optionName)) {
+                opts.setProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION, optionValue);
+                opts.setProperty(Constants.Configuration.MESSAGE_TYPE, optionValue);
+            } else if ("HTTPQueryParameterSeparator".equals(optionName)) {
+                opts.setProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR, optionValue);
+            } else if ("HTTPLocation".equals(optionName)) {
+                opts.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, optionValue);
+            } else if ("HTTPMethod".equals(optionName)) {
+                if (optionValue.equalsIgnoreCase("GET")) {
+                    opts.setProperty(Constants.Configuration.HTTP_METHOD,
+                                     Constants.Configuration.HTTP_METHOD_GET);
+                } else if (optionValue.equalsIgnoreCase("POST")) {
+                    opts.setProperty(Constants.Configuration.HTTP_METHOD,
+                                     Constants.Configuration.HTTP_METHOD_POST);
+                } else if (optionValue.equalsIgnoreCase("PUT")) {
+                    opts.setProperty(Constants.Configuration.HTTP_METHOD,
+                                     Constants.Configuration.HTTP_METHOD_PUT);
+                } else if (optionValue.equalsIgnoreCase("DELETE")) {
+                    opts.setProperty(Constants.Configuration.HTTP_METHOD,
+                                     Constants.Configuration.HTTP_METHOD_DELETE);
+                }
+            } else if ("HTTPLocationIgnoreUncited".equals(optionName)) {
+                opts.setProperty(WSDL2Constants.ATTR_WHTTP_IGNORE_UNCITED,
+                                JavaUtils.isTrueExplicitly(optionValue));
+
+            } else if ("useWSS".equals(optionName) && JavaUtils.isTrueExplicitly(optionValue)) {
+                opts.setUserName(username);
+                opts.setPassword(password);
+                useWSS = true;
+            }
+        }
+    }
+
+    // Parse
+    OMElement payloadElement = null;
+    if (payload != null) {
+        try {
+            payloadElement = AXIOMUtil.stringToOM(payload);
+        } catch (Exception e) {
+            throw new Error("INVALID_INPUT_EXCEPTION. Invalid input was : " + payload);
+        }
+    }
+
+    //creating service client
+    ConfigurationContext configContext = (ConfigurationContext) config.getServletContext()
+            .getAttribute(CarbonConstants.CLIENT_CONFIGURATION_CONTEXT);
+    String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+    opts.setManageSession(true);
+    opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, request.getHeader("Cookie"));
+    ServiceClient sc = new ServiceClient(configContext, null);
+    sc.setOptions(opts);
+
+    String body;
+    try {
+        if (useWSS) {
+            sc.engageModule("rampart");
+            sc.getServiceContext()
+                    .setProperty("rampartPolicy", PolicyEngine.getPolicy(AXIOMUtil.stringToOM(policy)));
+        }
+        //invoke service
+		if(WSDL2Constants.MEP_URI_IN_ONLY.equals(pattern)) {
+			sc.fireAndForget(payloadElement);
+			body = "<success details=\"in-only operation\"/>";
+		} else if(WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals(pattern)) {
+			sc.sendRobust(payloadElement);
+			body = "<success details=\"robust in-only operation\"/>";
+		} else {
+			OMElement responseMsg = sc.sendReceive(payloadElement);
+        	body = responseMsg != null ? responseMsg.toString() : "<success details=\"empty response\"/>";
+		}
+
+    } catch (Exception exception) {
+        OperationContext operationContext = sc.getLastOperationContext();
+        if (operationContext != null) {
+            MessageContext messageContext =
+                    operationContext.getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN);
+            if (messageContext != null) {
+                SOAPEnvelope envelope = messageContext.getEnvelope();
+                if (envelope != null) {
+                    OMElement bodyElement = envelope.getBody().getFirstElement();
+                    if(bodyElement != null) {
+                        if ("Exception".equals(bodyElement.getLocalName())) {
+                            OMNamespace ns = bodyElement.declareNamespace("http://wso2.org/ns/TryitProxy", "http");
+                            bodyElement.addAttribute("h:status", "unknown error", ns);
+                        }
+                        body = bodyElement.toString();
+                    } else {
+                        body = "<TryitProxyError h:status='unknown error' xmlns:h='http://wso2.org/ns/TryitProxy'/>";
+                    }
+                } else body = "<TryitProxyError h:status='SOAP envelope error' xmlns:h='http://wso2.org/ns/TryitProxy'>" + exception.toString() + "</TryitProxyError>";
+            }  else body = "<TryitProxyError h:status='messageContext error' xmlns:h='http://wso2.org/ns/TryitProxy'>" + exception.toString() + "</TryitProxyError>";
+        } else body = "<TryitProxyError h:status='exception' xmlns:h='http://wso2.org/ns/TryitProxy'>" + exception.toString() + "</TryitProxyError>";
+    } finally {
+        sc.cleanupTransport();
+    }
+
+    /*
+    // If there is a SOAP fault, we need to serialize that as the body.
+    // If there is an HTTP error code, we need to report it using a similar structure.
+    if (httpstatus != 20x && soapVer == "0") { // http error
+        String httpStatus = "400";
+        String httpStatusText = "Test HTTP error";
+        body = "<error http:status='" + httpStatus + "' http:statusText='" + httpStatusText + "' xmlns:http='http://wso2.org/ns/WSRequest'>" + body + "</error>";
+    }
+    */
+
+%>
+<%= body %>
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/browser_checker.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/browser_checker.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/browser_checker.jsp
new file mode 100644
index 0000000..445730f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/browser_checker.jsp
@@ -0,0 +1,12 @@
+<noscript>
+<div class="something-wrong">
+	<div class="title">JavaScript is disabled on your browser</div>
+	<div class="content">Please enable JavaScript or upgrade to a JavaScript-capable browser to use WSO2 Products.</div>
+</div>
+</noscript>
+<!--[if lte IE 6]>
+<div class="something-wrong">
+	<div class="title">Did you know that your Internet Explorer is out of date?</div>
+	<div class="content">To get the best possible experience using our website we recommend that you upgrade to a newer version.</div>
+</div>
+<![endif]-->

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/registry_styles_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/registry_styles_ajaxprocessor.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/registry_styles_ajaxprocessor.jsp
new file mode 100644
index 0000000..d687eac
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/registry_styles_ajaxprocessor.jsp
@@ -0,0 +1,44 @@
+<%@ page import="org.wso2.carbon.ui.clients.RegistryAdminServiceClient" %>
+<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
+<%--
+ * Copyright 2008 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+--%>
+<%@ page contentType="text/css" language="java" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+
+<c:catch var="e">
+<%
+        String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+        RegistryAdminServiceClient client = new RegistryAdminServiceClient(cookie, config, session);
+        if (client.isRegistryReadOnly()) {
+%>
+.registryWriteOperation {
+    display:none !important;
+    height:0 !important;
+    font-size:0 !important;
+}
+<%
+        } else {
+%>
+.registryNonWriteOperation {
+    display:none !important;
+    height:0 !important;
+    font-size:0 !important;
+}
+<%
+        }
+%>
+
+</c:catch>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/session-validate.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/session-validate.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/session-validate.jsp
new file mode 100644
index 0000000..d53b596
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/jsp/session-validate.jsp
@@ -0,0 +1,17 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%--
+ * Copyright 2008 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+--%>
+----valid----
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/ajaxheader.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/ajaxheader.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/ajaxheader.jsp
new file mode 100644
index 0000000..862fbf2
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/ajaxheader.jsp
@@ -0,0 +1,30 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ page import="javax.servlet.jsp.jstl.core.Config" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib uri="http://ajaxtags.org/tags/ajax" prefix="ajax" %>
+
+<script type="text/javascript" src="/carbon/ajax/js/prototype.js"></script>
+<script type="text/javascript" src="/carbon/ajax/js/scriptaculous/scriptaculous.js"></script>
+<script type="text/javascript" src="/carbon/ajax/js/ajax/ajaxtags.js"></script>
+<script type="text/javascript" src="/carbon/ajax/js/ajax/ajaxtags_controls.js"></script>
+<script type="text/javascript" src="/carbon/ajax/js/ajax/ajaxtags_parser.js"></script>
+
+<c:set var="contextPath" scope="request">/carbon/ajax</c:set>
+<div id="content"/>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/announcements.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/announcements.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/announcements.jsp
new file mode 100644
index 0000000..574e405
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/announcements.jsp
@@ -0,0 +1,25 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ page import="org.wso2.carbon.ui.util.UIAnnouncementDeployer" %>
+<%
+
+    String announcementContent = UIAnnouncementDeployer.getAnnouncementHtml(session, config);
+
+%>
+<%=announcementContent%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/breadcrumb.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/breadcrumb.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/breadcrumb.jsp
new file mode 100644
index 0000000..0712f0a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/breadcrumb.jsp
@@ -0,0 +1,54 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+
+<fmt:bundle basename="org.wso2.carbon.i18n.Resources">
+	<table class="page-header-links-table" cellspacing="0">
+		<tr>
+			<td class="breadcrumbs">
+			<table class="breadcrumb-table" cellspacing="0">
+				<tr>								 
+				    <td>
+					    <div id="breadcrumb-div"></div>
+                    </td>
+				</tr>
+
+			</table>
+			</td>
+<%
+    String requestURI = request.getHeader("Referer");
+    if (requestURI != null && requestURI.indexOf("?") > 0) {
+        requestURI = requestURI.substring(0, requestURI.indexOf("?"));
+    } else {
+        requestURI = "";
+    }
+    requestURI = "blah";
+    if (requestURI.endsWith("/admin/login.jsp")) { %>
+            <td class="page-header-help"><a href="../docs/signin_userguide.html"
+				target="_blank"><fmt:message key="component.help" /></a></td>
+<% } else if (requestURI.endsWith("/admin/error.jsp")) { %>
+            <td class="page-header-help"></td>
+<% } else { %>
+			<td class="page-header-help"><a href="./docs/userguide.html"
+				target="_blank"><fmt:message key="component.help" /></a></td>
+<% } %>
+		</tr>
+	</table>
+</fmt:bundle>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/defaultBody.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/defaultBody.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/defaultBody.jsp
new file mode 100644
index 0000000..7fbc4c2
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/defaultBody.jsp
@@ -0,0 +1,126 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ page import="javax.servlet.jsp.jstl.core.Config, java.util.Enumeration" %>
+<%@ page import="java.util.Locale" %>
+<%@ page import="org.wso2.carbon.ui.util.CharacterEncoder" %>
+
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+
+<h1>Carbon i18n Test page</h1>
+
+<c:if test="${!empty param.locale}">
+  <fmt:setLocale value="${param.locale}" scope="session"/>
+</c:if>
+
+<c:if test="${!empty param.fallback}">
+  <% Config.set(request, Config.FMT_FALLBACK_LOCALE, CharacterEncoder.getSafeText(request.getParameter("fallback"))); %>
+</c:if>
+
+<table>
+<tr>
+  <td><b>Set application-based locale:</b></td>
+  <td>
+<a href='?locale=se&fallback=<c:out value="${param.fallback}"/>'>Swedish</a> &#149;
+<a href='?locale=fr&fallback=<c:out value="${param.fallback}"/>'>French</a> &#149;
+<a href='?locale=de&fallback=<c:out value="${param.fallback}"/>'>German</a> &#149;
+<a href='?locale=es&fallback=<c:out value="${param.fallback}"/>'>Spanish (no bundle)</a> &#149;
+<a href='?locale=&fallback=<c:out value="${param.fallback}"/>'>None</a>
+  </td>
+</tr>
+<tr>
+  <td align="right"><b>Set fallback locale:</b></td>
+  <td>
+<a href='?locale=<c:out value="${param.locale}"/>&fallback=se'>Swedish</a> &#149;  
+<a href='?locale=<c:out value="${param.locale}"/>&fallback=fr'>French</a> &#149;
+<a href='?locale=<c:out value="${param.locale}"/>&fallback=de'>German</a> &#149;
+<a href='?locale=<c:out value="${param.locale}"/>&fallback=es'>Spanish (no bundle)</a> &#149;
+<a href='?locale=<c:out value="${param.locale}"/>&fallback='>None</a>
+  </td>
+</table>
+<p>
+
+Request parameter "locale": <c:out value="${param.locale}"/><br>
+<i>(This value is used to set the application based locale for this example)</i>
+<p>
+
+Application based locale: <%=Config.find(pageContext, Config.FMT_LOCALE)%><br>
+<i>(javax.servlet.jsp.jstl.fmt.locale configuration setting)</i>
+<p>
+
+Browser-Based locales: 
+<% 
+  Enumeration enum_ = request.getLocales();
+  while (enum_.hasMoreElements()) {
+    Locale locale = (Locale)enum_.nextElement();
+    out.print(locale);
+    out.print(" ");
+  }
+%>
+<br>
+<i>(ServletRequest.getLocales() on the incoming request)</i>
+<p>
+
+Fallback locale: <%=Config.find(pageContext, Config.FMT_FALLBACK_LOCALE)%><br>
+<i>(javax.servlet.jsp.jstl.fmt.fallbackLocale configuration setting)</i>
+<p>
+
+<jsp:useBean id="now" class="java.util.Date" />
+<h4>
+<fmt:formatDate value="${now}" dateStyle="full"/> &#149;
+<fmt:formatDate value="${now}" type="time"/>
+</h4>
+
+<p>
+
+<fmt:bundle basename="org.wso2.carbon.i18n.Resources">
+<table cellpadding="5" border="1">
+  <tr>
+    <th align="left">KEY</th>
+    <th align="left">VALUE</th>
+  </tr>
+  <tr>
+    <td>greetingMorning</td>
+    <td><fmt:message key="greetingMorning"/></td>
+  </tr>
+  <tr>
+    <td>greetingEvening</td>
+    <td><fmt:message key="greetingEvening"/></td>
+  </tr>
+  <tr>
+    <td>currentTime</td>
+    <td>
+      <fmt:message key="currentTime">
+        <fmt:param value="${now}"/>
+      </fmt:message>
+    </td>
+  </tr>
+  <tr>
+    <td>serverInfo</td>
+    <td><fmt:message key="serverInfo"/></td>
+  </tr>
+  <tr>
+    <td>undefinedKey</td>
+    <td><fmt:message key="undefinedKey"/></td>
+  </tr>
+</table>
+</fmt:bundle>
+<p>
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/footer.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/footer.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/footer.jsp
new file mode 100644
index 0000000..22bf191
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/footer.jsp
@@ -0,0 +1,28 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<div id="footer-div">
+	<div class="footer-content">
+		<div class="copyright">
+		    &copy; 2005 - 2013 WSO2 Inc. All Rights Reserved.
+		</div>
+		<!--div class="poweredby">
+		</div-->
+	</div>
+</div>
+                        

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/header.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/header.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/header.jsp
new file mode 100644
index 0000000..e660c7e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/header.jsp
@@ -0,0 +1,166 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+<%@ page import="java.net.URL" %>
+<%@ page import="org.wso2.carbon.utils.multitenancy.MultitenantConstants" %>
+<%@ page import="org.wso2.carbon.utils.CarbonUtils" %>
+
+<%
+    String userGuideURL = (String) config.getServletContext().getAttribute(CarbonConstants.PRODUCT_XML_WSO2CARBON +
+                                                                           CarbonConstants.PRODUCT_XML_USERGUIDE);
+    if(userGuideURL == null){
+        userGuideURL = "#";
+    }
+
+	String serverURL = (String) session.getAttribute(CarbonConstants.SERVER_URL);
+    if (serverURL == null) {
+        serverURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+        session.setAttribute(CarbonConstants.SERVER_URL, serverURL);
+    }
+
+%>
+<!--[IF IE 7]>
+	<style>
+		div#header-div div.right-links{
+			position:absolute;
+		}
+	</style>
+<![endif]-->
+<fmt:bundle basename="org.wso2.carbon.i18n.Resources">
+
+    <div id="header-div">
+        <div class="right-logo"><fmt:message key="management.console"/></div>
+        <div class="left-logo">
+            <a href="../admin/index.jsp" class="header-home"><img src="../admin/images/1px.gif" width="300px" height="32px"/></a>
+        </div>
+        <div class="middle-ad">
+            <%@include file="announcements.jsp"%>
+        </div>
+        <div class="header-links">
+		<div class="right-links">            
+			<ul>
+		                <%
+		                    Boolean authenticated = (Boolean) request.getSession().getAttribute("authenticated");
+		                    if (authenticated != null && authenticated.booleanValue()) {
+		                        String signedInAs = (String) request.getSession().getAttribute("logged-user");
+//		                        String serverURL = (String) request.getSession().getAttribute(CarbonConstants.SERVER_URL);
+		                        String domainName = (String) request.getSession().getAttribute(MultitenantConstants.TENANT_DOMAIN);
+		                        // Now that super.tenant domain is carbon.super we are showing the domain name itself.
+                                // showing localhost makes no-sense when local transport is enabled and accessed from
+                                // a remote browser
+		                        /*if (domainName == null ||
+		                        		MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(domainName)) {
+                                    //TODO Hack checking whether this is the local transport.
+                                    if(serverURL.startsWith("local")){
+                                        domainName = "localhost";
+                                    } else {
+                                        URL url = new URL(serverURL);
+
+                                        // this is the super tenant, we are showing the host name instead of the domain name,
+                                        domainName = url.getHost();
+                                        int port = url.getPort();
+                                        if (port != -1) {
+                                            domainName += ":" + port;
+                                        }
+                                    }
+		                        } */
+                                if (CarbonUIUtil.isContextRegistered(config, "/worklist/")) {
+		                %>
+                        <jsp:include page="../../worklist/header.jsp"/>
+                        <%
+                                }
+                        %>
+                        <%
+                            if (authenticated != null && authenticated.booleanValue() && 
+                                MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(domainName)) {
+                                if (!CarbonUtils.isRunningOnLocalTransportMode()) {
+                                    String remoteServerURL = (String) request.getSession().getAttribute(CarbonConstants.SERVER_URL);
+                                    /*server url comes in the form: https://localhost:9443/services/
+                                     we need to make it localhost:9443 and display in the header
+                                     */
+                                    if (remoteServerURL != null) {
+                                        URL remoteURL = new URL(remoteServerURL);
+                                        String host = remoteURL.getHost();
+                                        int port = remoteURL.getPort();
+                                        if (host != null && port > 0) {
+                                            remoteServerURL = host + ":" + port;
+                                       }
+                                        String frontEndServerURL = CarbonUIUtil.getAdminConsoleURL(request);
+                                        if (frontEndServerURL != null) {
+                                            URL localURL = new URL(frontEndServerURL);
+                                            String frontEndHost = localURL.getHost();
+                                            int frontEndPort = localURL.getPort();
+                                            if (frontEndHost != null && frontEndPort > 0) {
+                                                frontEndServerURL = frontEndHost + ":" + frontEndPort;
+                                            }
+                                        }
+                                        if (!remoteServerURL.equals(frontEndServerURL)) {
+   
+                        %>
+                                <li class="middle">
+                                    <label id="logged-user">
+                                        <strong><fmt:message key="remote.server.url"/>:</strong>&nbsp;<%=remoteServerURL%>
+                                    </label>
+                                </li>
+                                <li class="middle">|</li>
+                        <%
+                                        }
+                                    }
+                                }
+                            }
+                        %>
+
+		                <li class="middle">
+		                    <label id="logged-user">
+		                        <strong><fmt:message key="signed.in.as"/>:</strong>&nbsp;<%=signedInAs%>@<%=domainName%>
+		                    </label>
+		                </li>
+				<li class="middle">|</li>
+		                <li class="right">
+		                    <a href="../admin/logout_action.jsp"><fmt:message key="sign.out"/></a>
+		                </li>
+		                <%  } else { %>
+		                <li class="right">
+		                    <a href="../admin/login.jsp"><fmt:message key="sign.in"/></a>
+		                </li>
+		                <%  } %>
+		                <li class="middle">|</li>
+		                <li class="middle">
+		                    <a target="_blank" href="<%=userGuideURL %>"><fmt:message key="docs"/></a>
+		                </li>
+				<li class="middle">|</li>
+				<%
+				String aboutPageURL = "";
+				if(CarbonUIUtil.isContextRegistered(config,"/product/")){
+					aboutPageURL = "../product/about.html";
+				}else{
+					//switch to carbon about page
+					aboutPageURL = "../docs/about.html";
+				}
+				%>
+		                <li class="left">
+		                    <a target="_blank" href="<%=aboutPageURL %>"><fmt:message key="about"/></a>
+		                </li>
+		            </ul>
+		</div>
+        </div>
+    </div>
+</fmt:bundle>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region1.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region1.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region1.jsp
new file mode 100644
index 0000000..a64c69b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region1.jsp
@@ -0,0 +1,39 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@page import="org.wso2.carbon.ui.MenuAdminClient" %>
+
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+
+<c:if test="${!empty param.locale}">
+    <fmt:setLocale value="${param.locale}" scope="page"/>
+</c:if>
+<%
+    try {
+        MenuAdminClient menuAdminClient = new MenuAdminClient();
+%>
+        <%=menuAdminClient.getMenuContent("region1", request)%>
+<%
+        request.getSession().setAttribute("menuadminClient", menuAdminClient);
+        menuAdminClient.setBreadCrumbMap(request);
+    } catch (Throwable e) {
+        e.printStackTrace();
+    }
+%>
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region2.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region2.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region2.jsp
new file mode 100644
index 0000000..7a82dc4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region2.jsp
@@ -0,0 +1,29 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ page import="org.wso2.carbon.ui.MenuAdminClient" %>
+<%
+    try {
+        MenuAdminClient menuAdminClient = new MenuAdminClient();
+%>
+        <%=menuAdminClient.getMenuContent("region2", request)%>
+<%
+    } catch (Throwable e) {
+        e.printStackTrace();
+    }
+%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region3.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region3.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region3.jsp
new file mode 100644
index 0000000..518e8fc
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region3.jsp
@@ -0,0 +1,29 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ page import="org.wso2.carbon.ui.MenuAdminClient" %>
+<%
+    try {
+        MenuAdminClient menuAdminClient = new MenuAdminClient();
+%>
+        <%=menuAdminClient.getMenuContent("region3", request)%>
+<%
+    } catch (Throwable e) {
+        e.printStackTrace();
+    }
+%>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region4.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region4.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region4.jsp
new file mode 100644
index 0000000..a6881d2
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region4.jsp
@@ -0,0 +1,29 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ page import="org.wso2.carbon.ui.MenuAdminClient" %>
+<%
+    try {
+        MenuAdminClient menuAdminClient = new MenuAdminClient();
+%>
+        <%=menuAdminClient.getMenuContent("region4", request)%>
+<%
+    } catch (Throwable e) {
+        e.printStackTrace();
+    }
+%>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region5.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region5.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region5.jsp
new file mode 100644
index 0000000..2303b6e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/region5.jsp
@@ -0,0 +1,29 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ page import="org.wso2.carbon.ui.MenuAdminClient" %>
+<%
+    try {
+        MenuAdminClient menuAdminClient = new MenuAdminClient();
+%>
+        <%=menuAdminClient.getMenuContent("region5", request)%>
+<%
+    } catch (Throwable e) {
+        e.printStackTrace();
+    }
+%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/template.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/template.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/template.jsp
new file mode 100644
index 0000000..3ffc96c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/layout/template.jsp
@@ -0,0 +1,222 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%  response.addHeader( "X-FRAME-OPTIONS", "DENY" ); %>
+<%@ page import="java.util.Locale" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page import="org.wso2.carbon.registry.core.RegistryConstants" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+<%@ page import="java.util.ArrayList" %>
+<%@ page import="java.util.Iterator" %>
+<%@ page import="org.wso2.carbon.utils.multitenancy.MultitenantConstants" %>
+<%@ page import="org.wso2.carbon.base.ServerConfiguration" %>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+ <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+
+ <%
+   Locale locale = null;
+   CarbonUIUtil.setLocaleToSession(request);
+   locale = CarbonUIUtil.getLocaleFromSession(request);
+ %>
+
+    <fmt:setLocale value="<%=locale%>" scope="session"/>
+    <fmt:bundle basename="org.wso2.carbon.i18n.Resources">
+<!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">
+
+<%
+	//Customization of UI theming per tenant
+	String tenantDomain = null;
+	String globalCSS = "../admin/css/global.css";
+	String mainCSS = "";
+	if (request.getSession()
+			.getAttribute(MultitenantConstants.TENANT_DOMAIN) != null) {
+		tenantDomain = (String) request.getSession().getAttribute(
+				MultitenantConstants.TENANT_DOMAIN);
+	} else {
+		// user is not logged in or just logged out, but still they are inside url own to the domain
+		tenantDomain = (String) request
+				.getAttribute(MultitenantConstants.TENANT_DOMAIN);
+	}
+	if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
+        String themeRoot = "../../../../t/" + tenantDomain
+				+ "/registry/resource"
+				+ RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH
+				+ "/repository";
+		mainCSS = themeRoot + "/theme/admin/main.css";
+        if (request.getSession().getAttribute(
+                CarbonConstants.THEME_URL_RANDOM_SUFFIX_SESSION_KEY) != null) {
+            // this random string is used to get the effect of the theme change, where-ever the
+            // theme is changed, this session will be changed
+            mainCSS += "?rsuffix=" + request.getSession().getAttribute(
+                CarbonConstants.THEME_URL_RANDOM_SUFFIX_SESSION_KEY);
+        }
+    } else {
+        if ("true".equals(ServerConfiguration.getInstance().getFirstProperty(CarbonConstants.IS_CLOUD_DEPLOYMENT))) {
+            mainCSS = "../../registry/resource"
+                      + RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH
+                      + "/repository/components/org.wso2.carbon.all-themes/Default/admin/main.css";
+        } else {
+            mainCSS = "../styles/css/main.css";
+        }
+	}
+	//read web application's title if it's set on product.xml
+    String webAdminConsoleTitle = (String) config.getServletContext().getAttribute(CarbonConstants.PRODUCT_XML_WSO2CARBON +
+            CarbonConstants.PRODUCT_XML_WEB_ADMIN_CONSOLE_TITLE);
+%>
+<head>
+    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+    <%if(webAdminConsoleTitle != null && webAdminConsoleTitle.trim().length() > 0){ %>
+    <title><%=webAdminConsoleTitle%></title>
+    <%}else{ %>
+    <title><tiles:getAsString name="title"/></title>
+    <%}%>
+    <link href="<%=globalCSS%>" rel="stylesheet" type="text/css" media="all"/>
+<%
+	Object param = session.getAttribute("authenticated");
+	if (param != null && (Boolean) param) {
+%>
+    <link href="../admin/jsp/registry_styles_ajaxprocessor.jsp" rel="stylesheet" type="text/css"
+          media="all"/>
+<%
+	}
+%>
+    <link href="<%=mainCSS%>" rel="stylesheet" type="text/css" media="all"/>
+    <link href="../dialog/css/jqueryui/jqueryui-themeroller.css" rel="stylesheet" type="text/css"
+          media="all"/>
+    <link href="../dialog/css/dialog.css" rel="stylesheet" type="text/css" media="all"/>
+    <link rel="stylesheet" href="../admin/css/carbonFormStyles.css">
+    <!--[if gte IE 8]>
+    <link href="../dialog/css/dialog-ie8.css" rel="stylesheet" type="text/css" media="all"/>        
+    <![endif]-->
+    <!--[if gte IE 7]>
+    <link href="../dialog/css/dialog-ie8.css" rel="stylesheet" type="text/css" media="all"/>
+    <![endif]-->
+    <link rel="icon" href="../admin/images/favicon.ico" type="image/x-icon"/>
+    <link rel="shortcut icon" href="../admin/images/favicon.ico" type="image/x-icon"/>
+
+    <script type="text/javascript" src="../admin/js/jquery-1.5.2.min.js"></script>
+    <script type="text/javascript" src="../admin/js/jquery.form.js"></script>
+    <script type="text/javascript" src="../dialog/js/jqueryui/jquery-ui.min.js"></script>
+    <script type="text/javascript" src="../admin/js/jquery.validate.js"></script>    
+    <script type="text/javascript" src="../admin/js/jquery.cookie.js"></script>
+    <script type="text/javascript" src="../admin/js/jquery.ui.core.min.js"></script>
+    <script type="text/javascript" src="../admin/js/jquery.ui.widget.min.js"></script>
+    <script type="text/javascript" src="../admin/js/jquery.ui.tabs.min.js"></script>
+    <script type="text/javascript" src="../admin/js/main.js"></script>
+    <script type="text/javascript" src="../admin/js/WSRequest.js"></script>
+    <script type="text/javascript" src="../admin/js/cookies.js"></script>
+
+    <script type="text/javascript" src="../admin/js/customControls.js"></script>
+</head>
+<%
+	//set cookie containing collapsed menu items
+	Object o = config.getServletContext().getAttribute(
+			CarbonConstants.PRODUCT_XML_WSO2CARBON + "collapsedmenus");
+	if (o != null) {
+		ArrayList collapsedMenuItems = (ArrayList) o;
+		Iterator itrCollapsedMenuItems = collapsedMenuItems.iterator();
+		%>
+		<script type="text/javascript">
+		<%
+		while (itrCollapsedMenuItems.hasNext()) {
+			String menuItem = (String) itrCollapsedMenuItems.next();
+			out.print("if(getCookie('" + menuItem + "') == null){\n");
+			out.print("  setCookie('" + menuItem + "', 'none');\n");
+			out.print("}\n");
+		}
+		%>
+		</script>
+		<%
+	}
+%>
+<body>
+<jsp:include page="../../admin/jsp/browser_checker.jsp" />
+<div id="dcontainer"></div>
+<script type="text/javascript" src="../dialog/js/dialog.js"></script>
+
+<!-- JS imports for collapsible menu -->
+<script src="../yui/build/yahoo-dom-event/yahoo-dom-event.js" type="text/javascript"></script>
+<script src="../yui/build/animation/animation-min.js" type="text/javascript"></script>
+<script src="../admin/js/template.js" type="text/javascript"></script>
+<script src="../yui/build/yahoo/yahoo-min.js" type="text/javascript"></script>
+<script src="../yui/build/selector/selector-min.js" type="text/javascript"></script>
+
+<table id="main-table" border="0" cellspacing="0">
+    <tr>
+        <td id="header" colspan="3"><tiles:insertAttribute name="header"/>
+        </td>
+    </tr>
+    <tr>
+        <td class="vertical-menu-container" id="vertical-menu-container" style="display:none;">
+            <div id="menu-panel-button0"></div>
+            <div id="menu-panel-button1" class="menu-panel-buttons"></div>
+            <div id="menu-panel-button2" class="menu-panel-buttons"></div>
+            <div id="menu-panel-button3" class="menu-panel-buttons"></div>
+            <div id="menu-panel-button4" class="menu-panel-buttons"></div>
+            <div id="menu-panel-button5" class="menu-panel-buttons"></div>
+            <div id="menu-panel-button_dummy" style="display:none"></div>
+        </td>
+        <td id="menu-panel" valign="top">
+            <table id="menu-table" border="0" cellspacing="0">
+                <tr>
+                    <td id="region1"><tiles:insertAttribute name="region1"/></td>
+                </tr>
+                <tr>
+                    <td id="region2"><tiles:insertAttribute name="region2"/></td>
+                </tr>
+                <tr>
+                    <td id="region3"><tiles:insertAttribute name="region3"/></td>
+                </tr>
+                <tr>
+                    <td id="region4"><tiles:insertAttribute name="region4"/></td>
+                </tr>
+                <tr>
+                    <td id="region5"><tiles:insertAttribute name="region5"/></td>
+                </tr>
+                <tr>
+                    <td><img src="../admin/images/1px.gif" width="225px" height="1px"/></td>
+                </tr>
+            </table>
+        </td>
+        <td id="middle-content">
+            <table id="content-table" border="0" cellspacing="0">
+                <tr>
+                    <td id="page-header-links"><tiles:insertAttribute name="breadcrumb"/></td>
+                </tr>
+                <tr>
+                    <td id="body">
+                        <img src="../admin/images/1px.gif" width="735px" height="1px"/>
+                        <tiles:insertAttribute name="body"/>
+                    </td>
+                </tr>
+            </table>
+        </td>
+    </tr>
+    <tr>
+        <td id="footer" colspan="3"><tiles:insertAttribute name="footer"/></td>
+    </tr>
+</table>
+<script type="text/javascript">
+if (Function('/*@cc_on return document.documentMode===10@*/')()){
+    document.documentElement.className+=' ie10';
+}
+</script>
+</body>
+</html>
+</fmt:bundle>


[06/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor.css
new file mode 100644
index 0000000..780c387
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.yui-busy{cursor:wait !important;}.yui-toolbar-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container .yui-toolbar-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-conta
 iner.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-co
 ntainer .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;font-size:0px;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-f
 amily:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-pane
 l .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd .gecko form{overflow:auto;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group{margin-bottom:0.75em;}.yui-editor-panel
  .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;_top:-5px;width:24px;text-indent:52px;font-size:0%;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted bla
 ck;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;text-indent:0px;font-size:75%;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-men
 u .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-tool
 bar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}
 .yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-toolbar-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#
 808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:0.25em;}.yui-sk
 in-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;_font-size:0;margin:0;border-color:#808080;color:#f2f2f2;border-style:solid;border-width:1px 0;zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:0px;line-height:2;display:block;color:#000;overflow:hidden;white-space:nowrap;}.yui-skin-sam .yui-toolbar-container .yui-t
 oolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-di
 sabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;t
 op:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam .yui-toolbar-container .yui-button-menu .yui-menu-body-scrolled{position:relative;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-strikethrough span.yui-toolbar-icon{background-position:0 -108px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-tool
 bar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-undo span.yui-toolbar-icon{background-position:0 -1326px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-redo span.yui-toolbar-icon{background-position:0 -1355px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{ba
 ckground-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972p
 x;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px
 ;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:
 5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;position:absolute;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-sk
 in-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel .createlink_target,.yui-skin-sam .yui-editor-panel .insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color
 :#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;_width:198px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.cl
 ose{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-contain
 er{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/hue_bg.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/hue_bg.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/hue_bg.png
new file mode 100644
index 0000000..d9bcdeb
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/hue_bg.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/logger.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/logger.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/logger.css
new file mode 100644
index 0000000..f145cf8
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/logger.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000;}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em;}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal;}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em;}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757;}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF;}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}.yui-skin-sam .yui-log p{margin:1px;padding:.1em;}.yui-skin-sam .yui-log pre{margin:0;padding:0;}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;}.yui
 -skin-sam .yui-log .yui-log-ft{margin-top:.5em;}.yui-skin-sam .yui-log .yui-log-ft .yui-log-categoryfilters{}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em;}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em;}.yui-skin-sam .yui-log .info{background-color:#A7CC25;}.yui-skin-sam .yui-log .warn{background-color:#F58516;}.yui-skin-sam .yui-log .error{background-color:#E32F0B;}.yui-skin-sam .yui-log .time{background-color:#A6C9D7;}.yui-skin-sam .yui-log .window{background-color:#F2E886;}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/menu-button-arrow-disabled.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/menu-button-arrow-disabled.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/menu-button-arrow-disabled.png
new file mode 100644
index 0000000..8cef2ab
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/menu-button-arrow-disabled.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/menu-button-arrow.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/menu-button-arrow.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/menu-button-arrow.png
new file mode 100644
index 0000000..f03dfee
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/menu-button-arrow.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/menu.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/menu.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/menu.css
new file mode 100644
index 0000000..ba0e8f3
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/menu.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.yuimenu{top:-999em;left:-999em;}.yuimenubar{position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .
 yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-selected{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenub
 aritemlabel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{*zoom:1;_zoom:normal;border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu .yuimenu .bd{*zoom:normal;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .y
 ui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-check
 ed{background-image:url(menuitem_checkbox.png);background-position:left center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-shadow-visible{background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/picker_mask.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/picker_mask.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/picker_mask.png
new file mode 100644
index 0000000..f8d9193
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/picker_mask.png differ


[17/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/jquery.cookie.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/jquery.cookie.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/jquery.cookie.js
new file mode 100644
index 0000000..6df1fac
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/jquery.cookie.js
@@ -0,0 +1,96 @@
+/**
+ * Cookie plugin
+ *
+ * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+
+/**
+ * Create a cookie with the given name and value and other optional parameters.
+ *
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Set the value of a cookie.
+ * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
+ * @desc Create a cookie with all available options.
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Create a session cookie.
+ * @example $.cookie('the_cookie', null);
+ * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
+ *       used when the cookie was set.
+ *
+ * @param String name The name of the cookie.
+ * @param String value The value of the cookie.
+ * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
+ * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
+ *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
+ *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
+ *                             when the the browser exits.
+ * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
+ * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
+ * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
+ *                        require a secure protocol (like HTTPS).
+ * @type undefined
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+
+/**
+ * Get the value of a cookie with the given name.
+ *
+ * @example $.cookie('the_cookie');
+ * @desc Get the value of a cookie.
+ *
+ * @param String name The name of the cookie.
+ * @return The value of the cookie.
+ * @type String
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+jQuery.cookie = function(name, value, options) {
+    if (typeof value != 'undefined') { // name and value given, set cookie
+        options = options || {};
+        if (value === null) {
+            value = '';
+            options.expires = -1;
+        }
+        var expires = '';
+        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
+            var date;
+            if (typeof options.expires == 'number') {
+                date = new Date();
+                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+            } else {
+                date = options.expires;
+            }
+            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+        }
+        // CAUTION: Needed to parenthesize options.path and options.domain
+        // in the following expressions, otherwise they evaluate to undefined
+        // in the packed version for some reason...
+        var path = options.path ? '; path=' + (options.path) : '';
+        var domain = options.domain ? '; domain=' + (options.domain) : '';
+        var secure = options.secure ? '; secure' : '';
+        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
+    } else { // only name given, get cookie
+        var cookieValue = null;
+        if (document.cookie && document.cookie != '') {
+            var cookies = document.cookie.split(';');
+            for (var i = 0; i < cookies.length; i++) {
+                var cookie = jQuery.trim(cookies[i]);
+                // Does this cookie string begin with the name we want?
+                if (cookie.substring(0, name.length + 1) == (name + '=')) {
+                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+                    break;
+                }
+            }
+        }
+        return cookieValue;
+    }
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/ui.all.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/ui.all.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/ui.all.css
new file mode 100644
index 0000000..fa60867
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/ui.all.css
@@ -0,0 +1,609 @@
+/*
+ * jQuery UI screen structure and presentation
+ * This CSS file was generated by ThemeRoller, a Filament Group Project for jQuery UI
+ * Author: Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
+ * Visit ThemeRoller.com
+*/
+
+/*
+ * Note: If your ThemeRoller settings have a font size set in ems, your components will scale according to their parent element's font size.
+ * As a rule of thumb, set your body's font size to 62.5% to make 1em = 10px.
+ * body {font-size: 62.5%;}
+*/
+
+
+
+/*UI accordion*/
+.ui-accordion {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Verdana,Arial,sans-serif;
+	font-size: 1.1em;
+	border-bottom: 1px solid #d3d3d3;
+}
+.ui-accordion-group {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	border: 1px solid #d3d3d3;
+	border-bottom: none;
+}
+.ui-accordion-header {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	cursor: pointer;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+}
+.ui-accordion-header a {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	display: block;
+	font-size: 1em;
+	font-weight: normal;
+	text-decoration: none;
+	padding: .5em .5em .5em 1.7em;
+	color: #555555;
+	background: url(images/888888_7x7_arrow_right.gif) .5em 50% no-repeat;
+}
+.ui-accordion-header a:hover {
+	background: url(images/454545_7x7_arrow_right.gif) .5em 50% no-repeat;
+	color: #212121;
+}
+.ui-accordion-header:hover {
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	color: #212121;
+}
+.selected .ui-accordion-header, .selected .ui-accordion-header:hover {
+	background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;
+}
+.selected .ui-accordion-header a, .selected .ui-accordion-header a:hover {
+	color: #212121;
+	background: url(images/454545_7x7_arrow_down.gif) .5em 50% no-repeat;
+}
+.ui-accordion-content {
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_75.png) 0 0 repeat-x;
+	color: #222222;
+	font-size: 1em;
+}
+.ui-accordion-content p {
+	padding: 1em 1.7em 0.6em;
+}
+
+
+.tableHighlightRow {
+background-color:#AAF;
+}
+
+
+
+
+/*UI tabs*/
+.ui-tabs-nav {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	float: left;
+	position: relative;
+	z-index: 1;
+	border-right: 0px none #d3d3d3;
+	bottom: -1px;
+    width: 100%;
+}
+.ui-tabs-nav ul {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+}
+.ui-tabs-nav li {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	float: left;
+	border: 1px solid #d3d3d3;
+	border-right: none;
+}
+.ui-tabs-nav li a {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	float: left;
+	font-weight: normal;
+	text-decoration: none;
+	padding: .5em 1.7em;
+	color: #555555;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+}
+.ui-tabs-nav li a:hover {
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	color: #212121;
+}
+.ui-tabs-nav li.ui-tabs-selected {
+	border-bottom-color: #ffffff;
+}
+.ui-tabs-nav li.ui-tabs-selected a, .ui-tabs-nav li.ui-tabs-selected a:hover {
+	background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;
+	color: #212121;
+}
+.ui-tabs-panel {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	clear:left;
+	border: 1px solid #d3d3d3;
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_75.png) 0 0 repeat-x;
+	color: #222222;
+	padding: 1.5em 1.7em;	
+}
+.ui-tabs-hide {
+	display: none;/* for accessible hiding: position: absolute; left: -99999999px*/;
+}
+
+
+
+
+
+/*slider*/
+.ui-slider {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Verdana,Arial,sans-serif;
+	font-size: 1.1em;
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_75.png) 0 0 repeat-x;
+	border: 1px solid #aaaaaa;
+	height: .8em;
+	position: relative;
+}
+.ui-slider-handle {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	position: absolute;
+	z-index: 2;
+	top: -3px;
+	width: 1.2em;
+	height: 1.2em;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	border: 1px solid #d3d3d3;
+}
+.ui-slider-handle:hover {
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	border: 1px solid #999999;
+}
+.ui-slider-handle-active, .ui-slider-handle-active:hover {
+	background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;
+	border: 1px solid #aaaaaa;
+}
+.ui-slider-range {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	height: .8em;
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	position: absolute;
+	border: 1px solid #d3d3d3;
+	border-left: 0;
+	border-right: 0;
+	top: -1px;
+	z-index: 1;
+	opacity:.7;
+	filter:Alpha(Opacity=70);
+}
+
+
+
+
+
+
+/*dialog*/
+/*.ui-dialog {*/
+	/*resets*//*margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;*/
+	/*font-family: Verdana,Arial,sans-serif;*/
+	/*font-size: 1.1em;*/
+	/*background: #ffffff url(images/ffffff_40x100_textures_01_flat_75.png) 0 0 repeat-x;*/
+	/*color: #222222;*/
+	/*border: 4px solid #aaaaaa;*/
+	/*position: relative;*/
+/*}*/
+/*.ui-resizable-handle {*/
+	/*position: absolute;*/
+	/*font-size: 0.1px;*/
+	/*z-index: 99999;*/
+/*}*/
+/*.ui-resizable .ui-resizable-handle {*/
+	/*display: block; */
+/*}*/
+/*body .ui-resizable-disabled .ui-resizable-handle { display: none; } *//* use 'body' to make it more specific (css order) */
+/*body .ui-resizable-autohide .ui-resizable-handle { display: none; } *//* use 'body' to make it more specific (css order) */
+/*.ui-resizable-n { */
+	/*cursor: n-resize; */
+	/*height: 7px; */
+	/*width: 100%; */
+	/*top: -5px; */
+	/*left: 0px;  */
+/*}*/
+/*.ui-resizable-s { */
+	/*cursor: s-resize; */
+	/*height: 7px; */
+	/*width: 100%; */
+	/*bottom: -5px; */
+	/*left: 0px; */
+/*}*/
+/*.ui-resizable-e { */
+	/*cursor: e-resize; */
+	/*width: 7px; */
+	/*right: -5px; */
+	/*top: 0px; */
+	/*height: 100%; */
+/*}*/
+/*.ui-resizable-w { */
+	/*cursor: w-resize; */
+	/*width: 7px; */
+	/*left: -5px; */
+	/*top: 0px; */
+	/*height: 100%;*/
+/*}*/
+/*.ui-resizable-se { */
+	/*cursor: se-resize; */
+	/*width: 13px; */
+	/*height: 13px; */
+	/*right: 0px; */
+	/*bottom: 0px; */
+	/*background: url(images/222222_11x11_icon_resize_se.gif) no-repeat 0 0;*/
+/*}*/
+/*.ui-resizable-sw { */
+	/*cursor: sw-resize; */
+	/*width: 9px; */
+	/*height: 9px; */
+	/*left: 0px; */
+	/*bottom: 0px;  */
+/*}*/
+/*.ui-resizable-nw { */
+	/*cursor: nw-resize; */
+	/*width: 9px; */
+	/*height: 9px; */
+	/*left: 0px; */
+	/*top: 0px; */
+/*}*/
+/*.ui-resizable-ne { */
+	/*cursor: ne-resize; */
+	/*width: 9px; */
+	/*height: 9px; */
+	/*right: 0px; */
+	/*top: 0px; */
+/*}*/
+/*.ui-dialog-titlebar {*/
+	/*resets*//*margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;*/
+	/*padding: .5em 1.5em .5em 1em;*/
+	/*color: #555555;*/
+	/*background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;*/
+	/*border-bottom: 1px solid #d3d3d3;*/
+	/*font-size: 1em;*/
+	/*font-weight: normal;*/
+	/*position: relative;*/
+/*}*/
+/*.ui-dialog-title {}*/
+/*.ui-dialog-titlebar-close {*/
+	/*resets*//*margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;*/
+	/*background: url(images/888888_11x11_icon_close.gif) 0 0 no-repeat;*/
+	/*position: absolute;*/
+	/*right: 8px;*/
+	/*top: .7em;*/
+	/*width: 11px;*/
+	/*height: 11px;*/
+	/*z-index: 100;*/
+/*}*/
+/*.ui-dialog-titlebar-close-hover, .ui-dialog-titlebar-close:hover {*/
+	/*background: url(images/454545_11x11_icon_close.gif) 0 0 no-repeat;*/
+/*}*/
+/*.ui-dialog-titlebar-close:active {*/
+	/*background: url(images/454545_11x11_icon_close.gif) 0 0 no-repeat;*/
+/*}*/
+/*.ui-dialog-titlebar-close span {*/
+	/*display: none;*/
+/*}*/
+/*.ui-dialog-content {*/
+	/*resets*//*margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;*/
+	/*color: #222222;*/
+	/*padding: 1.5em 1.7em;	*/
+/*}*/
+/*.ui-dialog-buttonpane {*/
+	/*position: absolute;*/
+	/*bottom: 0;*/
+	/*width: 100%;*/
+	/*text-align: left;*/
+	/*border-top: 1px solid #aaaaaa;*/
+	/*background: #ffffff;*/
+/*}*/
+/*.ui-dialog-buttonpane button {*/
+	/*margin: .5em 0 .5em 8px;*/
+	/*color: #555555;*/
+	/*background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;*/
+	/*font-size: 1em;*/
+	/*border: 1px solid #d3d3d3;*/
+	/*cursor: pointer;*/
+	/*padding: .2em .6em .3em .6em;*/
+	/*line-height: 1.4em;*/
+/*}*/
+/*.ui-dialog-buttonpane button:hover {*/
+	/*color: #212121;*/
+	/*background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;*/
+	/*border: 1px solid #999999;*/
+/*}*/
+/*.ui-dialog-buttonpane button:active {*/
+	/*color: #212121;*/
+	/*background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;*/
+	/*border: 1px solid #aaaaaa;*/
+/*}*/
+/* This file skins dialog */
+/*.ui-dialog.ui-draggable .ui-dialog-titlebar,*/
+/*.ui-dialog.ui-draggable .ui-dialog-titlebar {*/
+	/*cursor: move;*/
+/*}*/
+
+
+
+
+
+
+
+/*datepicker*/
+/* Main Style Sheet for jQuery UI date picker */
+.ui-datepicker-div, .ui-datepicker-inline, #ui-datepicker-div {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Verdana,Arial,sans-serif;
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_75.png) 0 0 repeat-x;
+	font-size: 1.1em;
+	border: 4px solid #aaaaaa;
+	width: 15.5em;
+	padding: 2.5em .5em .5em .5em;
+	position: relative;
+}
+.ui-datepicker-div, #ui-datepicker-div {
+	z-index: 9999; /*must have*/
+	display: none;
+}
+.ui-datepicker-inline {
+	float: left;
+	display: block;
+}
+.ui-datepicker-control {
+	display: none;
+}
+.ui-datepicker-current {
+	display: none;
+}
+.ui-datepicker-next, .ui-datepicker-prev {
+	position: absolute;
+	left: .5em;
+	top: .5em;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+}
+.ui-datepicker-next {
+	left: 14.6em;
+}
+.ui-datepicker-next:hover, .ui-datepicker-prev:hover {
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+}
+.ui-datepicker-next a, .ui-datepicker-prev a {
+	text-indent: -999999px;
+	width: 1.3em;
+	height: 1.4em;
+	display: block;
+	font-size: 1em;
+	background: url(images/888888_7x7_arrow_left.gif) 50% 50% no-repeat;
+	border: 1px solid #d3d3d3;
+	cursor: pointer;
+}
+.ui-datepicker-next a {
+	background: url(images/888888_7x7_arrow_right.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-prev a:hover {
+	background: url(images/454545_7x7_arrow_left.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-next a:hover {
+	background: url(images/454545_7x7_arrow_right.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-prev a:active {
+	background: url(images/454545_7x7_arrow_left.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-next a:active {
+	background: url(images/454545_7x7_arrow_right.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-header select {
+	border: 1px solid #d3d3d3;
+	color: #555555;
+	background: #e6e6e6;
+	font-size: 1em;
+	line-height: 1.4em;
+	position: absolute;
+	top: .5em;
+	margin: 0 !important;
+}
+.ui-datepicker-header option:focus, .ui-datepicker-header option:hover {
+	background: #dadada;
+}
+.ui-datepicker-header select.ui-datepicker-new-month {
+	width: 7em;
+	left: 2.2em;
+}
+.ui-datepicker-header select.ui-datepicker-new-year {
+	width: 5em;
+	left: 9.4em;
+}
+table.ui-datepicker {
+	width: 15.5em;
+	text-align: right;
+}
+table.ui-datepicker td a {
+	padding: .1em .3em .1em 0;
+	display: block;
+	color: #555555;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	cursor: pointer;
+	border: 1px solid #ffffff;
+}
+table.ui-datepicker td a:hover {
+	border: 1px solid #999999;
+	color: #212121;
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+}
+table.ui-datepicker td a:active {
+	border: 1px solid #aaaaaa;
+	color: #212121;
+	background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;
+}
+table.ui-datepicker .ui-datepicker-title-row td {
+	padding: .3em 0;
+	text-align: center;
+	font-size: .9em;
+	color: #222222;
+	text-transform: uppercase;
+}
+table.ui-datepicker .ui-datepicker-title-row td a {
+	color: #222222;
+}
+.ui-datepicker-cover {
+	display: none;
+	display/**/: block;
+	position: absolute;
+	z-index: -1;
+	filter: mask();
+	top: -4px;
+	left: -4px;
+	width: 193px;
+	height: 200px;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+Generic ThemeRoller Classes
+>> Make your jQuery Components ThemeRoller-Compatible!
+*/
+
+/*component global class*/
+.ui-component {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Verdana,Arial,sans-serif;
+	font-size: 1.1em;
+}
+/*component content styles*/
+.ui-component-content {
+	border: 1px solid #aaaaaa;
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_75.png) 0 0 repeat-x;
+	color: #222222;
+}
+.ui-component-content a {
+	color: #222222;
+	text-decoration: underline;
+}
+/*component states*/
+.ui-default-state {
+	border: 1px solid #d3d3d3;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	font-weight: normal;
+	color: #555555 !important;
+}
+.ui-default-state a {
+	color: #555555;
+}
+.ui-default-state:hover, .ui-hover-state {
+	border: 1px solid #999999;
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	font-weight: normal;
+	color: #212121 !important;
+}
+.ui-hover-state a {
+	color: #212121;
+}
+.ui-default-state:active, .ui-active-state {
+	border: 1px solid #aaaaaa;
+	background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;
+	font-weight: normal;
+	color: #212121 !important;
+	outline: none;
+}
+.ui-active-state a {
+	color: #212121;
+	outline: none;
+}
+/*icons*/
+.ui-arrow-right-default {background: url(images/888888_7x7_arrow_right.gif) no-repeat 50% 50%;}
+.ui-arrow-right-default:hover, .ui-arrow-right-hover {background: url(images/454545_7x7_arrow_right.gif) no-repeat 50% 50%;}
+.ui-arrow-right-default:active, .ui-arrow-right-active {background: url(images/454545_7x7_arrow_right.gif) no-repeat 50% 50%;}
+.ui-arrow-right-content {background: url(images/222222_7x7_arrow_right.gif) no-repeat 50% 50%;}
+
+.ui-arrow-left-default {background: url(images/888888_7x7_arrow_left.gif) no-repeat 50% 50%;}
+.ui-arrow-left-default:hover, .ui-arrow-left-hover {background: url(images/454545_7x7_arrow_left.gif) no-repeat 50% 50%;}
+.ui-arrow-left-default:active, .ui-arrow-left-active {background: url(images/454545_7x7_arrow_left.gif) no-repeat 50% 50%;}
+.ui-arrow-left-content {background: url(images/222222_7x7_arrow_left.gif) no-repeat 50% 50%;}
+
+.ui-arrow-down-default {background: url(images/888888_7x7_arrow_down.gif) no-repeat 50% 50%;}
+.ui-arrow-down-default:hover, .ui-arrow-down-hover {background: url(images/454545_7x7_arrow_down.gif) no-repeat 50% 50%;}
+.ui-arrow-down-default:active, .ui-arrow-down-active {background: url(images/454545_7x7_arrow_down.gif) no-repeat 50% 50%;}
+.ui-arrow-down-content {background: url(images/222222_7x7_arrow_down.gif) no-repeat 50% 50%;}
+
+.ui-arrow-up-default {background: url(images/888888_7x7_arrow_up.gif) no-repeat 50% 50%;}
+.ui-arrow-up-default:hover, .ui-arrow-up-hover {background: url(images/454545_7x7_arrow_up.gif) no-repeat 50% 50%;}
+.ui-arrow-up-default:active, .ui-arrow-up-active {background: url(images/454545_7x7_arrow_up.gif) no-repeat 50% 50%;}
+.ui-arrow-up-content {background: url(images/222222_7x7_arrow_up.gif) no-repeat 50% 50%;}
+
+.ui-close-default {background: url(images/888888_11x11_icon_close.gif) no-repeat 50% 50%;}
+.ui-close-default:hover, .ui-close-hover {background: url(images/454545_11x11_icon_close.gif) no-repeat 50% 50%;}
+.ui-close-default:active, .ui-close-active {background: url(images/454545_11x11_icon_close.gif) no-repeat 50% 50%;}
+.ui-close-content {background: url(images/454545_11x11_icon_close.gif) no-repeat 50% 50%;}
+
+.ui-folder-closed-default {background: url(images/888888_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+.ui-folder-closed-default:hover, .ui-folder-closed-hover {background: url(images/454545_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+.ui-folder-closed-default:active, .ui-folder-closed-active {background: url(images/454545_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+.ui-folder-closed-content {background: url(images/888888_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+
+.ui-folder-open-default {background: url(images/888888_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+.ui-folder-open-default:hover, .ui-folder-open-hover {background: url(images/454545_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+.ui-folder-open-default:active, .ui-folder-open-active {background: url(images/454545_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+.ui-folder-open-content {background: url(images/454545_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+
+.ui-doc-default {background: url(images/888888_11x11_icon_doc.gif) no-repeat 50% 50%;}
+.ui-doc-default:hover, .ui-doc-hover {background: url(images/454545_11x11_icon_doc.gif) no-repeat 50% 50%;}
+.ui-doc-default:active, .ui-doc-active {background: url(images/454545_11x11_icon_doc.gif) no-repeat 50% 50%;}
+.ui-doc-content {background: url(images/222222_11x11_icon_doc.gif) no-repeat 50% 50%;}
+
+.ui-arrows-leftright-default {background: url(images/888888_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+.ui-arrows-leftright-default:hover, .ui-arrows-leftright-hover {background: url(images/454545_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+.ui-arrows-leftright-default:active, .ui-arrows-leftright-active {background: url(images/454545_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+.ui-arrows-leftright-content {background: url(images/222222_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+
+.ui-arrows-updown-default {background: url(images/888888_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+.ui-arrows-updown-default:hover, .ui-arrows-updown-hover {background: url(images/454545_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+.ui-arrows-updown-default:active, .ui-arrows-updown-active {background: url(images/454545_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+.ui-arrows-updown-content {background: url(images/222222_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+
+.ui-minus-default {background: url(images/888888_11x11_icon_minus.gif) no-repeat 50% 50%;}
+.ui-minus-default:hover, .ui-minus-hover {background: url(images/454545_11x11_icon_minus.gif) no-repeat 50% 50%;}
+.ui-minus-default:active, .ui-minus-active {background: url(images/454545_11x11_icon_minus.gif) no-repeat 50% 50%;}
+.ui-minus-content {background: url(images/222222_11x11_icon_minus.gif) no-repeat 50% 50%;}
+
+.ui-plus-default {background: url(images/888888_11x11_icon_plus.gif) no-repeat 50% 50%;}
+.ui-plus-default:hover, .ui-plus-hover {background: url(images/454545_11x11_icon_plus.gif) no-repeat 50% 50%;}
+.ui-plus-default:active, .ui-plus-active {background: url(images/454545_11x11_icon_plus.gif) no-repeat 50% 50%;}
+.ui-plus-content {background: url(images/222222_11x11_icon_plus.gif) no-repeat 50% 50%;}
+
+/*hidden elements*/
+.ui-hidden {
+	display: none;/* for accessible hiding: position: absolute; left: -99999999px*/;
+}
+.ui-accessible-hidden {
+	 position: absolute; left: -99999999px;
+}
+/*reset styles*/
+.ui-reset {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+}
+/*clearfix class*/
+.ui-clearfix:after {
+    content: "."; 
+    display: block; 
+    height: 0; 
+    clear: both; 
+    visibility: hidden;
+}
+.ui-clearfix {display: inline-block;}
+/* Hides from IE-mac \*/
+* html .ui-clearfix {height: 1%;}
+.ui-clearfix {display: block;}
+/* End hide from IE-mac */
+
+/* Note: for resizable styles, use the styles listed above in the dialog section */
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/jquery.ui.i18n.all.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/jquery.ui.i18n.all.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/jquery.ui.i18n.all.js
new file mode 100644
index 0000000..ce69597
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/jquery.ui.i18n.all.js
@@ -0,0 +1,856 @@
+/* Arabic Translation for jQuery UI date picker plugin. */
+/* Khaled Al Horani -- koko.dw@gmail.com */
+/* خالد الحوراني -- koko.dw@gmail.com */
+/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['ar'] = {
+		clearText: 'مسح', clearStatus: 'امسح التاريخ الحالي',
+		closeText: 'إغلاق', closeStatus: 'إغلاق بدون حفظ',
+		prevText: '&#x3c;السابق', prevStatus: 'عرض الشهر السابق',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'التالي&#x3e;', nextStatus: 'عرض الشهر القادم',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'اليوم', currentStatus: 'عرض الشهر الحالي',
+		monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران',
+		'تموز', 'آب', 'أيلول',	'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
+		monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
+		monthStatus: 'عرض شهر آخر', yearStatus: 'عرض سنة آخرى',
+		weekHeader: 'أسبوع', weekStatus: 'أسبوع السنة',
+		dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'],
+		dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
+		dayNamesMin: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
+		dayStatus: 'اختر DD لليوم الأول من الأسبوع', dateStatus: 'اختر D, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: 'اختر يوم', isRTL: true};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['ar']);
+});/* Bulgarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Stoyan Kyosev (http://svest.org). */
+jQuery(function(jQuery){
+    jQuery.datepicker.regional['bg'] = {
+		clearText: 'изчисти', clearStatus: 'изчисти актуалната дата',
+        closeText: 'затвори', closeStatus: 'затвори без промени',
+        prevText: '&#x3c;назад', prevStatus: 'покажи последния месец',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+        nextText: 'напред&#x3e;', nextStatus: 'покажи следващия месец',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+        currentText: 'днес', currentStatus: '',
+        monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
+        'Юли','Август','Септември','Октомври','Ноември','Декември'],
+        monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
+        'Юли','Авг','Сеп','Окт','Нов','Дек'],
+        monthStatus: 'покажи друг месец', yearStatus: 'покажи друга година',
+        weekHeader: 'Wk', weekStatus: 'седмица от месеца',
+        dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
+        dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
+        dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
+        dayStatus: 'Сложи DD като първи ден от седмицата', dateStatus: 'Избери D, M d',
+        dateFormat: 'dd.mm.yy', firstDay: 1,
+        initStatus: 'Избери дата', isRTL: false};
+    jQuery.datepicker.setDefaults(jQuery.datepicker.regional['bg']);
+});
+/* Inicialitzaci� en catal� per a l'extenci� 'calendar' per jQuery. */
+/* Writers: (joan.leon@gmail.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['ca'] = {
+		clearText: 'Netejar', clearStatus: '',
+		closeText: 'Tancar', closeStatus: '',
+		prevText: '&#x3c;Ant', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Seg&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Avui', currentStatus: '',
+		monthNames: ['Gener','Febrer','Mar&ccedil;','Abril','Maig','Juny',
+		'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'],
+		monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun',
+		'Jul','Ago','Set','Oct','Nov','Des'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Sm', weekStatus: '',
+		dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'],
+		dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'],
+		dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'mm/dd/yy', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['ca']);
+});/* Czech initialisation for the jQuery UI date picker plugin. */
+/* Written by Tomas Muller (tomas@tomas-muller.net). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['cs'] = {
+		clearText: 'Vymazat', clearStatus: 'Vymaže zadané datum',
+		closeText: 'Zavřít',  closeStatus: 'Zavře kalendář beze změny',
+		prevText: '&#x3c;Dříve', prevStatus: 'Přejít na předchozí měsí',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Později&#x3e;', nextStatus: 'Přejít na další měsíc',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Nyní', currentStatus: 'Přejde na aktuální měsíc',
+		monthNames: ['leden','únor','březen','duben','květen','červen',
+        'červenec','srpen','září','říjen','listopad','prosinec'],
+		monthNamesShort: ['led','úno','bře','dub','kvě','čer',
+		'čvc','srp','zář','říj','lis','pro'],
+		monthStatus: 'Přejít na jiný měsíc', yearStatus: 'Přejít na jiný rok',
+		weekHeader: 'Týd', weekStatus: 'Týden v roce',
+		dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
+		dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
+		dayNamesMin: ['ne','po','út','st','čt','pá','so'],
+		dayStatus: 'Nastavit DD jako první den v týdnu', dateStatus: '\'Vyber\' DD, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: 'Vyberte datum', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['cs']);
+});
+/* Danish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jan Christensen ( deletestuff@gmail.com). */
+jQuery(function(jQuery){
+    jQuery.datepicker.regional['da'] = {
+		clearText: 'Nulstil', clearStatus: 'Nulstil den aktuelle dato',
+		closeText: 'Luk', closeStatus: 'Luk uden ændringer',
+        prevText: '&#x3c;Forrige', prevStatus: 'Vis forrige måned',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Næste&#x3e;', nextStatus: 'Vis næste måned',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Idag', currentStatus: 'Vis aktuel måned',
+        monthNames: ['Januar','Februar','Marts','April','Maj','Juni', 
+        'Juli','August','September','Oktober','November','December'],
+        monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 
+        'Jul','Aug','Sep','Okt','Nov','Dec'],
+		monthStatus: 'Vis en anden måned', yearStatus: 'Vis et andet år',
+		weekHeader: 'Uge', weekStatus: 'Årets uge',
+		dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
+		dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
+		dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
+		dayStatus: 'Sæt DD som første ugedag', dateStatus: 'Vælg D, M d',
+        dateFormat: 'dd-mm-yy', firstDay: 0, 
+		initStatus: 'Vælg en dato', isRTL: false};
+    jQuery.datepicker.setDefaults(jQuery.datepicker.regional['da']);
+});
+/* German initialisation for the jQuery UI date picker plugin. */
+/* Written by Milian Wolff (mail@milianw.de). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['de'] = {
+		clearText: 'löschen', clearStatus: 'aktuelles Datum löschen',
+		closeText: 'schließen', closeStatus: 'ohne Änderungen schließen',
+		prevText: '&#x3c;zurück', prevStatus: 'letzten Monat zeigen',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Vor&#x3e;', nextStatus: 'nächsten Monat zeigen',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'heute', currentStatus: '',
+		monthNames: ['Januar','Februar','März','April','Mai','Juni',
+		'Juli','August','September','Oktober','November','Dezember'],
+		monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
+		'Jul','Aug','Sep','Okt','Nov','Dez'],
+		monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen',
+		weekHeader: 'Wo', weekStatus: 'Woche des Monats',
+		dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
+		dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+		dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+		dayStatus: 'Setze DD als ersten Wochentag', dateStatus: 'Wähle D, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: 'Wähle ein Datum', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['de']);
+});
+/* Esperanto initialisation for the jQuery UI date picker plugin. */
+/* Written by Olivier M. (olivierweb@ifrance.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['eo'] = {
+		clearText: 'Vakigi', clearStatus: '',
+		closeText: 'Fermi', closeStatus: 'Fermi sen modifi',
+		prevText: '&lt;Anta', prevStatus: 'Vidi la antaŭan monaton',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Sekv&gt;', nextStatus: 'Vidi la sekvan monaton',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Nuna', currentStatus: 'Vidi la nunan monaton',
+		monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
+		'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
+		monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+		'Jul','Aŭg','Sep','Okt','Nov','Dec'],
+		monthStatus: 'Vidi alian monaton', yearStatus: 'Vidi alian jaron',
+		weekHeader: 'Sb', weekStatus: '',
+		dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
+		dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'],
+		dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'],
+		dayStatus: 'Uzi DD kiel unua tago de la semajno', dateStatus: 'Elekti DD, MM d',
+		dateFormat: 'dd/mm/yy', firstDay: 0,
+		initStatus: 'Elekti la daton', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['eo']);
+});
+/* Inicializaci�n en espa�ol para la extensi�n 'UI date picker' para jQuery. */
+/* Traducido por Vester (xvester@gmail.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['es'] = {
+		clearText: 'Limpiar', clearStatus: '',
+		closeText: 'Cerrar', closeStatus: '',
+		prevText: '&#x3c;Ant', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Sig&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Hoy', currentStatus: '',
+		monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
+		'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
+		monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
+		'Jul','Ago','Sep','Oct','Nov','Dic'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Sm', weekStatus: '',
+		dayNames: ['Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','S&aacute;dabo'],
+		dayNamesShort: ['Dom','Lun','Mar','Mi&eacute;','Juv','Vie','S&aacute;b'],
+		dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','S&aacute;'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['es']);
+});/* Finnish initialisation for the jQuery UI date picker plugin. */
+/* Written by Harri Kilpi� (harrikilpio@gmail.com). */
+jQuery(function(jQuery){
+    jQuery.datepicker.regional['fi'] = {
+		clearText: 'Tyhjenn&auml;', clearStatus: '',
+		closeText: 'Sulje', closeStatus: '',
+		prevText: '&laquo;Edellinen', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Seuraava&raquo;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'T&auml;n&auml;&auml;n', currentStatus: '',
+        monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kes&auml;kuu',
+        'Hein&auml;kuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
+        monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kes&auml;',
+        'Hein&auml;','Elo','Syys','Loka','Marras','Joulu'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Vk', weekStatus: '',
+		dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'],
+		dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
+		dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+        dateFormat: 'dd.mm.yy', firstDay: 1,
+		initStatus: '', isRTL: false};
+    jQuery.datepicker.setDefaults(jQuery.datepicker.regional['fi']);
+});
+/* French initialisation for the jQuery UI date picker plugin. */
+/* Written by Keith Wood (kbwood@virginbroadband.com.au) and Stéphane Nahmani (sholby@sholby.net). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['fr'] = {
+		clearText: 'Effacer', clearStatus: '',
+		closeText: 'Fermer', closeStatus: 'Fermer sans modifier',
+		prevText: '&#x3c;Préc', prevStatus: 'Voir le mois précédent',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Suiv&#x3e;', nextStatus: 'Voir le mois suivant',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Courant', currentStatus: 'Voir le mois courant',
+		monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
+		'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
+		monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
+		'Jul','Aoû','Sep','Oct','Nov','Déc'],
+		monthStatus: 'Voir un autre mois', yearStatus: 'Voir un autre année',
+		weekHeader: 'Sm', weekStatus: '',
+		dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+		dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
+		dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
+		dayStatus: 'Utiliser DD comme premier jour de la semaine', dateStatus: 'Choisir le DD, MM d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: 'Choisir la date', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['fr']);
+});/* Hebrew initialisation for the UI Datepicker extension. */
+/* Written by Amir Hardon (ahardon at gmail dot com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['he'] = {
+		clearText: 'נקה', clearStatus: '',
+		closeText: 'סגור', closeStatus: '',
+		prevText: '&#x3c;הקודם', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'הבא&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'היום', currentStatus: '',
+		monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
+		'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
+		monthNamesShort: ['1','2','3','4','5','6',
+		'7','8','9','10','11','12'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Sm', weekStatus: '',
+		dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
+		dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+		dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+		dayStatus: 'DD', dateStatus: 'DD, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: '', isRTL: true};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['he']);
+});
+/* Croatian i18n for the jQuery UI date picker plugin. */
+/* Written by Vjekoslav Nesek. */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['hr'] = {
+		clearText: 'izbriši', clearStatus: 'Izbriši trenutni datum',
+		closeText: 'Zatvori', closeStatus: 'Zatvori kalendar',
+		prevText: '&#x3c;', prevStatus: 'Prikaži prethodni mjesec',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: '&#x3e;', nextStatus: 'Prikaži slijedeći mjesec',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Danas', currentStatus: 'Današnji datum',
+		monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipani',
+		'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
+		monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
+		'Srp','Kol','Ruj','Lis','Stu','Pro'],
+		monthStatus: 'Prikaži mjesece', yearStatus: 'Prikaži godine',
+		weekHeader: 'Tje', weekStatus: 'Tjedan',
+		dayNames: ['Nedjalja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
+		dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
+		dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
+		dayStatus: 'Odaber DD za prvi dan tjedna', dateStatus: '\'Datum\' D, M d',
+		dateFormat: 'dd.mm.yy.', firstDay: 1,
+		initStatus: 'Odaberi datum', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['hr']);
+});/* Hungarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Istvan Karaszi (jquerycalendar@spam.raszi.hu). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['hu'] = {
+		clearText: 'törlés', clearStatus: '',
+		closeText: 'bezárás', closeStatus: '',
+		prevText: '&laquo;&nbsp;vissza', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'előre&nbsp;&raquo;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'ma', currentStatus: '',
+		monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
+		'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
+		monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
+		'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Hé', weekStatus: '',
+		dayNames: ['Vasámap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
+		dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
+		dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'yy-mm-dd', firstDay: 1, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['hu']);
+});
+/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['hy'] = {
+		clearText: 'Մաքրել', clearStatus: '',
+		closeText: 'Փակել', closeStatus: '',
+		prevText: '&#x3c;Նախ.',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Հաջ.&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Այսօր', currentStatus: '',
+		monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
+		'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
+		monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
+		'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'ՇԲՏ', weekStatus: '',
+		dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
+		dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+		dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['hy']);
+});/* Indonesian initialisation for the jQuery UI date picker plugin. */
+/* Written by Deden Fathurahman (dedenf@gmail.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['id'] = {
+		clearText: 'kosongkan', clearStatus: 'bersihkan tanggal yang sekarang',
+		closeText: 'Tutup', closeStatus: 'Tutup tanpa mengubah',
+		prevText: '&#x3c;mundur', prevStatus: 'Tampilkan bulan sebelumnya',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'maju&#x3e;', nextStatus: 'Tampilkan bulan berikutnya',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'hari ini', currentStatus: 'Tampilkan bulan sekarang',
+		monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
+		'Juli','Agustus','September','Oktober','Nopember','Desember'],
+		monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
+		'Jul','Agus','Sep','Okt','Nop','Des'],
+		monthStatus: 'Tampilkan bulan yang berbeda', yearStatus: 'Tampilkan tahun yang berbeda',
+		weekHeader: 'Mg', weekStatus: 'Minggu dalam tahun',
+		dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
+		dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
+		dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
+		dayStatus: 'gunakan DD sebagai awal hari dalam minggu', dateStatus: 'pilih le DD, MM d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: 'Pilih Tanggal', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['id']);
+});/* Icelandic initialisation for the jQuery UI date picker plugin. */
+/* Written by Haukur H. Thorsson (haukur@eskill.is). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['is'] = {
+		clearText: 'Hreinsa', clearStatus: '',
+		closeText: 'Loka', closeStatus: '',
+		prevText: '&#x3c; Fyrri', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'N&aelig;sti &#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: '&Iacute; dag', currentStatus: '',
+		monthNames: ['Jan&uacute;ar','Febr&uacute;ar','Mars','Apr&iacute;l','Ma&iacute','J&uacute;n&iacute;',
+		'J&uacute;l&iacute;','&Aacute;g&uacute;st','September','Okt&oacute;ber','N&oacute;vember','Desember'],
+		monthNamesShort: ['Jan','Feb','Mar','Apr','Ma&iacute;','J&uacute;n',
+		'J&uacute;l','&Aacute;g&uacute;','Sep','Okt','N&oacute;v','Des'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Vika', weekStatus: '',
+		dayNames: ['Sunnudagur','M&aacute;nudagur','&THORN;ri&eth;judagur','Mi&eth;vikudagur','Fimmtudagur','F&ouml;studagur','Laugardagur'],
+		dayNamesShort: ['Sun','M&aacute;n','&THORN;ri','Mi&eth;','Fim','F&ouml;s','Lau'],
+		dayNamesMin: ['Su','M&aacute;','&THORN;r','Mi','Fi','F&ouml;','La'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['is']);
+});/* Italian initialisation for the jQuery UI date picker plugin. */
+/* Written by Apaella (apaella@gmail.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['it'] = {
+		clearText: 'Svuota', clearStatus: 'Annulla',
+		closeText: 'Chiudi', closeStatus: 'Chiudere senza modificare',
+		prevText: '&#x3c;Prec', prevStatus: 'Mese precedente',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: 'Mostra l\'anno precedente',
+		nextText: 'Succ&#x3e;', nextStatus: 'Mese successivo',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: 'Mostra l\'anno successivo',
+		currentText: 'Oggi', currentStatus: 'Mese corrente',
+		monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
+		'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
+		monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
+		'Lug','Ago','Set','Ott','Nov','Dic'],
+		monthStatus: 'Seleziona un altro mese', yearStatus: 'Seleziona un altro anno',
+		weekHeader: 'Sm', weekStatus: 'Settimana dell\'anno',
+		dayNames: ['Domenica','Luned&#236','Marted&#236','Mercoled&#236','Gioved&#236','Venerd&#236','Sabato'],
+		dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
+		dayNamesMin: ['Do','Lu','Ma','Me','Gio','Ve','Sa'],
+		dayStatus: 'Usa DD come primo giorno della settimana', dateStatus: 'Seleziona D, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 1, 
+		initStatus: 'Scegliere una data', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['it']);
+});
+/* Japanese (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Milly. */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['ja'] = {
+		clearText: '&#21066;&#38500;', clearStatus: '',
+		closeText: '&#38281;&#12376;&#12427;', closeStatus: '',
+		prevText: '&#x3c;&#21069;&#26376;', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: '&#27425;&#26376;&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: '&#20170;&#26085;', currentStatus: '',
+		monthNames: ['1&#26376;','2&#26376;','3&#26376;','4&#26376;','5&#26376;','6&#26376;',
+		'7&#26376;','8&#26376;','9&#26376;','10&#26376;','11&#26376;','12&#26376;'],
+		monthNamesShort: ['1&#26376;','2&#26376;','3&#26376;','4&#26376;','5&#26376;','6&#26376;',
+		'7&#26376;','8&#26376;','9&#26376;','10&#26376;','11&#26376;','12&#26376;'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Wk', weekStatus: '',
+		dayNames: ['&#26085;','&#26376;','&#28779;','&#27700;','&#26408;','&#37329;','&#22303;'],
+		dayNamesShort: ['&#26085;','&#26376;','&#28779;','&#27700;','&#26408;','&#37329;','&#22303;'],
+		dayNamesMin: ['&#26085;','&#26376;','&#28779;','&#27700;','&#26408;','&#37329;','&#22303;'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'yy/mm/dd', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['ja']);
+});/* Korean initialisation for the jQuery calendar extension. */
+/* Written by DaeKwon Kang (ncrash.dk@gmail.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['ko'] = {
+		clearText: '지우기', clearStatus: '',
+		closeText: '닫기', closeStatus: '',
+		prevText: '이전달', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: '다음달', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: '오늘', currentStatus: '',
+		monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
+		'7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
+		monthNamesShort: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
+		'7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Wk', weekStatus: '',
+		dayNames: ['일','월','화','수','목','금','토'],
+		dayNamesShort: ['일','월','화','수','목','금','토'],
+		dayNamesMin: ['일','월','화','수','목','금','토'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'yy-mm-dd', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['ko']);
+});/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <ar...@avalon.lt> */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['lt'] = {
+		clearText: 'Išvalyti', clearStatus: '',
+		closeText: 'Uždaryti', closeStatus: '',
+		prevText: '&#x3c;Atgal',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Pirmyn&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Šiandien', currentStatus: '',
+		monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
+		'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
+		monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
+		'Lie','Rugp','Rugs','Spa','Lap','Gru'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: '', weekStatus: '',
+		dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
+		dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
+		dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'yy-mm-dd', firstDay: 1, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['lt']);
+});/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <ar...@metasite.net> */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['lv'] = {
+		clearText: 'Notīrīt', clearStatus: '',
+		closeText: 'Aizvērt', closeStatus: '',
+		prevText: 'Iepr',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Nāka', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Šodien', currentStatus: '',
+		monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
+		'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
+		monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
+		'Jūl','Aug','Sep','Okt','Nov','Dec'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Nav', weekStatus: '',
+		dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
+		dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
+		dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd-mm-yy', firstDay: 1, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['lv']);
+});/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by ??? */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['nl'] = {
+		clearText: 'Wissen', clearStatus: 'Wis de huidige datum',
+		closeText: 'Sluiten', closeStatus: 'Sluit zonder verandering',
+		prevText: '&#x3c;Terug', prevStatus: 'Laat de voorgaande maand zien',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Volgende&#x3e;', nextStatus: 'Laat de volgende maand zien',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Vandaag', currentStatus: 'Laat de huidige maand zien',
+		monthNames: ['Januari','Februari','Maart','April','Mei','Juni',
+		'Juli','Augustus','September','Oktober','November','December'],
+		monthNamesShort: ['Jan','Feb','Mrt','Apr','Mei','Jun',
+		'Jul','Aug','Sep','Okt','Nov','Dec'],
+		monthStatus: 'Laat een andere maand zien', yearStatus: 'Laat een ander jaar zien',
+		weekHeader: 'Wk', weekStatus: 'Week van het jaar',
+		dayNames: ['Zondag','Maandag','Dinsdag','Woensdag','Donderdag','Vrijdag','Zaterdag'],
+		dayNamesShort: ['Zon','Maa','Din','Woe','Don','Vri','Zat'],
+		dayNamesMin: ['Zo','Ma','Di','Wo','Do','Vr','Za'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: 'Kies een datum', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['nl']);
+});/* Norwegian initialisation for the jQuery UI date picker plugin. */
+/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
+jQuery(function(jQuery){
+    jQuery.datepicker.regional['no'] = {
+		clearText: 'Tøm', clearStatus: '',
+		closeText: 'Lukk', closeStatus: '',
+        prevText: '&laquo;Forrige',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Neste&raquo;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'I dag', currentStatus: '',
+        monthNames: ['Januar','Februar','Mars','April','Mai','Juni', 
+        'Juli','August','September','Oktober','November','Desember'],
+        monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun', 
+        'Jul','Aug','Sep','Okt','Nov','Des'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Uke', weekStatus: '',
+		dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
+		dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
+		dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+        dateFormat: 'yy-mm-dd', firstDay: 0, 
+		initStatus: '', isRTL: false};
+    jQuery.datepicker.setDefaults(jQuery.datepicker.regional['no']);
+});
+/* Polish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['pl'] = {
+		clearText: 'Wyczyść', clearStatus: 'Wyczyść obecną datę',
+		closeText: 'Zamknij', closeStatus: 'Zamknij bez zapisywania',
+		prevText: '&#x3c;Poprzedni', prevStatus: 'Pokaż poprzedni miesiąc',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Następny&#x3e;', nextStatus: 'Pokaż następny miesiąc',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Dziś', currentStatus: 'Pokaż aktualny miesiąc',
+		monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
+		'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
+		monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
+		'Lip','Sie','Wrz','Pa','Lis','Gru'],
+		monthStatus: 'Pokaż inny miesiąc', yearStatus: 'Pokaż inny rok',
+		weekHeader: 'Tydz', weekStatus: 'Tydzień roku',
+		dayNames: ['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
+		dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
+		dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
+		dayStatus: 'Ustaw DD jako pierwszy dzień tygodnia', dateStatus: 'Wybierz D, M d',
+		dateFormat: 'yy-mm-dd', firstDay: 1, 
+		initStatus: 'Wybierz datę', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['pl']);
+});
+/* Brazilian initialisation for the jQuery UI date picker plugin. */
+/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['pt-BR'] = {
+		clearText: 'Limpar', clearStatus: '',
+		closeText: 'Fechar', closeStatus: '',
+		prevText: '&#x3c;Anterior', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Pr&oacute;ximo&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Hoje', currentStatus: '',
+		monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
+		'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+		monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
+		'Jul','Ago','Set','Out','Nov','Dez'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Sm', weekStatus: '',
+		dayNames: ['Domingo','Segunda-feira','Ter&ccedil;a-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado'],
+		dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
+		dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['pt-BR']);
+});/* Romanian initialisation for the jQuery UI date picker plugin. */
+/* Written by Edmond L. (ll_edmond@walla.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['ro'] = {
+		clearText: 'Curat', clearStatus: 'Sterge data curenta',
+		closeText: 'Inchide', closeStatus: 'Inchide fara schimbare',
+		prevText: '&#x3c;Anterior', prevStatus: 'Arata luna trecuta',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Urmator&#x3e;', nextStatus: 'Arata luna urmatoare',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Azi', currentStatus: 'Arata luna curenta',
+		monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Junie',
+		'Julie','August','Septembrie','Octobrie','Noiembrie','Decembrie'],
+		monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun',
+		'Jul', 'Aug', 'Sep', 'Oct', 'Noi', 'Dec'],
+		monthStatus: 'Arata o luna diferita', yearStatus: 'Arat un an diferit',
+		weekHeader: 'Sapt', weekStatus: 'Saptamana anului',
+		dayNames: ['Duminica', 'Luni', 'Marti', 'Miercuri', 'Joi', 'Vineri', 'Sambata'],
+		dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sam'],
+		dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sa'],
+		dayStatus: 'Seteaza DD ca prima saptamana zi', dateStatus: 'Selecteaza D, M d',
+		dateFormat: 'mm/dd/yy', firstDay: 0, 
+		initStatus: 'Selecteaza o data', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['ro']);
+});
+/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Andrew Stromnov (stromnov@gmail.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['ru'] = {
+		clearText: 'Очистить', clearStatus: '',
+		closeText: 'Закрыть', closeStatus: '',
+		prevText: '&#x3c;Пред',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'След&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Сегодня', currentStatus: '',
+		monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
+		'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
+		monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
+		'Июл','Авг','Сен','Окт','Ноя','Дек'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Не', weekStatus: '',
+		dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
+		dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
+		dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['ru']);
+});/* Slovak initialisation for the jQuery UI date picker plugin. */
+/* Written by Vojtech Rinik (vojto@hmm.sk). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['sk'] = {
+		clearText: 'Zmazať', clearStatus: '',
+		closeText: 'Zavrieť', closeStatus: '',
+		prevText: '&#x3c;Predchádzajúci',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Nasledujúci&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Dnes', currentStatus: '',
+		monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
+		'Júl','August','September','Október','November','December'],
+		monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
+		'Júl','Aug','Sep','Okt','Nov','Dec'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Ty', weekStatus: '',
+		dayNames: ['Nedel\'a','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
+		dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
+		dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['sk']);
+});
+/* Slovenian initialisation for the jQuery UI date picker plugin. */
+/* Written by Jaka Jancar (jaka@kubje.org). */
+/* c = &#x10D;, s = &#x161; z = &#x17E; C = &#x10C; S = &#x160; Z = &#x17D; */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['sl'] = {clearText: 'Izbri&#x161;i', clearStatus: 'Izbri&#x161;i trenutni datum',
+		closeText: 'Zapri', closeStatus: 'Zapri brez spreminjanja',
+		prevText: '&lt;Prej&#x161;nji', prevStatus: 'Prika&#x17E;i prej&#x161;nji mesec',
+		nextText: 'Naslednji&gt;', nextStatus: 'Prika&#x17E;i naslednji mesec',
+		currentText: 'Trenutni', currentStatus: 'Prika&#x17E;i trenutni mesec',
+		monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
+		'Julij','Avgust','September','Oktober','November','December'],
+		monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+		'Jul','Avg','Sep','Okt','Nov','Dec'],
+		monthStatus: 'Prika&#x17E;i drug mesec', yearStatus: 'Prika&#x17E;i drugo leto',
+		weekHeader: 'Teden', weekStatus: 'Teden v letu',
+		dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','&#x10C;etrtek','Petek','Sobota'],
+		dayNamesShort: ['Ned','Pon','Tor','Sre','&#x10C;et','Pet','Sob'],
+		dayNamesMin: ['Ne','Po','To','Sr','&#x10C;e','Pe','So'],
+		dayStatus: 'Nastavi DD za prvi dan v tednu', dateStatus: 'Izberi DD, d MM yy',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: 'Izbira datuma', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['sl']);
+});
+/* Swedish initialisation for the jQuery UI date picker plugin. */
+/* Written by Anders Ekdahl ( anders@nomadiz.se). */
+jQuery(function(jQuery){
+    jQuery.datepicker.regional['sv'] = {
+		clearText: 'Rensa', clearStatus: '',
+		closeText: 'Stäng', closeStatus: '',
+        prevText: '&laquo;Förra',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Nästa&raquo;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Idag', currentStatus: '',
+        monthNames: ['Januari','Februari','Mars','April','Maj','Juni', 
+        'Juli','Augusti','September','Oktober','November','December'],
+        monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 
+        'Jul','Aug','Sep','Okt','Nov','Dec'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Ve', weekStatus: '',
+		dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
+		dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
+		dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+        dateFormat: 'yy-mm-dd', firstDay: 1, 
+		initStatus: '', isRTL: false};
+    jQuery.datepicker.setDefaults(jQuery.datepicker.regional['sv']);
+});
+/* Thai initialisation for the jQuery UI date picker plugin. */
+/* Written by pipo (pipo@sixhead.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['th'] = {
+		clearText: 'ลบ', clearStatus: '',
+		closeText: 'ปิด', closeStatus: '',
+		prevText: '&laquo;&nbsp;ย้อน', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'ถัดไป&nbsp;&raquo;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'วันนี้', currentStatus: '',
+		monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
+		'กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
+		monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
+		'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Sm', weekStatus: '',
+		dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
+		dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+		dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['th']);
+});/* Turkish initialisation for the jQuery UI date picker plugin. */
+/* Written by Izzet Emre Erkan (kara@karalamalar.net). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['tr'] = {
+		clearText: 'temizle', clearStatus: 'geçerli tarihi temizler',
+		closeText: 'kapat', closeStatus: 'sadece göstergeyi kapat',
+		prevText: '&#x3c;geri', prevStatus: 'önceki ayı göster',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'ileri&#x3e', nextStatus: 'sonraki ayı göster',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'bugün', currentStatus: '',
+		monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
+		'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
+		monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
+		'Tem','Ağu','Eyl','Eki','Kas','Ara'],
+		monthStatus: 'başka ay', yearStatus: 'başka yıl',
+		weekHeader: 'Hf', weekStatus: 'Ayın haftaları',
+		dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
+		dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
+		dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
+		dayStatus: 'Haftanın ilk gününü belirleyin', dateStatus: 'D, M d seçiniz',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: 'Bir tarih seçiniz', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['tr']);
+});/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['uk'] = {
+		clearText: 'Очистити', clearStatus: '',
+		closeText: 'Закрити', closeStatus: '',
+		prevText: '&#x3c;',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: '&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Сьогодні', currentStatus: '',
+		monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
+		'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
+		monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
+		'Лип','Сер','Вер','Жов','Лис','Гру'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Не', weekStatus: '',
+		dayNames: ['неділя','понеділок','вівторок','середа','четвер','пятниця','суббота'],
+		dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
+		dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: '', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['uk']);
+});/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by Cloudream (cloudream@gmail.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['zh-CN'] = {
+		clearText: '清除', clearStatus: '清除已选日期',
+		closeText: '关闭', closeStatus: '不改变当前选择',
+		prevText: '&#x3c;上月', prevStatus: '显示上月',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '显示上一年',
+		nextText: '下月&#x3e;', nextStatus: '显示下月',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '显示下一年',
+		currentText: '今天', currentStatus: '显示本月',
+		monthNames: ['一月','二月','三月','四月','五月','六月',
+		'七月','八月','九月','十月','十一月','十二月'],
+		monthNamesShort: ['一','二','三','四','五','六',
+		'七','八','九','十','十一','十二'],
+		monthStatus: '选择月份', yearStatus: '选择年份',
+		weekHeader: '周', weekStatus: '年内周次',
+		dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+		dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+		dayNamesMin: ['日','一','二','三','四','五','六'],
+		dayStatus: '设置 DD 为一周起始', dateStatus: '选择 m月 d日, DD',
+		dateFormat: 'yy-mm-dd', firstDay: 1, 
+		initStatus: '请选择日期', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['zh-CN']);
+});
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by Ressol (ressol@gmail.com). */
+jQuery(function(jQuery){
+	jQuery.datepicker.regional['zh-TW'] = {
+		clearText: '清除', clearStatus: '清除已選日期',
+		closeText: '關閉', closeStatus: '不改變目前的選擇',
+		prevText: '&#x3c;上月', prevStatus: '顯示上月',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '顯示上一年',
+		nextText: '下月&#x3e;', nextStatus: '顯示下月',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '顯示下一年',
+		currentText: '今天', currentStatus: '顯示本月',
+		monthNames: ['一月','二月','三月','四月','五月','六月',
+		'七月','八月','九月','十月','十一月','十二月'],
+		monthNamesShort: ['一','二','三','四','五','六',
+		'七','八','九','十','十一','十二'],
+		monthStatus: '選擇月份', yearStatus: '選擇年份',
+		weekHeader: '周', weekStatus: '年內周次',
+		dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+		dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+		dayNamesMin: ['日','一','二','三','四','五','六'],
+		dayStatus: '設定 DD 為一周起始', dateStatus: '選擇 m月 d日, DD',
+		dateFormat: 'yy/mm/dd', firstDay: 1, 
+		initStatus: '請選擇日期', isRTL: false};
+	jQuery.datepicker.setDefaults(jQuery.datepicker.regional['zh-TW']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ar.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ar.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ar.js
new file mode 100644
index 0000000..4c8e5d3
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ar.js
@@ -0,0 +1,26 @@
+/* Arabic Translation for jQuery UI date picker plugin. */
+/* Khaled Al Horani -- koko.dw@gmail.com */
+/* خالد الحوراني -- koko.dw@gmail.com */
+/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
+jQuery(function($){
+	$.datepicker.regional['ar'] = {
+		clearText: 'مسح', clearStatus: 'امسح التاريخ الحالي',
+		closeText: 'إغلاق', closeStatus: 'إغلاق بدون حفظ',
+		prevText: '&#x3c;السابق', prevStatus: 'عرض الشهر السابق',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'التالي&#x3e;', nextStatus: 'عرض الشهر القادم',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'اليوم', currentStatus: 'عرض الشهر الحالي',
+		monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران',
+		'تموز', 'آب', 'أيلول',	'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
+		monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
+		monthStatus: 'عرض شهر آخر', yearStatus: 'عرض سنة آخرى',
+		weekHeader: 'أسبوع', weekStatus: 'أسبوع السنة',
+		dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'],
+		dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
+		dayNamesMin: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
+		dayStatus: 'اختر DD لليوم الأول من الأسبوع', dateStatus: 'اختر D, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: 'اختر يوم', isRTL: true};
+	$.datepicker.setDefaults($.datepicker.regional['ar']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-bg.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-bg.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-bg.js
new file mode 100644
index 0000000..f11de66
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-bg.js
@@ -0,0 +1,25 @@
+/* Bulgarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Stoyan Kyosev (http://svest.org). */
+jQuery(function($){
+    $.datepicker.regional['bg'] = {
+		clearText: 'изчисти', clearStatus: 'изчисти актуалната дата',
+        closeText: 'затвори', closeStatus: 'затвори без промени',
+        prevText: '&#x3c;назад', prevStatus: 'покажи последния месец',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+        nextText: 'напред&#x3e;', nextStatus: 'покажи следващия месец',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+        currentText: 'днес', currentStatus: '',
+        monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
+        'Юли','Август','Септември','Октомври','Ноември','Декември'],
+        monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
+        'Юли','Авг','Сеп','Окт','Нов','Дек'],
+        monthStatus: 'покажи друг месец', yearStatus: 'покажи друга година',
+        weekHeader: 'Wk', weekStatus: 'седмица от месеца',
+        dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
+        dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
+        dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
+        dayStatus: 'Сложи DD като първи ден от седмицата', dateStatus: 'Избери D, M d',
+        dateFormat: 'dd.mm.yy', firstDay: 1,
+        initStatus: 'Избери дата', isRTL: false};
+    $.datepicker.setDefaults($.datepicker.regional['bg']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ca.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ca.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ca.js
new file mode 100644
index 0000000..cc2d5cc
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ca.js
@@ -0,0 +1,25 @@
+/* Inicialitzaci� en catal� per a l'extenci� 'calendar' per jQuery. */
+/* Writers: (joan.leon@gmail.com). */
+jQuery(function($){
+	$.datepicker.regional['ca'] = {
+		clearText: 'Netejar', clearStatus: '',
+		closeText: 'Tancar', closeStatus: '',
+		prevText: '&#x3c;Ant', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Seg&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Avui', currentStatus: '',
+		monthNames: ['Gener','Febrer','Mar&ccedil;','Abril','Maig','Juny',
+		'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'],
+		monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun',
+		'Jul','Ago','Set','Oct','Nov','Des'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Sm', weekStatus: '',
+		dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'],
+		dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'],
+		dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'mm/dd/yy', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['ca']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-cs.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-cs.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-cs.js
new file mode 100644
index 0000000..d04c618
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-cs.js
@@ -0,0 +1,25 @@
+/* Czech initialisation for the jQuery UI date picker plugin. */
+/* Written by Tomas Muller (tomas@tomas-muller.net). */
+jQuery(function($){
+	$.datepicker.regional['cs'] = {
+		clearText: 'Vymazat', clearStatus: 'Vymaže zadané datum',
+		closeText: 'Zavřít',  closeStatus: 'Zavře kalendář beze změny',
+		prevText: '&#x3c;Dříve', prevStatus: 'Přejít na předchozí měsí',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Později&#x3e;', nextStatus: 'Přejít na další měsíc',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Nyní', currentStatus: 'Přejde na aktuální měsíc',
+		monthNames: ['leden','únor','březen','duben','květen','červen',
+        'červenec','srpen','září','říjen','listopad','prosinec'],
+		monthNamesShort: ['led','úno','bře','dub','kvě','čer',
+		'čvc','srp','zář','říj','lis','pro'],
+		monthStatus: 'Přejít na jiný měsíc', yearStatus: 'Přejít na jiný rok',
+		weekHeader: 'Týd', weekStatus: 'Týden v roce',
+		dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
+		dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
+		dayNamesMin: ['ne','po','út','st','čt','pá','so'],
+		dayStatus: 'Nastavit DD jako první den v týdnu', dateStatus: '\'Vyber\' DD, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: 'Vyberte datum', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['cs']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-da.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-da.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-da.js
new file mode 100644
index 0000000..2a178d6
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-da.js
@@ -0,0 +1,25 @@
+/* Danish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jan Christensen ( deletestuff@gmail.com). */
+jQuery(function($){
+    $.datepicker.regional['da'] = {
+		clearText: 'Nulstil', clearStatus: 'Nulstil den aktuelle dato',
+		closeText: 'Luk', closeStatus: 'Luk uden ændringer',
+        prevText: '&#x3c;Forrige', prevStatus: 'Vis forrige måned',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Næste&#x3e;', nextStatus: 'Vis næste måned',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Idag', currentStatus: 'Vis aktuel måned',
+        monthNames: ['Januar','Februar','Marts','April','Maj','Juni', 
+        'Juli','August','September','Oktober','November','December'],
+        monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 
+        'Jul','Aug','Sep','Okt','Nov','Dec'],
+		monthStatus: 'Vis en anden måned', yearStatus: 'Vis et andet år',
+		weekHeader: 'Uge', weekStatus: 'Årets uge',
+		dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
+		dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
+		dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
+		dayStatus: 'Sæt DD som første ugedag', dateStatus: 'Vælg D, M d',
+        dateFormat: 'dd-mm-yy', firstDay: 0, 
+		initStatus: 'Vælg en dato', isRTL: false};
+    $.datepicker.setDefaults($.datepicker.regional['da']); 
+});


[28/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/login.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/login.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/login.jsp
new file mode 100644
index 0000000..51d54d9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/login.jsp
@@ -0,0 +1,272 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+
+<%@page import="org.wso2.carbon.utils.CarbonUtils"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page import="org.wso2.carbon.ui.util.CharacterEncoder"%>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<jsp:include page="../dialog/display_messages.jsp"/>
+
+<%
+String userForumURL =
+        (String) config.getServletContext().getAttribute(CarbonConstants.PRODUCT_XML_WSO2CARBON +
+                                                         CarbonConstants.PRODUCT_XML_USERFORUM);
+String userGuideURL =
+        (String) config.getServletContext().getAttribute(CarbonConstants.PRODUCT_XML_WSO2CARBON +
+                                                         CarbonConstants.PRODUCT_XML_USERGUIDE);
+String mailinglistURL =
+        (String) config.getServletContext().getAttribute(CarbonConstants.PRODUCT_XML_WSO2CARBON +
+                                                         CarbonConstants.PRODUCT_XML_MAILINGLIST);
+String issuetrackerURL =
+        (String) config.getServletContext().getAttribute(CarbonConstants.PRODUCT_XML_WSO2CARBON +
+                                                         CarbonConstants.PRODUCT_XML_ISSUETRACKER);
+if(userForumURL == null){
+	userForumURL = "#";
+}
+if(userGuideURL == null){
+	userGuideURL = "#";
+}
+if(mailinglistURL == null){
+	mailinglistURL = "#";
+}
+if(issuetrackerURL == null){
+	issuetrackerURL = "#";
+}
+
+if (CharacterEncoder.getSafeText(request.getParameter("skipLoginPage"))!=null){
+	response.sendRedirect("../admin/login_action.jsp");
+	return;
+}
+
+%>
+
+<fmt:bundle basename="org.wso2.carbon.i18n.Resources">
+
+     <script type="text/javascript">
+
+        function doValidation() {
+            var reason = "";
+
+            var userNameEmpty = isEmpty("username");
+            var passwordEmpty = isEmpty("password");
+
+            if (userNameEmpty || passwordEmpty) {
+                CARBON.showWarningDialog('<fmt:message key="empty.credentials"/>');
+                document.getElementById('txtUserName').focus();
+                return false;
+            }
+
+            return true;
+        }
+
+    </script>
+
+    <%
+        String loginStatus = CharacterEncoder.getSafeText(request.getParameter("loginStatus"));
+        String errorCode = CharacterEncoder.getSafeText(request.getParameter("errorCode"));
+
+        if (loginStatus != null && "false".equalsIgnoreCase(loginStatus)) {
+            if (errorCode == null) {
+                errorCode = "login.fail.message";
+            }
+    %>
+
+    <script type="text/javascript">
+        jQuery(document).ready(function() {
+            CARBON.showWarningDialog('<fmt:message key="<%=errorCode%>"/>');
+        });
+    </script>
+    <%
+        }
+
+        if (loginStatus != null && "failed".equalsIgnoreCase(loginStatus)) {
+            if (errorCode == null) {
+                errorCode = "login.fail.message1";
+            }
+     %>
+    <script type="text/javascript">
+        jQuery(document).ready(function() {
+            CARBON.showWarningDialog('<fmt:message key="<%=errorCode%>"/>');
+        });
+    </script>
+    <%
+        }
+        String backendURL = CharacterEncoder.getSafeText(CarbonUIUtil.getServerURL(config.getServletContext(), session));
+    %>
+     <script type="text/javascript">
+    	function getSafeText(text){
+    		text = text.replace(/</g,'&lt;');
+    		return text.replace(/>/g,'&gt');
+    	}
+    
+        function checkInputs(){
+        	var loginForm = document.getElementById('loginForm');
+        	var backendUrl = document.getElementById("txtbackendURL");
+        	var username = document.getElementById("txtUserName");
+        	
+        	backendUrl.value = getSafeText(backendUrl.value);
+        	username.value = getSafeText(username.value);
+        	loginForm.submit();
+        }
+    </script>
+    <div id="middle">
+        <table cellspacing="0" width="100%">
+            <tr>
+                <td>
+                    <div id="features">
+                        <table cellspacing="0">
+                            <tr class="feature feature-top">
+                                <td>
+                                    <a target="_blank" href="<%=userGuideURL %>"><img src="../admin/images/user-guide.gif"/></a>
+                                </td>
+                                <td>
+                                    <h3><a target="_blank" href="<%=userGuideURL %>"><fmt:message key="user.guide"/></a></h3>
+
+                                    <p><fmt:message key="user.guide.text"/></p>
+                                </td>
+                            </tr>
+                            <tr class="feature">
+                                <td>
+                                    <a target="_blank" href="<%=userForumURL %>"><img
+                                            src="../admin/images/forum.gif"/></a>
+                                </td>
+                                <td>
+                                    <h3><a target="_blank" href="<%=userForumURL %>"><fmt:message
+                                            key="forum"/></a>
+                                    </h3>
+
+                                    <p><fmt:message key="forum.text"/></p>
+                                </td>
+                            </tr>
+                            <tr class="feature">
+                                <td>
+                                    <a target="_blank"
+                                       href="<%=issuetrackerURL %>"><img
+                                            src="../admin/images/issue-tracker.gif"/></a>
+                                </td>
+                                <td>
+                                    <h3><a target="_blank"
+                                           href="<%=issuetrackerURL %>">
+                                        <fmt:message key="issue.tracker"/></a></h3>
+
+                                    <p><fmt:message key="issue.tracker.text"/></p>
+
+                                </td>
+                            </tr>
+                            <tr class="feature">
+                                <td>
+                                    <a target="_blank" href="<%=mailinglistURL %>"><img
+                                            src="../admin/images/mailing-list.gif"/></a>
+                                </td>
+                                <td>
+                                    <h3><a target="_blank" href="<%=mailinglistURL %>">
+                                        <fmt:message key="mailing.list"/></a></h3>
+
+                                    <p><fmt:message key="mailing.list.text"/></p>
+                                </td>
+                            </tr>
+                        </table>
+                    </div>
+                </td>
+                <td width="20%">
+                    <div id="loginbox">
+                        <h2><fmt:message key="sign.in"/></h2>
+
+                        <form action='../admin/login_action.jsp' method="POST" onsubmit="return doValidation();" target="_self" onsubmit="checkInputs()">
+                            <table>
+                                 <%if(!CarbonUtils.isRunningOnLocalTransportMode()) { %>
+                                <tr>
+                                    <td>
+                                        <nobr><label for="txtUserName"><fmt:message
+                                                key="backendURL"/></label></nobr>
+                                    </td>
+                                    <td>
+                                        <input type="text" id="txtbackendURL" name="backendURL"
+                                               class="user" tabindex="1" value="<%=backendURL%>"/>
+                                    </td>
+                                </tr>
+                                <% } %>
+                                <tr>
+                                    <td>
+                                        <label for="txtUserName"><fmt:message
+                                                key="username"/></label>
+                                    </td>
+                                    <td>
+                                        <input type="text" id="txtUserName" name="username"
+                                               class="user" tabindex="1"/>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <label for="txtPassword"><fmt:message
+                                                key="password"/></label>
+                                    </td>
+                                    <td>
+                                        <input type="password" id="txtPassword" name="password"
+                                               class="password" tabindex="2"/>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        
+                                    </td>
+                                    <td>
+                                    	<input type="checkbox" name="rememberMe" 
+                                        				value="rememberMe" tabindex="3"/>
+                                        <label for="txtRememberMe"><fmt:message
+                                                key="rememberMe"/></label>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>&nbsp;</td>
+                                    <td>
+                                        <input type="submit" value="<fmt:message key="sign.in"/>"
+                                               class="button" tabindex="3"/>
+                                    </td>
+                                </tr>
+                            </table>
+                        </form>
+                        <br/>
+			            <a target="_blank" href="../docs/signin_userguide.html" tabindex="4">
+                            <fmt:message key="sign.in.help"/>
+                        </a>
+                    </div>
+                </td>
+            </tr>
+        </table>
+    </div>
+    <script type="text/javascript">
+        function init(loginStatus) {
+            // intialize the code and call to the back end
+            /*wso2.wsf.Util.initURLs();*/
+            /*Initialize the XSLT cache*/
+            /*wso2.wsf.XSLTHelper.init();*/
+
+            if (loginStatus == 'true') {
+            } else if (loginStatus == 'null') {
+            } else if (loginStatus == 'false') {
+                wso2.wsf.Util.alertWarning("Login failed. Please recheck the user name and password and try again")
+            } 
+        }
+        document.getElementById('txtUserName').focus();
+    </script>
+
+</fmt:bundle>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/ajax/ajaxtags.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/ajax/ajaxtags.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/ajax/ajaxtags.js
new file mode 100644
index 0000000..4b82748
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/ajax/ajaxtags.js
@@ -0,0 +1,1285 @@
+/**
+ * Copyright 2005 Darren L. Spurgeon
+ * Copyright 2007 Jens Kapitza
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ 
+var AjaxJspTag = {
+  Version: '1.3'
+};
+
+/**
+ * AjaxTags
+ */
+
+AjaxJspTag.Base = function() {};
+AjaxJspTag.Base.prototype = {
+
+  resolveParameters: function() {
+    // Strip URL of querystring and append it to parameters
+    var qs = delimitQueryString(extractQueryString(this.url));
+    if (this.options.parameters) {
+      this.options.parameters += ',' + qs;
+    } else {
+      this.options.parameters = qs;
+    }
+    this.url = trimQueryString(this.url);
+    
+    if ((this.options.parameters.length > 0 ) && (this.options.parameters.charAt(this.options.parameters.length - 1) === ',')) {
+      this.options.parameters = this.options.parameters.substr(0,this.options.parameters.length-1);
+    }
+  }
+
+};
+
+/**
+ * Prefunction Invoke Ajax.Update TAG
+ */
+AjaxJspTag.PreFunctionUpdateInvoke = Class.create();
+AjaxJspTag.PreFunctionUpdateInvoke.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(ajaxupdateData) {
+  this.preFunction = ajaxupdateData.preFunction;
+  if (isFunction(this.preFunction))
+  { 
+  	this.preFunction();
+  }
+  if (this.cancelExecution) {
+	    	this.cancelExecution = false;
+	    	return ;
+      	}
+  var thisCall = new Ajax.Updater(ajaxupdateData.id,ajaxupdateData.href,{onComplete: ajaxupdateData.postFunction});
+  }
+
+
+});
+
+
+/**
+ * UPDATEFIELD TAG
+ */
+AjaxJspTag.UpdateField = Class.create();
+AjaxJspTag.UpdateField.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+    this.setListeners();
+    addAjaxListener(this);
+  },
+  reload: function () {
+    this.setListeners();
+  },
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameters: options.parameters || '',
+      doPost: options.doPost || false,
+      valueUpdateByName:  options.valueUpdateByName || false,
+      eventType: options.eventType ? options.eventType : "click",
+      parser: options.parser ? options.parser :  ( options.valueUpdateByName ? new ResponseXmlParser(): new ResponseTextParser()),
+      handler: options.handler ? options.handler : this.handler
+    }, options || {});
+  },
+
+  setListeners: function() {
+    eval("$(this.options.action).on"+this.options.eventType+" = this.execute.bindAsEventListener(this)");
+  },
+
+  execute: function(e) {
+    if (isFunction(this.options.preFunction)) 
+    {
+    	this.options.preFunction();
+	}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+    // parse parameters and do replacements
+    var params = buildParameterString(this.options.parameters);
+
+    // parse targets
+    var targetList = this.options.target.split(',');
+
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    var setFunc = this.setField;
+    var aj = new Ajax.Request(this.url, {
+      asynchronous: true,
+      method: obj.options.doPost ? 'post':'get',
+      evalScripts: true,
+      parameters: params,
+      onSuccess: function(request) {
+        obj.options.parser.load(request);
+        var results = obj.options.parser.itemList;
+        obj.options.handler(request, {targets: targetList, items: results});
+      },
+      onFailure: function(request) {
+        if (isFunction(obj.options.errorFunction)){
+         obj.options.errorFunction(request,obj.options.parser);
+     	}
+      },
+      onComplete: function(request) {
+        if (isFunction(obj.options.postFunction)) { obj.options.postFunction(); }
+      }
+    });
+  },
+
+  handler: function(request, optionsArr) {
+  // this points to options
+    for (var i=0; i<optionsArr.targets.length && i<optionsArr.items.length; i++) {
+   	namedIndex = i;
+   	if (this.valueUpdateByName) {
+    	for (j=0; j <optionsArr.items.length; j++) {
+    		if (optionsArr.targets[i]  ===  optionsArr.items[j][0]) {
+    			namedIndex = j;
+    		}
+    	}
+    }
+    $(optionsArr.targets[i]).value = optionsArr.items[namedIndex][1];
+    }
+  }
+
+});
+
+
+
+/**
+ * CALLBACK TAG
+ */
+AjaxJspTag.Callback = Class.create();
+AjaxJspTag.Callback.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options); 
+    this.errorCount = 0;
+    addOnLoadEvent(this );
+  },
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameters: options.parameters || '',
+      parser: options.parser ? options.parser : new ResponseCallBackXmlParser(),
+      plainText: options.plainText ?   true : false ,
+      handler: options.handler ? options.handler : this.handler
+    }, options || {});
+  },
+  onload: function(){
+  	this.run();
+  },
+  run: function(){
+  // wenn fehler kommen den client veranlassen eben nicht mehr versuchen sich anzumelden
+    if (!this.isRunning && this.errorCount < 100) {
+      this.execute();
+    }  
+  },
+  execute: function(e) {
+    if (isFunction(this.options.preFunction)) { this.options.preFunction();}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+    // parse parameters and do replacements
+    //var params = buildParameterString(this.options.parameters);
+
+    // parse targets
+    this.isRunning = true;
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    var aj = new Ajax.Request(this.url, {
+      asynchronous: true,
+      method:  'post',
+      evalScripts: true,
+      onSuccess: function(request) {
+        obj.options.parser.load(request);
+        obj.options.list = obj.options.parser.items; 
+        obj.errorCount = 0;
+      
+      },
+      onFailure: function(request) {
+        if (isFunction(obj.options.errorFunction)) {obj.options.errorFunction();}
+        obj.isRunning = false;
+        obj.errorCount++;
+      },
+      onComplete: function(request) {
+      	// nun this.list kann mit der antwor alles gemacht werden was man will
+        if (isFunction(obj.options.postFunction)) {obj.options.postFunction();}
+        obj.isRunning = false;
+        obj.run();
+      }
+    });
+  }
+});
+/// callback -- ende
+
+
+
+
+
+/**
+ * SELECT TAG
+ */
+AjaxJspTag.Select = Class.create();
+AjaxJspTag.Select.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+    this.setListeners();
+
+    if (parseBoolean(this.options.executeOnLoad)) {
+      this.execute();
+    }
+   addAjaxListener(this);
+  },
+  reload: function () {
+    this.setListeners();
+  },
+  
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameters: options.parameters || '',
+      doPost: options.doPost || false,
+      emptyOptionValue: options.emptyOptionValue || '',
+      emptyOptionName:  options.emptyOptionName || '',
+      eventType: options.eventType ? options.eventType : "change",
+      parser: options.parser ? options.parser : new ResponseXmlParser(),
+      handler: options.handler ? options.handler : this.handler
+    }, options || {});
+  },
+
+  setListeners: function() {
+  $(this.options.source).ajaxSelect = this; 
+  
+    Event.observe($(this.options.source),
+      this.options.eventType,
+      this.execute.bindAsEventListener(this),
+      false);
+    eval("$(this.options.source).on"+this.options.eventType+" = function(){return false;};");
+  },
+
+  execute: function(e) {
+    if (isFunction(this.options.preFunction)) {this.options.preFunction();}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+    // parse parameters and do replacements
+    var params = buildParameterString(this.options.parameters);
+
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    var aj = new Ajax.Request(this.url, {
+      asynchronous: true,
+      method: obj.options.doPost ? 'post':'get',
+      evalScripts: true,
+      parameters: params,
+      onSuccess: function(request) {
+        obj.options.parser.load(request);
+        var results = obj.options.parser.itemList;
+        obj.options.handler(request, {target: obj.options.target,
+                                      items: results });
+      },
+      onFailure: function(request) {
+        if (isFunction(obj.options.errorFunction)){ obj.options.errorFunction();}
+      },
+      onComplete: function(request) {
+        if (isFunction(obj.options.postFunction)) {obj.options.postFunction();}
+      }
+    });
+  },
+
+  handler: function(request, options) {
+    // build an array of option values to be set as selected
+    
+    $(options.target).options.length = 0;
+    $(options.target).disabled = false;
+    for (var i=0; i<options.items.length; i++) {
+      var newOption = new Option(options.items[i][0], options.items[i][1]);
+      //$(options.target).options[i] = new Option(options.items[i][0], options.items[i][1]);
+      // set the option as selected if it is in the default list
+      if ( newOption.selected == false && options.items[i].length == 3 && parseBoolean(options.items[i][2]) ){
+           newOption.selected = true;
+      }
+      $(options.target).options[i] = newOption;
+    }
+    
+    
+    if (options.items.length == 0)
+    {
+      $(options.target).options[i] = new Option(this.emptyOptionName, this.emptyOptionValue);
+    	$(options.target).disabled = true;
+    }
+    // auch ein SELECT TAG ?
+   	if ($(options.target).ajaxSelect && $(options.target).ajaxSelect.execute)
+   	{
+   		$(options.target).ajaxSelect.execute();
+   	}
+  }
+
+});
+
+
+/**
+ * HTMLCONTENT TAG
+ */
+AjaxJspTag.HtmlContent = Class.create();
+AjaxJspTag.HtmlContent.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+    this.setListeners();
+    addAjaxListener(this);
+    
+  },
+  reload: function(){
+  	this.setListeners();
+  },
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameterName: options.parameterName ? options.parameterName : AJAX_DEFAULT_PARAMETER,
+      parameters: options.parameters || '',
+      doPost: options.doPost || false,
+      
+      preFunctionParameter:options.preFunctionParameter || null,
+      errorFunctionParameter:  options.errorFunctionParameter || null,
+      postFunctionParameter: options.postFunctionParameter || null,
+      
+      eventType: options.eventType ? options.eventType : "click",
+      parser: options.parser ? options.parser : new ResponseHtmlParser(),
+      handler: options.handler ? options.handler : this.handler
+    }, options || {});
+  },
+
+  setListeners: function() {
+    if (this.options.source) {
+      eval("$(this.options.source).on"+this.options.eventType+" = this.execute.bindAsEventListener(this)");
+    } else if (this.options.sourceClass) {
+      var elementArray = document.getElementsByClassName(this.options.sourceClass);
+      for (var i=0; i<elementArray.length; i++) {
+        eval("elementArray[i].on"+this.options.eventType+" = this.execute.bindAsEventListener(this)");
+      }
+    }
+  },
+
+  execute: function(e) {
+  	this.options.preFunctionParameters = evalJScriptParameters(  this.options.preFunctionParameter);
+   
+    if (isFunction(this.options.preFunction)) {this.options.preFunction();}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+    // replace default parameter with value/content of source element selected
+    var ajaxParameters = this.options.parameters;
+    if (this.options.sourceClass) {
+      var re = new RegExp("(\\{"+this.options.parameterName+"\\})", 'g');
+      var elem = Event.element(e);
+      if (elem.type) {
+        ajaxParameters = ajaxParameters.replace(re, $F(elem));
+      } else {
+        ajaxParameters = ajaxParameters.replace(re, elem.innerHTML);
+      }
+    }
+
+    // parse parameters and do replacements
+    var params = buildParameterString(ajaxParameters);
+
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    var aj = new Ajax.Updater(this.options.target, this.url, {
+      asynchronous: true,
+      method: obj.options.doPost ? 'post':'get',
+      evalScripts: true,
+      parameters: params,
+      onFailure: function(request) {
+        obj.options. errorFunctionParameters =  evalJScriptParameters(  obj.options.errorFunctionParameter  );
+        if (isFunction(obj.options.errorFunction)) {obj.options.errorFunction();}
+      },
+      onComplete: function(request) {
+        obj.options. postFunctionParameters =  evalJScriptParameters(   obj.options.postFunctionParameter);
+        if (isFunction(obj.options.postFunction)) {obj.options.postFunction();}
+      }
+    });
+  }
+
+});
+
+/**
+ * TREE TAG
+ */
+AjaxJspTag.Tree = Class.create();
+AjaxJspTag.Tree.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+    this.execute();
+  },
+
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameters: options.parameters || '',
+      eventType: options.eventType ? options.eventType : "click",
+      parser: options.parser ? options.parser : new ResponseXmlToHtmlLinkListParser(),
+      handler: options.handler ? options.handler : this.handler,
+      collapsedClass: options.collapsedClass ? options.collapsedClass : "collapsedNode",
+      expandedClass: options.expandedClass ? options.expandedClass : "expandedNode",
+      treeClass: options.treeClass ? options.treeClass : "tree",
+      nodeClass: options.nodeClass || ''
+    }, options || {});
+    this.calloutParameter = AJAX_DEFAULT_PARAMETER;
+  },
+
+  execute: function(e) {
+    if (isFunction(this.options.preFunction)) {this.options.preFunction();}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+       
+    //if the node is expanded, just collapse it
+    if(this.options.target != null) {
+      var imgElem = $("span_" + this.options.target);
+      if(imgElem != null) {
+        var expanded = this.toggle(imgElem);
+        if(!expanded) {
+          $(this.options.target).innerHTML = "";
+             if (! $(this.options.target).style)
+       			$(this.options.target).setAttribute("style","");
+    
+     		$(this.options.target).style.display ="none";
+    
+          return;
+        }
+      }
+    }
+    // indicator 
+    
+    // parse parameters and do replacements
+    var ajaxParameters = this.options.parameters || '';
+    var re = new RegExp("(\\{"+this.calloutParameter+"\\})", 'g');
+    ajaxParameters = ajaxParameters.replace(re, this.options.target);
+    
+    var params = buildParameterString(ajaxParameters);
+      
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    var aj = new Ajax.Request(this.url, {
+      asynchronous: true,
+      method: 'get',
+      evalScripts: true,
+      parameters: params,
+      onSuccess: function(request) {
+      // IE 5,6 BUG 
+      	objx = new Object();
+		objx.responseXML = request.responseXML;
+      
+         obj.options.parser.load(Object.extend(objx, {
+                                                   collapsedClass: obj.options.collapsedClass,
+                                                   treeClass:      obj.options.treeClass,
+                                                   nodeClass:      obj.options.nodeClass}));
+         obj.options.handler(objx, {target:    obj.options.target,
+                                       parser:    obj.options.parser,
+                                       eventType: obj.options.eventType,
+                                       url:       obj.url});
+      },
+      onFailure: function(request) {
+        if (isFunction(obj.options.errorFunction)){ obj.options.errorFunction();}
+      },
+      onComplete: function(request) {
+        if (isFunction(obj.options.postFunction)) {obj.options.postFunction();}
+		// damit htmlcontent wieder geht
+        reloadAjaxListeners();
+      }
+    });
+  },
+  
+  toggle: function (e) {
+    var expanded =  e.className == this.options.expandedClass;
+    e.className =  expanded ? this.options.collapsedClass : this.options.expandedClass;
+    return !expanded;
+  },
+  
+  handler: function(request, options) {
+    var parser = options.parser;
+    var target = $(options.target);
+    if (parser.content == null) {
+
+         // div.setAttribute("style","");
+        //  div.style.display ="none";
+          
+    if (!target.style)
+      target.setAttribute("style","");
+    
+    target.style.display ="none";
+    
+    	 target.innerHTML = "";
+     	return;
+    }
+      
+
+     
+    target.appendChild(parser.content);   
+    
+    if (!target.style)
+      target.setAttribute("style","");
+    
+    target.style.display ="block";
+    
+    var images = target.getElementsByTagName("span");
+    for (var i=0; i<images.length; i++) {
+      //get id
+      var id = images[i].id.substring(5);
+      var toggleFunction = "function() {toggleTreeNode('" +  id + "', '" + options.url + "', null);}";
+      eval("images[i].on" + options.eventType + "=" + toggleFunction); 
+    }
+   
+    //toggle the one that must be expanded
+    var expandedNodes = parser.expandedNodes;
+    for (var i=0; i<expandedNodes.length; i++) {
+       toggleTreeNode(expandedNodes[i], options.url, null);
+    }
+  }
+
+});
+
+/**
+ * TABPANEL TAG
+ */
+AjaxJspTag.TabPanel = Class.create();
+AjaxJspTag.TabPanel.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+    this.execute();
+  },
+
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameters: options.parameters || '',
+      eventType: options.eventType ? options.eventType : "click",
+      parser: options.parser ? options.parser : new ResponseHtmlParser(),
+      handler: options.handler ? options.handler : this.handler
+    }, options || {});
+  },
+
+  execute: function(e) {
+    if (isFunction(this.options.preFunction)){ this.options.preFunction();}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+    // parse parameters and do replacements
+    this.resolveParameters();
+    var params = buildParameterString(this.options.parameters);
+
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    var aj = new Ajax.Updater(this.options.target, this.url, {
+      asynchronous: true,
+      method: 'get',
+      evalScripts: true,
+      parameters: params,
+      onSuccess: function(request) {
+        var src;
+        if (obj.options.source) {
+          src = obj.options.source;
+        } else {
+          src = document.getElementsByClassName(obj.options.currentStyleClass,
+                                                $(obj.options.panelId))[0];
+        }
+        obj.options.handler(request, {source: src,
+                                      panelStyleId: obj.options.panelId,
+                                      currentStyleClass: obj.options.currentStyleClass});
+      },
+      onFailure: function(request) {
+        if (isFunction(obj.options.errorFunction)){ obj.options.errorFunction();}
+      },
+      onComplete: function(request) {
+        if (isFunction(obj.options.postFunction)){ obj.options.postFunction();}
+      }
+    });
+  },
+
+  handler: function(request, options) {
+    // find current anchor
+    var cur = document.getElementsByClassName(options.currentStyleClass, $(options.panelStyleId));
+    // remove class
+    if(cur.length > 0)
+        cur[0].className = '';
+    // add class to selected tab
+    options.source.className = options.currentStyleClass;
+  }
+
+});
+
+
+/**
+ * PORTLET TAG
+ */
+AjaxJspTag.Portlet = Class.create();
+AjaxJspTag.Portlet.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+    this.setListeners();
+    if (parseBoolean(this.options.executeOnLoad )) {
+      this.execute();
+    }
+    if (this.preserveState) this.checkCookie();
+    
+    if (parseBoolean(this.options.startMinimize)) {
+   		this.togglePortlet();
+    }
+    addAjaxListener(this);
+    // should i reloadAjaxListeners() after execute?
+  },
+  reload: function () {
+    this.setListeners();
+  },
+  
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameters: options.parameters || '',
+      target: options.source+"Content",
+      close: options.source+"Close",
+      startMinimize: options.startMinimize || false,
+      refresh: options.source+"Refresh",
+      toggle: options.source+"Size",
+      isMaximized: true,
+      expireDays: options.expireDays || "0",
+      expireHours: options.expireHours || "0",
+      expireMinutes: options.expireMinutes || "0",
+      executeOnLoad: evalBoolean(options.executeOnLoad, true),
+      refreshPeriod: options.refreshPeriod || null,
+      eventType: options.eventType ? options.eventType : "click",
+      parser: options.parser ? options.parser : new ResponseHtmlParser(),
+      handler: options.handler ? options.handler : this.handler
+    }, options || {});
+
+    if (parseInt(this.options.expireDays) > 0
+        || parseInt(this.options.expireHours) > 0
+        || parseInt(this.options.expireMinutes) > 0) {
+      this.preserveState = true;
+      this.options.expireDate = getExpDate(
+        parseInt(this.options.expireDays),
+        parseInt(this.options.expireHours),
+        parseInt(this.options.expireMinutes));
+    }
+
+    this.isAutoRefreshSet = false;
+  },
+
+  setListeners: function() {
+    if (this.options.imageClose) {
+      eval("$(this.options.close).on"+this.options.eventType+" = this.closePortlet.bindAsEventListener(this)");
+    }
+    if (this.options.imageRefresh) {
+      eval("$(this.options.refresh).on"+this.options.eventType+" = this.refreshPortlet.bindAsEventListener(this)");
+    }
+    if (this.options.imageMaximize && this.options.imageMinimize) {
+      eval("$(this.options.toggle).on"+this.options.eventType+" = this.togglePortlet.bindAsEventListener(this)");
+    }
+  },
+
+  execute: function(e) {
+    if (isFunction(this.options.preFunction)){ this.options.preFunction();}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+    // parse parameters and do replacements
+    this.resolveParameters();
+    var params = buildParameterString(this.options.parameters);
+
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    if (this.options.refreshPeriod && this.isAutoRefreshSet == false) {
+      // periodic updater
+      var freq = this.options.refreshPeriod;
+      this.ajaxPeriodicalUpdater = new Ajax.PeriodicalUpdater(this.options.target, this.url, {
+        asynchronous: true,
+        method: 'get',
+        evalScripts: true,
+        parameters: params,
+        frequency: freq,
+        onFailure: function(request) {
+          if (isFunction(obj.options.errorFunction)){ obj.options.errorFunction();}
+        },
+        onComplete: function(request) {},
+        onSuccess: function(request) {
+          if (isFunction(obj.options.postFunction)) {obj.options.postFunction();}
+        }
+      });
+
+      this.isAutoRefreshSet = true;
+    } else {
+      // normal updater
+      this.ajaxUpdater = new Ajax.Updater(this.options.target, this.url, {
+        asynchronous: true,
+        method: 'get',
+        parameters: params,
+        evalScripts: true,
+        onFailure: function(request) {
+          if (isFunction(obj.options.errorFunction)) {obj.options.errorFunction();}
+        },
+        onComplete: function(request) {
+          if (isFunction(obj.options.postFunction)) {obj.options.postFunction();}
+        }
+      });
+    }
+    
+  },
+
+  checkCookie: function() {
+    // Check cookie for save state
+    var cVal = getCookie("AjaxJspTag.Portlet."+this.options.source);
+    if (cVal != null) {
+      if (cVal == AJAX_PORTLET_MIN) {
+        this.togglePortlet();
+      } else if (cVal == AJAX_PORTLET_CLOSE) {
+        this.closePortlet();
+      }
+    }
+  },
+
+  stopAutoRefresh: function() {
+    // stop auto-update if present
+    if (this.ajaxPeriodicalUpdater != null
+        && this.options.refreshPeriod
+        && this.isAutoRefreshSet == true) {
+      this.ajaxPeriodicalUpdater.stop();
+    }
+  },
+
+  startAutoRefresh: function() {
+    // stop auto-update if present
+    if (this.ajaxPeriodicalUpdater != null && this.options.refreshPeriod) {
+      this.ajaxPeriodicalUpdater.start();
+    }
+  },
+
+  refreshPortlet: function(e) {
+    // clear existing updater
+    this.stopAutoRefresh();
+    if (this.ajaxPeriodicalUpdater != null) {
+      this.startAutoRefresh();
+    } else {
+      this.execute();
+    }
+  },
+
+  closePortlet: function(e) {
+    this.stopAutoRefresh();
+    Element.remove(this.options.source);
+    // Save state in cookie
+    if (this.preserveState) {
+      setCookie("AjaxJspTag.Portlet."+this.options.source,
+        AJAX_PORTLET_CLOSE,
+        this.options.expireDate);
+    }
+  },
+
+  togglePortlet: function(e) {
+    Element.toggle(this.options.target);
+    if (this.options.isMaximized) {
+    if (this.options.imageMaximize){
+      $(this.options.toggle).src = this.options.imageMaximize;
+      }
+      this.stopAutoRefresh();
+    } else {
+     if (this.options.imageMinimize){
+      $(this.options.toggle).src = this.options.imageMinimize;
+      }
+      this.startAutoRefresh();
+    }
+    this.options.isMaximized = !this.options.isMaximized;
+    // Save state in cookie
+    if (this.preserveState) {
+      setCookie("AjaxJspTag.Portlet."+this.options.source,
+        (this.options.isMaximized === true ? AJAX_PORTLET_MAX : AJAX_PORTLET_MIN),
+        this.options.expireDate);
+    }
+  }
+
+});
+
+
+/**
+ * AUTOCOMPLETE TAG
+ */
+Ajax.XmlToHtmlAutocompleter = Class.create();
+Object.extend(Object.extend(Ajax.XmlToHtmlAutocompleter.prototype,  Autocompleter.Base.prototype), {
+  initialize: function(element, update, url, options) {
+    this.baseInitialize(element, update, options);
+    this.options.asynchronous  = true;
+    this.options.onComplete    = this.onComplete.bind(this);
+    this.options.defaultParams = this.options.parameters || null;
+    this.url                   = url;
+  },
+  // onblur hack IE works with FF
+     onBlur: function (event) {
+  	  // Dont hide the div on "blur" if the user clicks scrollbar 
+	if(Element.getStyle(this.update, 'height') != ''){ 
+ 		var x=999999;
+ 		var y=999999;
+ 		var offsets = Position.positionedOffset(this.update);
+ 		var top = offsets[1];
+ 		var left = offsets[0];
+ 		var data = Element.getDimensions(this.update);
+ 		var width = data.width;
+ 		var height = data.height;
+ 		if (event)
+ 		{
+ 			x=event.x-left;
+ 			y=event.y -top;
+ 		} 
+ 		
+        if (x > 0 && x <  width && y > 0 && y < height )
+        { 
+      	this.element.focus();
+        return;
+        } 
+      }
+      
+        // needed to make click events working
+    setTimeout(this.hide.bind(this), 250);
+    this.hasFocus = false;
+    this.active = false;     
+      
+      
+  },
+  getUpdatedChoices: function() {
+   if (isFunction(this.options.preFunction)){ this.options.preFunction();}
+      // preFunction can cancelExecution set this.cancelExecution = true;
+	  if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    this.stopIndicator();
+	    return ;
+      }
+    entry = encodeURIComponent(this.options.paramName) + '=' + 
+      encodeURIComponent(this.getToken());
+
+    this.options.parameters = this.options.callback ?
+      this.options.callback(this.element, entry) : entry;
+
+    // parse parameters and do replacements
+    var params = buildParameterString(this.options.defaultParams);
+    if (!isEmpty(params) || (isString(params) && params.length > 0)) {
+      this.options.parameters += '&' + params;
+    }
+
+    new Ajax.Request(this.url, this.options);
+  },
+  onComplete: function(request) {
+    var parser = this.options.parser;
+    parser.load(request);
+    this.updateChoices(parser.content);
+  } 
+
+});
+
+AjaxJspTag.Autocomplete = Class.create();
+AjaxJspTag.Autocomplete.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+    // create DIV
+    new Insertion.After(this.options.source, '<div id="' + this.options.divElement + '" class="' + this.options.className + '"></div>');
+    this.execute();
+
+  },
+
+  setOptions: function(options) {
+    this.options = Object.extend({
+      divElement: "ajaxAuto_" + options.source,
+      indicator: options.indicator || '',
+      parameters: options.parameters || '',
+      parser: options.parser ? options.parser : new ResponseXmlToHtmlListParser(),
+      handler: options.handler ? options.handler : this.handler
+    }, options || {});
+  },
+
+  execute: function(e) {
+      // preFunction moved bevor request now
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    var aj = new Ajax.XmlToHtmlAutocompleter(
+                     this.options.source,
+                     this.options.divElement,
+                     this.url, {minChars: obj.options.minimumCharacters,
+                                tokens: obj.options.appendSeparator,
+                                indicator: obj.options.indicator,
+                                parameters: obj.options.parameters,
+                                evalScripts: true,
+                                preFunction: obj.options.preFunction,
+                                parser: obj.options.parser,
+                                afterUpdateElement: function(inputField, selectedItem) {
+                                  obj.options.handler(null, {
+                                    selectedItem: selectedItem,
+                                    tokens: obj.options.appendSeparator,
+                                    target: obj.options.target,
+                                    inputField: inputField,
+                                    postFunction: obj.options.postFunction,
+                                    list:obj.options.parser.getArray(),
+                                    options: obj.options,
+                                    autocomplete:aj
+                                    }
+                                  );
+                                }
+                               }
+             );
+  },
+
+  handler: function(request, options) {
+    if (options.target) {
+      if (options.tokens) {
+        if ($(options.target).value.length > 0) {
+          $(options.target).value += options.tokens;
+        }
+        $(options.target).value += options.selectedItem.id;
+      } else {
+        $(options.target).value = options.selectedItem.id;
+      }
+    }
+    options.selectedIndex = options.autocomplete.index;
+    options.selectedObject = options.list[options.autocomplete.index];
+    
+    if (isFunction(options.postFunction)) {
+      //Disable onupdate event handler of input field
+      //because, postFunction can change the content of
+      //input field and get into eternal loop.
+      var onupdateHandler = $(options.inputField).onupdate;
+      $(options.inputField).onupdate = '';
+      
+      options.postFunction();
+      //Enable onupdate event handler of input field
+      $(options.inputField).onupdate = onupdateHandler;
+    }
+  }
+
+});
+
+
+/**
+ * TOGGLE TAG
+ */
+AjaxJspTag.Toggle = Class.create();
+AjaxJspTag.Toggle.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+
+    // create message DIV
+    if (this.options.messageClass) {
+      this.messageContainer = new Insertion.Top($(this.options.source),
+        '<div id="'+ this.options.source +'_message" class="' + this.options.messageClass +'"></div>');
+    }
+
+    this.setListeners();
+    addAjaxListener(this);
+  },
+  reload: function () {
+    this.setListeners();
+  },
+  
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameters: options.parameters || 'rating={ajaxParameter}',
+      parser: options.parser ? options.parser : new ResponseTextParser(),
+      handler: options.handler ? options.handler : this.handler,
+      updateFunction: options.updateFunction || false
+    }, options || {});
+    this.ratingParameter = AJAX_DEFAULT_PARAMETER;
+  },
+
+  setListeners: function() {
+    // attach events to anchors
+    var elements = $(this.options.source).getElementsByTagName('a');
+    for (var j=0; j<elements.length; j++) {
+      elements[j].onmouseover = this.raterMouseOver.bindAsEventListener(this);
+      elements[j].onmouseout = this.raterMouseOut.bindAsEventListener(this);
+      elements[j].onclick = this.raterClick.bindAsEventListener(this);
+    }
+  },
+
+  getCurrentRating: function(list) {
+    var selectedIndex = -1;
+    for (var i=0; i<list.length; i++) {
+      if (Element.hasClassName(list[i], this.options.selectedClass)) {
+        selectedIndex = i;
+      }
+    }
+    return selectedIndex;
+  },
+
+  getCurrentIndex: function(list, elem) {
+    var currentIndex = 0;
+    for (var i=0; i<list.length; i++) {
+      if (elem == list[i]) {
+        currentIndex = i;
+      }
+    }
+    return currentIndex;
+  },
+
+  raterMouseOver: function (e) {
+    // get containing div
+    var container = Event.findElement(e, 'div');
+
+    // get list of all anchors
+    var elements = container.getElementsByTagName('a');
+
+    // find the current rating
+    var selectedIndex = this.getCurrentRating(elements);
+
+    // find the index of the 'hovered' element
+    var currentIndex = this.getCurrentIndex(elements, Event.element(e));
+
+    // set message
+    if (this.options.messageClass) {
+      $(container.id+'_message').innerHTML = Event.element(e).title;
+    }
+
+    // iterate over each anchor and apply styles
+    for (var i=0; i<elements.length; i++) {
+      if (selectedIndex > -1) {
+        if (i <= selectedIndex && i <= currentIndex)
+          Element.addClassName(elements[i], this.options.selectedOverClass);
+        else if (i <= selectedIndex && i > currentIndex)
+          Element.addClassName(elements[i], this.options.selectedLessClass);
+        else if (i > selectedIndex && i <= currentIndex)
+          Element.addClassName(elements[i], this.options.overClass);
+      } else {
+        if (i <= currentIndex) Element.addClassName(elements[i], this.options.overClass);
+      }
+    }
+  },
+
+  raterMouseOut: function (e) {
+    // get containing div
+    var container = Event.findElement(e, 'div');
+
+    // get list of all anchors
+    var elements = container.getElementsByTagName('a');
+
+    // clear message
+    if (this.options.messageClass) {
+      $(container.id+'_message').innerHTML = '';
+    }
+
+    // iterate over each anchor and apply styles
+    for (var i=0; i<elements.length; i++) {
+      Element.removeClassName(elements[i], this.options.selectedOverClass);
+      Element.removeClassName(elements[i], this.options.selectedLessClass);
+      Element.removeClassName(elements[i], this.options.overClass);
+    }
+  },
+
+  raterClick: function (e) {
+    // get containing div
+    var container = Event.findElement(e, 'div');
+
+    // get list of all anchors
+    var elements = container.getElementsByTagName('a');
+
+    // find the index of the 'hovered' element
+    var currentIndex = this.getCurrentIndex(elements, Event.element(e));
+
+    // update styles
+    for (var i=0; i<elements.length; i++) {
+      Element.removeClassName(elements[i], this.options.selectedOverClass);
+      Element.removeClassName(elements[i], this.options.selectedLessClass);
+      Element.removeClassName(elements[i], this.options.overClass);
+      if (i <= currentIndex) {
+        if (Element.hasClassName(container, 'onoff')
+              && Element.hasClassName(elements[i], this.options.selectedClass)) {
+          Element.removeClassName(elements[i], this.options.selectedClass);
+        } else {
+          Element.addClassName(elements[i], this.options.selectedClass);
+        }
+      } else if (i > currentIndex) {
+        Element.removeClassName(elements[i], this.options.selectedClass);
+      }
+    }
+
+    // send AJAX
+    var ratingToSend = elements[currentIndex].title;
+    if (Element.hasClassName(container, 'onoff')) {
+      // send opposite of what was selected
+      var ratings = this.options.ratings.split(',');
+      if (ratings[0] == ratingToSend) ratingToSend = ratings[1];
+      else ratingToSend = ratings[0];
+      elements[currentIndex].title = ratingToSend;
+    }
+    this.execute(ratingToSend);
+
+    // set field (if defined)
+    if (this.options.state) {
+      $(this.options.state).value = ratingToSend;
+    }
+  },
+
+  execute: function(ratingValue) {
+    if (isFunction(this.options.preFunction)){ this.options.preFunction();}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+    // parse parameters and do replacements
+    var ajaxParameters = this.options.parameters || '';
+    var re = new RegExp("(\\{"+this.ratingParameter+"\\})", 'g');
+    ajaxParameters = ajaxParameters.replace(re, ratingValue);
+    var params = buildParameterString(ajaxParameters);
+
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    var toggleStateFunc = this.getToggleStateValue;
+    var aj = new Ajax.Request(this.url, {
+      asynchronous: true,
+      method: 'get',
+      evalScripts: true,
+      parameters: params,
+      onSuccess: function(request) {
+        obj.options.parser.load(request);
+        var results = obj.options.parser.itemList;
+        obj.options.handler(request, {items: results});
+      },
+      onFailure: function(request) {
+        if (isFunction(obj.options.errorFunction)){ obj.options.errorFunction();}
+      },
+      onComplete: function(request) {
+        if (isFunction(obj.options.postFunction)) {obj.options.postFunction();}
+      }
+    });
+  },
+
+  handler: function(request, roptions) {
+  //daten in items
+  	var erg = roptions.items[0][0] ; // on/off / 1,2,3
+  	try  {
+  	this.updateFunction(erg);
+    // TODO: anything?
+    } catch (e) {} // muss nicht forhanden sein
+  },
+
+  getToggleStateValue: function(name, results) {
+    for (var i=0; i<results.length; i++) {
+      if (results[i][0] == name) {return results[i][1];}
+    }
+    return "";
+  }
+
+});
+
+
+/**
+ * CALLOUT TAG
+ */
+AjaxJspTag.Callout = Class.create();
+AjaxJspTag.Callout.prototype = Object.extend(new AjaxJspTag.Base(), {
+
+  initialize: function(url, options) {
+    this.url = url;
+    this.setOptions(options);
+    this.setListeners();
+    addAjaxListener(this);
+  },
+  reload: function () {
+    this.setListeners();
+  },
+  
+  setOptions: function(options) {
+    this.options = Object.extend({
+      parameters: options.parameters || '',
+      overlib: options.overlib || AJAX_CALLOUT_OVERLIB_DEFAULT,
+      parser: options.parser ? options.parser : new ResponseXmlToHtmlParser(),
+      handler: options.handler ? options.handler : this.handler,
+      doPost: options.doPost? true : false ,
+      openEvent: options.openEvent ? options.openEvent : "mouseover",
+      closeEvent: options.closeEvent ? options.closeEvent : "mouseout"
+    }, options || {});
+    this.calloutParameter = AJAX_DEFAULT_PARAMETER;
+  },
+
+  setListeners: function() {
+    if (this.options.sourceClass) {
+      var elemList = document.getElementsByClassName(this.options.sourceClass);
+      for (var i=0; i<elemList.length; i++) {
+        eval("elemList[i].on"+this.options.openEvent+" = this.calloutOpen.bindAsEventListener(this)");
+        eval("elemList[i].on"+this.options.closeEvent+" = this.calloutClose.bindAsEventListener(this)");
+      }
+    }
+  },
+
+  calloutOpen: function(e) {
+    this.execute(e);
+  },
+
+  calloutClose: function(e) {
+    nd();
+  },
+
+  execute: function(e) {
+    if (isFunction(this.options.preFunction)){ this.options.preFunction();}
+	if (this.options.cancelExecution) {
+	    this.cancelExecution = false;
+	    return ;
+      }
+    // parse parameters and do replacements
+    var ajaxParameters = this.options.parameters || '';
+    var re = new RegExp("(\\{"+this.calloutParameter+"\\})", 'g');
+    var elem = Event.element(e);
+    if (elem.type) {
+      ajaxParameters = ajaxParameters.replace(re, $F(elem));
+    } else {
+      ajaxParameters = ajaxParameters.replace(re, elem.innerHTML);
+    }
+    var params = buildParameterString(ajaxParameters);
+
+    var obj = this; // required because 'this' conflict with Ajax.Request
+    var aj = new Ajax.Request(this.url, {
+      asynchronous: true,
+      method: obj.options.doPost ? 'post':'get',
+      evalScripts: true,
+      parameters: params,
+      onSuccess: function(request) {
+        obj.options.parser.load(request);
+        obj.options.handler(obj.options.parser.content, {title: obj.options.title,
+                                                         overlib: obj.options.overlib});
+      },
+      onFailure: function(request) {
+        if (isFunction(obj.options.errorFunction)){ obj.options.errorFunction();}
+      },
+      onComplete: function(request) {
+        if (isFunction(obj.options.postFunction)){ obj.options.postFunction();}
+      }
+    });
+  },
+
+  handler: function(content, options) {
+  if (content != "") { // #4 
+    if (options.overlib) {
+      if (options.title) {
+        return eval("overlib(content,CAPTION,options.title,"+options.overlib+")");
+      } else {
+        return eval("overlib(content,"+options.overlib+")");
+      }
+    } else {
+      if (options.title) {
+        return overlib(content,CAPTION,options.title);
+      } else {
+        return overlib(content);
+      }
+    }
+  }
+ }
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/ajax/ajaxtags_controls.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/ajax/ajaxtags_controls.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/ajax/ajaxtags_controls.js
new file mode 100644
index 0000000..0394c94
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/ajax/ajaxtags_controls.js
@@ -0,0 +1,307 @@
+/**
+ * Copyright 2005 Darren L. Spurgeon
+ * Copyright 2007 Jens Kapitza
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+
+/**
+ * Global Variables
+ */
+AJAX_DEFAULT_PARAMETER = "ajaxParameter";
+AJAX_PORTLET_MAX = 1;
+AJAX_PORTLET_MIN = 2;
+AJAX_PORTLET_CLOSE = 3;
+AJAX_CALLOUT_OVERLIB_DEFAULT = "STICKY,CLOSECLICK,DELAY,250,TIMEOUT,5000,VAUTO,WRAPMAX,240,CSSCLASS,FGCLASS,'olfg',BGCLASS,'olbg',CGCLASS,'olcg',CAPTIONFONTCLASS,'olcap',CLOSEFONTCLASS,'olclo',TEXTFONTCLASS,'oltxt'";
+
+
+/**
+ * Type Detection
+ */
+function isAlien(a) {
+  return isObject(a) && typeof a.constructor != 'function';
+}
+
+function isArray(a) {
+  return isObject(a) && a.constructor == Array;
+}
+
+function isBoolean(a) {
+  return typeof a == 'boolean';
+}
+
+function isEmpty(o) {
+  var i, v;
+  if (isObject(o)) {
+    for (i in o) {
+      v = o[i];
+      if (isUndefined(v) && isFunction(v)) {
+        return false;
+      }
+    }
+  }
+  return true;
+}
+
+function isFunction(a) {
+  return typeof a == 'function';
+}
+
+function isNull(a) {
+  return typeof a == 'object' && !a;
+}
+
+function isNumber(a) {
+  return typeof a == 'number' && isFinite(a);
+}
+
+function isObject(a) {
+  return (a && typeof a == 'object') || isFunction(a);
+}
+
+function isString(a) {
+  return typeof a == 'string';
+}
+
+function isUndefined(a) {
+  return typeof a == 'undefined';
+}
+
+
+/**
+ * Utility Functions
+ */
+
+function addOnLoadEvent(func) {
+  var oldonload = window.onload;
+  if (isFunction(func)) {
+  	if (!isFunction(oldonload)) {
+  	  window.onload = func;
+  	} else {
+  	  window.onload = function() {
+  	    oldonload();
+  	    func();
+  	  };
+  	}
+  } else {
+  	if (isObject(func) && isFunction(func.onload)) {
+  		// callback event?
+  	  window.onload = function() {
+  	   if (isFunction(oldonload)) {
+  		 oldonload();
+  	   }
+  	   // onload des objektes aufrufen
+  	   func.onload();
+  	  };
+  	}
+  }
+}
+
+/*
+ * Extract querystring from a URL
+ */
+function extractQueryString(url) {
+  return ( (url.indexOf('?') >= 0) && (url.indexOf('?') < (url.length-1))) ? url.substr(url.indexOf('?')+1): '';
+}
+
+/*
+ * Trim the querystring from a URL
+ */
+function trimQueryString(url) {
+  return (url.indexOf('?') >= 0) ? url.substring(0, url.indexOf('?')) : url;
+}
+
+function delimitQueryString(qs) {
+  var ret = '';
+  var params = "";
+  if (qs.length > 0) {
+	params = qs.split('&');
+    for (i=0; i<params.length; i++) {
+      if (i > 0)
+      { 
+      	ret += ',';
+      }
+      ret += params[i];
+    }
+  }
+  return ret;
+}
+
+function trim(str) {
+	return str.replace(/^\s*/,"").replace(/\s*$/,"");
+}
+
+// encode , =
+function buildParameterString(parameterList) {
+  var returnString = '';
+  var params = (parameterList || '').split(',');
+  if (params !== null) {
+    for (p=0; p<params.length; p++) {
+     	pair = params[p].split('=');
+       	key = trim(pair[0]); // trim string no spaces allowed in key a, b should work
+       	val = pair[1];
+      // if val is not null and it contains a match for a variable, then proceed
+      if (!isEmpty(val) || isString(val)) {
+        	varList = val.match( new RegExp("\\{[\\w\\.\\(\\)\\[\\]]*\\}", 'g') );
+        if (!isNull(varList)) {
+          	field = $(varList[0].substring(1, varList[0].length-1));
+          switch (field.type) {
+            case 'checkbox':
+            case 'radio':
+            case 'text':
+            case 'textarea':
+            case 'password':
+            case 'hidden':
+            case 'select-one':
+              returnString += '&' + key + '=' + encodeURIComponent(field.value);
+              break;
+            case 'select-multiple':
+              fieldValue = $F(varList[0].substring(1, varList[0].length-1));
+              for (i=0; i<fieldValue.length; i++) {
+                returnString += '&' + key + '=' + encodeURIComponent(fieldValue[i]);
+              }
+              break;
+            default:
+              returnString += '&' + key + '=' + encodeURIComponent(field.innerHTML);
+              break;
+          }
+        } else {
+          // just add back the pair
+          returnString += '&' + key + '=' + encodeURIComponent(val);
+        }
+      }
+    }
+  }
+
+  if (returnString.charAt(0) == '&') {
+    returnString = returnString.substr(1);
+  }
+  return returnString;
+}
+
+function evalBoolean(value, defaultValue) {
+  if (!isNull(value) && isString(value)) {
+    return (parseBoolean(value)) ? "true" : "false";
+  } else {
+    return defaultValue === true ? "true" : "false";
+  }
+}
+function parseBoolean(value) {
+  if (!isNull(value) && isString(value)) {
+    return ( "true" == value.toLowerCase() || "yes" == value.toLowerCase());
+  } else {
+  	if (isBoolean(value)) {return value; }
+    return false;
+  }
+}
+
+// read function parameterstring
+function evalJScriptParameters(paramString) {
+	if (isNull(paramString) || !isString(paramString))
+	{
+		return null;
+	} 
+	return eval("new Array("+paramString+")");
+}
+
+// listener wieder anhaengen fuer TREE tag wird von htmlcontent benutzt
+function reloadAjaxListeners(){
+	for (i=0; i < this.ajaxListeners.length; i++){
+		if ( isFunction(this.ajaxListeners[i].reload) ) {
+			this.ajaxListeners[i].reload();
+		}
+	}
+}
+
+function addAjaxListener(obj) {
+	if (!this.ajaxListeners) {
+		this.ajaxListeners = new Array(obj);
+	} else {
+		this.ajaxListeners.push(obj);
+	}
+}
+
+/* ---------------------------------------------------------------------- */
+/* Example File From "_JavaScript and DHTML Cookbook"
+   Published by O'Reilly & Associates
+   Copyright 2003 Danny Goodman
+*/
+
+// http://jslint.com/ 
+// Missing radix parameter -- setDate setHours setMinutes
+
+// utility function to retrieve a future expiration date in proper format;
+// pass three integer parameters for the number of days, hours,
+// and minutes from now you want the cookie to expire; all three
+// parameters required, so use zeros where appropriate
+function getExpDate(days, hours, minutes) {
+  var expDate = new Date();
+  if (typeof days == "number" && typeof hours == "number" && typeof hours == "number") {
+    expDate.setDate(expDate.getDate() + parseInt(days));
+    expDate.setHours(expDate.getHours() + parseInt(hours));
+    expDate.setMinutes(expDate.getMinutes() + parseInt(minutes));
+    return expDate.toGMTString();
+  }
+}
+
+// utility function called by getCookie()
+function getCookieVal(offset) {
+  var endstr = document.cookie.indexOf (";", offset);
+  if (endstr == -1) {
+    endstr = document.cookie.length;
+  }
+  return unescape(document.cookie.substring(offset, endstr));
+}
+
+// primary function to retrieve cookie by name
+function getCookie(name) {
+  var arg = name + "=";
+  var alen = arg.length;
+  var clen = document.cookie.length;
+  var i = 0;
+  var j;
+  while (i < clen) {
+    j = i + alen;
+    if (document.cookie.substring(i, j) == arg) {
+      return getCookieVal(j);
+    }
+    i = document.cookie.indexOf(" ", i) + 1;
+    if (i == 0) {
+    	break;
+    }
+  }
+  return null;
+}
+
+// store cookie value with optional details as needed
+function setCookie(name, value, expires, path, domain, secure) {
+  document.cookie = name + "=" + escape (value) +
+    ((expires) ? "; expires=" + expires : "") +
+    ((path) ? "; path=" + path : "") +
+    ((domain) ? "; domain=" + domain : "") +
+    ((secure) ? "; secure" : "");
+}
+
+// remove the cookie by setting ancient expiration date
+function deleteCookie(name,path,domain) {
+  if (getCookie(name)) {
+    document.cookie = name + "=" +
+      ((path) ? "; path=" + path : "") +
+      ((domain) ? "; domain=" + domain : "") +
+      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
+  }
+}
+/* ---------------------------------------------------------------------- */
+/* End Copyright 2003 Danny Goodman */
+ 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/ajax/ajaxtags_parser.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/ajax/ajaxtags_parser.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/ajax/ajaxtags_parser.js
new file mode 100644
index 0000000..aee9e35
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/ajax/ajaxtags_parser.js
@@ -0,0 +1,305 @@
+/**
+ * Copyright 2005 Darren L. Spurgeon
+ * Copyright 2007 Jens Kapitza
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ 
+/**
+* Response Parsers
+*/
+var AbstractResponseParser = function () {
+	this.getArray = function () {
+		return null;
+	};
+}; 
+
+
+/**
+* parser to work easy with xml response
+* create  to make them known
+*/
+var DefaultResponseParser = Class.create();
+var ResponseTextParser = Class.create();
+var ResponseXmlParser = Class.create();
+var ResponseHtmlParser = Class.create();
+var ResponseXmlToHtmlParser = Class.create();
+var ResponseCallBackXmlParser = Class.create();
+var ResponsePlainTextXmlToHtmlParser = Class.create();
+var ResponseXmlToHtmlListParser = Class.create();
+var ResponseXmlToHtmlLinkListParser = Class.create();
+
+DefaultResponseParser.prototype = Object.extend(new AbstractResponseParser(), {
+  initialize: function() {
+    this.type = "xml";
+  },
+  getArray: function () {
+    return this.itemList;
+  },
+  load: function(request) {
+    this.content = request.responseXML;
+    this.parse();
+    this.prepareData( this.itemList);
+  },
+  // format <name><value><value><value>....<value>
+  prepareData: function( dataarray ) {},
+  
+  parse: function() {
+    root = this.content.documentElement;
+    responseNodes = root.getElementsByTagName("response");
+    this.itemList = [];
+    if (responseNodes.length > 0) {
+      responseNode = responseNodes[0];
+      itemNodes = responseNode.getElementsByTagName("item");
+      for (i=0; i<itemNodes.length; i++) {
+        nameNodes = itemNodes[i].getElementsByTagName("name");
+        valueNodes = itemNodes[i].getElementsByTagName("value");
+        if (nameNodes.length > 0 && valueNodes.length > 0) {
+          name = nameNodes[0].firstChild ? nameNodes[0].firstChild.nodeValue : "";
+          myData = [];
+          myData.push(name);
+            for (j=0; j <valueNodes.length; j++) {
+              value = valueNodes[j].firstChild ? valueNodes[j].firstChild.nodeValue: "";
+       		  myData.push(value);
+            }
+          this.itemList.push(myData);
+        }
+      }
+    }
+  }
+});
+
+
+ResponseTextParser.prototype = Object.extend(new AbstractResponseParser(), {
+  initialize: function() {
+    this.type = "text";
+  },
+
+  load: function(request) {
+    this.content = request.responseText;
+    this.split();
+  },
+
+  split: function() {
+    this.itemList = [];
+    var lines = this.content.split('\n');
+    for (i=0; i<lines.length; i++) {
+      this.itemList.push(lines[i].split(','));
+    }
+  }
+});
+
+ResponseXmlParser.prototype = Object.extend(new DefaultResponseParser(), {
+  prepareData: function(request,dataarray) {
+  }
+});
+
+
+ResponseHtmlParser.prototype = Object.extend(new AbstractResponseParser(), {
+  initialize: function() {
+    this.type = "html";
+  },
+
+  load: function(request) {
+    this.content = request.responseText;
+  }
+});
+
+ResponseXmlToHtmlParser.prototype = Object.extend(new DefaultResponseParser(), {
+  initialize: function() {
+    this.type = "xmltohtml";
+  	this.plaintext = false;
+  },
+  prepareData: function( dataarray) {
+   this.contentdiv = document.createElement("div");
+   
+   for (i=0; i < dataarray.length; i++)
+   {
+     h1 =  document.createElement("h1");
+     if (!this.plaintext) {
+       h1.innerHTML += dataarray[i][0];
+     } else {
+       h1.appendChild(document.createTextNode(dataarray[i][0]));
+     }
+     this.contentdiv.appendChild(h1);
+     for (j=1; j < dataarray[i].length; j++) {
+       div =  document.createElement("div");
+       if (!this.plaintext) {
+         div.innerHTML += dataarray[i][j];
+       } else {
+         div.appendChild(document.createTextNode(dataarray[i][j]));
+       }
+       this.contentdiv.appendChild(div);
+     }
+   }
+   //#4
+   if (dataarray.length >= 1) {
+   	this.content =  this.contentdiv.innerHTML;
+   }
+	else {
+	   this.content = ""; // keine daten dann ''
+	}
+   // skip plz 
+   
+   
+  } 
+});
+
+// server callback
+
+ResponseCallBackXmlParser.prototype = Object.extend(new DefaultResponseParser(), {
+  initialize: function() {
+    this.type = "xml";
+  },
+  prepareData: function( dataarray) {
+   this.items = [];
+   
+   for (i=0; i < dataarray.length; i++)
+   {
+	this.items.push( [ dataarray[i][0],dataarray[i][1],(dataarray[i][2] ? true : false) ] );
+   }
+  } 
+});
+
+
+
+ResponsePlainTextXmlToHtmlParser.prototype = Object.extend(new ResponseXmlToHtmlParser(), {
+  initialize: function() {
+    this.type = "xmltohtml";
+  	this.plaintext = true;
+  }
+});
+
+
+
+ResponseXmlToHtmlListParser.prototype = Object.extend(new DefaultResponseParser(), {
+  initialize: function() {
+    this.type = "xmltohtmllist";
+    this.plaintext =  true;
+  },
+ 
+
+  prepareData: function( dataarray) {
+    this.contentdiv = document.createElement("div");
+    ul = document.createElement("ul");
+    for (i=0; i < dataarray.length; i++)
+    {
+      liElement = document.createElement("li");
+      liElement.id=dataarray[i][1];
+      if (this.plaintext) {
+        liElement.appendChild(document.createTextNode(dataarray[i][0]));
+      } else {
+        liElement.innerHTML = dataarray[i][0];
+      }
+      ul.appendChild(liElement);
+    }
+    this.contentdiv.appendChild(ul);
+    this.content = this.contentdiv.innerHTML;
+  }
+});
+
+ResponseXmlToHtmlLinkListParser.prototype = Object.extend(new AbstractResponseParser(), {
+  initialize: function() {
+    this.type = "xmltohtmllinklist";
+  },
+
+  load: function(request) {
+    this.xml = request.responseXML;
+    this.collapsedClass = request.collapsedClass;
+    this.treeClass = request.treeClass;
+    this.nodeClass = request.nodeClass;
+    this.expandedNodes = [];
+    this.parse();
+  },
+
+  parse: function() {
+    var ul = document.createElement('ul');
+    ul.className = this.treeClass;
+    var root = this.xml.documentElement;
+
+    var responseNodes = root.getElementsByTagName("response");
+    if (responseNodes.length > 0) {
+      responseNode = responseNodes[0];
+      itemNodes = responseNode.getElementsByTagName("item");
+      
+      if (itemNodes.length === 0) {
+      	ul = null;
+      }
+      for (i=0; i<itemNodes.length; i++) {
+       	nameNodes = itemNodes[i].getElementsByTagName("name");
+        valueNodes = itemNodes[i].getElementsByTagName("value");
+        
+        
+        urlNodes = itemNodes[i].getElementsByTagName("url");
+        collapsedNodes = itemNodes[i].getElementsByTagName("collapsed");
+        
+        leafnodes = itemNodes[i].getElementsByTagName("leaf");
+        
+        if (nameNodes.length > 0 && valueNodes.length > 0) {
+          name = nameNodes[0].firstChild.nodeValue;
+          value = valueNodes[0].firstChild.nodeValue;
+          url = "#";
+          try {
+          	url = urlNodes[0].firstChild.nodeValue;
+          } catch (ex) {
+          // default url is link
+          }
+          leaf = false;
+          try {
+          	leaf = leafnodes[0].firstChild.nodeValue;
+          } catch (ex) {
+          // no leaf flag found 
+          }
+          
+          collapsed =  false;
+          try {
+	         collapsed = parseBoolean(collapsedNodes[0].firstChild.nodeValue);
+            } catch (ex) {
+          // it is not collapsed as default 
+          }
+          
+          li = document.createElement('li');
+          li.id = "li_" + value;
+          ul.appendChild(li);
+          
+          if (!parseBoolean(leaf))
+          {
+          	span = document.createElement('span');
+          	li.appendChild(span);
+          	// img geht im IE nicht
+          	span.id = "span_" + value;
+          	span.className = this.collapsedClass;
+		  }
+
+          link  = document.createElement('a');
+          li.appendChild(link);
+          link.href = url;
+          link.className = this.nodeClass;
+          link.appendChild(document.createTextNode(name));
+          
+          div = document.createElement('div');
+          li.appendChild(div);
+          div.id = value;
+          div.setAttribute("style","");
+          div.style.display ="none";
+          
+          if(!collapsed) {
+            this.expandedNodes.push(value);
+          }
+        }  
+      }
+    }  
+    this.content = ul;
+  }
+});


[47/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/FileUploadServiceClient.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/FileUploadServiceClient.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/FileUploadServiceClient.java
new file mode 100644
index 0000000..8ac274b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/FileUploadServiceClient.java
@@ -0,0 +1,66 @@
+/*                                                                             
+ * Copyright 2004,2005 The Apache Software Foundation.                         
+ *                                                                             
+ * Licensed under the Apache License, Version 2.0 (the "License");             
+ * you may not use this file except in compliance with the License.            
+ * You may obtain a copy of the License at                                     
+ *                                                                             
+ *      http://www.apache.org/licenses/LICENSE-2.0                             
+ *                                                                             
+ * Unless required by applicable law or agreed to in writing, software         
+ * distributed under the License is distributed on an "AS IS" BASIS,           
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    
+ * See the License for the specific language governing permissions and         
+ * limitations under the License.                                              
+ */
+package org.wso2.carbon.ui.clients;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.core.common.IFileUpload;
+import org.wso2.carbon.core.common.UploadedFileItem;
+import org.wso2.carbon.core.commons.stub.fileupload.FileUploadServiceStub;
+
+/**
+ *
+ */
+public class FileUploadServiceClient implements IFileUpload {
+    private static final Log log = LogFactory.getLog(FileUploadServiceClient.class);
+    private FileUploadServiceStub stub;
+
+    public FileUploadServiceClient(ConfigurationContext ctx,
+                                   String serverURL,
+                                   String cookie) throws AxisFault {
+        String serviceEPR = serverURL + "FileUploadService";
+        stub = new FileUploadServiceStub(ctx, serviceEPR);
+        ServiceClient client = stub._getServiceClient();
+        Options options = client.getOptions();
+        options.setManageSession(true);
+        if (cookie != null) {
+            options.setProperty(HTTPConstants.COOKIE_STRING, cookie);
+        }
+        options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
+    }
+
+    public String[] uploadFiles(UploadedFileItem[] uploadedFileItems) throws Exception {
+        org.wso2.carbon.core.commons.stub.fileupload.UploadedFileItem[] newItems =
+                new org.wso2.carbon.core.commons.stub.fileupload.UploadedFileItem[uploadedFileItems.length];
+        int i = 0;
+        for (UploadedFileItem item : uploadedFileItems) {
+            org.wso2.carbon.core.commons.stub.fileupload.UploadedFileItem newItem =
+                    new org.wso2.carbon.core.commons.stub.fileupload.UploadedFileItem();
+            newItem.setDataHandler(item.getDataHandler());
+            newItem.setFileName(item.getFileName());
+            newItem.setFileType(item.getFileType());
+            newItems[i++] = newItem;
+        }
+
+        return stub.uploadFiles(newItems);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/LoggedUserInfoClient.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/LoggedUserInfoClient.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/LoggedUserInfoClient.java
new file mode 100644
index 0000000..1cf903f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/LoggedUserInfoClient.java
@@ -0,0 +1,66 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui.clients;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.core.common.AuthenticationException;
+import org.wso2.carbon.core.common.LoggedUserInfo;
+import org.wso2.carbon.core.commons.stub.loggeduserinfo.LoggedUserInfoAdminStub;
+
+public class LoggedUserInfoClient {
+
+    private static final Log log = LogFactory.getLog(LoggedUserInfoClient.class);
+    private LoggedUserInfoAdminStub stub;
+
+    public LoggedUserInfoClient(ConfigurationContext ctx, String serverURL, String cookie)
+            throws AxisFault {
+        String serviceEPR = serverURL + "LoggedUserInfoAdmin";
+        stub = new LoggedUserInfoAdminStub(ctx, serviceEPR);
+        ServiceClient client = stub._getServiceClient();
+        Options options = client.getOptions();
+        options.setManageSession(true);
+        if (cookie != null) {
+            options.setProperty(HTTPConstants.COOKIE_STRING, cookie);
+        }
+    }
+
+    public LoggedUserInfo getUserInfo() throws Exception {
+        try {
+            return getLoggedUserInfo(stub.getUserInfo());
+        } catch (Exception e) {
+            String msg = "Error occurred while getting system permissions of user";
+            log.error(msg, e);
+            throw new AuthenticationException(msg, e);
+        }
+    }
+
+    private LoggedUserInfo getLoggedUserInfo(
+            org.wso2.carbon.core.commons.stub.loggeduserinfo.LoggedUserInfo userInfo) {
+        LoggedUserInfo loggedUserInfo = new LoggedUserInfo();
+        loggedUserInfo.setUIPermissionOfUser(userInfo.getUIPermissionOfUser());
+        loggedUserInfo.setPasswordExpiration(userInfo.getPasswordExpiration());
+        return loggedUserInfo;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/RegistryAdminServiceClient.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/RegistryAdminServiceClient.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/RegistryAdminServiceClient.java
new file mode 100644
index 0000000..b06ca75
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/RegistryAdminServiceClient.java
@@ -0,0 +1,94 @@
+/*
+ *  Copyright (c) 2005-2009, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ *
+ */
+package org.wso2.carbon.ui.clients;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.core.commons.stub.registry.service.RegistryAdminServiceStub;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.http.HttpSession;
+
+public class RegistryAdminServiceClient {
+
+    private static final Log log = LogFactory.getLog(RegistryAdminServiceClient.class);
+    private RegistryAdminServiceStub stub;
+    private HttpSession session;
+
+    public RegistryAdminServiceClient(String cookie, ServletConfig config, HttpSession session)
+            throws AxisFault {
+        String serverURL = CarbonUIUtil.getServerURL(config.getServletContext(),
+                    session);
+        ConfigurationContext ctx = (ConfigurationContext) config.
+                    getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+        this.session = session;
+        String serviceEPR = serverURL + "RegistryAdminService";
+        stub = new RegistryAdminServiceStub(ctx, serviceEPR);
+        ServiceClient client = stub._getServiceClient();
+        Options options = client.getOptions();
+        options.setManageSession(true);
+        if (cookie != null) {
+            options.setProperty(HTTPConstants.COOKIE_STRING, cookie);
+        }
+    }
+
+    public boolean isRegistryReadOnly() {
+
+        try {
+            return stub.isRegistryReadOnly();
+        } catch (Exception e) {
+            String msg = "Error occurred while checking registry mode";
+            log.error(msg, e);
+        }
+
+        return false;
+    }
+
+    public String getRegistryHTTPURL() {
+        try {
+            String httpPermalink = stub.getHTTPPermalink("/");
+            if (httpPermalink != null) {
+                return httpPermalink.substring(0, httpPermalink.length() - "/".length());
+            }
+        } catch (Exception e) {
+            log.error("Unable to get permalink", e);
+        }
+        return "#";
+    }
+
+    public String getRegistryHTTPSURL() {
+        try {
+            String httpsPermalink = stub.getHTTPSPermalink("/");
+            if (httpsPermalink != null) {
+                return httpsPermalink.substring(0, httpsPermalink.length() - "/".length());
+            }
+        } catch (Exception e) {
+            log.error("Unable to get permalink", e);
+        }
+        return "#";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/ComponentBuilder.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/ComponentBuilder.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/ComponentBuilder.java
new file mode 100644
index 0000000..7a28102
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/ComponentBuilder.java
@@ -0,0 +1,693 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui.deployment;
+
+import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.ui.deployment.beans.Component;
+import org.wso2.carbon.ui.deployment.beans.Context;
+import org.wso2.carbon.ui.deployment.beans.FileUploadExecutorConfig;
+import org.wso2.carbon.ui.deployment.beans.Menu;
+import org.wso2.carbon.ui.deployment.beans.Servlet;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.*;
+
+import static org.wso2.carbon.CarbonConstants.AUTHENTICATION;
+import static org.wso2.carbon.CarbonConstants.BYPASS;
+import static org.wso2.carbon.CarbonConstants.CONTEXT;
+import static org.wso2.carbon.CarbonConstants.CONTEXTS;
+import static org.wso2.carbon.CarbonConstants.CONTEXT_ID;
+import static org.wso2.carbon.CarbonConstants.CONTEXT_NAME;
+import static org.wso2.carbon.CarbonConstants.DESCRIPTION;
+import static org.wso2.carbon.CarbonConstants.FRAMEWORK_CONFIG;
+import static org.wso2.carbon.CarbonConstants.HTTP_URLS;
+import static org.wso2.carbon.CarbonConstants.LINK;
+import static org.wso2.carbon.CarbonConstants.MENUE_ELE;
+import static org.wso2.carbon.CarbonConstants.MENUS_ELE;
+import static org.wso2.carbon.CarbonConstants.PROTOCOL;
+import static org.wso2.carbon.CarbonConstants.REQUIRE_NOT_LOGGED_IN;
+import static org.wso2.carbon.CarbonConstants.REQUIRE_NOT_SUPER_TENANT;
+import static org.wso2.carbon.CarbonConstants.REQUIRE_PERMISSION;
+import static org.wso2.carbon.CarbonConstants.REQUIRE_SUPER_TENANT;
+import static org.wso2.carbon.CarbonConstants.SERVLET;
+import static org.wso2.carbon.CarbonConstants.SERVLETS;
+import static org.wso2.carbon.CarbonConstants.SERVLET_CLASS;
+import static org.wso2.carbon.CarbonConstants.SERVLET_DISPLAY_NAME;
+import static org.wso2.carbon.CarbonConstants.SERVLET_ID;
+import static org.wso2.carbon.CarbonConstants.SERVLET_NAME;
+import static org.wso2.carbon.CarbonConstants.SERVLET_URL_PATTERN;
+import static org.wso2.carbon.CarbonConstants.TILES;
+import static org.wso2.carbon.CarbonConstants.WSO2CARBON_NS;
+
+/**
+ * XML Builder for building the UI related portions of the component.xml file included
+ * in Carbon components
+ */
+public final class ComponentBuilder {
+    private static Log log = LogFactory.getLog(ComponentBuilder.class);
+
+    private ComponentBuilder() {
+    }
+
+    /*TODO : use registry to store this */
+//    private static Map<String, Action> actionMap = new HashMap<String, Action>();
+
+    /**
+     * reads component.xml from given bundle & returns an object representation  of it
+     *
+     * @param registeredBundle The bundle that is being registered
+     * @param bundleContext    The bundle context of the UI bundles
+     * @return Component
+     */
+    public static Component build(Bundle registeredBundle, BundleContext bundleContext) {
+        Component component = null;
+        Dictionary headers = registeredBundle.getHeaders();
+        try {
+            URL url = registeredBundle.getEntry("META-INF/component.xml");
+            if (url != null) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Found component.xml in bundle : " + registeredBundle.getSymbolicName());
+                }
+                //found a Carbon OSGi bundle that should amend for admin UI
+                String bundleVersion = (String) headers.get("Bundle-Version");
+                String bundleName = (String) headers.get("Bundle-Name");
+                InputStream inputStream = url.openStream();
+                component = build(inputStream, bundleName, bundleVersion,
+                        bundleContext);
+            }
+        } catch (Exception e) {
+            log.error("Cannot build component.xml for " + registeredBundle.getSymbolicName(), e);
+        }
+        return component;
+    }
+
+
+    public static Component build(InputStream componentIn,
+                                  String componentName,
+                                  String componentVersion,
+                                  BundleContext bundleContext) throws CarbonException,
+            XMLStreamException {
+
+        XMLStreamReader streamReader =
+                XMLInputFactory.newInstance().createXMLStreamReader(componentIn);
+        StAXOMBuilder builder = new StAXOMBuilder(streamReader);
+        OMElement document = builder.getDocumentElement();
+        Component component = new Component();
+        component.setName(componentName);
+        component.setVersion(componentVersion);
+
+        processMenus(componentName, document, component);
+        processServlets(document, component);
+        processFileUploadConfigs(document, component);
+        processCustomUIs(document, component);
+        processOSGiServices(document, bundleContext);
+        processFrameworkConfiguration(document, component);
+        processContextConfiguration(componentName, document, component);
+
+        return component;
+    }
+
+    /**
+     * Processes the following XML segment
+     * <p/>
+     * <osgiServices>
+     * <service>
+     * <classes>
+     * <class>org.wso2.carbon.ui.UIExtender</class>
+     * </classes>
+     * <object>
+     * org.wso2.carbon.service.mgt.ui.ServiceManagementUIExtender
+     * </object>
+     * <properties>
+     * <property name="service-mgt">true</property>
+     * </properties>
+     * </service>
+     * </osgiServices>
+     *
+     * @param document      The document
+     * @param bundleContext The OSGi bundle context
+     * @throws CarbonException If an error occurs while instantiating a service object
+     */
+    private static void processOSGiServices(OMElement document,
+                                            BundleContext bundleContext) throws CarbonException {
+        OMElement osgiServiceEle =
+                document.getFirstChildWithName(new QName(WSO2CARBON_NS, "osgiServices"));
+        if (osgiServiceEle == null) {
+            return;
+        }
+        for (Iterator services =
+                osgiServiceEle.getChildrenWithName(new QName(WSO2CARBON_NS, "service"));
+             services.hasNext();) {
+            OMElement service = (OMElement) services.next();
+            OMElement objectEle =
+                    service.getFirstChildWithName(new QName(WSO2CARBON_NS, "object"));
+            Object obj;
+            String objClazz = objectEle.getText().trim();
+            try {
+                Class objectClazz = Class.forName(objClazz, true, ComponentBuilder.class.getClassLoader());
+                obj = objectClazz.newInstance();
+            } catch (Exception e) {
+                String msg = "Cannot instantiate OSGi service class " + objClazz;
+                log.error(msg, e);
+                throw new CarbonException(msg, e);
+            }
+
+            OMElement classesEle =
+                    service.getFirstChildWithName(new QName(WSO2CARBON_NS, "classes"));
+            List<String> classList = new ArrayList<String>();
+            for (Iterator classes = classesEle.getChildElements(); classes.hasNext();) {
+                OMElement clazz = (OMElement) classes.next();
+                classList.add(clazz.getText().trim());
+            }
+
+            OMElement propertiesEle =
+                    service.getFirstChildWithName(new QName(WSO2CARBON_NS, "properties"));
+            Dictionary<String, String> props = new Hashtable<String, String>();
+            for (Iterator properties = propertiesEle.getChildElements(); properties.hasNext();) {
+                OMElement prop = (OMElement) properties.next();
+                props.put(prop.getAttribute(new QName("name")).getAttributeValue().trim(),
+                        prop.getText().trim());
+            }
+            bundleContext.registerService(classList.toArray(new String[classList.size()]),
+                    obj, props);
+
+            if (log.isDebugEnabled()) {
+                log.debug("Registered OSGi service " + objClazz);
+            }
+        }
+    }
+
+    public static void processCustomUIs(OMElement document, Component component) {
+        Iterator customUIElements =
+                document.getChildrenWithName(new QName(WSO2CARBON_NS, "customUI"));
+        while (customUIElements.hasNext()) {
+
+            OMElement customUIElement = (OMElement) customUIElements.next();
+
+            OMElement uiTypeElement =
+                    customUIElement.getFirstChildWithName(new QName(WSO2CARBON_NS, "uiType"));
+            String type = (uiTypeElement != null) ? uiTypeElement.getText() : "view";
+
+            OMElement mediaTypeElement =
+                    customUIElement.getFirstChildWithName(new QName(WSO2CARBON_NS, "mediaType"));
+            String mediaType = (mediaTypeElement != null) ? mediaTypeElement.getText() : null;
+
+            OMElement uiPathElement =
+                    customUIElement.getFirstChildWithName(new QName(WSO2CARBON_NS, "uiPath"));
+            String uiPath = (uiPathElement != null) ? uiPathElement.getText() : null;
+
+            if (log.isDebugEnabled()) {
+                log.debug("Read the custom UI configuration. Media type: " +
+                        mediaType + ", UI path: " + uiPath + ", Type: " + type);
+            }
+
+            if (mediaType != null && uiPath != null) {
+                if ("view".equals(type)) {
+                    component.addCustomViewUI(mediaType, uiPath);
+                } else if ("add".equals(type)) {
+                    component.addCustomAddUI(mediaType, uiPath);
+                } else {
+                    String msg = "Unknown custom UI type for media type " + mediaType + " and UI path " +
+                            uiPath +
+                            ". This custom UI will not be enabled. Custom UI type should be 'view' or 'add'.";
+                    log.error(msg);
+                }
+            } else {
+                String msg = "Required information missing in custom UI configuration. " +
+                        "Media type and UI path should contain a valid value.";
+                log.error(msg);
+            }
+        }
+    }
+
+    private static void processFileUploadConfigs(OMElement document,
+                                                 Component component) throws CarbonException {
+        OMElement fileUploadConfigElement =
+                document.getFirstChildWithName(new QName(CarbonConstants.WSO2CARBON_NS,
+                        CarbonConstants.FILE_UPLOAD_CONFIG));
+        if (fileUploadConfigElement != null) {
+
+//            //Getting ConfigurationContext service
+//            ServiceReference configCtxServiceRef = UIBundleDeployer.getBundleContext().getServiceReference(
+//                    ConfigurationContextService.class.getName());
+//            if (configCtxServiceRef == null) {
+//                throw new CarbonException("ConfigurationContext Service is not found");
+//            }
+//            ConfigurationContext configContext = ((ConfigurationContextService)
+//                    UIBundleDeployer.getBundleContext().getService(configCtxServiceRef)).getServerConfigContext();
+
+//            //Getting FileUploadExecutorManager service
+//            ServiceReference executorManagerServiceRef = bundle.getBundleContext().getServiceReference(
+//                    ConfigurationContext.class.getName());
+//            if (executorManagerServiceRef == null) {
+//                throw new CarbonException("FileUploadExecutorManager Service is not found");
+//            }
+//
+//            FileUploadExecutorManager executorManager = ((FileUploadExecutorManager) bundle.getBundleContext().getService(
+//                    executorManagerServiceRef));
+
+            for (Iterator iterator = fileUploadConfigElement.getChildElements(); iterator.hasNext();) {
+                OMElement mapppingElement = (OMElement) iterator.next();
+                if (mapppingElement.getLocalName().equalsIgnoreCase("Mapping")) {
+                    OMElement actionsElement =
+                            mapppingElement.getFirstChildWithName(
+                                    new QName(CarbonConstants.WSO2CARBON_NS, CarbonConstants.ACTIONS));
+
+                    if (actionsElement == null) {
+                        String msg = "The mandatory FileUploadConfig/Actions entry " +
+                                "does not exist or is empty in the CARBON_HOME/conf/carbon.xml " +
+                                "file. Please fix this error in the  carbon.xml file and restart.";
+                        log.error(msg);
+                        throw new CarbonException(msg);
+                    }
+                    Iterator actionElementIterator =
+                            actionsElement.getChildrenWithName(
+                                    new QName(CarbonConstants.WSO2CARBON_NS, CarbonConstants.ACTION));
+
+                    if (!actionElementIterator.hasNext()) {
+                        String msg = "A FileUploadConfig/Mapping entry in the " +
+                                "CARBON_HOME/conf/carbon.xml should have at least on Action " +
+                                "defined. Please fix this error in the carbon.xml file and " +
+                                "restart.";
+                        log.error(msg);
+                        throw new CarbonException(msg);
+                    }
+
+                    OMElement classElement = mapppingElement.getFirstChildWithName(
+                            new QName(CarbonConstants.WSO2CARBON_NS, CarbonConstants.CLASS));
+
+                    if (classElement == null || classElement.getText() == null) {
+                        String msg = "The mandatory FileUploadConfig/Mapping/Class entry " +
+                                "does not exist or is empty in the CARBON_HOME/conf/carbon.xml " +
+                                "file. Please fix this error in the  carbon.xml file and restart.";
+                        log.error(msg);
+                        throw new CarbonException(msg);
+                    }
+
+                    FileUploadExecutorConfig executorConfig = new FileUploadExecutorConfig();
+                    String className = classElement.getText().trim();
+                    executorConfig.setFUploadExecClass(className);
+//                    try {
+//                        Class clazz = bundle.loadClass(className);
+//                        Constructor constructor =
+//                                clazz.getConstructor(new Class[]{ConfigurationContext.class});
+//                        object = (FileUploadExecutor)constructor
+//                                .newInstance(new Object[]{configContext});
+//                        executorConfig.setFUploadExecObject(object);
+//                    } catch (Exception e) {
+//                        String msg = "Error occurred while trying to instantiate the " + className +
+//                                " class specified as a FileUploadConfig/Mapping/class element in " +
+//                                "the CARBON_HOME/conf/carbon.xml file. Please fix this error in " +
+//                                "the carbon.xml file and restart.";
+//                        log.error(msg, e);
+//                        throw new CarbonException(msg, e);
+//                    }
+
+                    while (actionElementIterator.hasNext()) {
+                        OMElement actionElement = (OMElement) actionElementIterator.next();
+                        if (actionElement.getText() == null) {
+                            String msg = "A FileUploadConfig/Mapping/Actions/Action element in the " +
+                                    "CARBON_HOME/conf/carbon.xml file is empty. Please include " +
+                                    "the correct value in this file and restart.";
+                            log.error(msg);
+                            throw new CarbonException(msg);
+                        }
+                        executorConfig.addMappingAction(actionElement.getText().trim());
+                    }
+                    component.addFileUploadExecutorConfig(executorConfig);
+                }
+            }
+        }
+    }
+
+    private static void processServlets(OMElement document,
+                                        Component component) {
+        //Reading servlet definitions
+        OMElement servletsEle =
+                document.getFirstChildWithName(new QName(WSO2CARBON_NS, SERVLETS));
+        if (servletsEle != null) {
+            for (Iterator iterator =
+                    servletsEle.getChildrenWithName(new QName(WSO2CARBON_NS, SERVLET));
+                 iterator.hasNext();) {
+
+                OMElement servletEle = (OMElement) iterator.next();
+                Servlet servlet = new Servlet();
+
+                OMAttribute attrib = servletEle.getAttribute(new QName(SERVLET_ID));
+                if (attrib != null) {
+                    servlet.setId(attrib.getAttributeValue());
+                }
+
+
+                Iterator nameEles =
+                        servletEle.getChildrenWithName(new QName(WSO2CARBON_NS, SERVLET_NAME));
+                if (nameEles.hasNext()) {
+                    OMElement nameEle = (OMElement) nameEles.next();
+                    servlet.setName(nameEle.getText());
+                }
+                Iterator displayNameEles =
+                        servletEle.getChildrenWithName(new QName(WSO2CARBON_NS, SERVLET_DISPLAY_NAME));
+                if (displayNameEles.hasNext()) {
+                    OMElement displayNameEle = (OMElement) displayNameEles.next();
+                    servlet.setDisplayName(displayNameEle.getText().trim());
+                }
+                Iterator servletClassEles =
+                        servletEle.getChildrenWithName(new QName(WSO2CARBON_NS, SERVLET_CLASS));
+                if (servletClassEles.hasNext()) {
+                    OMElement servletClassEle = (OMElement) servletClassEles.next();
+                    servlet.setServletClass(servletClassEle.getText().trim());
+                }
+                Iterator urlPatternEles =
+                        servletEle.getChildrenWithName(new QName(WSO2CARBON_NS, SERVLET_URL_PATTERN));
+                if (urlPatternEles.hasNext()) {
+                    OMElement urlPatternEle = (OMElement) urlPatternEles.next();
+                    servlet.setUrlPatten(urlPatternEle.getText().trim());
+                }
+                component.addServlet(servlet);
+            }
+
+        }
+    }
+
+    private static void processFrameworkConfiguration(OMElement document, Component component) {
+        OMElement bypassesEle =
+                document.getFirstChildWithName(new QName(WSO2CARBON_NS, FRAMEWORK_CONFIG));
+
+        if (bypassesEle != null) {
+            for (Iterator iterator =
+                    bypassesEle
+                            .getChildrenWithName(new QName(WSO2CARBON_NS, BYPASS));
+                 iterator.hasNext();) {
+
+                OMElement bypassEle = (OMElement) iterator.next();
+                Iterator requireAuthenticationEles =
+                        bypassEle.getChildrenWithName(
+                                new QName(WSO2CARBON_NS, AUTHENTICATION));
+                if (requireAuthenticationEles.hasNext()) {
+                    OMElement skipAuthElement = (OMElement) requireAuthenticationEles.next();
+                    Iterator skipLinkEles =
+                            skipAuthElement
+                                    .getChildrenWithName(new QName(WSO2CARBON_NS, LINK));
+
+                    while (skipLinkEles.hasNext()) {
+                        OMElement skipLinkElement = (OMElement) skipLinkEles.next();
+                        if (skipLinkElement.getLocalName().equalsIgnoreCase(LINK)) {
+                            if (skipLinkElement.getText() != null) {
+                                component.addUnauthenticatedUrl(skipLinkElement.getText());
+                            }
+                        }
+                    }
+                }
+
+                Iterator requireSkipTilesEles =
+                        bypassEle.getChildrenWithName(new QName(WSO2CARBON_NS, TILES));
+                if (requireSkipTilesEles.hasNext()) {
+                    OMElement skipTilesElement = (OMElement) requireSkipTilesEles.next();
+                    Iterator skipLinkEles =
+                            skipTilesElement
+                                    .getChildrenWithName(new QName(WSO2CARBON_NS, LINK));
+                    while (skipLinkEles.hasNext()) {
+                        OMElement skipLinkElement = (OMElement) skipLinkEles.next();
+                        if (skipLinkElement.getLocalName().equalsIgnoreCase(LINK)) {
+                            if (skipLinkElement.getText() != null) {
+                                component.addSkipTilesUrl(skipLinkElement.getText());
+                            }
+                        }
+                    }
+                }
+
+                Iterator requireSkipHttpUrlEles =
+                        bypassEle.getChildrenWithName(new QName(WSO2CARBON_NS, HTTP_URLS));
+                if (requireSkipHttpUrlEles.hasNext()) {
+                    OMElement SkipHttpUrlElement = (OMElement) requireSkipHttpUrlEles.next();
+                    Iterator skipLinkEles =
+                            SkipHttpUrlElement
+                                    .getChildrenWithName(new QName(WSO2CARBON_NS, LINK));
+                    while (skipLinkEles.hasNext()) {
+                        OMElement skipLinkElement = (OMElement) skipLinkEles.next();
+                        if (skipLinkElement.getLocalName().equalsIgnoreCase(LINK)) {
+                            if (skipLinkElement.getText() != null) {
+                                component.addSkipHttpsUrlList(skipLinkElement.getText());
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+
+    }
+
+    private static void processContextConfiguration(String componentName, OMElement document, Component component) {
+        OMElement contextsEle =
+                document.getFirstChildWithName(new QName(WSO2CARBON_NS, CONTEXTS));
+        if (contextsEle != null) {
+            for (Iterator iterator =
+                    contextsEle.getChildrenWithName(new QName(WSO2CARBON_NS, CONTEXT));
+                 iterator.hasNext();) {
+                OMElement contextEle = (OMElement) iterator.next();
+
+                Context context = new Context();
+
+                Iterator contextIdEles = contextEle.getChildrenWithName(new QName(WSO2CARBON_NS, CONTEXT_ID));
+                if (contextIdEles.hasNext()) {
+                    OMElement idEle = (OMElement) contextIdEles.next();
+                    context.setContextId(idEle.getText());
+                } else {
+                    //found context without an Id
+                    log.warn(componentName + " contains a component.xml with empty context id");
+                }
+
+                Iterator contextNameEles = contextEle.getChildrenWithName(new QName(WSO2CARBON_NS, CONTEXT_NAME));
+                if (contextNameEles.hasNext()) {
+                    OMElement nameEle = (OMElement) contextNameEles.next();
+                    context.setContextName(nameEle.getText());
+                } else {
+                    //found context without a context name
+                    log.warn(componentName + " contains a component.xml with empty context name");
+                }
+
+                Iterator contextProtocolEles = contextEle.getChildrenWithName(new QName(WSO2CARBON_NS, PROTOCOL));
+                if (contextProtocolEles.hasNext()) {
+                    OMElement protocolEle = (OMElement) contextProtocolEles.next();
+                    context.setProtocol(protocolEle.getText());
+                } else {
+                    //found context without a context name
+                    log.warn(componentName + " contains a component.xml with empty protocol");
+                }
+
+                Iterator contextDescEles = contextEle.getChildrenWithName(new QName(WSO2CARBON_NS, DESCRIPTION));
+                if (contextDescEles.hasNext()) {
+                    OMElement descEle = (OMElement) contextDescEles.next();
+                    context.setDescription(descEle.getText());
+                } else {
+                    //found context without a context description
+                    log.warn(componentName + " contains a component.xml with empty context description");
+                }
+
+                component.addContext(context);
+
+            }
+        }
+
+    }
+
+    public static void processMenus(String componentName, OMElement document,
+                                     Component component) {
+        OMElement menusEle =
+                document.getFirstChildWithName(new QName(WSO2CARBON_NS, MENUS_ELE));
+        if (menusEle != null) {
+            for (Iterator iterator =
+                    menusEle.getChildrenWithName(new QName(WSO2CARBON_NS, MENUE_ELE));
+                 iterator.hasNext();) {
+                OMElement menuEle = (OMElement) iterator.next();
+
+                Menu menu = new Menu();
+
+                Iterator idEles = menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, "id"));
+                if (idEles.hasNext()) {
+                    OMElement idEle = (OMElement) idEles.next();
+                    menu.setId(idEle.getText());
+                } else {
+                    //found menu without an Id
+                    log.warn(componentName + " contains a component.xml with empty menu id");
+                }
+                Iterator i18nKeyEles =
+                        menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, "i18n-key"));
+                if (i18nKeyEles.hasNext()) {
+                    OMElement i18nKeyEle = (OMElement) i18nKeyEles.next();
+                    menu.setI18nKey(i18nKeyEle.getText());
+                }
+                Iterator i18nBundleEles =
+                        menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, "i18n-bundle"));
+                if (i18nBundleEles.hasNext()) {
+                    OMElement i18nBundleEle = (OMElement) i18nBundleEles.next();
+                    menu.setI18nBundle(i18nBundleEle.getText());
+                }
+                Iterator parentMenuEles =
+                        menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, "parent-menu"));
+                if (parentMenuEles.hasNext()) {
+                    OMElement parentMenuEle = (OMElement) parentMenuEles.next();
+                    menu.setParentMenu(parentMenuEle.getText());
+                }
+                Iterator regionEles = menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, "region"));
+                if (regionEles.hasNext()) {
+                    OMElement regionEle = (OMElement) regionEles.next();
+                    menu.setRegion(regionEle.getText());
+                }
+                Iterator iconEles = menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, "icon"));
+                if (iconEles.hasNext()) {
+                    OMElement iconEle = (OMElement) iconEles.next();
+                    menu.setIcon(iconEle.getText());
+                }
+                Iterator linkEles = menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, "link"));
+                if (linkEles.hasNext()) {
+                    OMElement linkEle = (OMElement) linkEles.next();
+                    menu.setLink(linkEle.getText());
+                }
+                Iterator orderEles = menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, "order"));
+                if (orderEles.hasNext()) {
+                    OMElement orderEle = (OMElement) orderEles.next();
+                    menu.setOrder(orderEle.getText());
+                }
+                Iterator styleClassEles =
+                        menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, "style-class"));
+                if (styleClassEles.hasNext()) {
+                    OMElement styleEle = (OMElement) styleClassEles.next();
+                    menu.setStyleClass(styleEle.getText());
+                }
+
+                Iterator requireAuthenticationEles =
+                        menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, "skip-authentication"));
+                if (requireAuthenticationEles.hasNext()) {
+                    menu.setRequireAuthentication(false);
+                    component.addUnauthenticatedUrl(menu.getLink());
+
+                    OMElement skipAuthElement = (OMElement) requireAuthenticationEles.next();
+                    Iterator skipLinkEles =
+                            skipAuthElement.getChildrenWithName(new QName(WSO2CARBON_NS, "skip-link"));
+
+                    while (skipLinkEles.hasNext()) {
+                        OMElement skipLinkElement = (OMElement) skipLinkEles.next();
+                        if (skipLinkElement.getLocalName().equalsIgnoreCase("skip-link")) {
+                            if (skipLinkElement.getText() != null) {
+                                component.addUnauthenticatedUrl(skipLinkElement.getText());
+                            }
+                        }
+                    }
+                }
+
+                Iterator requirePermissionElements =
+                        menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, REQUIRE_PERMISSION));
+                List<String> permissions = new LinkedList<String>();
+                while (requirePermissionElements.hasNext()) {
+                    OMElement permissionEle = (OMElement) requirePermissionElements.next();
+                    permissions.add(permissionEle.getText());
+                }
+                if (permissions.size() > 0) {
+                    menu.setRequirePermission(permissions.toArray(new String[permissions.size()]));
+                } else {
+                    Iterator permissionElements =
+                            menuEle.getChildrenWithName(
+                                    new QName(WSO2CARBON_NS, "all"));
+                    if (permissionElements.hasNext()) {
+                        menu.setAllPermissionsRequired(true);
+                    } else {
+                        permissionElements =
+                            menuEle.getChildrenWithName(
+                                    new QName(WSO2CARBON_NS, "at-least"));
+                        if (permissionElements.hasNext()) {
+                            menu.setAtLeastOnePermissionsRequired(true);
+                        }
+                    }
+                    if (permissionElements.hasNext()) {
+                        OMElement permissionsEle = (OMElement) permissionElements.next();
+                        requirePermissionElements =
+                            permissionsEle.getChildrenWithName(
+                                    new QName(WSO2CARBON_NS, REQUIRE_PERMISSION));
+                        while (requirePermissionElements.hasNext()) {
+                            OMElement permissionEle = (OMElement) requirePermissionElements.next();
+                            permissions.add(permissionEle.getText());
+                        }
+                        if (permissions.size() > 0) {
+                            menu.setRequirePermission(
+                                    permissions.toArray(new String[permissions.size()]));
+                        }
+                    }
+
+                }
+                // checking require master tenant flag
+                Iterator requireSuperTenantEles =
+                        menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, REQUIRE_SUPER_TENANT));
+                if (requireSuperTenantEles.hasNext()) {
+                    OMElement requireSuperTenantEle = (OMElement) requireSuperTenantEles.next();
+                    if ("true".equalsIgnoreCase(requireSuperTenantEle.getText())) {
+                        menu.setRequireSuperTenant(true);
+                    }
+                }
+                // checking require master tenant flag
+                Iterator requireNotSuperTenantEles =
+                        menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, REQUIRE_NOT_SUPER_TENANT));
+                if (requireNotSuperTenantEles.hasNext()) {
+                    OMElement requireNotSuperTenantEle = (OMElement) requireNotSuperTenantEles.next();
+                    if ("true".equalsIgnoreCase(requireNotSuperTenantEle.getText())) {
+                        menu.setRequireNotSuperTenant(true);
+                    }
+                }
+                // checking the require not logged in
+                Iterator requireNotLoggedInEles =
+                        menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, REQUIRE_NOT_LOGGED_IN));
+                if (requireNotLoggedInEles.hasNext()) {
+                    OMElement requireNotLoggedInEle = (OMElement) requireNotLoggedInEles.next();
+                    if ("true".equalsIgnoreCase(requireNotLoggedInEle.getText())) {
+                        menu.setRequireNotLoggedIn(true);
+                    }
+                }
+
+                Iterator requireServiceModeEls =
+                        menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, CarbonConstants.REQUIRE_CLOUD_DEPLOYMENT));
+                if (requireServiceModeEls.hasNext()) {
+                    OMElement requireServiceModeEle = (OMElement) requireServiceModeEls.next();
+                    if ("true".equalsIgnoreCase(requireServiceModeEle.getText())) {
+                        menu.setRequireCloudDeployment(true);
+                    }
+                }
+
+                //url parameters
+                Iterator<OMElement> urlParamsEles = menuEle.getChildrenWithName(new QName(WSO2CARBON_NS, "url-params"));
+                if (urlParamsEles.hasNext()) {
+                    OMElement urlParamsEle = (OMElement) urlParamsEles.next();
+                    menu.setUrlParameters(urlParamsEle.getText());
+                }
+                component.addMenu(menu);
+
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/UIBundleDeployer.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/UIBundleDeployer.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/UIBundleDeployer.java
new file mode 100644
index 0000000..a617259
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/UIBundleDeployer.java
@@ -0,0 +1,515 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui.deployment;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.eclipse.equinox.http.helper.ContextPathServletAdaptor;
+import org.eclipse.equinox.http.helper.FilterServletAdaptor;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.SynchronousBundleListener;
+import org.osgi.service.http.HttpContext;
+import org.osgi.service.http.HttpService;
+import org.osgi.service.http.NamespaceException;
+import org.osgi.util.tracker.ServiceTracker;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.base.ServerConfiguration;
+import org.wso2.carbon.ui.BundleBasedUIResourceProvider;
+import org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions;
+import org.wso2.carbon.ui.deployment.beans.Component;
+import org.wso2.carbon.ui.deployment.beans.CustomUIDefenitions;
+import org.wso2.carbon.ui.deployment.beans.FileUploadExecutorConfig;
+import org.wso2.carbon.ui.deployment.beans.Menu;
+import org.wso2.carbon.ui.internal.CarbonUIServiceComponent;
+import org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager;
+import org.wso2.carbon.ui.util.UIResourceProvider;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Iterator;
+
+public class UIBundleDeployer implements SynchronousBundleListener {
+
+    private static Log log = LogFactory.getLog(UIBundleDeployer.class);
+    private String bundleResourcePath = "/web";
+    private BundleContext bundleContext;
+    private HttpContext httpContext;
+    private ServiceTracker fileUploadExecManagerTracker;
+    private BundleBasedUIResourceProvider bundleBasedUIResourceProvider =
+            new BundleBasedUIResourceProvider(bundleResourcePath);
+    /*
+     * Used to hide the menus in the management console.
+     */
+    private ArrayList<String> hideMenuIds = new ArrayList<String>();
+
+    public UIResourceProvider getBundleBasedUIResourcePrvider() {
+        return bundleBasedUIResourceProvider;
+    }
+
+    public void deploy(BundleContext bundleContext, HttpContext context) {
+        this.bundleContext = bundleContext;
+        this.httpContext = context;
+
+        fileUploadExecManagerTracker = new ServiceTracker(bundleContext,
+                FileUploadExecutorManager.class.getName(), null);
+        fileUploadExecManagerTracker.open();
+
+        hideMenuIds.addAll(Arrays.asList(ServerConfiguration
+                                         .getInstance().getProperties("HideMenuItemIds.HideMenuItemId")));
+         
+        //When Carbon starts up with existing set of bundles which contain component.xmls,
+        //the bundleChanged() method does not get called. So calling processComponentXML()
+        //method here seems to be the only solution.
+        //TODO fork a new thread to do this task since this needs some processing time.
+        for (Bundle bundle : bundleContext.getBundles()) {
+            if ((bundle.getState() & (Bundle.UNINSTALLED | Bundle.INSTALLED)) == 0) {
+                try {
+                    processUIBundle(bundle, CarbonConstants.ADD_UI_COMPONENT);
+                } catch (Exception e) {
+                    log.error("Error occured when processing ui bundle " + bundle.getSymbolicName(), e);
+                }
+            }
+        }
+
+        try {
+            bundleContext.addServiceListener(new ServletServiceListener(),
+                    "(objectClass=" + Servlet.class.getName() + ")");
+        } catch (InvalidSyntaxException e) {
+            log.error(e);
+        }
+    }
+    /*
+    INSTALLED = 1;
+    STARTED = 2;
+    STOPPED = 4;
+    UPDATED = 8;
+    UNINSTALLED = 16;
+    RESOLVED = 32;
+    UNRESOLVED = 64;
+    STARTING = 128;
+    STOPPING = 256;
+    LAZY_ACTIVATION = 512;
+     */
+    public void bundleChanged(BundleEvent event) {
+        Bundle bundle = event.getBundle();
+        if(log.isDebugEnabled()){
+            log.debug("Received new bundle event  : " + event.getType());
+        }
+        try {
+            switch (event.getType()) {
+                //TODO need to fix here.
+                case BundleEvent.RESOLVED:
+                    if(log.isDebugEnabled()){
+                        log.debug("Add ui component event received....");
+                    }
+                    processUIBundle(bundle, CarbonConstants.ADD_UI_COMPONENT);
+                    break;
+
+                case BundleEvent.UNRESOLVED:
+                    if(log.isDebugEnabled()){
+                    log.debug("Remove ui component event received....");
+                    }
+                    processUIBundle(bundle, CarbonConstants.REMOVE_UI_COMPONENT);
+                    break;
+            }
+        } catch (Exception e) {
+            log.error("Error occured when processing component xml in bundle " + bundle.getSymbolicName(), e);
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 1)Search for the UIBundle header
+     * 2)Check for UI bundle fragments - for backward compatibility
+     *
+     * @param bundle
+     * @param action
+     * @throws CarbonException
+     */
+    private void processUIBundle(Bundle bundle, String action) throws CarbonException {
+        Dictionary headers = bundle.getHeaders();
+
+        String value = (String) headers.get("Carbon-Component");
+        if (value != null && "UIBundle".equals(value)) { //this is a UI Bundle
+            if (CarbonConstants.ADD_UI_COMPONENT.equals(action)) {
+                if(log.isDebugEnabled()){
+                    log.debug("UI component add action received in UIBundleDeployer  : "+action);
+                }
+                if(log.isDebugEnabled()){
+                    log.debug("Adding bundle resource paths  : "+ bundle );
+                }
+                bundleBasedUIResourceProvider.addBundleResourcePaths(bundle);
+                if(log.isDebugEnabled()){
+                    log.debug("processComponentXML in   : "+ bundle +"   "+action);
+                }
+                processComponentXML(bundle, action);
+            } else if (CarbonConstants.REMOVE_UI_COMPONENT.equals(action)){
+                if(log.isDebugEnabled()){
+                    log.debug("UI component add action received in UIBundleDeployer  : "+action);
+                }
+                if(log.isDebugEnabled()){
+                    log.debug("Removing bundle resource paths  : "+ bundle );
+                }
+                bundleBasedUIResourceProvider.removeBundleResourcePaths(bundle);
+                if(log.isDebugEnabled()){
+                    log.debug("processComponentXML in   : "+ bundle +"   "+action);
+                }
+                processComponentXML(bundle, action);
+            }
+
+        }
+    }
+
+    /**
+     * Read component.xml(if any) and invoke suitable actions
+     *
+     * @param bundle
+     * @param action - used to determine if a menu item should be added or removed from UI. Value for action
+     *               is determined by the bundle's lifecycle method(RESOLVED,...,etc).
+     */
+    private void processComponentXML(Bundle bundle, String action) throws CarbonException {
+        if (bundleContext.getBundle() == bundle) {
+            return;
+        }
+        if(log.isDebugEnabled()){
+                    log.debug("Processing component xml in the bundle...");
+                }
+        Component component = ComponentBuilder.build(bundle, bundleContext);
+        if (component == null) {
+            return;
+        } else {
+            ServiceReference reference = bundleContext.getServiceReference(CarbonUIDefinitions.class.getName());
+            CarbonUIDefinitions carbonUIDefinitions = null;
+            if (reference != null) {
+                carbonUIDefinitions = (CarbonUIDefinitions) bundleContext.getService(reference);
+            }
+            if (carbonUIDefinitions != null) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Found carbonUIDefinitions in OSGi context");
+                }
+                if (CarbonConstants.ADD_UI_COMPONENT.equals(action)) {
+                    if (log.isDebugEnabled()) {
+                        log.debug("Adding UI component using existing Carbon Definition");
+                    }
+                    ArrayList<Menu> menusToAdd = new ArrayList<Menu>();
+					for (Menu menu : component.getMenus()) {
+						
+						// Prevent adding the menu if it is defined to be hidden.
+						if (!(hideMenuIds.contains(menu.getId()))) {
+							menusToAdd.add(menu);
+						}
+					}
+					if(menusToAdd.size() > 0) {
+						Menu[] menus = new Menu[menusToAdd.size()];
+						menus = menusToAdd.toArray(menus);
+						carbonUIDefinitions.addMenuItems(menus);
+					}
+
+                    carbonUIDefinitions.addServletItems(component.getServlets());
+                    carbonUIDefinitions.addUnauthenticatedUrls(component.getUnauthenticatedUrlList());
+                    carbonUIDefinitions.addSkipTilesUrls(component.getSkipTilesUrlList());
+                    carbonUIDefinitions.addHttpUrls(component.getSkipHttpsUrlList());
+                    carbonUIDefinitions.addContexts(component.getContextsList());
+                } else if (CarbonConstants.REMOVE_UI_COMPONENT.equals(action)) {
+                    if (log.isDebugEnabled()) {
+                        log.debug("Removing UI component using existing carbon definition");
+                    }
+                    carbonUIDefinitions.removeMenuItems(component.getMenus());
+                    carbonUIDefinitions.removeServletItems(component.getServlets());
+                    carbonUIDefinitions.removeUnauthenticatedUrls(component.getUnauthenticatedUrlList());
+                    carbonUIDefinitions.removeSkipTilesUrls(component.getSkipTilesUrlList());
+                    carbonUIDefinitions.removeHttpUrls(component.getSkipHttpsUrlList());
+                    carbonUIDefinitions.removeContexts(component.getContextsList());
+                }
+            } else {
+                if (log.isDebugEnabled()) {
+                    log.debug("CarbonUIDefinitions is NULL. Registering new...");
+                }
+                carbonUIDefinitions = new CarbonUIDefinitions();
+                carbonUIDefinitions.addMenuItems(component.getMenus());
+                carbonUIDefinitions.addServletItems(component.getServlets());
+                carbonUIDefinitions.addUnauthenticatedUrls(component.getUnauthenticatedUrlList());
+                carbonUIDefinitions.addSkipTilesUrls(component.getSkipTilesUrlList());
+                carbonUIDefinitions.addHttpUrls(component.getSkipHttpsUrlList());
+                carbonUIDefinitions.addContexts(component.getContextsList());
+                bundleContext.registerService(CarbonUIDefinitions.class.getName(), carbonUIDefinitions, null);
+            }
+        }
+        //processing servlet definitions
+        processServletDefinitions(component,action);
+        // processing the custom UI definitions required by Registry
+        processCustomRegistryDefinitions(component,action);
+        //processing file upload executor entries in the UI component
+        processFileUploadExecutorDefinitions(component,action);
+
+    }
+
+
+
+    private void processFileUploadExecutorDefinitions(Component component , String action) throws
+            CarbonException{
+        if (component.getFileUploadExecutorConfigs() != null
+                && component.getFileUploadExecutorConfigs().length > 0) {
+            FileUploadExecutorManager executorManager =
+                    (FileUploadExecutorManager) fileUploadExecManagerTracker.getService();
+            if (executorManager == null) {
+                log.error("FileUploadExecutorManager service is not available");
+                return;
+            }
+            FileUploadExecutorConfig[] executorConfigs = component.getFileUploadExecutorConfigs();
+            for (FileUploadExecutorConfig executorConfig : executorConfigs) {
+                String[] mappingActions = executorConfig.getMappingActionList();
+                for (String mappingAction : mappingActions) {
+                    if (CarbonConstants.ADD_UI_COMPONENT.equals(action)) {
+                        executorManager.addExecutor(mappingAction,
+                                executorConfig.getFUploadExecClass());
+                    } else if (CarbonConstants.REMOVE_UI_COMPONENT.equals(action)) {
+                        executorManager.removeExecutor(mappingAction);
+                    }
+                }
+            }
+        }
+    }
+
+
+    private void processServletDefinitions(Component component, String action) throws
+            CarbonException{
+        if (component != null
+                && component.getServlets() != null
+                && component.getServlets().length > 0) {
+            HttpService httpService;
+            try {
+                httpService = CarbonUIServiceComponent.getHttpService();
+            } catch (Exception e) {
+                throw new CarbonException("An instance of HttpService is not available");
+            }
+            org.wso2.carbon.ui.deployment.beans.Servlet[] servletDefinitions = component.getServlets();
+            for (int a = 0; a < servletDefinitions.length; a++) {
+                org.wso2.carbon.ui.deployment.beans.Servlet servlet = servletDefinitions[a];
+                if (CarbonConstants.ADD_UI_COMPONENT.equals(action)) {
+                    if (log.isTraceEnabled()) {
+                        log.trace("Registering sevlet : " + servlet);
+                    }
+                    try {
+                        Class clazz = Class.forName(servlet.getServletClass());
+                        //TODO : allow servlet parameters to be passed
+                        Dictionary params = new Hashtable();
+                        httpService.registerServlet(servlet.getUrlPatten(),
+                                (Servlet) clazz.newInstance(), params,
+                                httpContext);
+                    } catch (ClassNotFoundException e) {
+                        log.error("Servlet class : " + servlet.getServletClass() + " not found.", e);
+                    } catch (ServletException e) {
+                        log.error("Problem registering Servlet class : " +
+                                servlet.getServletClass() + ".", e);
+                    } catch (NamespaceException e) {
+                        log.error("Problem registering Servlet class : " +
+                                servlet.getServletClass() + ".", e);
+                    } catch (InstantiationException e) {
+                        log.error("Problem registering Servlet class : " +
+                                servlet.getServletClass() + ".", e);
+                    } catch (IllegalAccessException e) {
+                        log.error("Problem registering Servlet class : " +
+                                servlet.getServletClass() + ".", e);
+                    }
+                } else if (CarbonConstants.REMOVE_UI_COMPONENT.equals(action)) {
+                    if (log.isTraceEnabled()) {
+                        log.trace("Unregistering sevlet : " + servlet);
+                    }
+                    httpService.unregister(servlet.getUrlPatten());
+                }
+            }
+
+        }
+
+
+    }
+
+    private void processCustomRegistryDefinitions(Component component, String action) throws
+            CarbonException{
+          if (component != null) {
+
+            ServiceReference reference =
+                    bundleContext.getServiceReference(CustomUIDefenitions.class.getName());
+            CustomUIDefenitions customUIDefinitions = null;
+            if (reference != null) {
+                customUIDefinitions = (CustomUIDefenitions) bundleContext.getService(reference);
+            }
+            if (customUIDefinitions == null) {
+                String msg = "Custom UI defenitions service is not available.";
+                log.error(msg);
+                throw new CarbonException(msg);
+            }
+
+            Iterator<String> viewMediaTypes = component.getCustomViewUIMap().keySet().iterator();
+            while (viewMediaTypes.hasNext()) {
+                String mediaType = viewMediaTypes.next();
+                String uiPath = component.getCustomViewUIMap().get(mediaType);
+                if (CarbonConstants.ADD_UI_COMPONENT.equals(action)) {
+                    if (customUIDefinitions.getCustomViewUI(mediaType) == null) {
+                        customUIDefinitions.addCustomViewUI(mediaType, uiPath);
+                        if (log.isDebugEnabled()) {
+                            log.debug("Registered the custom view UI media type: " + mediaType + ", UI path: " + uiPath);
+                        }
+                    } else {
+                        String msg = "Custom view UI is already registered for media type: " + mediaType +
+                                ". Custom UI with media type: " + mediaType + " and UI path: " +
+                                uiPath + " will not be registered.";
+                        log.error(msg);
+                    }
+                }else if (CarbonConstants.REMOVE_UI_COMPONENT.equals(action)){
+                    //TODO
+                }
+
+            }
+
+            Iterator<String> addMediaTypes = component.getCustomAddUIMap().keySet().iterator();
+            while (addMediaTypes.hasNext()) {
+                String mediaType = addMediaTypes.next();
+                String uiPath = component.getCustomAddUIMap().get(mediaType);
+                if (CarbonConstants.ADD_UI_COMPONENT.equals(action)) {
+                    if (customUIDefinitions.getCustomAddUI(mediaType) == null) {
+                        customUIDefinitions.addCustomAddUI(mediaType, uiPath);
+                        if (log.isDebugEnabled()) {
+                            log.debug("Registered the custom add UI media type: " + mediaType + ", UI path: " + uiPath);
+                        }
+                    } else {
+                        String msg = "Custom add UI is already registered for media type: " + mediaType +
+                                ". Custom UI with media type: " + mediaType + " and UI path: " +
+                                uiPath + " will not be registered.";
+                        log.error(msg);
+                    }
+                } else if (CarbonConstants.REMOVE_UI_COMPONENT.equals(action)) {
+                    //TODO
+
+                }
+            }
+        }
+    }
+
+    public void registerServlet(Servlet servlet, String urlPattern, Dictionary params,
+                                Dictionary servletAttrs, int event, javax.servlet.Filter associatedFilter) throws CarbonException {
+
+        HttpService httpService;
+        try {
+            httpService = CarbonUIServiceComponent.getHttpService();
+        } catch (Exception e) {
+            throw new CarbonException("An instance of HttpService is not available");
+        }
+        try {
+            if (event == ServiceEvent.REGISTERED) {
+                Servlet adaptedJspServlet = new ContextPathServletAdaptor(servlet, urlPattern);
+                if (associatedFilter == null) {
+                    httpService.registerServlet(urlPattern, adaptedJspServlet, params, httpContext);
+                } else {
+                    httpService.registerServlet(urlPattern,
+                            new FilterServletAdaptor(associatedFilter, null, adaptedJspServlet), params, httpContext);
+                }
+                if (servletAttrs != null) {
+                    for (Enumeration enm = servletAttrs.keys(); enm.hasMoreElements();) {
+                        String key = (String) enm.nextElement();
+                        adaptedJspServlet.getServletConfig().getServletContext().setAttribute(key, servletAttrs.get(key));
+                    }
+                }
+            } else if (event == ServiceEvent.UNREGISTERING) {
+                httpService.unregister(urlPattern);
+            }
+
+        } catch (Exception e) {
+            log.error("Error occurred while registering servlet",e);
+        }
+    }
+
+    public class ServletServiceListener implements ServiceListener {
+
+        public ServletServiceListener() {
+            try {
+                ServiceReference[] servletSRs = bundleContext.getServiceReferences((String)null,
+                        "(objectClass=" + Servlet.class.getName() + ")");
+
+                if (servletSRs != null) {
+                    for (ServiceReference sr : servletSRs) {
+                        registerServletFromSR(sr, ServiceEvent.REGISTERED);
+                    }
+                }
+            } catch (Exception e) {
+                log.error("Failed to obtain registerd services. Invalid filter Syntax.", e);
+            }
+        }
+
+        public void serviceChanged(ServiceEvent event) {
+            if (event.getType() == ServiceEvent.REGISTERED) {
+                registerServletFromSR(event.getServiceReference(), event.getType());
+            }
+        }
+
+        public void registerServletFromSR(ServiceReference sr, int event) {
+            Servlet servlet = (Servlet) bundleContext.getService(sr);
+            if (servlet == null) {
+                log.error("Servlet instance cannot be null");
+                return;
+            }
+
+            Object urlPatternObj = sr.getProperty(CarbonConstants.SERVLET_URL_PATTERN);
+            if (urlPatternObj == null || !(urlPatternObj instanceof String) || urlPatternObj.equals("")) {
+                log.error("URL pattern should not be null");
+                return;
+            }
+            String urlPattern = (String) urlPatternObj;
+
+            Object paramsObj = sr.getProperty(CarbonConstants.SERVLET_PARAMS);
+            if (paramsObj != null && !(paramsObj instanceof Dictionary)) {
+                log.error("Servlet params instances should be type of Dictionary");
+                return;
+            }
+            Dictionary params = (Dictionary) paramsObj;
+
+            Object attributesObj = sr.getProperty(CarbonConstants.SERVLET_ATTRIBUTES);
+            if (attributesObj != null && !(attributesObj instanceof Dictionary)) {
+                log.error("Servlet attributes instances should be type of Dictionary");
+                return;
+            }
+            Dictionary attributes = (Dictionary) attributesObj;
+
+            Object associatedFilterObj = sr.getProperty(CarbonConstants.ASSOCIATED_FILTER);
+
+            // use the qualified name for the Filter as it will by default conflicted with the OSGI class
+            javax.servlet.Filter associatedFilter = null;
+            if (associatedFilterObj != null) {
+                associatedFilter = (javax.servlet.Filter) associatedFilterObj;
+            }
+
+            try {
+                registerServlet(servlet, urlPattern, params, attributes, event, associatedFilter);
+            } catch (CarbonException e) {
+                log.error(e);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/BreadCrumbItem.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/BreadCrumbItem.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/BreadCrumbItem.java
new file mode 100644
index 0000000..569315b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/BreadCrumbItem.java
@@ -0,0 +1,70 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui.deployment.beans;
+
+import java.io.Serializable;
+
+public class BreadCrumbItem implements Serializable{
+	private static final long serialVersionUID = 1181334740216034786L;
+	private String id;
+	private String i18nKey;
+	private String i18nBundle;
+	private String link;
+	private String convertedText;
+	private int order;	
+	
+	public int getOrder() {
+		return order;
+	}
+	public void setOrder(int order) {
+		this.order = order;
+	}
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getI18nKey() {
+		return i18nKey;
+	}
+	public void setI18nKey(String key) {
+		i18nKey = key;
+	}
+	public String getI18nBundle() {
+		return i18nBundle;
+	}
+	public void setI18nBundle(String bundle) {
+		i18nBundle = bundle;
+	}
+	public String getLink() {
+		return link;
+	}
+	public void setLink(String link) {
+		this.link = link;
+	}
+	public String getConvertedText() {
+		return convertedText;
+	}
+	public void setConvertedText(String convertedText) {
+		this.convertedText = convertedText;
+	}
+	public String toString() {
+		return id +":"+i18nKey+":"+i18nBundle+":"+link+":"+convertedText;
+	}	
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/CarbonUIDefinitions.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/CarbonUIDefinitions.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/CarbonUIDefinitions.java
new file mode 100644
index 0000000..9dcd9c8
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/CarbonUIDefinitions.java
@@ -0,0 +1,358 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui.deployment.beans;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.base.ServerConfiguration;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.ui.MenuAdminClient;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.*;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+public class CarbonUIDefinitions {
+    private static Log log = LogFactory.getLog(CarbonUIDefinitions.class);
+    private List<Menu> menuDefinitions = new CopyOnWriteArrayList<Menu> ();
+    private List<Servlet> servletDefinitions = new ArrayList<Servlet>();
+    private HashMap<String, String> unauthenticatedUrls = new HashMap<String, String>();
+    private HashMap<String, String> skipTilesUrls = new HashMap<String, String>();
+    private HashMap<String, String> httpUrls = new HashMap<String, String>();
+    private HashMap<String, Context> contexts = new HashMap<String, Context>();
+
+    public void addContexts(List<Context> contexts) {
+        for (Context ctx : contexts){
+            addContexts(ctx.getContextId(), ctx);
+        }
+    }
+
+    public void removeContexts(List<Context> contexts){
+        for (Context ctx : contexts){
+            removeContexts(ctx);
+        }
+    }
+
+    public void addContexts(String contextId, Context context) {
+        contexts.put(contextId, context);
+    }
+
+    public void removeContexts(Context context){
+        contexts.remove(context.getContextId());
+    }
+
+    public HashMap<String, Context> getContexts() {
+        return contexts;
+    }
+
+    public void addHttpUrls(List<String> urls) {
+         for(String url : urls){
+            addHttpUrls(url);
+        }
+    }
+
+    public void removeHttpUrls(List<String> urls) {
+        for(String url : urls){
+            removeHttpUrls(url);
+        }
+    }
+
+    public void addHttpUrls(String url) {
+        httpUrls.put(url, url);
+    }
+
+    public void removeHttpUrls(String url){
+        httpUrls.remove(url);
+    }
+
+    public HashMap<String, String> getHttpUrls() {
+        return httpUrls;
+    }
+
+    public void addUnauthenticatedUrls(List<String> urls) {
+        for (String url : urls) {
+            addUnauthenticatedUrls(url);
+        }
+    }
+
+    public void removeUnauthenticatedUrls(List<String> urls) {
+        for (String url : urls) {
+            removeUnauthenticatedUrls(url);
+        }
+    }
+
+    public void addUnauthenticatedUrls(String url) {
+        unauthenticatedUrls.put(url, url);
+    }
+
+    public void removeUnauthenticatedUrls(String url) {
+        unauthenticatedUrls.remove(url);
+    }
+
+    public HashMap<String, String> getUnauthenticatedUrls() {
+        return unauthenticatedUrls;
+    }
+
+    public void addSkipTilesUrls(List<String> urls) {
+         for(String url : urls){
+            addSkipTilesUrls(url);
+        }
+    }
+
+
+    public void removeSkipTilesUrls(List<String> urls){
+        for(String url : urls){
+           removeSkipTilesUrls(url);
+        }
+    }
+
+    public void addSkipTilesUrls(String url) {
+        skipTilesUrls.put(url, url);
+    }
+
+    public void removeSkipTilesUrls(String url){
+        skipTilesUrls.remove(url);
+    }
+
+    public HashMap<String, String> getSkipTilesUrls() {
+        return skipTilesUrls;
+    }
+
+
+    /**
+     * Removes a given menu item from menu definitions.
+     * Menu items available to all users will be effected.
+     *
+     * @param menuId
+     * @see CarbonUIUtil#removeMenuDefinition(String, javax.servlet.http.HttpServletRequest)
+     */
+    public void removeMenuDefinition(String menuId) {  //did not change the paramType to Menu
+        //TODO : consider removing child menu items as well
+        if (menuId != null && menuId.trim().length() > 0) {
+            for (Menu menu : menuDefinitions) {
+                    if (menu != null && menuId.equals(menu.getId())) {
+                        menuDefinitions.remove(menu);
+                        if (log.isDebugEnabled()) {
+                            log.debug("Removing menu item : " + menuId);
+                        }
+                    }
+
+            }
+        }
+    }
+
+    /**
+     * @param loggedInUserName
+     * @param userPermissions
+     * @param request
+     * @return
+     */
+    public Menu[] getMenuDefinitions(String loggedInUserName,
+                                     boolean isSuperTenant,
+                                     ArrayList<String> userPermissions,
+                                     HttpServletRequest request) {
+        return getMenuDefinitions(loggedInUserName, isSuperTenant, userPermissions, request,
+                menuDefinitions.toArray(new Menu[0]));
+    }
+
+    /**
+     * Get menu definitions based on Logged in user & user permission
+     *
+     * @param loggedInUserName
+     * @param userPermissions
+     * @return
+     */
+    public Menu[] getMenuDefinitions(String loggedInUserName,
+                                     boolean isSuperTenant,
+                                     ArrayList<String> userPermissions,
+                                     HttpServletRequest request,
+                                     Menu[] currentMenuItems) {
+        if (loggedInUserName != null) {
+            //If a user is logged in, send filtered set of menus
+            ArrayList<Menu> filteredMenuDefs = new ArrayList<Menu>();
+
+            //Get permissions granted for logged in user
+            //HashMap<String,String> grantedPermissions = getGrantedPermissions(loggedInUserName, userPermissions);
+
+            for (int a = 0; a < currentMenuItems.length; a++) {
+                String serverInServiceMode = ServerConfiguration.getInstance().
+                        getFirstProperty(CarbonConstants.IS_CLOUD_DEPLOYMENT);
+                Menu menu = currentMenuItems[a];
+                boolean continueAdding = true;
+                if (menu.isRequireSuperTenant() && !isSuperTenant) {
+                    continueAdding = false;
+                    if (log.isDebugEnabled()) {
+                        log.debug("User : " + loggedInUserName +
+                                " is not logged in from super tenant to access menu -> " + menu);
+                    }
+                } else if (menu.isRequireNotSuperTenant() && isSuperTenant) {
+                    continueAdding = false;
+                    if (log.isDebugEnabled()) {
+                        log.debug("User : " + loggedInUserName +
+                                " is not logged in from non super tenant to access menu -> " + menu);
+                    }
+
+                } else if (menu.isRequireNotLoggedIn() && loggedInUserName != null) {
+                    continueAdding = false;
+                    if (log.isDebugEnabled()) {
+                        log.debug("User : " + loggedInUserName +
+                                " is logged in, the menu only shows when not logged in -> " + menu);
+                    }
+
+                } else if (menu.isRequireCloudDeployment() && !"true".equals(serverInServiceMode)) {
+                    continueAdding = false;
+                    if (log.isDebugEnabled()) {
+                        log.debug("Server is not running in a cloud deployment, " +
+                                  "the menu is only shown when running in cloud deployment -> " + menu);
+                    }
+                }
+                if (continueAdding) {
+                    String[] requiredPermissions = menu.getRequirePermission();
+                    int grantCount = 0;
+                    for (String requiredPermission : requiredPermissions) {
+                        int temp = grantCount;
+                        for (String grantedPermission : userPermissions) {
+                            if ("*".equals(requiredPermission)) {
+                                grantCount++;
+                                break;
+                            } else {
+                                if (!requiredPermission.startsWith("/")) {
+                                    grantCount = requiredPermissions.length;
+                                    log.error(" Attention :: Permission issue in Menu item "
+                                            + menu.getId());
+                                    break;
+                                }
+
+                                if (requiredPermission.startsWith(grantedPermission)) {
+                                    grantCount++;
+                                    break;
+                                }
+                            }
+                        }
+                        if (temp == grantCount && !menu.isAtLeastOnePermissionsRequired()) {
+                            grantCount = 0;
+                            break;
+                        }
+                    }
+                    if (grantCount >= requiredPermissions.length || grantCount > 0 &&
+                            menu.isAtLeastOnePermissionsRequired()) {
+                        filteredMenuDefs.add(menu);
+                    }
+
+                }
+            }
+            Menu[] filteredMenus = new Menu[filteredMenuDefs.size()];
+            request.getSession().setAttribute(MenuAdminClient.USER_MENU_ITEMS_FILTERED, "true");
+            return filteredMenuDefs.toArray(filteredMenus);
+
+        } else {
+            request.getSession().setAttribute(MenuAdminClient.USER_MENU_ITEMS_FILTERED, "false");
+            return currentMenuItems;
+        }
+    }
+
+
+    private HashMap<String, String> getGrantedPermissions(String userName,
+                                                          ArrayList<String> userPermissions) {
+        HashMap<String, String> userRoles = new HashMap<String, String>();
+        Iterator<String> iterator = userPermissions.iterator();
+        while (iterator.hasNext()) {
+            String permission = iterator.next();
+            if (log.isDebugEnabled()) {
+                log.debug("User : " + userName + " has permission : " + permission);
+            }
+            userRoles.put(permission, permission);
+        }
+        return userRoles;
+    }
+
+
+
+    public void addMenuItems(Menu[] newMenuDefinitions) {
+        for (Menu menu : newMenuDefinitions) {
+            menuDefinitions.add(menu);
+            if (log.isDebugEnabled()) {
+            log.debug("Adding new menu itesm : "+ menu);
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("Listing all menu items as of now...");
+            for (Menu menu : menuDefinitions) {
+                log.debug("--->" + menu);
+            }
+        }
+    }
+
+    /**
+     * @param menuDefinitionsToBeRemoved
+     */
+    public void removeMenuItems(Menu[] menuDefinitionsToBeRemoved) {
+       for(Menu menu : menuDefinitionsToBeRemoved){
+           removeMenuDefinition(menu.getId());
+       }
+    }
+
+    /**
+     * @return
+     */
+    public Servlet[] getServletDefinitions() {
+        return servletDefinitions.toArray(new Servlet[0]);
+    }
+
+
+
+
+    /**
+     * @param newServletDefinitions
+     */
+    public void addServletItems(Servlet[] newServletDefinitions) {
+
+        for (Servlet servlet : newServletDefinitions) {
+            this.servletDefinitions.add(servlet);
+            if(log.isDebugEnabled()){
+            log.debug("Added new servlet definition " + servlet);
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("Listing all Servlet items as of now...");
+            for (Servlet servlet : servletDefinitions ) {
+                log.debug("--->" + servlet);
+            }
+        }
+    }
+
+    public  void removeServletItems(Servlet[] servletDefinitionsToRemoved) {
+        for(Servlet servlet : servletDefinitionsToRemoved){
+            if(this.servletDefinitions.contains(servlet)) {
+                this.servletDefinitions.remove(servlet);
+            }
+            if(log.isDebugEnabled()){
+                log.debug("removing the servlet definition : " + servlet);
+
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("Listing all Servlet items as of now...");
+            for (Servlet servlet : servletDefinitions ) {
+                log.debug("--->" + servlet);
+            }
+        }
+
+    }
+}


[46/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Component.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Component.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Component.java
new file mode 100644
index 0000000..34b4b96
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Component.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui.deployment.beans;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class Component {
+    private List<Menu> menusList;
+    private List<Servlet> servletList;
+    private List<FileUploadExecutorConfig> fUploadExecConfigList;
+    private String name;
+    private String version;
+    //menu entries containing skip-authentication=false in component.xml
+    private List<String> unauthenticatedUrlList;
+    private List<String> skipTilesUrlList;
+    private List<String> skipHttpsUrlList;
+
+    private Map<String, String> customViewUIMap = new HashMap<String, String>();
+    private Map<String, String> customAddUIMap = new HashMap<String, String>();
+
+    private List<Context> contextsList;
+
+    public Component() {
+        this.menusList = new ArrayList<Menu>();
+        this.servletList = new ArrayList<Servlet>();
+        this.fUploadExecConfigList = new ArrayList<FileUploadExecutorConfig>();
+        this.unauthenticatedUrlList = new ArrayList<String>();
+        this.skipTilesUrlList = new ArrayList<String>();
+        this.skipHttpsUrlList = new ArrayList<String>();
+        this.contextsList = new ArrayList<Context>();
+    }
+
+    public List<Context> getContextsList() {
+        return contextsList;
+    }
+
+    public void addContext(Context context) {
+        this.contextsList.add(context);
+    }
+
+    public List<String> getSkipHttpsUrlList() {
+        return skipHttpsUrlList;
+    }
+
+    public void addSkipHttpsUrlList(String skipHttpUrl) {
+        skipHttpsUrlList.add(skipHttpUrl);
+    }
+
+    public List<String> getUnauthenticatedUrlList() {
+        return unauthenticatedUrlList;
+    }
+
+    public void addUnauthenticatedUrl(String unauthenticatedUrl) {
+        unauthenticatedUrlList.add(unauthenticatedUrl);
+    }
+
+    public List<String> getSkipTilesUrlList() {
+        return skipTilesUrlList;
+    }
+
+    public void addSkipTilesUrl(String skipTilesUrl) {
+        skipTilesUrlList.add(skipTilesUrl);
+    }
+
+    public void addMenu(Menu menu) {
+        menusList.add(menu);
+    }
+
+    public List<Menu> getMenusList() {
+        return menusList;
+    }
+
+    public void addServlet(Servlet servlet) {
+        servletList.add(servlet);
+    }
+
+    public List<Servlet> getServletList() {
+        return servletList;
+    }
+
+    public Servlet[] getServlets() {
+        if (servletList != null) {
+            Servlet[] servlets = new Servlet[servletList.size()];
+            servletList.toArray(servlets);
+            return servlets;
+        } else {
+            return null;
+        }
+    }
+
+    public Menu[] getMenus() {
+        if (menusList != null) {
+            Menu[] menus = new Menu[menusList.size()];
+            menusList.toArray(menus);
+            return menus;
+        } else {
+            return null;
+        }
+    }
+
+    public FileUploadExecutorConfig[] getFileUploadExecutorConfigs() {
+        FileUploadExecutorConfig[] fUploadExecConfigs = new FileUploadExecutorConfig[fUploadExecConfigList.size()];
+        fUploadExecConfigList.toArray(fUploadExecConfigs);
+        return fUploadExecConfigs;
+    }
+
+    public void addFileUploadExecutorConfig(FileUploadExecutorConfig fileUploadExecutorConfig) {
+        this.fUploadExecConfigList.add(fileUploadExecutorConfig);
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public Map<String, String> getCustomViewUIMap() {
+        return customViewUIMap;
+    }
+
+    public void addCustomViewUI(String mediaType, String uiPath) {
+        customViewUIMap.put(mediaType, uiPath);
+    }
+
+    public Map<String, String> getCustomAddUIMap() {
+        return customAddUIMap;
+    }
+
+    public void addCustomAddUI(String mediaType, String uiPath) {
+        customAddUIMap.put(mediaType, uiPath);
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Context.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Context.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Context.java
new file mode 100644
index 0000000..5fa32e3
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Context.java
@@ -0,0 +1,63 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui.deployment.beans;
+
+import java.io.Serializable;
+
+/**
+ * Represents a context in UI Framework
+ */
+public class Context implements Serializable {
+    private String contextId;
+    private String contextName;
+    private String protocol;
+    private String description;
+
+    public void setContextId(String contextId) {
+        this.contextId = contextId;
+    }
+
+    public void setContextName(String contextName) {
+        this.contextName = contextName;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+
+    public String getContextId() {
+        return contextId;
+    }
+
+    public String getContextName() {
+        return contextName;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public void setProtocol(String protocol) {
+        this.protocol = protocol;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/CustomUIDefenitions.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/CustomUIDefenitions.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/CustomUIDefenitions.java
new file mode 100644
index 0000000..d6f9305
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/CustomUIDefenitions.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2006, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.carbon.ui.deployment.beans;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Stores the custom UI defintions in the form of media type -> UI (jsp) path. Object of this class
+ * filled with currently available custom UI will be available in the servlet context.
+ */
+public class CustomUIDefenitions {
+
+    public static final String CUSTOM_UI_DEFENITIONS = "customUIDefinitions";
+
+    private Map <String, String> customViewUIMap = new HashMap <String, String> ();
+    private Map <String, String> customAddUIMap = new HashMap <String, String> ();
+
+    public String getCustomViewUI(String mediaType) {
+        return customViewUIMap.get(mediaType);
+    }
+
+    public void addCustomViewUI(String mediaType, String uiPath) {
+        customViewUIMap.put(mediaType, uiPath);
+    }
+
+    public String getCustomAddUI(String mediaType) {
+        return customAddUIMap.get(mediaType);
+    }
+
+    public void addCustomAddUI(String mediaType, String uiPath) {
+        customAddUIMap.put(mediaType, uiPath);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/FileUploadExecutorConfig.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/FileUploadExecutorConfig.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/FileUploadExecutorConfig.java
new file mode 100644
index 0000000..d106771
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/FileUploadExecutorConfig.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui.deployment.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FileUploadExecutorConfig {
+    private List<String> mappingActionList;
+    private String executorClass;
+
+    public FileUploadExecutorConfig(){
+        mappingActionList = new ArrayList<String>();
+    }
+
+    public String[] getMappingActionList() {
+        String[] mappingActions = new String[mappingActionList.size()];
+    	mappingActionList.toArray(mappingActions);
+    	return mappingActions;
+    }
+
+    public void addMappingAction(String action) {
+        this.mappingActionList.add(action);
+    }
+
+    public String getFUploadExecClass() {
+        return executorClass;
+    }
+
+    public void setFUploadExecClass(String executorClass) {
+        this.executorClass = executorClass;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Menu.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Menu.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Menu.java
new file mode 100644
index 0000000..e6df8a1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Menu.java
@@ -0,0 +1,247 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui.deployment.beans;
+
+import java.io.Serializable;
+import java.util.Arrays;
+
+/**
+ * Represents a Menu item in UI framework
+ */
+public class Menu implements Comparable<Menu>, Serializable {
+	private String id;
+	private String i18nKey;
+	private String i18nBundle;
+	private String parentMenu;
+	private String link;
+	private String region;
+	private String order;
+	private String icon;
+	private String styleClass;
+	//authentication required to display this menu item
+	private boolean requireAuthentication = true;
+	private String[] requirePermission = new String[]{"*"};
+    private boolean allPermissionsRequired = false;
+    private boolean atLeastOnePermissionsRequired = false;
+    private boolean requireSuperTenant = false;
+    private boolean requireNotSuperTenant = false;
+    private boolean requireCloudDeployment = false;
+
+    private boolean requireNotLoggedIn = false;
+	//eg: param1=Claims&action=add
+	//These parameters will be appended to link & will be available in
+	//generated menu link
+	private String urlParameters;
+	
+
+	/**
+	 * @deprecated
+	 */
+    private String name;
+    /**
+     * @deprecated
+     */
+    private int level;
+
+    public Menu(){   	
+    }
+    
+    public int getLevel() {
+        return level;
+    }
+
+    public int compareTo(Menu o) {
+        return o.getLevel() - level;
+    }
+
+    public boolean equals(Object ob){
+        if((ob != null) && (this.id != null) && (ob instanceof Menu)){
+            return (this.id.equals(((Menu)ob).id))? true : false;
+        }
+        return false;
+    }
+
+    public int hashCode(){
+        return this.id.hashCode();
+    }
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getI18nKey() {
+		return i18nKey;
+	}
+
+	public void setI18nKey(String key) {
+		i18nKey = key;
+	}
+
+	public String getI18nBundle() {
+		return i18nBundle;
+	}
+
+	public void setI18nBundle(String bundle) {
+		i18nBundle = bundle;
+	}
+
+	public String getParentMenu() {
+		return parentMenu;
+	}
+
+	public void setParentMenu(String parentMenu) {
+		this.parentMenu = parentMenu;
+	}
+
+	public String getLink() {
+		return link;
+	}
+
+	public void setLink(String link) {
+		this.link = link;
+	}
+
+	public String getRegion() {
+		return region;
+	}
+
+	public void setRegion(String region) {
+		this.region = region;
+	}
+
+	public String getOrder() {
+		return order;
+	}
+
+	public void setOrder(String order) {
+		this.order = order;
+	}
+
+	public String getIcon() {
+		return icon;
+	}
+
+	public void setIcon(String icon) {
+		this.icon = icon;
+	}	
+
+	public String getStyleClass() {
+		return styleClass;
+	}
+
+	public void setStyleClass(String styleClass) {
+		this.styleClass = styleClass;
+	}
+
+	
+	public boolean getRequireAuthentication() {
+		return requireAuthentication;
+	}
+
+	public void setRequireAuthentication(boolean requireAuthentication) {
+		this.requireAuthentication = requireAuthentication;
+	}	
+
+	public String[] getRequirePermission() {
+		return requirePermission;
+	}
+
+	public void setRequirePermission(String[] requirePermission) {
+		this.requirePermission = Arrays.copyOf(requirePermission, requirePermission.length);
+	}
+
+    public boolean isAllPermissionsRequired() {
+        return allPermissionsRequired;
+    }
+
+    public void setAllPermissionsRequired(boolean allPermissionsRequired) {
+        this.allPermissionsRequired = allPermissionsRequired;
+    }
+
+    public boolean isAtLeastOnePermissionsRequired() {
+        return atLeastOnePermissionsRequired && !isAllPermissionsRequired();
+    }
+
+    public void setAtLeastOnePermissionsRequired(boolean atLeastOnePermissionsRequired) {
+        this.atLeastOnePermissionsRequired = atLeastOnePermissionsRequired;
+    }
+
+    /**
+	 * eg: param1=Claims&action=add
+	 * These parameters will be appended to link & will be available in
+	 * generated menu link
+	 * @return String
+	 */
+	public String getUrlParameters() {
+		return urlParameters;
+	}
+
+	public void setUrlParameters(String urlParameters) {
+		this.urlParameters = urlParameters;
+	}
+
+	public String toString() {
+		return id+" : "
+		+i18nKey+" : "
+		+i18nBundle+" : "
+		+parentMenu+" : "
+		+link+" : "
+		+region+" : "
+		+order+" : "
+		+icon+" : "
+		+styleClass+" : "
+		+requireAuthentication+" : "
+		+urlParameters;
+	}
+
+    public boolean isRequireSuperTenant() {
+        return requireSuperTenant;
+    }
+
+    public void setRequireSuperTenant(boolean requireSuperTenant) {
+        this.requireSuperTenant = requireSuperTenant;
+    }
+
+    public void setRequireNotSuperTenant(boolean requireNotSuperTenant) {
+        this.requireNotSuperTenant = requireNotSuperTenant;
+    }
+
+    public boolean isRequireNotSuperTenant() {
+        return requireNotSuperTenant;
+    }
+
+    public boolean isRequireNotLoggedIn() {
+        return requireNotLoggedIn;
+    }
+
+    public void setRequireNotLoggedIn(boolean requireNotLoggedIn) {
+        this.requireNotLoggedIn = requireNotLoggedIn;
+    }
+
+    public boolean isRequireCloudDeployment() {
+        return requireCloudDeployment;
+    }
+
+    public void setRequireCloudDeployment(boolean requireCloudDeployment) {
+        this.requireCloudDeployment = requireCloudDeployment;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Servlet.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Servlet.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Servlet.java
new file mode 100644
index 0000000..1304864
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/beans/Servlet.java
@@ -0,0 +1,71 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui.deployment.beans;
+
+public class Servlet {
+	private String id;
+	private String name;
+	private String displayName;
+	private String servletClass;
+	private String urlPatten;
+	
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getDisplayName() {
+		return displayName;
+	}
+	public void setDisplayName(String displayName) {
+		this.displayName = displayName;
+	}
+	public String getServletClass() {
+		return servletClass;
+	}
+	public void setServletClass(String servletClass) {
+		this.servletClass = servletClass;
+	}
+	
+	public String getUrlPatten() {
+		return urlPatten;
+	}
+	public void setUrlPatten(String urlPatten) {
+		this.urlPatten = urlPatten;
+	}
+	public String toString(){
+		return "ServletDefinition = "+id+" : "+name+" : "+displayName+" : "+servletClass+" : "+urlPatten;
+	}
+    public boolean equals(Object ob){
+        if((ob !=null) && (this.id != null) && (ob instanceof Servlet)){
+           return (this.id.equals(((Servlet)ob).id))? true : false;
+        }
+        return false;
+    }
+    public int hashCode(){
+        return this.id.hashCode();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/internal/CarbonUIServiceComponent.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/internal/CarbonUIServiceComponent.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/internal/CarbonUIServiceComponent.java
new file mode 100644
index 0000000..9b9983f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/internal/CarbonUIServiceComponent.java
@@ -0,0 +1,548 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui.internal;
+
+import static org.wso2.carbon.CarbonConstants.PRODUCT_XML;
+import static org.wso2.carbon.CarbonConstants.PRODUCT_XML_PROPERTIES;
+import static org.wso2.carbon.CarbonConstants.PRODUCT_XML_PROPERTY;
+import static org.wso2.carbon.CarbonConstants.PRODUCT_XML_WSO2CARBON;
+import static org.wso2.carbon.CarbonConstants.WSO2CARBON_NS;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.ContentHandler;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletContext;
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.eclipse.equinox.http.helper.ContextPathServletAdaptor;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.http.HttpContext;
+import org.osgi.service.http.HttpService;
+import org.osgi.service.packageadmin.PackageAdmin;
+import org.osgi.service.url.URLConstants;
+import org.osgi.service.url.URLStreamHandlerService;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.base.api.ServerConfigurationService;
+import org.wso2.carbon.registry.core.Registry;
+import org.wso2.carbon.registry.core.service.RegistryService;
+import org.wso2.carbon.ui.BasicAuthUIAuthenticator;
+import org.wso2.carbon.ui.CarbonProtocol;
+import org.wso2.carbon.ui.CarbonSSOSessionManager;
+import org.wso2.carbon.ui.CarbonSecuredHttpContext;
+import org.wso2.carbon.ui.CarbonUIAuthenticator;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.ui.DefaultCarbonAuthenticator;
+import org.wso2.carbon.ui.TextJavascriptHandler;
+import org.wso2.carbon.ui.TilesJspServlet;
+import org.wso2.carbon.ui.UIAuthenticationExtender;
+import org.wso2.carbon.ui.UIResourceRegistry;
+import org.wso2.carbon.ui.deployment.UIBundleDeployer;
+import org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions;
+import org.wso2.carbon.ui.deployment.beans.Context;
+import org.wso2.carbon.ui.deployment.beans.CustomUIDefenitions;
+import org.wso2.carbon.ui.tracker.AuthenticatorRegistry;
+import org.wso2.carbon.ui.transports.FileDownloadServlet;
+import org.wso2.carbon.ui.transports.FileUploadServlet;
+import org.wso2.carbon.ui.util.UIAnnouncementDeployer;
+import org.wso2.carbon.user.core.service.RealmService;
+import org.wso2.carbon.utils.ConfigurationContextService;
+
+/**
+ * @scr.component name="core.ui.dscomponent" immediate="true"
+ * @scr.reference name="registry.service" interface="org.wso2.carbon.registry.core.service.RegistryService"
+ * cardinality="1..1" policy="dynamic"  bind="setRegistryService" unbind="unsetRegistryService"
+ * @scr.reference name="config.context.service" interface="org.wso2.carbon.utils.ConfigurationContextService"
+ * cardinality="1..1" policy="dynamic"  bind="setConfigurationContextService" unbind="unsetConfigurationContextService"
+ * @scr.reference name="server.configuration" interface="org.wso2.carbon.base.api.ServerConfigurationService"
+ * cardinality="1..1" policy="dynamic" bind="setServerConfigurationService" unbind="unsetServerConfigurationService"
+ * @scr.reference name="package.admin" interface="org.osgi.service.packageadmin.PackageAdmin"
+ * cardinality="1..1" policy="dynamic" bind="setPackageAdmin" unbind="unsetPackageAdmin"
+ * @scr.reference name="http.service" interface="org.osgi.service.http.HttpService"
+ * cardinality="1..1" policy="dynamic"  bind="setHttpService" unbind="unsetHttpService"
+ * @scr.reference name="user.realmservice.default" interface="org.wso2.carbon.user.core.service.RealmService"
+ * cardinality="1..1" policy="dynamic" bind="setRealmService"  unbind="unsetRealmService"
+ * @scr.reference name="ui.authentication.extender" interface="org.wso2.carbon.ui.UIAuthenticationExtender"
+ * cardinality="0..1" policy="dynamic" bind="setUIAuthenticationExtender"  unbind="unsetUIAuthenticationExtender"
+ */
+public class CarbonUIServiceComponent {
+
+    private static Log log = LogFactory.getLog(CarbonUIServiceComponent.class);
+
+    private static PackageAdmin packageAdminInstance;
+    private static RegistryService registryServiceInstance;
+    private static HttpService httpServiceInstance;
+    private static ConfigurationContextService ccServiceInstance;
+    private static ServerConfigurationService serverConfiguration;
+    private static RealmService realmService;
+    private static List<UIAuthenticationExtender> authenticationExtenders =
+            new LinkedList<UIAuthenticationExtender>();
+
+    private BundleContext bundleContext;
+
+    private Servlet adaptedJspServlet;
+
+    protected void activate(ComponentContext ctxt) {
+        try {
+            start(ctxt.getBundleContext());
+            String adminConsoleURL =
+                    CarbonUIUtil.getAdminConsoleURL(serverConfiguration.getFirstProperty("WebContextRoot"));
+
+            //Retrieving available contexts
+            Context defaultContext = null;
+            Context defaultAdditionalContext = null;
+            ServiceReference reference = ctxt.getBundleContext().getServiceReference(CarbonUIDefinitions.class.getName());
+            CarbonUIDefinitions carbonUIDefinitions = null;
+            if (reference != null) {
+                carbonUIDefinitions =
+                        (CarbonUIDefinitions) ctxt.getBundleContext().getService(reference);
+                if (carbonUIDefinitions != null) {
+                    if (carbonUIDefinitions.getContexts().containsKey("default-context")) {
+                        defaultContext = carbonUIDefinitions.getContexts().get("default-context");
+                    }if (carbonUIDefinitions.getContexts().containsKey("default-additional-context")) {
+                        defaultAdditionalContext = carbonUIDefinitions.getContexts().get("default-additional-context");
+                    }
+
+                }
+            }
+
+            if (adminConsoleURL != null) {
+                log.info("Mgt Console URL  : " + adminConsoleURL);
+            }
+            if (defaultContext != null && !"".equals(defaultContext.getContextName()) && !"null".equals(defaultContext.getContextName())) {
+                // Adding the other context url
+                int index = adminConsoleURL.lastIndexOf("carbon");
+                String defContextUrl = adminConsoleURL.substring(0, index) + defaultContext.getContextName();
+                if (defaultContext.getDescription() != null) {
+                    if (defaultContext.getProtocol() != null && "http".equals(defaultContext.getProtocol())) {
+                        log.info(defaultContext.getDescription() + " : " + CarbonUIUtil.https2httpURL(defContextUrl));
+                    } else {
+                        log.info(defaultContext.getDescription() + " : " + defContextUrl);
+                    }
+                } else {
+                    log.info("Default Context : " + defContextUrl);
+                }
+            } if (defaultAdditionalContext != null && !"".equals(defaultAdditionalContext.getContextName()) && !"null".equals(defaultAdditionalContext.getContextName())) {
+                // Adding the other context url
+                int index = adminConsoleURL.lastIndexOf("carbon");
+                String defContextUrl = adminConsoleURL.substring(0, index) + defaultAdditionalContext.getContextName();
+                if (defaultAdditionalContext.getDescription() != null) {
+                    if (defaultAdditionalContext.getProtocol() != null && "http".equals(defaultAdditionalContext.getProtocol())) {
+                        log.info(defaultAdditionalContext.getDescription() + " : " + CarbonUIUtil.https2httpURL(defContextUrl));
+                    } else {
+                        log.info(defaultAdditionalContext.getDescription() + " : " + defContextUrl);
+                    }
+                } else {
+                    log.info("Default Context : " + defContextUrl);
+                }
+            }
+            DefaultCarbonAuthenticator authenticator = new DefaultCarbonAuthenticator();
+            Hashtable<String, String> props = new Hashtable<String, String>();
+            props.put(AuthenticatorRegistry.AUTHENTICATOR_TYPE, authenticator.getAuthenticatorName());
+            ctxt.getBundleContext().registerService(CarbonUIAuthenticator.class.getName(), authenticator, props);
+            
+            BasicAuthUIAuthenticator basicAuth = new BasicAuthUIAuthenticator();
+            props = new Hashtable<String, String>();
+            props.put(AuthenticatorRegistry.AUTHENTICATOR_TYPE, authenticator.getAuthenticatorName());
+            ctxt.getBundleContext().registerService(CarbonUIAuthenticator.class.getName(), basicAuth, props);
+
+            AuthenticatorRegistry.init(ctxt.getBundleContext());
+
+            // register a SSOSessionManager instance as an OSGi Service.
+            ctxt.getBundleContext().registerService(CarbonSSOSessionManager.class.getName(),
+                                                     CarbonSSOSessionManager.getInstance(), null);
+            log.debug("Carbon UI bundle is activated ");
+        } catch (Throwable e) {
+            log.error("Failed to activate Carbon UI bundle ", e);
+        }
+    }
+
+    protected void deactivate(ComponentContext ctxt) {
+        log.debug("Carbon UI bundle is deactivated ");
+    }
+
+    public void start(BundleContext context) throws Exception {
+        this.bundleContext = context;
+
+        ServerConfigurationService serverConfig = getServerConfiguration();
+
+        boolean isLocalTransportMode = checkForLocalTransportMode(serverConfig);
+        //TODO set a system property
+
+        ConfigurationContext clientConfigContext = getConfigurationContextService().getClientConfigContext();
+        //This is applicable only when the FE and BE runs in the same JVM.
+        ConfigurationContext serverConfigContext = getConfigurationContextService().getServerConfigContext();
+
+        CarbonUIDefinitions carbonUIDefinitions = new CarbonUIDefinitions();
+        context.registerService(CarbonUIDefinitions.class.getName(), carbonUIDefinitions, null);
+
+        // create a CustomUIDefinitions object and set it as a osgi service. UIBundleDeployer can access this
+        // service and populate it with custom UI definitions of the deployed UI bundle, if available.
+        CustomUIDefenitions customUIDefenitions = new CustomUIDefenitions();
+        context.registerService(CustomUIDefenitions.class.getName(), customUIDefenitions, null);
+
+        Hashtable<String, String[]> properties1 = new Hashtable<String, String[]>();
+        properties1.put(URLConstants.URL_HANDLER_PROTOCOL, new String[]{"carbon"});
+        context.registerService(URLStreamHandlerService.class.getName(),
+                                new CarbonProtocol(context), properties1);
+
+        Hashtable<String, String[]> properties3 = new Hashtable<String, String[]>();
+        properties3.put(URLConstants.URL_CONTENT_MIMETYPE, new String[]{"text/javascript"});
+        context.registerService(ContentHandler.class.getName(), new TextJavascriptHandler(),
+                                properties3);
+
+        final HttpService httpService = getHttpService();
+
+        Dictionary<String, String> initparams = new Hashtable<String, String>();
+        initparams.put("servlet-name", "TilesServlet");
+        initparams.put("definitions-config", "/WEB-INF/tiles/main_defs.xml");
+        initparams.put("org.apache.tiles.context.TilesContextFactory",
+                       "org.apache.tiles.context.enhanced.EnhancedContextFactory");
+        initparams.put("org.apache.tiles.factory.TilesContainerFactory.MUTABLE", "true");
+        initparams.put("org.apache.tiles.definition.DefinitionsFactory",
+                       "org.wso2.carbon.tiles.CarbonUrlDefinitionsFactory");
+
+        String webContext = "carbon"; // The subcontext for the Carbon Mgt Console
+
+        String serverURL = CarbonUIUtil.getServerURL(serverConfig);
+        String indexPageURL = CarbonUIUtil.getIndexPageURL(serverConfig);
+        if (indexPageURL == null) {
+            indexPageURL = "/carbon/admin/index.jsp";
+        }
+        RegistryService registryService = getRegistryService();
+        Registry registry = registryService.getLocalRepository();
+
+        UIBundleDeployer uiBundleDeployer = new UIBundleDeployer();
+        UIResourceRegistry uiResourceRegistry = new UIResourceRegistry();
+        uiResourceRegistry.initialize(bundleContext);
+        uiResourceRegistry.setDefaultUIResourceProvider(
+                uiBundleDeployer.getBundleBasedUIResourcePrvider());
+//        BundleResourcePathRegistry resourcePathRegistry = uiBundleDeployer.getBundleResourcePathRegistry();
+
+        HttpContext commonContext =
+                new CarbonSecuredHttpContext(context.getBundle(), "/web", uiResourceRegistry, registry);
+
+        //Registering filedownload servlet
+        Servlet fileDownloadServlet = new ContextPathServletAdaptor(new FileDownloadServlet(
+                context, getConfigurationContextService()), "/filedownload");
+        httpService.registerServlet("/filedownload", fileDownloadServlet, null, commonContext);
+        fileDownloadServlet.getServletConfig().getServletContext().setAttribute(
+                CarbonConstants.SERVER_URL, serverURL);
+        fileDownloadServlet.getServletConfig().getServletContext().setAttribute(
+                CarbonConstants.INDEX_PAGE_URL, indexPageURL);
+
+        //Registering fileupload servlet
+        Servlet fileUploadServlet;
+        if (isLocalTransportMode) {
+            fileUploadServlet = new ContextPathServletAdaptor(new FileUploadServlet(
+                    context, serverConfigContext, webContext), "/fileupload");
+        } else {
+            fileUploadServlet = new ContextPathServletAdaptor(new FileUploadServlet(
+                    context, clientConfigContext, webContext), "/fileupload");
+        }
+
+        httpService.registerServlet("/fileupload", fileUploadServlet, null, commonContext);
+        fileUploadServlet.getServletConfig().getServletContext().setAttribute(
+                CarbonConstants.SERVER_URL, serverURL);
+        fileUploadServlet.getServletConfig().getServletContext().setAttribute(
+                CarbonConstants.INDEX_PAGE_URL, indexPageURL);
+
+        uiBundleDeployer.deploy(bundleContext, commonContext);
+        context.addBundleListener(uiBundleDeployer);
+
+        httpService.registerServlet("/", new org.apache.tiles.web.startup.TilesServlet(),
+                                    initparams,
+                                    commonContext);
+        httpService.registerResources("/" + webContext, "/", commonContext);
+
+        adaptedJspServlet = new ContextPathServletAdaptor(
+                new TilesJspServlet(context.getBundle(), uiResourceRegistry), "/" + webContext);
+        httpService.registerServlet("/" + webContext + "/*.jsp", adaptedJspServlet, null,
+                                    commonContext);
+
+        ServletContext jspServletContext =
+                adaptedJspServlet.getServletConfig().getServletContext();
+        jspServletContext.setAttribute("registry", registryService);
+
+        jspServletContext.setAttribute(CarbonConstants.SERVER_CONFIGURATION, serverConfig);
+        jspServletContext.setAttribute(CarbonConstants.CLIENT_CONFIGURATION_CONTEXT, clientConfigContext);
+        //If the UI is running on local transport mode, then we use the server-side config context.
+        if(isLocalTransportMode) {
+            jspServletContext.setAttribute(CarbonConstants.CONFIGURATION_CONTEXT, serverConfigContext);
+        } else {
+            jspServletContext.setAttribute(CarbonConstants.CONFIGURATION_CONTEXT, clientConfigContext);
+        }
+
+        jspServletContext.setAttribute(CarbonConstants.BUNDLE_CLASS_LOADER,
+                                       this.getClass().getClassLoader());
+        jspServletContext.setAttribute(CarbonConstants.SERVER_URL, serverURL);
+        jspServletContext.setAttribute(CarbonConstants.INDEX_PAGE_URL, indexPageURL);
+        jspServletContext.setAttribute(CarbonConstants.UI_BUNDLE_CONTEXT, bundleContext);
+
+        // set the CustomUIDefinitions object as an attribute of servlet context, so that the Registry UI bundle
+        // can access the custom UI details within JSPs.
+        jspServletContext
+                .setAttribute(CustomUIDefenitions.CUSTOM_UI_DEFENITIONS, customUIDefenitions);
+
+        // Registering jspServletContext as a service so that UI components can use it
+        bundleContext.registerService(ServletContext.class.getName(), jspServletContext, null);
+
+        //saving bundle context for future reference within CarbonUI Generation
+        CarbonUIUtil.setBundleContext(context);
+        UIAnnouncementDeployer.deployNotificationSources();
+
+        if (log.isDebugEnabled()) {
+            log.debug("Starting web console using context : " + webContext);
+        }
+
+        //read product.xml
+        readProductXML(jspServletContext, uiBundleDeployer);
+    }
+
+    /**
+     * reads product.xml contained within styles bundle of a product.
+     * product.xml contains properties like userforum, mailing list,etc.. which are
+     * specific to the product.
+     *
+     * @param jspServletContext
+     * @throws IOException
+     * @throws XMLStreamException
+     * @throws FactoryConfigurationError
+     */
+    private void readProductXML(ServletContext jspServletContext, UIBundleDeployer uiBundleDeployer)
+            throws IOException, XMLStreamException {
+        Enumeration<URL> e = bundleContext.getBundle().findEntries("META-INF", PRODUCT_XML, true);
+        // it is possible to make the styles bundle a UIBundle. But in that case we have to get the
+        // product.xml file using BundleBasedUIResourceFinder. However product.xml file is not a UI
+        // resource. rather it is  a config file. Hence I'm making this a fragment bundle.
+        // actually styles bundle should be a fragment of carbon UI. -- Pradeep
+        /*Bundle stylesBundle = ((BundleBasedUIResourceProvider) uiBundleDeployer.getBundleBasedUIResourcePrvider()).getBundle(CarbonConstants.PRODUCT_STYLES_CONTEXT);
+        if (stylesBundle != null) {
+            e = stylesBundle.findEntries("META-INF", PRODUCT_XML, true);
+        }*/
+        if (e != null) {
+            URL url = (URL) e.nextElement();
+            InputStream inputStream = url.openStream();
+            XMLStreamReader streamReader =
+                    XMLInputFactory.newInstance().createXMLStreamReader(inputStream);
+            StAXOMBuilder builder = new StAXOMBuilder(streamReader);
+            OMElement document = builder.getDocumentElement();
+            OMElement propsEle =
+                    document.getFirstChildWithName(
+                            new QName(WSO2CARBON_NS, PRODUCT_XML_PROPERTIES));
+            if (propsEle != null) {
+                Iterator<OMElement> properties = propsEle.getChildrenWithName(
+                        new QName(WSO2CARBON_NS, PRODUCT_XML_PROPERTY));
+                while (properties.hasNext()) {
+                    OMElement property = properties.next();
+                    String propertyName = property.getAttributeValue(new QName("name"));
+                    String value = property.getText();
+                    if (log.isDebugEnabled()) {
+                        log.debug(PRODUCT_XML + ": " + propertyName + "=" + value);
+                    }
+                    //process collapsed menus in a different manner than other properties
+                    if ("collapsedmenus".equals(propertyName)) {
+                        ArrayList<String> collapsedMenuItems = new ArrayList<String>();
+                        if (value != null && value.indexOf(',') > -1) {
+                            //multiple menu items provided.Tokenize & add iteratively
+                            StringTokenizer st = new StringTokenizer(value, ",");
+                            while (st.hasMoreTokens()) {
+                                collapsedMenuItems.add(st.nextToken());
+                            }
+                        } else {
+                            //single menu item specified.add this
+                            collapsedMenuItems.add(value);
+                        }
+                        jspServletContext.setAttribute(PRODUCT_XML_WSO2CARBON + propertyName, collapsedMenuItems);
+
+                        /*
+                        Sometimes the values loaded to the jspServletContext is not available.
+                        i.e. when the request is sent to /carbon
+                        it works only if teh request takes the patern such as /carbon/admin/index.jsp
+                        in the case of /carbon the params are read from utils hashmap which is saved at this point.
+                         */
+                        CarbonUIUtil.setProductParam(PRODUCT_XML_WSO2CARBON + propertyName, collapsedMenuItems);
+                    } else {
+                        jspServletContext.setAttribute(PRODUCT_XML_WSO2CARBON + propertyName, value);
+                        CarbonUIUtil.setProductParam(PRODUCT_XML_WSO2CARBON + propertyName, value);
+                    }
+                }
+            }
+        }
+    }
+
+    public static synchronized Bundle getBundle(Class clazz) {
+        if (packageAdminInstance == null) {
+            throw new IllegalStateException("Not started");
+        } //$NON-NLS-1$
+        return packageAdminInstance.getBundle(clazz);
+    }
+
+    protected void setConfigurationContextService(ConfigurationContextService contextService) {
+        ccServiceInstance = contextService;
+    }
+
+    protected void unsetConfigurationContextService(ConfigurationContextService contextService) {
+        ccServiceInstance = null;
+    }
+
+    protected void setRegistryService(RegistryService registryService) {
+        registryServiceInstance = registryService;
+    }
+
+    protected void unsetRegistryService(RegistryService registryService) {
+        registryServiceInstance = null;
+    }
+
+    protected void setServerConfigurationService(ServerConfigurationService serverConfiguration) {
+        CarbonUIServiceComponent.serverConfiguration = serverConfiguration;
+    }
+
+    protected void unsetServerConfigurationService(ServerConfigurationService serverConfiguration) {
+        CarbonUIServiceComponent.serverConfiguration = null;
+    }
+
+    protected void setPackageAdmin(PackageAdmin packageAdmin) {
+        packageAdminInstance = packageAdmin;
+    }
+
+    protected void unsetPackageAdmin(PackageAdmin packageAdmin) {
+        packageAdminInstance = null;
+    }
+
+    protected void setHttpService(HttpService httpService) {
+        httpServiceInstance = httpService;
+    }
+
+    protected void unsetHttpService(HttpService httpService) {
+        httpServiceInstance = null;
+    }
+
+    protected void setRealmService(RealmService realmService) {
+        CarbonUIServiceComponent.realmService = realmService;
+    }
+
+    protected void unsetRealmService(RealmService realmService) {
+        CarbonUIServiceComponent.realmService = null;
+    }
+
+    public static RealmService getRealmService() {
+        return realmService;
+    }
+
+    protected void setUIAuthenticationExtender(UIAuthenticationExtender authenticationExtender) {
+        CarbonUIServiceComponent.authenticationExtenders.add(authenticationExtender);
+    }
+
+    protected void unsetUIAuthenticationExtender(UIAuthenticationExtender authenticationExtender) {
+        CarbonUIServiceComponent.authenticationExtenders.remove(authenticationExtender);
+    }
+
+    public static UIAuthenticationExtender[] getUIAuthenticationExtenders() {
+        return authenticationExtenders.toArray(
+                new UIAuthenticationExtender[authenticationExtenders.size()]);
+    }
+
+    public static HttpService getHttpService() {
+        if (httpServiceInstance == null) {
+            String msg = "Before activating Carbon UI bundle, an instance of "
+                         + HttpService.class.getName() + " should be in existence";
+            log.error(msg);
+            throw new RuntimeException(msg);
+        }
+        return httpServiceInstance;
+    }
+
+    public static ConfigurationContextService getConfigurationContextService() {
+        if (ccServiceInstance == null) {
+            String msg = "Before activating Carbon UI bundle, an instance of "
+                         + "UserRealm service should be in existence";
+            log.error(msg);
+            throw new RuntimeException(msg);
+        }
+        return ccServiceInstance;
+    }
+
+    public static RegistryService getRegistryService() {
+        if (registryServiceInstance == null) {
+            String msg = "Before activating Carbon UI bundle, an instance of "
+                         + "RegistryService should be in existence";
+            log.error(msg);
+            throw new RuntimeException(msg);
+        }
+        return registryServiceInstance;
+    }
+
+    public static ServerConfigurationService getServerConfiguration() {
+        if (serverConfiguration == null) {
+            String msg = "Before activating Carbon UI bundle, an instance of "
+                         + "ServerConfiguration Service should be in existence";
+            log.error(msg);
+            throw new RuntimeException(msg);
+        }
+        return serverConfiguration;
+    }
+
+    public static PackageAdmin getPackageAdmin() throws Exception {
+        if (packageAdminInstance == null) {
+            String msg = "Before activating Carbon UI bundle, an instance of "
+                         + "PackageAdmin Service should be in existance";
+            log.error(msg);
+            throw new Exception(msg);
+        }
+        return packageAdminInstance;
+    }
+
+    /**
+     * This method checks whether the management console is configured to run on the local transport.
+     * Check the ServerURL property in the carbon.xml.
+     * Set a system property if and only if the system is running on local transport.
+     * 
+     * @param serverConfiguration Service configuration.
+     * @return boolean; true if running on local transport
+     */
+    private boolean checkForLocalTransportMode(ServerConfigurationService serverConfiguration) {
+        String serverURL = serverConfiguration.getFirstProperty(CarbonConstants.SERVER_URL);
+        if(serverURL != null && (serverURL.startsWith("local") ||
+                serverURL.startsWith("Local") || serverURL.startsWith("LOCAL"))) {
+            System.setProperty(CarbonConstants.LOCAL_TRANSPORT_MODE_ENABLED, "true");
+            return true;
+        }
+        return false;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/Breadcrumb.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/Breadcrumb.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/Breadcrumb.java
new file mode 100644
index 0000000..27df5cb
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/Breadcrumb.java
@@ -0,0 +1,278 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui.taglibs;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.ui.BreadCrumbGenerator;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.ui.deployment.beans.BreadCrumbItem;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.BodyTagSupport;
+import java.io.IOException;
+import java.text.CharacterIterator;
+import java.text.StringCharacterIterator;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+
+public class Breadcrumb extends BodyTagSupport {
+	private static final long serialVersionUID = 3086447243740241245L;
+	private static final Log log = LogFactory.getLog(Breadcrumb.class);
+	private String label;
+	private String resourceBundle;
+	private boolean topPage;
+	private HttpServletRequest request;
+	private boolean hidden = false;
+	private String disableBreadCrumbsProperty="org.wso2.carbon.ui.disableBreadCrumbs";
+	
+	public String getLabel() {
+		return label;
+	}
+
+	public void setLabel(String label) {
+		this.label = label;
+	}
+
+	public String getResourceBundle() {
+		return resourceBundle;
+	}
+
+	public void setResourceBundle(String resourceBundle) {
+		this.resourceBundle = resourceBundle;
+	}
+
+	public boolean isTopPage() {
+		return topPage;
+	}
+
+	public void setTopPage(boolean topPage) {
+		this.topPage = topPage;
+	}
+
+	public HttpServletRequest getRequest() {
+		return request;
+	}
+
+	public void setRequest(HttpServletRequest request) {
+		this.request = request;
+	}
+    
+	public boolean getHidden() {
+		return hidden;
+	}
+
+	public void setHidden(boolean hidden) {
+		this.hidden = hidden;
+	}
+
+	/**
+	 * JSP end tag for breadcrumb tag
+	 */
+	public int doEndTag() throws JspException {
+	    String disableBreadCrumbs=System.getProperty(disableBreadCrumbsProperty);
+	    boolean isBreadCrumbDisabled = (disableBreadCrumbs==null) ? false : disableBreadCrumbs.equalsIgnoreCase("true");
+		String breadcrumbConent = "";
+		String cookieContent = "";
+		JspWriter writer = pageContext.getOut();
+	    if (isBreadCrumbDisabled){
+            try {
+			    writer.write("");
+		    } catch (IOException e) {
+		    	//do nothing
+		    }
+	        return 0;
+        }
+        
+		StringBuffer content = new StringBuffer();
+		
+
+		if (request != null) {
+			String retainLastBreadcrumbStr = request.getParameter("retainlastbc");
+			if(log.isDebugEnabled()){
+				log.debug("BreadcrumbTag : " + request.getPathTranslated());				
+			}
+
+            String path = (String) request.getAttribute("javax.servlet.include.request_uri");
+
+			// now path contains value similar to following. eg: path =
+			// /carbon/userstore/index.jsp
+			// Find last occurance of "carbon". This is the starting of web app context.
+			int carbonLocation = path.lastIndexOf("carbon");
+			String jspFilePath = path.substring(carbonLocation, path.length());			
+			// now, jspFilePath = carbon/service-mgt/list_service_main.jsp
+			// now, replace 'carbon' and you get path to real file name
+			jspFilePath = jspFilePath.replaceFirst("carbon", "..");
+			
+			//Find subcontext before jsp file
+			int lastIndexofSlash = jspFilePath.lastIndexOf('/');
+			String subContextToJSP = jspFilePath.substring(0,lastIndexofSlash);
+
+			//Find jsp file name
+			String jspFileName = jspFilePath.substring(lastIndexofSlash+1, jspFilePath.length());
+			//save query string for current url
+			String queryString = request.getQueryString();
+			
+			//creating a new breadcrumb item for page request
+			BreadCrumbItem breadCrumbItem = new BreadCrumbItem();			
+			//creating breadcrumb id using jsp file path
+			//This is guaranteed to be unique for a subcontext (eg: /modulemgt,/service-listing)
+			breadCrumbItem.setId(jspFileName);
+			
+            Locale locale = CarbonUIUtil.getLocaleFromSession(request);
+            String text = CarbonUIUtil.geti18nString(label, resourceBundle, locale);
+			breadCrumbItem.setConvertedText(text);	
+			
+			//if request contains parameter 'toppage', override the value of this.topPage with
+			//the value set in request.
+			//This is useful when same page is being used @ different levels. 
+			//eg: wsdl2code/index.jsp
+			//This page is being called from Tools -> WSDL2Code & Service Details -> Generate Client
+			String topPageParameter = request.getParameter("toppage");
+			if(topPageParameter != null){
+				boolean topPageParamValue = Boolean.valueOf(topPageParameter).booleanValue();
+				if(log.isDebugEnabled()){
+					log.debug("toppage value set from request parameter.("+topPageParamValue+").");
+				}
+				this.topPage = topPageParamValue;
+			}
+
+			if(! topPage){
+				// need to add this url as a breadcrumb
+				HashMap<String,List<BreadCrumbItem>> links = (HashMap<String,List<BreadCrumbItem>>) request
+						.getSession().getAttribute("page-breadcrumbs");
+				
+				String partUrl = "";
+				if(queryString != null){
+					partUrl = jspFilePath + "?" + queryString ;
+				}else{
+					partUrl = jspFilePath;
+				}
+				
+				if (links != null) {
+					//check if a breadcrumb exists for given sub context
+					List<BreadCrumbItem> breadcrumbsForSubContext = links.get(subContextToJSP);
+					int size = 0;
+					if(breadcrumbsForSubContext != null){
+						int sizeOfSubContextBreadcrumbs = breadcrumbsForSubContext.size();
+						//removing to stop this array getting grown with duplicates
+						ArrayList idsToRemove = new ArrayList();						
+						for(int a = 0;a < sizeOfSubContextBreadcrumbs;a++){
+							if(breadcrumbsForSubContext.get(a).getId().equals(jspFileName)){
+								idsToRemove.add(a);
+							}
+						}
+						if(idsToRemove.size() > 0){
+                            for (Object anIdsToRemove : idsToRemove) {
+                                Integer i = (Integer) anIdsToRemove;
+                                breadcrumbsForSubContext.remove(i.intValue());
+                            }
+						}
+						
+						size = breadcrumbsForSubContext.size();
+						breadCrumbItem.setOrder(size + 1);
+						breadCrumbItem.setLink(partUrl);
+						breadcrumbsForSubContext.add(breadCrumbItem);
+						links.put(subContextToJSP,breadcrumbsForSubContext);					
+						request.getSession().setAttribute("page-breadcrumbs", links);				
+					}else{
+						breadcrumbsForSubContext = new ArrayList<BreadCrumbItem>();
+						breadCrumbItem.setOrder(size + 1);
+						breadCrumbItem.setLink(partUrl);
+						breadcrumbsForSubContext.add(breadCrumbItem);
+						links.put(subContextToJSP,breadcrumbsForSubContext);					
+						request.getSession().setAttribute("page-breadcrumbs", links);			
+					}
+				} else {
+					HashMap<String,List<BreadCrumbItem>> tmp = new HashMap<String,List<BreadCrumbItem>>();
+					// Going inside for the first time
+					breadCrumbItem.setOrder(1);
+					breadCrumbItem.setLink(partUrl);
+					List<BreadCrumbItem> list = new ArrayList<BreadCrumbItem>();
+					list.add(breadCrumbItem);
+					tmp.put(subContextToJSP,list);
+					request.getSession().setAttribute("page-breadcrumbs", tmp);
+				}				
+			}
+			boolean retainLastBreadcrumb = false;
+			if(retainLastBreadcrumbStr != null){
+				retainLastBreadcrumb = Boolean.parseBoolean(retainLastBreadcrumbStr);
+			}
+			
+			BreadCrumbGenerator breadCrumbGenerator = new BreadCrumbGenerator();			
+			HashMap<String,String> generatedContent = breadCrumbGenerator.getBreadCrumbContent(
+					request, breadCrumbItem,jspFilePath,topPage,retainLastBreadcrumb);
+			breadcrumbConent = generatedContent.get("html-content");
+			cookieContent = generatedContent.get("cookie-content");
+		}
+
+        content.append("<script type=\"text/javascript\">\n");
+        content.append("    setCookie('current-breadcrumb', '"+cookieContent+"');\n");
+        content.append("    document.onload=setBreadcrumDiv();\n");
+		content.append("    function setBreadcrumDiv () {\n");
+		content.append("        var breadcrumbDiv = document.getElementById('breadcrumb-div');\n");
+		if(! hidden){
+			content.append("        breadcrumbDiv.innerHTML = '" + breadcrumbConent + "';\n");			
+		}else{
+			//do not print breadcrumb
+			content.append("        breadcrumbDiv.innerHTML = '';\n");			
+		}
+		content.append("    }\n");
+		content.append("</script>\n");
+
+		try {
+			writer.write(content.toString());
+		} catch (IOException e) {
+			String msg = "Cannot write breadcrumb tag content";
+			log.error(msg, e);
+
+			try {
+				//exit gracefully
+				writer.write(""); 
+			} catch (IOException e1) {
+			    //do nothing
+			}
+		}
+		return 0;
+	}
+
+	/**
+	 * replaces backslash with forward slash
+	 * @param str
+	 * @return
+	 */
+	private static String replaceBacklash(String str){
+	    StringBuilder result = new StringBuilder();
+	    StringCharacterIterator iterator = new StringCharacterIterator(str);
+	    char character =  iterator.current();
+	    while (character != CharacterIterator.DONE ){	     
+	      if (character == '\\') {
+	         result.append("/");
+	      }else {
+	        result.append(character);
+	      }	      
+	      character = iterator.next();
+	    }
+	    return result.toString();
+	}	
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/ItemGroupSelector.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/ItemGroupSelector.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/ItemGroupSelector.java
new file mode 100644
index 0000000..fe81727
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/ItemGroupSelector.java
@@ -0,0 +1,157 @@
+/*                                                                             
+ * Copyright 2004,2005 The Apache Software Foundation.                         
+ *                                                                             
+ * Licensed under the Apache License, Version 2.0 (the "License");             
+ * you may not use this file except in compliance with the License.            
+ * You may obtain a copy of the License at                                     
+ *                                                                             
+ *      http://www.apache.org/licenses/LICENSE-2.0                             
+ *                                                                             
+ * Unless required by applicable law or agreed to in writing, software         
+ * distributed under the License is distributed on an "AS IS" BASIS,           
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    
+ * See the License for the specific language governing permissions and         
+ * limitations under the License.                                              
+ */
+package org.wso2.carbon.ui.taglibs;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.ui.CarbonUIUtil;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import java.io.IOException;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+/**
+ * A tag for selecting & deselecting a group of items & applying some common operation
+ * on these items
+ */
+public class ItemGroupSelector extends SimpleItemGroupSelector {
+
+    private static final Log log = LogFactory.getLog(ItemGroupSelector.class);
+    private String selectAllInPageFunction;
+    private String addRemoveKey;
+    private String addRemoveFunction;
+    private String addRemoveButtonId;
+    private String selectAllInPageKey;
+    private int numberOfPages = 1;
+    private String extraHtml;
+
+    public String getSelectAllInPageFunction() {
+        return selectAllInPageFunction;
+    }
+
+    public void setSelectAllInPageFunction(String selectAllInPageFunction) {
+        this.selectAllInPageFunction = selectAllInPageFunction;
+    }
+
+    public String getAddRemoveFunction() {
+        return addRemoveFunction;
+    }
+
+    public void setAddRemoveFunction(String addRemoveFunction) {
+        this.addRemoveFunction = addRemoveFunction;
+    }
+
+    public String getAddRemoveButtonId() {
+        return addRemoveButtonId;
+    }
+
+    public void setAddRemoveButtonId(String addRemoveButtonId) {
+        this.addRemoveButtonId = addRemoveButtonId;
+    }
+
+    public String getSelectAllInPageKey() {
+        return selectAllInPageKey;
+    }
+
+    public void setSelectAllInPageKey(String selectAllInPageKey) {
+        this.selectAllInPageKey = selectAllInPageKey;
+    }
+
+    public String getAddRemoveKey() {
+        return addRemoveKey;
+    }
+
+    public void setAddRemoveKey(String addRemoveKey) {
+        this.addRemoveKey = addRemoveKey;
+    }
+
+    public int getNumberOfPages() {
+        return numberOfPages;
+    }
+
+    public void setNumberOfPages(int numberOfPages) {
+        this.numberOfPages = numberOfPages;
+    }
+
+    public String getExtraHtml() {
+        return extraHtml;
+    }
+
+    public void setExtraHtml(String extraHtml) {
+        this.extraHtml = extraHtml;
+    }
+
+    public int doEndTag() throws JspException {
+        
+        String selectAllInPage = (selectAllInPageKey != null) ? selectAllInPageKey : "Select all in this page";
+        String selectAll = (selectAllKey != null) ? selectAllKey : "Select all in all pages";
+        String selectNone = (selectNoneKey != null) ? selectNoneKey : "Select none";
+        String addRemove = (addRemoveKey != null) ? addRemoveKey : "Remove";
+
+        if (resourceBundle != null) {
+            try {
+                Locale locale = JSi18n.getLocaleFromPageContext(pageContext);
+                ResourceBundle bundle = ResourceBundle.getBundle(resourceBundle,locale);
+                selectAllInPage = bundle.getString(selectAllInPageKey);
+                selectAll = bundle.getString(selectAllKey);
+                selectNone = bundle.getString(selectNoneKey);
+                if (addRemoveKey != null) {
+                    addRemove = bundle.getString(addRemoveKey);
+                } else {
+                    addRemove = "";
+                }
+            } catch (Exception e) {
+                log.warn("Error while i18ning ItemGroupSelector", e);
+            }
+        }
+        
+        JspWriter writer = pageContext.getOut();
+
+        String content = "<table>" +
+                         "<tr>" +
+                         "<td><a href=\"#\" onclick=\"" + selectAllInPageFunction + ";return false;\"  " +
+                         "style=\"cursor:pointer\">" + selectAllInPage + "</a>&nbsp<b>|</b>&nbsp;" +
+                         "</td>";
+        if (numberOfPages > 1) {
+            content += "<td><a href=\"#\" onclick=\"" + selectAllFunction + ";return false;\"  " +
+                       "style=\"cursor:pointer\">" + selectAll + "</a>&nbsp<b>|</b>&nbsp;</td>";
+        }
+
+        content += "<td><a href=\"#\" onclick=\"" + selectNoneFunction + ";return false;\"  " +
+                   "style=\"cursor:pointer\">" + selectNone + "</a></td>" +
+                   "<td width=\"20%\">&nbsp;</td>";
+
+        if(addRemoveButtonId != null){
+
+            content += ("<td><a href='#' id=\"" + addRemoveButtonId + "\" onclick=\"" + addRemoveFunction + ";return false;\">" +addRemove );
+            content +=  "</a></td>";
+
+        }
+            content += ( extraHtml != null ? "<td>" + extraHtml + "</td>" : "") +
+                   "</tr>" +
+                   "</table>";
+        try {
+            writer.write(content);
+        } catch (IOException e) {
+            String msg = "Cannot write ItemSelector tag content";
+            log.error(msg, e);
+            throw new JspException(msg, e);
+        }
+        return 0;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/JSi18n.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/JSi18n.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/JSi18n.java
new file mode 100644
index 0000000..302a275
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/JSi18n.java
@@ -0,0 +1,162 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui.taglibs;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.ui.CarbonUIUtil;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.BodyTagSupport;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+public class JSi18n extends BodyTagSupport {
+    private static final Log log = LogFactory.getLog(JSi18n.class);
+
+    private static final String ORG_WSO2_CARBON_I18N_JSRESOURCES =
+            "org.wso2.carbon.i18n.JSResources";
+
+    private String resourceBundle;
+    private HttpServletRequest request;
+    private String i18nObjectName = "jsi18n";
+    private String namespace = null;
+
+    public String getI18nObjectName() {
+        if (namespace != null) {
+            return namespace + "_" + i18nObjectName;
+        }
+        return i18nObjectName;
+    }
+
+    public void setI18nObjectName(String i18nObjectName) {
+        this.i18nObjectName = i18nObjectName;
+    }
+
+    public HttpServletRequest getRequest() {
+        return request;
+    }
+
+    public void setRequest(HttpServletRequest request) {
+        this.request = request;
+    }
+
+    public String getResourceBundle() {
+        return resourceBundle;
+    }
+
+    public void setResourceBundle(String resourceBundle) {
+        this.resourceBundle = resourceBundle;
+    }
+
+    public int doEndTag() throws JspException {
+        if (request != null) {
+            // Retrieve locale from either session or request headers
+            Locale locale = getLocaleFromPageContext(pageContext);
+
+            String jsString =
+                    "<script type=\"text/javascript\" src='../yui/build/utilities/utilities.js'></script>" +
+                            "<script type=\"text/javascript\" src='../yui/build/yahoo/yahoo-min.js'></script>" +
+                            "<script type=\"text/javascript\" src='../yui/build/json/json-min.js'></script>" +
+                            "<script type=\"text/javascript\"> var " +
+                            ((getNamespace() != null) ? getNamespace() + "_" : "") + "tmpPairs = '{";
+
+            boolean firstPair = true;
+
+            // Retrieve the default carbon JS resource bundle
+            ResourceBundle defaultBunndle = ResourceBundle.getBundle(
+                    ORG_WSO2_CARBON_I18N_JSRESOURCES, locale);
+
+            // Retrieve keys from the default bundle
+            for (Enumeration e = defaultBunndle.getKeys(); e.hasMoreElements();) {
+                String key = (String) e.nextElement();
+                String value = defaultBunndle.getString(key);
+                if (firstPair) {
+                    jsString = jsString + "\"" + key + "\":\"" + value + "\"";
+                    firstPair = false;
+                } else {
+                    jsString = jsString + ",\"" + key + "\":\"" + value + "\"";
+                }
+            }
+
+            if (resourceBundle != null) {
+                // Retrieve the resource bundle
+                ResourceBundle bundle = ResourceBundle.getBundle(resourceBundle, locale);
+
+                // Retrieve keys from the user defined bundle
+                for (Enumeration e = bundle.getKeys(); e.hasMoreElements();) {
+                    String key = (String) e.nextElement();
+                    String value = bundle.getString(key);
+                    if (firstPair) {
+                        jsString = jsString + "\"" + key + "\":\"" + value + "\"";
+                        firstPair = false;
+                    } else {
+                        jsString = jsString + ",\"" + key + "\":\"" + value + "\"";
+                    }
+                }
+            }
+
+            jsString = jsString + "}'; var " + getI18nObjectName() +
+                    " = YAHOO.lang.JSON.parse(" +
+                            ((getNamespace() != null) ? getNamespace() + "_" : "") + "tmpPairs);</script>";
+
+            StringBuffer content = new StringBuffer();
+            content.append(jsString);
+
+            // Write to output
+            JspWriter writer = pageContext.getOut();
+            try {
+                writer.write(content.toString());
+            } catch (IOException e) {
+                String msg = "Cannot write i18n tag content";
+                log.error(msg, e);
+
+                try {
+                    //exit gracefully
+                    writer.write("");
+                } catch (IOException e1) {/*do nothing*/}
+            }
+
+        }
+
+        return 0;
+    }
+
+    public String getNamespace() {
+        return namespace;
+    }
+
+    public void setNamespace(String namespace) {
+        namespace = namespace.replace('.', '_');
+        this.namespace = namespace;
+    }
+
+    public static Locale getLocaleFromPageContext(PageContext pageContext)
+    {
+        if (pageContext.getSession().getAttribute(CarbonUIUtil.SESSION_PARAM_LOCALE) != null) {
+            return CarbonUIUtil.toLocale(pageContext.getSession().getAttribute(CarbonUIUtil.SESSION_PARAM_LOCALE).toString());
+        }else{
+            return pageContext.getRequest().getLocale();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/Paginator.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/Paginator.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/Paginator.java
new file mode 100644
index 0000000..46070ac
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/Paginator.java
@@ -0,0 +1,260 @@
+/*                                                                             
+ * Copyright 2004,2005 The Apache Software Foundation.                         
+ *                                                                             
+ * Licensed under the Apache License, Version 2.0 (the "License");             
+ * you may not use this file except in compliance with the License.            
+ * You may obtain a copy of the License at                                     
+ *                                                                             
+ *      http://www.apache.org/licenses/LICENSE-2.0                             
+ *                                                                             
+ * Unless required by applicable law or agreed to in writing, software         
+ * distributed under the License is distributed on an "AS IS" BASIS,           
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    
+ * See the License for the specific language governing permissions and         
+ * limitations under the License.                                              
+ */
+package org.wso2.carbon.ui.taglibs;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.ui.CarbonUIUtil;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.BodyTagSupport;
+import java.io.IOException;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+/**
+ * Implementation of the Paginator taglib
+ */
+public class Paginator extends BodyTagSupport {
+
+    private static final Log log = LogFactory.getLog(Paginator.class);
+    private int pageNumber;
+    private int numberOfPages;
+    private int noOfPageLinksToDisplay = 5;
+    private String page;
+    private String pageNumberParameterName;
+    private String resourceBundle;
+    private String nextKey;
+    private String prevKey;
+    private String action;
+    private String parameters = "";
+    private boolean showPageNumbers = true;
+
+
+    public int getPageNumber() {
+        return pageNumber;
+    }
+
+    public void setPageNumber(int pageNumber) {
+        this.pageNumber = pageNumber;
+    }
+
+    public int getNumberOfPages() {
+        return numberOfPages;
+    }
+
+    public void setNumberOfPages(int numberOfPages) {
+        this.numberOfPages = numberOfPages;
+    }
+
+    public String getPage() {
+        return page;
+    }
+
+    public void setPage(String page) {
+        this.page = page;
+    }
+
+    public String getPageNumberParameterName() {
+        return pageNumberParameterName;
+    }
+
+    public void setPageNumberParameterName(String pageNumberParameterName) {
+        this.pageNumberParameterName = pageNumberParameterName;
+    }
+
+    public String getResourceBundle() {
+        return resourceBundle;
+    }
+
+    public void setResourceBundle(String resourceBundle) {
+        this.resourceBundle = resourceBundle;
+    }
+
+    public String getNextKey() {
+        return nextKey;
+    }
+
+    public void setNextKey(String nextKey) {
+        this.nextKey = nextKey;
+    }
+
+    public String getPrevKey() {
+        return prevKey;
+    }
+
+    public void setPrevKey(String prevKey) {
+        this.prevKey = prevKey;
+    }
+
+    public String getParameters() {
+        return parameters;
+    }
+
+    public void setParameters(String parameters) {
+        this.parameters = parameters;
+    }
+
+    public String getShowPageNumbers() {
+        return ""+ showPageNumbers;
+    }
+
+    public void setShowPageNumbers(String showPageNumbers) {
+        this.showPageNumbers = Boolean.valueOf(showPageNumbers);
+    }
+
+    public int getNoOfPageLinksToDisplay() {
+        return noOfPageLinksToDisplay;
+    }
+
+    public void setNoOfPageLinksToDisplay(int noOfPageLinksToDisplay) {
+        this.noOfPageLinksToDisplay = noOfPageLinksToDisplay;
+    }
+
+    public String getAction() {
+        return action;
+    }
+
+    public void setAction(String action) {
+        this.action = action;
+    }
+
+    public int doEndTag() throws JspException {
+        String next = "next";
+        String prev = "prev";
+        if (resourceBundle != null) {
+            try {
+                Locale locale = JSi18n.getLocaleFromPageContext(pageContext);
+                ResourceBundle bundle = ResourceBundle.getBundle(resourceBundle,locale);
+                next = bundle.getString(nextKey);
+                prev = bundle.getString(prevKey);
+            } catch (Exception e) {
+                log.warn("Error while i18ning paginator", e);
+            }
+        }
+
+        JspWriter writer = pageContext.getOut();
+
+        String content = "<table><tr>";
+        if (numberOfPages > 1) {
+            if (pageNumber > 0) {
+                if(!"post".equals(action)){
+                    content += "<td><strong><a href=\"" + page + "?" +
+                            pageNumberParameterName + "=0" + "&" + parameters + "\">&lt;&lt;first" +
+                            "&nbsp;&nbsp;</a></strong></td>" +
+                            "<td><strong><a href=\"" + page + "?" +
+                            pageNumberParameterName + "=" + (pageNumber - 1) + "&" + parameters + "\">"
+                            + "&lt;&nbsp;" + prev + "&nbsp;&nbsp;</a></strong></td>";
+                } else {
+                    content += "<td><strong><a href=# onclick=\"doPaginate('" + page + "','" + pageNumberParameterName + "','" + (0) +"')\">&lt;&lt;first" +
+                            "&nbsp;&nbsp;</a></strong></td>" +
+                            "<td><strong><a href=# onclick=\"doPaginate('" + page + "','" + pageNumberParameterName + "','" + (pageNumber -1) +"')\">"
+                            + "&lt;&nbsp;" + prev + "&nbsp;&nbsp;</a></strong></td>";
+                }
+            } else {
+                content += "<td ><strong ><span style=\"color:gray\">" + "&lt;&lt; first " +
+                        "&nbsp;&nbsp;&lt;" + prev + "&nbsp;&nbsp;</span></strong></td>";
+            }
+
+            if (showPageNumbers) {
+                    int firstLinkNo;
+                    int lastLinkNo;
+                    if (noOfPageLinksToDisplay % 2 == 0) {
+
+                        if ((pageNumber - (noOfPageLinksToDisplay / 2 - 1)) < 0) {
+                            firstLinkNo = 0;
+                        } else {
+                            firstLinkNo = pageNumber - (noOfPageLinksToDisplay / 2 - 1);
+                        }
+
+                        if ((pageNumber + noOfPageLinksToDisplay / 2) > numberOfPages - 1) {
+                            lastLinkNo = numberOfPages - 1;
+                        } else {
+                            lastLinkNo = pageNumber + noOfPageLinksToDisplay / 2;
+                        }
+
+                    } else {
+                        if ((pageNumber - (int) Math.floor(noOfPageLinksToDisplay / 2)) < 0) {
+                            firstLinkNo = 0;
+                        } else {
+                            firstLinkNo = pageNumber - (int) Math.floor(noOfPageLinksToDisplay / 2);
+                        }
+
+                        if ((pageNumber + (int) Math.floor(noOfPageLinksToDisplay / 2)) >
+                                numberOfPages - 1) {
+                            lastLinkNo = numberOfPages - 1;
+                        } else {
+                            lastLinkNo = pageNumber + (int) Math.floor(noOfPageLinksToDisplay / 2);
+                        }
+                    }
+                    if (firstLinkNo != 0) {
+                        content += "<td><strong> ... &nbsp;&nbsp;</strong></td> ";
+                    }
+                    for (int i = firstLinkNo; i <= lastLinkNo; i++) {
+                        if (i == pageNumber) {
+                            content += "<td><strong>" + (i + 1) + "&nbsp;&nbsp;</strong></td>";
+                        } else {
+                            if(!"post".equals(action)){
+                                content += "<td><strong><a href=\"" + page + "?" +
+                                        pageNumberParameterName + "=" + i + "&" + parameters + "\">" +
+                                        (i + 1) + " &nbsp;&nbsp;</a></strong></td>";
+                            } else {
+                                content += "<td><strong>" +
+                                        "<a href=# onclick=\"doPaginate('" + page + "','" + pageNumberParameterName + "','" + (i) +"')\">" +
+                                        (i + 1) + " &nbsp;&nbsp;</a></strong></td>";
+                            }
+                        }
+                    }
+
+                    if (lastLinkNo != numberOfPages - 1) {
+                        content += "<td><strong> ... &nbsp;&nbsp;</strong></td> ";
+                    }
+            } else {
+                content += "<td><strong> Page &nbsp;&nbsp;" + (pageNumber + 1) + " of  " +
+                        numberOfPages + " &nbsp;&nbsp;</strong></td>";
+            }
+
+            if (pageNumber < numberOfPages - 1) {
+                if(!"post".equals(action)){
+                    content += "<td ><strong ><a href =\"" + page + "?" +
+                            pageNumberParameterName + "=" + (pageNumber + 1) + "&" + parameters + "\">"
+                            + next + "&nbsp;&gt;</a></strong></td>"
+                            + "<td ><strong ><a href =\"" + page + "?" +
+                            pageNumberParameterName + "=" + (numberOfPages - 1) + "&" + parameters
+                            + "\">" + "&nbsp;&nbsp;last" + "&nbsp;&gt;&gt;</a></strong></td>";
+                } else {
+                    content += "<td ><strong><a href=# onclick=\"doPaginate('" + page + "','" + pageNumberParameterName + "','" + (pageNumber +1) +"')\">"
+                            + next + "&nbsp;&gt;</a></strong></td>"
+                            + "<td ><strong ><a href=# onclick=\"doPaginate('" + page + "','" + pageNumberParameterName + "','" + (numberOfPages - 1) +"')\">" +
+                            "&nbsp;&nbsp;last" + "&nbsp;&gt;&gt;</a></strong></td>";
+                }
+            } else {
+                content += "<td ><strong ><span style=\"color:gray\">" + next + " &gt;&nbsp;&nbsp;"
+                        + "last" + "&gt;&gt; " + "</span></strong></td>";
+            }
+        }
+        content += "</tr ></table > ";
+        try {
+            writer.write(content);
+        } catch (IOException e) {
+            String msg = "Cannot write paginator tag content";
+            log.error(msg, e);
+            throw new JspException(msg, e);
+        }
+        return 0;
+    }
+}


[37/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/dhtmlHistory.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/dhtmlHistory.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/dhtmlHistory.js
new file mode 100644
index 0000000..907e769
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/dhtmlHistory.js
@@ -0,0 +1,925 @@
+/** 
+   Copyright (c) 2005, Brad Neuberg, bkn3@columbia.edu
+   http://codinginparadise.org
+   
+   Permission is hereby granted, free of charge, to any person obtaining 
+   a copy of this software and associated documentation files (the "Software"), 
+   to deal in the Software without restriction, including without limitation 
+   the rights to use, copy, modify, merge, publish, distribute, sublicense, 
+   and/or sell copies of the Software, and to permit persons to whom the 
+   Software is furnished to do so, subject to the following conditions:
+   
+   The above copyright notice and this permission notice shall be 
+   included in all copies or substantial portions of the Software.
+   
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
+   OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 
+   OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 
+   THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+   
+   The JSON class near the end of this file is
+   Copyright 2005, JSON.org
+*/
+
+/** An object that provides DHTML history, history data, and bookmarking 
+    for AJAX applications. */
+window.dhtmlHistory = {
+   /** Initializes our DHTML history. You should
+       call this after the page is finished loading. */
+   /** public */ initialize: function() {
+      // only Internet Explorer needs to be explicitly initialized;
+      // other browsers don't have its particular behaviors.
+      // Basicly, IE doesn't autofill form data until the page
+      // is finished loading, which means historyStorage won't
+      // work until onload has been fired.
+      if (this.isInternetExplorer() == false) {
+         return;
+      }
+         
+      // if this is the first time this page has loaded...
+      if (historyStorage.hasKey("DhtmlHistory_pageLoaded") == false) {
+         this.fireOnNewListener = false;
+         this.firstLoad = true;
+         historyStorage.put("DhtmlHistory_pageLoaded", true);
+      }
+      // else if this is a fake onload event
+      else {
+         this.fireOnNewListener = true;
+         this.firstLoad = false;   
+      }
+   },
+             
+   /** Adds a history change listener. Note that
+       only one listener is supported at this
+       time. */
+   /** public */ addListener: function(callback) {
+      this.listener = callback;
+      
+      // if the page was just loaded and we
+      // should not ignore it, fire an event
+      // to our new listener now
+      if (this.fireOnNewListener == true) {
+         this.fireHistoryEvent(this.currentLocation);
+         this.fireOnNewListener = false;
+      }
+   },
+   
+   /** public */ add: function(newLocation, historyData) {
+      // most browsers require that we wait a certain amount of time before changing the
+      // location, such as 200 milliseconds; rather than forcing external callers to use
+      // window.setTimeout to account for this to prevent bugs, we internally handle this
+      // detail by using a 'currentWaitTime' variable and have requests wait in line
+      var self = this;
+      var addImpl = function() {
+         // indicate that the current wait time is now less
+         if (self.currentWaitTime > 0)
+            self.currentWaitTime = self.currentWaitTime - self.WAIT_TIME;
+            
+         // remove any leading hash symbols on newLocation
+         newLocation = self.removeHash(newLocation);
+         
+         // IE has a strange bug; if the newLocation
+         // is the same as _any_ preexisting id in the
+         // document, then the history action gets recorded
+         // twice; throw a programmer exception if there is
+         // an element with this ID
+         var idCheck = document.getElementById(newLocation);
+         if (idCheck != undefined || idCheck != null) {
+            var message = 
+               "Exception: History locations can not have "
+               + "the same value as _any_ id's "
+               + "that might be in the document, "
+               + "due to a bug in Internet "
+               + "Explorer; please ask the "
+               + "developer to choose a history "
+               + "location that does not match "
+               + "any HTML id's in this "
+               + "document. The following ID "
+               + "is already taken and can not "
+               + "be a location: " 
+               + newLocation;
+               
+            throw message; 
+         }
+         
+         // store the history data into history storage
+         historyStorage.put(newLocation, historyData);
+         
+         // indicate to the browser to ignore this upcomming 
+         // location change
+         self.ignoreLocationChange = true;
+ 
+         // indicate to IE that this is an atomic location change
+         // block
+         this.ieAtomicLocationChange = true;
+                 
+         // save this as our current location
+         self.currentLocation = newLocation;
+         
+         // change the browser location
+         window.location.hash = newLocation;
+         
+         // change the hidden iframe's location if on IE
+         if (self.isInternetExplorer())
+            self.iframe.src = "blank.html?" + newLocation;
+            
+         // end of atomic location change block
+         // for IE
+         this.ieAtomicLocationChange = false;
+      };
+
+      // now execute this add request after waiting a certain amount of time, so as to
+      // queue up requests
+      window.setTimeout(addImpl, this.currentWaitTime);
+   
+      // indicate that the next request will have to wait for awhile
+      this.currentWaitTime = this.currentWaitTime + this.WAIT_TIME;
+   },
+   
+   /** public */ isFirstLoad: function() {
+      if (this.firstLoad == true) {
+         return true;
+      }
+      else {
+         return false;
+      }
+   },
+   
+   /** public */ isInternational: function() {
+      return false;
+   },
+   
+   /** public */ getVersion: function() {
+      return "0.05";
+   },
+   
+   /** Gets the current hash value that is in the browser's
+       location bar, removing leading # symbols if they are present. */
+   /** public */ getCurrentLocation: function() {
+      var currentLocation = this.removeHash(window.location.hash);
+         
+      return currentLocation;
+   },
+   
+   
+   
+   
+   
+   /** Our current hash location, without the "#" symbol. */
+   /** private */ currentLocation: null,
+   
+   /** Our history change listener. */
+   /** private */ listener: null,
+   
+   /** A hidden IFrame we use in Internet Explorer to detect history
+       changes. */
+   /** private */ iframe: null,
+   
+   /** Indicates to the browser whether to ignore location changes. */
+   /** private */ ignoreLocationChange: null,
+ 
+   /** The amount of time in milliseconds that we should wait between add requests. 
+       Firefox is okay with 200 ms, but Internet Explorer needs 400. */
+   /** private */ WAIT_TIME: 200,
+
+   /** The amount of time in milliseconds an add request has to wait in line before being
+       run on a window.setTimeout. */
+   /** private */ currentWaitTime: 0,
+   
+   /** A flag that indicates that we should fire a history change event
+       when we are ready, i.e. after we are initialized and
+       we have a history change listener. This is needed due to 
+       an edge case in browsers other than Internet Explorer; if
+       you leave a page entirely then return, we must fire this
+       as a history change event. Unfortunately, we have lost
+       all references to listeners from earlier, because JavaScript
+       clears out. */
+   /** private */ fireOnNewListener: null,
+   
+   /** A variable that indicates whether this is the first time
+       this page has been loaded. If you go to a web page, leave
+       it for another one, and then return, the page's onload
+       listener fires again. We need a way to differentiate
+       between the first page load and subsequent ones.
+       This variable works hand in hand with the pageLoaded
+       variable we store into historyStorage.*/
+   /** private */ firstLoad: null,
+   
+   /** A variable to handle an important edge case in Internet
+       Explorer. In IE, if a user manually types an address into
+       their browser's location bar, we must intercept this by
+       continiously checking the location bar with an timer 
+       interval. However, if we manually change the location
+       bar ourselves programmatically, when using our hidden
+       iframe, we need to ignore these changes. Unfortunately,
+       these changes are not atomic, so we surround them with
+       the variable 'ieAtomicLocationChange', that if true,
+       means we are programmatically setting the location and
+       should ignore this atomic chunked change. */
+   /** private */ ieAtomicLocationChange: null,          
+   
+   /** Creates the DHTML history infrastructure. */
+   /** private */ create: function() {
+      // get our initial location
+      var initialHash = this.getCurrentLocation();
+      
+      // save this as our current location
+      this.currentLocation = initialHash;
+      
+      // write out a hidden iframe for IE and
+      // set the amount of time to wait between add() requests
+      if (this.isInternetExplorer()) {
+         document.write("<iframe style='border: 0px; width: 1px; "
+                               + "height: 1px; position: absolute; bottom: 0px; "
+                               + "right: 0px; visibility: visible;' "
+                               + "name='DhtmlHistoryFrame' id='DhtmlHistoryFrame' "
+                               + "src='blank.html?" + initialHash + "'>"
+                               + "</iframe>");
+         // wait 400 milliseconds between history
+         // updates on IE, versus 200 on Firefox
+         this.WAIT_TIME = 400;
+      }
+      
+      // add an unload listener for the page; this is
+      // needed for Firefox 1.5+ because this browser caches all
+      // dynamic updates to the page, which can break some of our 
+      // logic related to testing whether this is the first instance
+      // a page has loaded or whether it is being pulled from the cache
+      var self = this;
+      window.onunload = function() {
+         self.firstLoad = null;
+      };
+      
+      // determine if this is our first page load;
+      // for Internet Explorer, we do this in 
+      // this.iframeLoaded(), which is fired on
+      // page load. We do it there because
+      // we have no historyStorage at this point
+      // in IE, which only exists after the page
+      // is finished loading for that browser
+      if (this.isInternetExplorer() == false) {
+         if (historyStorage.hasKey("DhtmlHistory_pageLoaded") == false) {
+            this.ignoreLocationChange = true;
+            this.firstLoad = true;
+            historyStorage.put("DhtmlHistory_pageLoaded", true);
+         }
+         else {
+            // indicate that we want to pay attention
+            // to this location change
+            this.ignoreLocationChange = false;
+            // For browser's other than IE, fire
+            // a history change event; on IE,
+            // the event will be thrown automatically
+            // when it's hidden iframe reloads
+            // on page load.
+            // Unfortunately, we don't have any 
+            // listeners yet; indicate that we want
+            // to fire an event when a listener
+            // is added.
+            this.fireOnNewListener = true;
+         }
+      }
+      else { // Internet Explorer
+         // the iframe will get loaded on page
+         // load, and we want to ignore this fact
+         this.ignoreLocationChange = true;
+      }
+      
+      if (this.isInternetExplorer()) {
+            this.iframe = document.getElementById("DhtmlHistoryFrame");
+      }                                                              
+
+      // other browsers can use a location handler that checks
+      // at regular intervals as their primary mechanism;
+      // we use it for Internet Explorer as well to handle
+      // an important edge case; see checkLocation() for
+      // details
+      var self = this;
+      var locationHandler = function() {
+         self.checkLocation();
+      };
+      setInterval(locationHandler, 100);
+   },
+   
+   /** Notify the listener of new history changes. */
+   /** private */ fireHistoryEvent: function(newHash) {
+      // extract the value from our history storage for
+      // this hash
+      var historyData = historyStorage.get(newHash);
+
+      // call our listener      
+      this.listener.call(null, newHash, historyData);
+   },
+   
+   /** Sees if the browsers has changed location.  This is the primary history mechanism
+       for Firefox. For Internet Explorer, we use this to handle an important edge case:
+       if a user manually types in a new hash value into their Internet Explorer location
+       bar and press enter, we want to intercept this and notify any history listener. */
+   /** private */ checkLocation: function() {
+      // ignore any location changes that we made ourselves
+      // for browsers other than Internet Explorer
+      if (this.isInternetExplorer() == false
+         && this.ignoreLocationChange == true) {
+         this.ignoreLocationChange = false;
+         return;
+      }
+      
+      // if we are dealing with Internet Explorer
+      // and we are in the middle of making a location
+      // change from an iframe, ignore it
+      if (this.isInternetExplorer() == false
+          && this.ieAtomicLocationChange == true) {
+         return;
+      }
+      
+      // get hash location
+      var hash = this.getCurrentLocation();
+      
+      // see if there has been a change
+      if (hash == this.currentLocation)
+         return;
+         
+      // on Internet Explorer, we need to intercept users manually
+      // entering locations into the browser; we do this by comparing
+      // the browsers location against the iframes location; if they
+      // differ, we are dealing with a manual event and need to
+      // place it inside our history, otherwise we can return
+      this.ieAtomicLocationChange = true;
+      
+      if (this.isInternetExplorer()
+          && this.getIFrameHash() != hash) {
+         this.iframe.src = "blank.html?" + hash;
+      }
+      else if (this.isInternetExplorer()) {
+         // the iframe is unchanged
+         return;
+      }
+         
+      // save this new location
+      this.currentLocation = hash;
+      
+      this.ieAtomicLocationChange = false;
+      
+      // notify listeners of the change
+      this.fireHistoryEvent(hash);
+   },  
+
+   /** Gets the current location of the hidden IFrames
+       that is stored as history. For Internet Explorer. */
+   /** private */ getIFrameHash: function() {
+      // get the new location
+      var historyFrame = document.getElementById("DhtmlHistoryFrame");
+      var doc = historyFrame.contentWindow.document;
+      var hash = new String(doc.location.search);
+
+      if (hash.length == 1 && hash.charAt(0) == "?")
+         hash = "";
+      else if (hash.length >= 2 && hash.charAt(0) == "?")
+         hash = hash.substring(1); 
+    
+    
+      return hash;
+   },          
+   
+   /** Removes any leading hash that might be on a location. */
+   /** private */ removeHash: function(hashValue) {
+      if (hashValue == null || hashValue == undefined)
+         return null;
+      else if (hashValue == "")
+         return "";
+      else if (hashValue.length == 1 && hashValue.charAt(0) == "#")
+         return "";
+      else if (hashValue.length > 1 && hashValue.charAt(0) == "#")
+         return hashValue.substring(1);
+      else
+         return hashValue;     
+   },          
+   
+   /** For IE, says when the hidden iframe has finished loading. */
+   /** private */ iframeLoaded: function(newLocation) {
+      // ignore any location changes that we made ourselves
+      if (this.ignoreLocationChange == true) {
+         this.ignoreLocationChange = false;
+         return;
+      }
+      
+      // get the new location
+      var hash = new String(newLocation.search);
+      if (hash.length == 1 && hash.charAt(0) == "?")
+         hash = "";
+      else if (hash.length >= 2 && hash.charAt(0) == "?")
+         hash = hash.substring(1);
+      
+      // move to this location in the browser location bar
+      // if we are not dealing with a page load event
+      if (this.pageLoadEvent != true) {
+         window.location.hash = hash;
+      }
+
+      // notify listeners of the change
+      this.fireHistoryEvent(hash);
+   },
+   
+   /** Determines if this is Internet Explorer. */
+   /** private */ isInternetExplorer: function() {
+      var userAgent = navigator.userAgent.toLowerCase();
+      if (document.all && userAgent.indexOf('msie')!=-1) {
+         return true;
+      }
+      else {
+         return false;
+      }
+   }
+};
+
+
+
+
+
+
+
+
+
+
+
+
+/** An object that uses a hidden form to store history state 
+    across page loads. The chief mechanism for doing so is using
+    the fact that browser's save the text in form data for the
+    life of the browser and cache, which means the text is still
+    there when the user navigates back to the page. See
+    http://codinginparadise.org/weblog/2005/08/ajax-tutorial-saving-session-across.html
+    for full details. */
+window.historyStorage = {
+   /** If true, we are debugging and show the storage textfield. */
+   /** public */ debugging: false,
+   
+   /** Our hash of key name/values. */
+   /** private */ storageHash: new Object(),
+   
+   /** If true, we have loaded our hash table out of the storage form. */
+   /** private */ hashLoaded: false, 
+   
+   /** public */ put: function(key, value) {
+       this.assertValidKey(key);
+       
+       // if we already have a value for this,
+       // remove the value before adding the
+       // new one
+       if (this.hasKey(key)) {
+         this.remove(key);
+       }
+       
+       // store this new key
+       this.storageHash[key] = value;
+       
+       // save and serialize the hashtable into the form
+       this.saveHashTable(); 
+   },
+   
+   /** public */ get: function(key) {
+      this.assertValidKey(key);
+      
+      // make sure the hash table has been loaded
+      // from the form
+      this.loadHashTable();
+      
+      var value = this.storageHash[key];
+
+      if (value == undefined)
+         return null;
+      else
+         return value; 
+   },
+   
+   /** public */ remove: function(key) {
+      this.assertValidKey(key);
+      
+      // make sure the hash table has been loaded
+      // from the form
+      this.loadHashTable();
+      
+      // delete the value
+      delete this.storageHash[key];
+      
+      // serialize and save the hash table into the 
+      // form
+      this.saveHashTable();
+   },
+   
+   /** Clears out all saved data. */
+   /** public */ reset: function() {
+      this.storageField.value = "";
+      this.storageHash = new Object();
+   },
+   
+   /** public */ hasKey: function(key) {
+      this.assertValidKey(key);
+      
+      // make sure the hash table has been loaded
+      // from the form
+      this.loadHashTable();
+      
+      if (typeof this.storageHash[key] == "undefined")
+         return false;
+      else
+         return true;
+   },
+   
+   /** Determines whether the key given is valid;
+       keys can only have letters, numbers, the dash,
+       underscore, spaces, or one of the 
+       following characters:
+       !@#$%^&*()+=:;,./?|\~{}[] */
+   /** public */ isValidKey: function(key) {
+      // allow all strings, since we don't use XML serialization
+      // format anymore
+      return (typeof key == "string");
+      
+      /*
+      if (typeof key != "string")
+         key = key.toString();
+      
+      
+      var matcher = 
+         /^[a-zA-Z0-9_ \!\@\#\$\%\^\&\*\(\)\+\=\:\;\,\.\/\?\|\\\~\{\}\[\]]*$/;
+                     
+      return matcher.test(key);*/
+   },
+   
+   
+   
+   
+   /** A reference to our textarea field. */
+   /** private */ storageField: null,
+   
+   /** private */ init: function() {
+      // write a hidden form into the page
+      var styleValue = "position: absolute; top: -1000px; left: -1000px;";
+      if (this.debugging == true) {
+         styleValue = "width: 30em; height: 30em;";
+      }   
+      
+      var newContent =
+         "<form id='historyStorageForm' " 
+               + "method='GET' "
+               + "style='" + styleValue + "'>"
+            + "<textarea id='historyStorageField' "
+                      + "style='" + styleValue + "'"
+                              + "left: -1000px;' "
+                      + "name='historyStorageField'></textarea>"
+         + "</form>";
+      document.write(newContent);
+      
+      this.storageField = document.getElementById("historyStorageField");
+   },
+   
+   /** Asserts that a key is valid, throwing
+       an exception if it is not. */
+   /** private */ assertValidKey: function(key) {
+      if (this.isValidKey(key) == false) {
+         throw "Please provide a valid key for "
+               + "window.historyStorage, key= "
+               + key;
+       }
+   },
+   
+   /** Loads the hash table up from the form. */
+   /** private */ loadHashTable: function() {
+      if (this.hashLoaded == false) {
+         // get the hash table as a serialized
+         // string
+         var serializedHashTable = this.storageField.value;
+         
+         if (serializedHashTable != "" &&
+             serializedHashTable != null) {
+            // destringify the content back into a 
+            // real JavaScript object
+            this.storageHash = eval('(' + serializedHashTable + ')');  
+         }
+         
+         this.hashLoaded = true;
+      }
+   },
+   
+   /** Saves the hash table into the form. */
+   /** private */ saveHashTable: function() {
+      this.loadHashTable();
+      
+      // serialized the hash table
+      var serializedHashTable = JSON.stringify(this.storageHash);
+      
+      // save this value
+      this.storageField.value = serializedHashTable;
+   }   
+};
+
+
+
+
+
+
+
+
+
+
+/** The JSON class is copyright 2005 JSON.org. */
+Array.prototype.______array = '______array';
+
+var JSON = {
+    org: 'http://www.JSON.org',
+    copyright: '(c)2005 JSON.org',
+    license: 'http://www.crockford.com/JSON/license.html',
+
+    stringify: function (arg) {
+        var c, i, l, s = '', v;
+
+        switch (typeof arg) {
+        case 'object':
+            if (arg) {
+                if (arg.______array == '______array') {
+                    for (i = 0; i < arg.length; ++i) {
+                        v = this.stringify(arg[i]);
+                        if (s) {
+                            s += ',';
+                        }
+                        s += v;
+                    }
+                    return '[' + s + ']';
+                } else if (typeof arg.toString != 'undefined') {
+                    for (i in arg) {
+                        v = arg[i];
+                        if (typeof v != 'undefined' && typeof v != 'function') {
+                            v = this.stringify(v);
+                            if (s) {
+                                s += ',';
+                            }
+                            s += this.stringify(i) + ':' + v;
+                        }
+                    }
+                    return '{' + s + '}';
+                }
+            }
+            return 'null';
+        case 'number':
+            return isFinite(arg) ? String(arg) : 'null';
+        case 'string':
+            l = arg.length;
+            s = '"';
+            for (i = 0; i < l; i += 1) {
+                c = arg.charAt(i);
+                if (c >= ' ') {
+                    if (c == '\\' || c == '"') {
+                        s += '\\';
+                    }
+                    s += c;
+                } else {
+                    switch (c) {
+                        case '\b':
+                            s += '\\b';
+                            break;
+                        case '\f':
+                            s += '\\f';
+                            break;
+                        case '\n':
+                            s += '\\n';
+                            break;
+                        case '\r':
+                            s += '\\r';
+                            break;
+                        case '\t':
+                            s += '\\t';
+                            break;
+                        default:
+                            c = c.charCodeAt();
+                            s += '\\u00' + Math.floor(c / 16).toString(16) +
+                                (c % 16).toString(16);
+                    }
+                }
+            }
+            return s + '"';
+        case 'boolean':
+            return String(arg);
+        default:
+            return 'null';
+        }
+    },
+    parse: function (text) {
+        var at = 0;
+        var ch = ' ';
+
+        function error(m) {
+            throw {
+                name: 'JSONError',
+                message: m,
+                at: at - 1,
+                text: text
+            };
+        }
+
+        function next() {
+            ch = text.charAt(at);
+            at += 1;
+            return ch;
+        }
+
+        function white() {
+            while (ch != '' && ch <= ' ') {
+                next();
+            }
+        }
+
+        function str() {
+            var i, s = '', t, u;
+
+            if (ch == '"') {
+outer:          while (next()) {
+                    if (ch == '"') {
+                        next();
+                        return s;
+                    } else if (ch == '\\') {
+                        switch (next()) {
+                        case 'b':
+                            s += '\b';
+                            break;
+                        case 'f':
+                            s += '\f';
+                            break;
+                        case 'n':
+                            s += '\n';
+                            break;
+                        case 'r':
+                            s += '\r';
+                            break;
+                        case 't':
+                            s += '\t';
+                            break;
+                        case 'u':
+                            u = 0;
+                            for (i = 0; i < 4; i += 1) {
+                                t = parseInt(next(), 16);
+                                if (!isFinite(t)) {
+                                    break outer;
+                                }
+                                u = u * 16 + t;
+                            }
+                            s += String.fromCharCode(u);
+                            break;
+                        default:
+                            s += ch;
+                        }
+                    } else {
+                        s += ch;
+                    }
+                }
+            }
+            error("Bad string");
+        }
+
+        function arr() {
+            var a = [];
+
+            if (ch == '[') {
+                next();
+                white();
+                if (ch == ']') {
+                    next();
+                    return a;
+                }
+                while (ch) {
+                    a.push(val());
+                    white();
+                    if (ch == ']') {
+                        next();
+                        return a;
+                    } else if (ch != ',') {
+                        break;
+                    }
+                    next();
+                    white();
+                }
+            }
+            error("Bad array");
+        }
+
+        function obj() {
+            var k, o = {};
+
+            if (ch == '{') {
+                next();
+                white();
+                if (ch == '}') {
+                    next();
+                    return o;
+                }
+                while (ch) {
+                    k = str();
+                    white();
+                    if (ch != ':') {
+                        break;
+                    }
+                    next();
+                    o[k] = val();
+                    white();
+                    if (ch == '}') {
+                        next();
+                        return o;
+                    } else if (ch != ',') {
+                        break;
+                    }
+                    next();
+                    white();
+                }
+            }
+            error("Bad object");
+        }
+
+        function num() {
+            var n = '', v;
+            if (ch == '-') {
+                n = '-';
+                next();
+            }
+            while (ch >= '0' && ch <= '9') {
+                n += ch;
+                next();
+            }
+            if (ch == '.') {
+                n += '.';
+                while (next() && ch >= '0' && ch <= '9') {
+                    n += ch;
+                }
+            }
+            if (ch == 'e' || ch == 'E') {
+                n += 'e';
+                next();
+                if (ch == '-' || ch == '+') {
+                    n += ch;
+                    next();
+                }
+                while (ch >= '0' && ch <= '9') {
+                    n += ch;
+                    next();
+                }
+            }
+            v = +n;
+            if (!isFinite(v)) {
+                error("Bad number");
+            } else {
+                return v;
+            }
+        }
+
+        function word() {
+            switch (ch) {
+                case 't':
+                    if (next() == 'r' && next() == 'u' && next() == 'e') {
+                        next();
+                        return true;
+                    }
+                    break;
+                case 'f':
+                    if (next() == 'a' && next() == 'l' && next() == 's' &&
+                            next() == 'e') {
+                        next();
+                        return false;
+                    }
+                    break;
+                case 'n':
+                    if (next() == 'u' && next() == 'l' && next() == 'l') {
+                        next();
+                        return null;
+                    }
+                    break;
+            }
+            error("Syntax error");
+        }
+
+        function val() {
+            white();
+            switch (ch) {
+                case '{':
+                    return obj();
+                case '[':
+                    return arr();
+                case '"':
+                    return str();
+                case '-':
+                    return num();
+                default:
+                    return ch >= '0' && ch <= '9' ? num() : word();
+            }
+        }
+
+        return val();
+    }
+};
+
+
+
+/** Initialize all of our objects now. */
+window.historyStorage.init();
+window.dhtmlHistory.create();

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/excanvas.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/excanvas.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/excanvas.js
new file mode 100644
index 0000000..12c74f7
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/excanvas.js
@@ -0,0 +1 @@
+if(!document.createElement("canvas").getContext){(function(){var z=Math;var K=z.round;var J=z.sin;var U=z.cos;var b=z.abs;var k=z.sqrt;var D=10;var F=D/2;function T(){return this.context_||(this.context_=new W(this))}var O=Array.prototype.slice;function G(i,j,m){var Z=O.call(arguments,2);return function(){return i.apply(j,Z.concat(O.call(arguments)))}}function AD(Z){return String(Z).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function r(i){if(!i.namespaces.g_vml_){i.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML")}if(!i.namespaces.g_o_){i.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML")}if(!i.styleSheets.ex_canvas_){var Z=i.createStyleSheet();Z.owningElement.id="ex_canvas_";Z.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}r(document);var E={init:function(Z){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=Z||document;i.createElement("canvas");i.attachEvent("onreadystatec
 hange",G(this.init_,this,i))}},init_:function(m){var j=m.getElementsByTagName("canvas");for(var Z=0;Z<j.length;Z++){this.initElement(j[Z])}},initElement:function(i){if(!i.getContext){i.getContext=T;r(i.ownerDocument);i.innerHTML="";i.attachEvent("onpropertychange",S);i.attachEvent("onresize",w);var Z=i.attributes;if(Z.width&&Z.width.specified){i.style.width=Z.width.nodeValue+"px"}else{i.width=i.clientWidth}if(Z.height&&Z.height.specified){i.style.height=Z.height.nodeValue+"px"}else{i.height=i.clientHeight}}return i}};function S(i){var Z=i.srcElement;switch(i.propertyName){case"width":Z.getContext().clearRect();Z.style.width=Z.attributes.width.nodeValue+"px";Z.firstChild.style.width=Z.clientWidth+"px";break;case"height":Z.getContext().clearRect();Z.style.height=Z.attributes.height.nodeValue+"px";Z.firstChild.style.height=Z.clientHeight+"px";break}}function w(i){var Z=i.srcElement;if(Z.firstChild){Z.firstChild.style.width=Z.clientWidth+"px";Z.firstChild.style.height=Z.clientHeight+"px
 "}}E.init();var I=[];for(var AC=0;AC<16;AC++){for(var AB=0;AB<16;AB++){I[AC*16+AB]=AC.toString(16)+AB.toString(16)}}function V(){return[[1,0,0],[0,1,0],[0,0,1]]}function d(m,j){var i=V();for(var Z=0;Z<3;Z++){for(var AF=0;AF<3;AF++){var p=0;for(var AE=0;AE<3;AE++){p+=m[Z][AE]*j[AE][AF]}i[Z][AF]=p}}return i}function Q(i,Z){Z.fillStyle=i.fillStyle;Z.lineCap=i.lineCap;Z.lineJoin=i.lineJoin;Z.lineWidth=i.lineWidth;Z.miterLimit=i.miterLimit;Z.shadowBlur=i.shadowBlur;Z.shadowColor=i.shadowColor;Z.shadowOffsetX=i.shadowOffsetX;Z.shadowOffsetY=i.shadowOffsetY;Z.strokeStyle=i.strokeStyle;Z.globalAlpha=i.globalAlpha;Z.font=i.font;Z.textAlign=i.textAlign;Z.textBaseline=i.textBaseline;Z.arcScaleX_=i.arcScaleX_;Z.arcScaleY_=i.arcScaleY_;Z.lineScale_=i.lineScale_}var B={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",
 chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffo
 n:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#
 B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"};function g(i){var m=i.indexOf("(",3);var Z=i.indexOf(")",m+1);var j=i.substring(m+1,Z).split(",");if(j.length==4&&i.substr(3,1)=="a"){alpha=Number(j[3])}else{j[3]=1}return j}function C(Z){return parseFloat(Z)/100}function N(i,j,Z){return Math.min(Z,Math.max(j,i))}function c(AF){var j,i,Z;h=parseFloat(AF[0])/360%360;if(h<0){h++}s=N(C(AF[1]),0,1);l=N(C(AF[2]),0,1);if(s==0){j=i=Z=l}else{var m=l<0.5?l*(1+s):l+s-l*s;var AE=2*l-m;j=A(AE,m,h+1/3);i=A(AE,m,h);Z=A(AE,m,h-1/3)}return"#"+I[Math.floor(j*255)]+I[Math.floor(i*255)]+I[Math.floor(Z*255)]}function
  A(i,Z,j){if(j<0){j++}if(j>1){j--}if(6*j<1){return i+(Z-i)*6*j}else{if(2*j<1){return Z}else{if(3*j<2){return i+(Z-i)*(2/3-j)*6}else{return i}}}}function Y(Z){var AE,p=1;Z=String(Z);if(Z.charAt(0)=="#"){AE=Z}else{if(/^rgb/.test(Z)){var m=g(Z);var AE="#",AF;for(var j=0;j<3;j++){if(m[j].indexOf("%")!=-1){AF=Math.floor(C(m[j])*255)}else{AF=Number(m[j])}AE+=I[N(AF,0,255)]}p=m[3]}else{if(/^hsl/.test(Z)){var m=g(Z);AE=c(m);p=m[3]}else{AE=B[Z]||Z}}}return{color:AE,alpha:p}}var L={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var f={};function X(Z){if(f[Z]){return f[Z]}var m=document.createElement("div");var j=m.style;try{j.font=Z}catch(i){}return f[Z]={style:j.fontStyle||L.style,variant:j.fontVariant||L.variant,weight:j.fontWeight||L.weight,size:j.fontSize||L.size,family:j.fontFamily||L.family}}function P(j,i){var Z={};for(var AF in j){Z[AF]=j[AF]}var AE=parseFloat(i.currentStyle.fontSize),m=parseFloat(j.size);if(typeof j.size=="number"){Z.size=j.size}else{if(
 j.size.indexOf("px")!=-1){Z.size=m}else{if(j.size.indexOf("em")!=-1){Z.size=AE*m}else{if(j.size.indexOf("%")!=-1){Z.size=(AE/100)*m}else{if(j.size.indexOf("pt")!=-1){Z.size=m/0.75}else{Z.size=AE}}}}}Z.size*=0.981;return Z}function AA(Z){return Z.style+" "+Z.variant+" "+Z.weight+" "+Z.size+"px "+Z.family}function t(Z){switch(Z){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function W(i){this.m_=V();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=D*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var Z=i.ownerDocument.createElement("div");Z.style.width=i.clientWidth+"px";Z.style.height=i.clientHeight+"px";Z.style.overflow="hidden";Z.style.position="absolute";i.appendChild(Z);this.element_=Z;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var M=W.pro
 totype;M.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};M.beginPath=function(){this.currentPath_=[]};M.moveTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"moveTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.lineTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"lineTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.bezierCurveTo=function(j,i,AI,AH,AG,AE){var Z=this.getCoords_(AG,AE);var AF=this.getCoords_(j,i);var m=this.getCoords_(AI,AH);e(this,AF,m,Z)};function e(Z,m,j,i){Z.currentPath_.push({type:"bezierCurveTo",cp1x:m.x,cp1y:m.y,cp2x:j.x,cp2y:j.y,x:i.x,y:i.y});Z.currentX_=i.x;Z.currentY_=i.y}M.quadraticCurveTo=function(AG,j,i,Z){var AF=this.getCoords_(AG,j);var AE=this.getCoords_(i,Z);var AH={x:this.currentX_+2/3*(AF.x-this.currentX_),y:this.currentY_+2/3*(AF.y-this.currentY_)};var m={x:AH.x+(AE.x-this.currentX_)/3,y:AH.y+(AE
 .y-this.currentY_)/3};e(this,AH,m,AE)};M.arc=function(AJ,AH,AI,AE,i,j){AI*=D;var AN=j?"at":"wa";var AK=AJ+U(AE)*AI-F;var AM=AH+J(AE)*AI-F;var Z=AJ+U(i)*AI-F;var AL=AH+J(i)*AI-F;if(AK==Z&&!j){AK+=0.125}var m=this.getCoords_(AJ,AH);var AG=this.getCoords_(AK,AM);var AF=this.getCoords_(Z,AL);this.currentPath_.push({type:AN,x:m.x,y:m.y,radius:AI,xStart:AG.x,yStart:AG.y,xEnd:AF.x,yEnd:AF.y})};M.rect=function(j,i,Z,m){this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath()};M.strokeRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.stroke();this.currentPath_=p};M.fillRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.fill();this.currentPath_=p};M.createLinearGradient=function(i,m,Z,j){var p=new v("gradient");p.x0_=i;p.y0_=m;p.x1_=Z;p.y
 1_=j;return p};M.createRadialGradient=function(m,AE,j,i,p,Z){var AF=new v("gradientradial");AF.x0_=m;AF.y0_=AE;AF.r0_=j;AF.x1_=i;AF.y1_=p;AF.r1_=Z;return AF};M.drawImage=function(AO,j){var AH,AF,AJ,AV,AM,AK,AQ,AX;var AI=AO.runtimeStyle.width;var AN=AO.runtimeStyle.height;AO.runtimeStyle.width="auto";AO.runtimeStyle.height="auto";var AG=AO.width;var AT=AO.height;AO.runtimeStyle.width=AI;AO.runtimeStyle.height=AN;if(arguments.length==3){AH=arguments[1];AF=arguments[2];AM=AK=0;AQ=AJ=AG;AX=AV=AT}else{if(arguments.length==5){AH=arguments[1];AF=arguments[2];AJ=arguments[3];AV=arguments[4];AM=AK=0;AQ=AG;AX=AT}else{if(arguments.length==9){AM=arguments[1];AK=arguments[2];AQ=arguments[3];AX=arguments[4];AH=arguments[5];AF=arguments[6];AJ=arguments[7];AV=arguments[8]}else{throw Error("Invalid number of arguments")}}}var AW=this.getCoords_(AH,AF);var m=AQ/2;var i=AX/2;var AU=[];var Z=10;var AE=10;AU.push(" <g_vml_:group",' coordsize="',D*Z,",",D*AE,'"',' coordorigin="0,0"',' style="width:',Z,"p
 x;height:",AE,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]||this.m_[1][1]!=1||this.m_[1][0]){var p=[];p.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",K(AW.x/D),",","Dy=",K(AW.y/D),"");var AS=AW;var AR=this.getCoords_(AH+AJ,AF);var AP=this.getCoords_(AH,AF+AV);var AL=this.getCoords_(AH+AJ,AF+AV);AS.x=z.max(AS.x,AR.x,AP.x,AL.x);AS.y=z.max(AS.y,AR.y,AP.y,AL.y);AU.push("padding:0 ",K(AS.x/D),"px ",K(AS.y/D),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",p.join(""),", sizingmethod='clip');")}else{AU.push("top:",K(AW.y/D),"px;left:",K(AW.x/D),"px;")}AU.push(' ">','<g_vml_:image src="',AO.src,'"',' style="width:',D*AJ,"px;"," height:",D*AV,'px"',' cropleft="',AM/AG,'"',' croptop="',AK/AT,'"',' cropright="',(AG-AM-AQ)/AG,'"',' cropbottom="',(AT-AK-AX)/AT,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",AU.join(""))};M.stroke=function(AM){var m=10;var AN=10;var AE=5000;var AG={x:
 null,y:null};var AL={x:null,y:null};for(var AH=0;AH<this.currentPath_.length;AH+=AE){var AK=[];var AF=false;AK.push("<g_vml_:shape",' filled="',!!AM,'"',' style="position:absolute;width:',m,"px;height:",AN,'px;"',' coordorigin="0,0"',' coordsize="',D*m,",",D*AN,'"',' stroked="',!AM,'"',' path="');var AO=false;for(var AI=AH;AI<Math.min(AH+AE,this.currentPath_.length);AI++){if(AI%AE==0&&AI>0){AK.push(" m ",K(this.currentPath_[AI-1].x),",",K(this.currentPath_[AI-1].y))}var Z=this.currentPath_[AI];var AJ;switch(Z.type){case"moveTo":AJ=Z;AK.push(" m ",K(Z.x),",",K(Z.y));break;case"lineTo":AK.push(" l ",K(Z.x),",",K(Z.y));break;case"close":AK.push(" x ");Z=null;break;case"bezierCurveTo":AK.push(" c ",K(Z.cp1x),",",K(Z.cp1y),",",K(Z.cp2x),",",K(Z.cp2y),",",K(Z.x),",",K(Z.y));break;case"at":case"wa":AK.push(" ",Z.type," ",K(Z.x-this.arcScaleX_*Z.radius),",",K(Z.y-this.arcScaleY_*Z.radius)," ",K(Z.x+this.arcScaleX_*Z.radius),",",K(Z.y+this.arcScaleY_*Z.radius)," ",K(Z.xStart),",",K(Z.yStart)
 ," ",K(Z.xEnd),",",K(Z.yEnd));break}if(Z){if(AG.x==null||Z.x<AG.x){AG.x=Z.x}if(AL.x==null||Z.x>AL.x){AL.x=Z.x}if(AG.y==null||Z.y<AG.y){AG.y=Z.y}if(AL.y==null||Z.y>AL.y){AL.y=Z.y}}}AK.push(' ">');if(!AM){R(this,AK)}else{a(this,AK,AG,AL)}AK.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",AK.join(""))}};function R(j,AE){var i=Y(j.strokeStyle);var m=i.color;var p=i.alpha*j.globalAlpha;var Z=j.lineScale_*j.lineWidth;if(Z<1){p*=Z}AE.push("<g_vml_:stroke",' opacity="',p,'"',' joinstyle="',j.lineJoin,'"',' miterlimit="',j.miterLimit,'"',' endcap="',t(j.lineCap),'"',' weight="',Z,'px"',' color="',m,'" />')}function a(AO,AG,Ah,AP){var AH=AO.fillStyle;var AY=AO.arcScaleX_;var AX=AO.arcScaleY_;var Z=AP.x-Ah.x;var m=AP.y-Ah.y;if(AH instanceof v){var AL=0;var Ac={x:0,y:0};var AU=0;var AK=1;if(AH.type_=="gradient"){var AJ=AH.x0_/AY;var j=AH.y0_/AX;var AI=AH.x1_/AY;var Aj=AH.y1_/AX;var Ag=AO.getCoords_(AJ,j);var Af=AO.getCoords_(AI,Aj);var AE=Af.x-Ag.x;var p=Af.y-Ag.y;AL=Math.a
 tan2(AE,p)*180/Math.PI;if(AL<0){AL+=360}if(AL<0.000001){AL=0}}else{var Ag=AO.getCoords_(AH.x0_,AH.y0_);Ac={x:(Ag.x-Ah.x)/Z,y:(Ag.y-Ah.y)/m};Z/=AY*D;m/=AX*D;var Aa=z.max(Z,m);AU=2*AH.r0_/Aa;AK=2*AH.r1_/Aa-AU}var AS=AH.colors_;AS.sort(function(Ak,i){return Ak.offset-i.offset});var AN=AS.length;var AR=AS[0].color;var AQ=AS[AN-1].color;var AW=AS[0].alpha*AO.globalAlpha;var AV=AS[AN-1].alpha*AO.globalAlpha;var Ab=[];for(var Ae=0;Ae<AN;Ae++){var AM=AS[Ae];Ab.push(AM.offset*AK+AU+" "+AM.color)}AG.push('<g_vml_:fill type="',AH.type_,'"',' method="none" focus="100%"',' color="',AR,'"',' color2="',AQ,'"',' colors="',Ab.join(","),'"',' opacity="',AV,'"',' g_o_:opacity2="',AW,'"',' angle="',AL,'"',' focusposition="',Ac.x,",",Ac.y,'" />')}else{if(AH instanceof u){if(Z&&m){var AF=-Ah.x;var AZ=-Ah.y;AG.push("<g_vml_:fill",' position="',AF/Z*AY*AY,",",AZ/m*AX*AX,'"',' type="tile"',' src="',AH.src_,'" />')}}else{var Ai=Y(AO.fillStyle);var AT=Ai.color;var Ad=Ai.alpha*AO.globalAlpha;AG.push('<g_vml_:f
 ill color="',AT,'" opacity="',Ad,'" />')}}}M.fill=function(){this.stroke(true)};M.closePath=function(){this.currentPath_.push({type:"close"})};M.getCoords_=function(j,i){var Z=this.m_;return{x:D*(j*Z[0][0]+i*Z[1][0]+Z[2][0])-F,y:D*(j*Z[0][1]+i*Z[1][1]+Z[2][1])-F}};M.save=function(){var Z={};Q(this,Z);this.aStack_.push(Z);this.mStack_.push(this.m_);this.m_=d(V(),this.m_)};M.restore=function(){if(this.aStack_.length){Q(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function H(Z){return isFinite(Z[0][0])&&isFinite(Z[0][1])&&isFinite(Z[1][0])&&isFinite(Z[1][1])&&isFinite(Z[2][0])&&isFinite(Z[2][1])}function y(i,Z,j){if(!H(Z)){return }i.m_=Z;if(j){var p=Z[0][0]*Z[1][1]-Z[0][1]*Z[1][0];i.lineScale_=k(b(p))}}M.translate=function(j,i){var Z=[[1,0,0],[0,1,0],[j,i,1]];y(this,d(Z,this.m_),false)};M.rotate=function(i){var m=U(i);var j=J(i);var Z=[[m,j,0],[-j,m,0],[0,0,1]];y(this,d(Z,this.m_),false)};M.scale=function(j,i){this.arcScaleX_*=j;this.arcScaleY_*=i;var Z=[[j,0,0],[0,i,0],[0,0,1
 ]];y(this,d(Z,this.m_),true)};M.transform=function(p,m,AF,AE,i,Z){var j=[[p,m,0],[AF,AE,0],[i,Z,1]];y(this,d(j,this.m_),true)};M.setTransform=function(AE,p,AG,AF,j,i){var Z=[[AE,p,0],[AG,AF,0],[j,i,1]];y(this,Z,true)};M.drawText_=function(AK,AI,AH,AN,AG){var AM=this.m_,AQ=1000,i=0,AP=AQ,AF={x:0,y:0},AE=[];var Z=P(X(this.font),this.element_);var j=AA(Z);var AR=this.element_.currentStyle;var p=this.textAlign.toLowerCase();switch(p){case"left":case"center":case"right":break;case"end":p=AR.direction=="ltr"?"right":"left";break;case"start":p=AR.direction=="rtl"?"right":"left";break;default:p="left"}switch(this.textBaseline){case"hanging":case"top":AF.y=Z.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":AF.y=-Z.size/2.25;break}switch(p){case"right":i=AQ;AP=0.05;break;case"center":i=AP=AQ/2;break}var AO=this.getCoords_(AI+AF.x,AH+AF.y);AE.push('<g_vml_:line from="',-i,' 0" to="',AP,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' fill
 ed="',!AG,'" stroked="',!!AG,'" style="position:absolute;width:1px;height:1px;">');if(AG){R(this,AE)}else{a(this,AE,{x:-i,y:0},{x:AP,y:Z.size})}var AL=AM[0][0].toFixed(3)+","+AM[1][0].toFixed(3)+","+AM[0][1].toFixed(3)+","+AM[1][1].toFixed(3)+",0,0";var AJ=K(AO.x/D)+","+K(AO.y/D);AE.push('<g_vml_:skew on="t" matrix="',AL,'" ',' offset="',AJ,'" origin="',i,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',AD(AK),'" style="v-text-align:',p,";font:",AD(j),'" /></g_vml_:line>');this.element_.insertAdjacentHTML("beforeEnd",AE.join(""))};M.fillText=function(j,Z,m,i){this.drawText_(j,Z,m,i,false)};M.strokeText=function(j,Z,m,i){this.drawText_(j,Z,m,i,true)};M.measureText=function(j){if(!this.textMeasureEl_){var Z='<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>';this.element_.insertAdjacentHTML("beforeEnd",Z);this.textMeasureEl_=this.element_.lastChild}var i=this.element_.ownerDocument;this.textMea
 sureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(i.createTextNode(j));return{width:this.textMeasureEl_.offsetWidth}};M.clip=function(){};M.arcTo=function(){};M.createPattern=function(i,Z){return new u(i,Z)};function v(Z){this.type_=Z;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}v.prototype.addColorStop=function(i,Z){Z=Y(Z);this.colors_.push({offset:i,color:Z.color,alpha:Z.alpha})};function u(i,Z){q(i);switch(Z){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=Z;break;default:n("SYNTAX_ERR")}this.src_=i.src;this.width_=i.width;this.height_=i.height}function n(Z){throw new o(Z)}function q(Z){if(!Z||Z.nodeType!=1||Z.tagName!="IMG"){n("TYPE_MISMATCH_ERR")}if(Z.readyState!="complete"){n("INVALID_STATE_ERR")}}function o(Z){this.code=this[Z];this.message=Z+": DOM Exception "+this.code}var x=o.prototype=new Error;x.INDEX_SIZE_ERR=1;x.D
 OMSTRING_SIZE_ERR=2;x.HIERARCHY_REQUEST_ERR=3;x.WRONG_DOCUMENT_ERR=4;x.INVALID_CHARACTER_ERR=5;x.NO_DATA_ALLOWED_ERR=6;x.NO_MODIFICATION_ALLOWED_ERR=7;x.NOT_FOUND_ERR=8;x.NOT_SUPPORTED_ERR=9;x.INUSE_ATTRIBUTE_ERR=10;x.INVALID_STATE_ERR=11;x.SYNTAX_ERR=12;x.INVALID_MODIFICATION_ERR=13;x.NAMESPACE_ERR=14;x.INVALID_ACCESS_ERR=15;x.VALIDATION_ERR=16;x.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=E;CanvasRenderingContext2D=W;CanvasGradient=v;CanvasPattern=u;DOMException=o})()};
\ No newline at end of file


[40/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/documentation.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/documentation.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/documentation.css
new file mode 100644
index 0000000..7c55609
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/documentation.css
@@ -0,0 +1,95 @@
+body {
+    background-color: white;
+    padding-left: 20px;
+    padding-top: 0px;
+    padding-right: 20px;
+    padding-bottom: 50px;
+    margin: 0px;
+    font-family: "Lucida Grande","Lucida Sans","Microsoft Sans Serif", "Lucida Sans Unicode","Verdana","Sans-serif","trebuchet ms";
+    color: #111;
+	font-size:12px;
+	font-size-adjust:none;
+	font-stretch:normal;
+	font-style:normal;
+	font-variant:normal;
+	font-weight:normal;
+	line-height:1.25em;
+	background-repeat: no-repeat;
+	background-position: left bottom;
+}
+
+p { margin-left: 20px;
+margin-right: 20px;}
+
+td { }
+
+a:link { }
+
+a:visited { }
+
+a:hover { }
+
+a:active { }
+
+h1, h2, h3, h4, h5 {
+margin: 0px;
+padding-left: 20px;
+padding-top: 5px;
+padding-bottom: 5px;
+font-weight: normal;
+}
+
+h1 {
+	background-image: url(../images/help-header.gif);
+	background-repeat: no-repeat;
+	background-position: left top;
+	padding-top: 90px;
+	padding-bottom: 25px;
+	font-size: 225%;
+	font-weight: normal;
+	padding-left: 20px;
+	color: #f47b20;
+	margin-left: -20px;
+	margin-right: -20px;
+}
+
+a img {
+ 	border: 0px;
+}
+table.styled {
+border: solid 0px #ccc;
+border-collapse: collapse;
+}
+table.styled tr td {
+border: solid 1px #ccc;
+padding: 3px;
+}
+table.styled tr td.subHeader {
+border: solid 0px #ccc;
+padding-top: 10px;
+padding-bottom: 5px;
+font-size: 125%;
+font-weight: bold;
+}
+
+div#footer-div {
+	height: 27px;
+	width: 100%;
+}
+
+div#footer-div div.footer-content {
+	height: 27px;
+	margin: auto;
+	padding: 0px;
+    margin-left: -20px;
+    margin-right: -20px;
+    background-color: #a9a9a9;
+}
+
+div#footer-div div.footer-content div.copyright {
+	padding-top: 5px;
+	color: #fff;
+	width: 450px;
+	float: left;
+	margin-left: 20px;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/global.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/global.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/global.css
new file mode 100644
index 0000000..25722b6
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/global.css
@@ -0,0 +1,1445 @@
+body {
+    background-color: white;
+    padding: 0px;
+    margin: 0px;
+    font-family: "Lucida Grande","Lucida Sans","Microsoft Sans Serif", "Lucida Sans Unicode","Verdana","Sans-serif","trebuchet ms" !important;
+    color: #111;
+	font-size:12px;
+	font-size-adjust:none;
+	font-stretch:normal;
+	font-style:normal;
+	font-variant:normal;
+	font-weight:normal;
+	line-height:1.25em;
+}
+table {
+	border: 0px;
+	padding: 0px;
+	margin: 0px;
+}
+table thead tr th{
+	padding: 0px;
+	text-align: left;
+	vertical-align: top;
+	border: 0px;
+}
+table tbody tr td {
+	padding: 0px;
+	text-align: left;
+	vertical-align: top;
+	border: 0px;
+}
+table tr td {
+	padding: 0px;
+	text-align: left;
+	vertical-align: top;
+	border: 0px;
+}
+ul {
+    list-style: none;
+    margin: 0px;
+    padding: 0px;
+}
+ul li{
+    list-style: none;
+    margin: 0px;
+    padding: 0px;
+}
+
+p {
+}
+
+a:link {
+    color: #386698;
+    text-decoration: none;
+}
+
+a:visited {
+    color: #386698;
+    text-decoration: none;
+}
+
+a:hover {
+    color: #f47b20;
+}
+
+a img {
+	border: 0px;
+}
+
+a.link-disable {
+	cursor: text;
+	color: #999;
+}
+
+/* Neutralize styling:
+   Elements with a vertical margin: */
+    h1, h2, h3, h4, h5, h6, p, pre,
+    blockquote, ol, dl, address {
+        margin: 0 0 0px;
+        padding: 0px 0 0;
+    }
+    
+form {
+padding-top: 0px !important;
+padding-bottom: 0px !important;
+margin-top: 0px !important;
+margin-bottom: 0px !important;
+}
+h3.page-subtitle{
+	color: #8b8b8b;
+        font-size: 11px;
+        letter-spacing: 0.05em;
+        text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.6);
+        margin: 10px 10px 10px 10px;
+}
+/* ---------------- template styles ------------------------- */
+table#main-table {
+	min-width: 985px;
+	width: 100%;
+}
+table#main-table td {
+	padding: 0px;
+}
+table#main-table td#header {
+	background-image: url( ../images/header-region-bg.gif);
+    background-repeat: repeat-x;
+    background-position: left top;
+	height: 100px;
+}
+
+table#main-table td#menu-panel {
+	background-color: #fff;
+	padding-bottom: 20px;
+	border-right: solid 1px #636466;
+	width: 225px;
+	font-size: 100%;
+}
+divtd#menu{
+	margin-left:20px;
+}
+td#menu table#menu-table {
+	width: 225px;
+}
+
+table#menu-table td {
+}
+
+table#menu-table td#region1 {
+}
+
+table#menu-table td#region2 {
+}
+
+table#menu-table td#region3 {
+}
+
+table#main-table td#middle-content {
+	padding-left: 20px;
+	padding-right: 20px;
+	padding-top: 15px;
+	padding-bottom: 15px;
+	background-color: #F4F4F4;
+	/*width: 95%;*/
+}
+
+td#middle-content table#content-table {
+	width: 100%;
+}
+
+table#content-table td#page-header-links {
+	height: 20px;
+	vertical-align: middle;
+	padding-bottom: 5px;
+}
+
+table#content-table td#body {
+}
+
+table#main-table td#footer {
+	height: 25px;
+	background-color: #bfbfbf;
+}	
+
+/* ---------------- header styles ------------------ */
+div#header-div {
+    background-image: url( ../images/header-bg.gif);
+    background-repeat: no-repeat;
+    background-position: left top;
+    height: 100px;
+    min-width: 985px;
+}
+
+div#header-div div.left-logo {
+	background-image: url( ../images/header-logo.gif );
+    background-repeat: no-repeat;
+    background-position: left top;
+	height: 32px;
+	/*width: 332px;*/
+	width: 332px;
+	margin-top: 23px;
+	margin-left: 20px;
+	float: left;
+}
+
+div#header-div div.left-logo a.header-home {
+display: block;
+}
+
+div#header-div div.left-logo a.header-home img{
+display: block;
+}
+
+div#header-div div.right-logo {
+	/*background-image: url( ../images/mgt-logo.gif);
+    background-repeat: no-repeat;
+    background-position: right top;*/
+	line-height: 18px;
+	height: 22px;
+	float: right;
+	width: 220px;
+	margin-top: 28px;
+	margin-right: 20px;
+	color: #000;
+	font-size: 18px;
+	font-weight: normal;
+	text-align: right;
+}
+
+div#header-div div.header-links {
+	clear: both;
+	float: left;
+	height: 25px;
+	width: 100%;
+	margin-top: 15px;
+}
+
+div#header-div div.header-links div.right-links{
+	clear: both;
+	float: right;
+	height: 25px;
+	margin-right: 15px;
+	padding-top: 0;
+}
+
+div.header-links ul {
+	list-style: none;
+	margin-left: 0px;
+	margin-top: 0px;
+	margin-bottom: 0px;
+	margin-right: 0px;
+	padding: 0px;
+	float: right;
+}
+
+div.header-links ul li {
+	position: relative;
+	float: left;
+	padding-left: 5px;
+	padding-right: 5px;
+	padding-top: 0px;
+	padding-bottom: 0px;
+	margin: 0px;
+}
+
+/* ------------ page-header-links styles -------------- */
+
+table.page-header-links-table {
+	width: 100%;
+}
+
+table#main-table table.page-header-links-table tr td.page-header-help {
+	text-align: right;
+	font-size: 120%;
+}
+
+td.page-header-help a {
+	background-image: url( ../images/help.gif);
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    padding-bottom: 2px;
+    display: block;
+    float: right;
+    z-index: 10;
+}
+div.page-header-help a {
+	background-image: url( ../images/help.gif);
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    padding-bottom: 2px;
+    line-height: 17px;
+    float: right;
+    z-index: 10;
+    padding-right: 15px;
+    margin-top: 5px;
+    position: relative;
+}
+
+table#main-table table.page-header-links-table tr td.breadcrumbs table.breadcrumb-table tr td.breadcrumb-link {
+	padding-right: 0px;
+	font-size: 90%;
+	white-space:nowrap;
+}
+
+table#main-table table.page-header-links-table tr td.breadcrumbs table.breadcrumb-table tr td.breadcrumb-link a{
+	padding-right: 0px;
+	font-size: 90%;
+}
+
+table#main-table table.page-header-links-table tr td.breadcrumbs table.breadcrumb-table tr td.breadcrumb-current-page a{
+	padding-right: 0px;
+	font-size: 90%;
+	color: #999;
+	cursor: text;
+}
+
+/* ------------- menu styles ---------------------- */
+div#menu {
+    margin-left: 0px;
+    margin-right: 0px;
+    min-width: 224px;
+}
+
+div#menu ul.main {
+}
+
+div#menu ul.main li {
+    font-weight: normal;
+}
+
+div#menu ul.main li.normal {
+}
+
+div#menu ul.main li a.menu-home {
+	font-weight:bold;
+    height:22px;
+    line-height:22px;
+    padding-top:0px;
+    padding-bottom:0px;
+    display: block;
+    /*width:215px;*/
+    padding-left: 10px;
+    padding-right: 20px;
+    color: #0067B1;
+    background-image: url(../images/home-bg.gif);
+    background-repeat: repeat-x;
+    background-position: left top;
+}
+
+div#menu ul.main li a.menu-home:hover {
+	color: #111;
+	background-image: none;
+	background-color: #CCCCCC;
+}
+
+div#menu ul.main li.menu-header {
+	background-image:url(../images/menu-header.gif);
+    background-position: left bottom;
+    background-repeat:repeat-x;
+    font-weight:normal;
+    height:24px;
+    line-height:24px;
+    padding-top:0px;
+    padding-bottom:0px;
+    display: block;
+    /*width:215px;*/
+    padding-left: 10px;
+    padding-right: 20px;
+    cursor: text;
+}
+
+div#menu ul.main li.menu-header img {
+	float:right;
+	margin-right:-15px;
+	margin-top:4px;
+	cursor: pointer;
+}
+
+div#menu ul.main li.menu-disabled-link img {
+	float:right;
+	margin-right:-15px;
+	cursor: pointer;
+}
+
+div#menu ul.main li a.menu-default {
+    background-image: url( ../images/default-menu-icon.gif );
+    background-repeat: no-repeat;
+    background-position: 16px 2px;
+    background-color: transparent;
+    height: 16px;
+    display: block;
+    /*width:187px;*/
+    padding-left: 38px;
+    padding-right: 20px;
+    padding-top: 3px;
+    padding-bottom: 3px;
+    cursor: pointer;
+    border-top: solid 1px #fff;
+    border-bottom: solid 1px #fff;
+	color: #2F7ABD;
+    font-weight:normal;
+}
+
+div#menu ul.main li a.menu-default-selected {
+    background-image: url( ../images/default-menu-icon.gif );
+    background-repeat: no-repeat;
+    background-position: 16px 2px;
+    background-color: transparent;
+    height: 16px;
+    display: block;
+    /*width:187px;*/
+    padding-left: 38px;
+    padding-right: 20px;
+    padding-top: 3px;
+    padding-bottom: 3px;
+    cursor: pointer;
+    border-top: solid 1px #ccc;
+    border-bottom: solid 1px #ccc;
+	color: #2F7ABD;
+    font-weight:normal;
+}
+
+div#menu ul.main li a.menu-default:hover {
+	background-color: #F2F2F2;
+	border-bottom: solid 1px #BFBFBF;
+	border-top: solid 1px #BFBFBF;
+	height: 16px;
+	color: #00447C;
+}
+
+div#menu ul.main li.menu-disabled-link {
+	background-image: url( ../images/default-menu-icon.gif );
+    background-repeat: no-repeat;
+    background-position: 16px 2px;
+	background-color: #F5F5F5;
+	color: #111111;
+    height: 16px;
+    display: block;
+    /*width:187px;*/
+    padding-left: 38px;
+    padding-right: 20px;
+    padding-top: 3px;
+    padding-bottom: 3px;
+    cursor: pointer;
+    border-top: solid 1px #fff;
+    border-bottom: solid 1px #fff;
+    font-weight:normal;
+    cursor:text;
+}
+
+div#menu ul.sub li a.menu-disabled-link:hover {
+	background-color: #F5F5F5;
+	color: #111111;
+}
+
+div#menu ul.sub {
+    *margin-top: -13px;
+}
+
+/* -------------- child no-01 styles -------------- */
+
+div#menu ul.sub li a.menu-default {
+    background-position: 16px 2px;
+    /*width:187px;*/
+    padding-left: 38px;
+    padding-right: 20px;
+    color: #2F7ABD;
+}
+
+	/* ----------- child no-01 (disabled) styles ------------------- */
+	
+	div#menu ul.sub li.menu-disabled-link {
+		background-position: 16px 2px;
+	    /*width:187px;*/
+	    padding-left: 38px;
+	    padding-right: 20px;
+	    color: #111;
+	}
+
+/* -------------- child no-02 styles -------------- */
+
+div#menu ul.sub li.normal ul.sub li a.menu-default {
+    background-position: 32px 2px;
+    /*width:171px;*/
+    padding-left: 54px;
+    padding-right: 20px;
+}
+
+	/* ----------- child no-02 (disabled) styles ------------------- */
+
+	div#menu ul.sub li.normal ul.sub li.menu-disabled-link {
+	    background-position: 32px 2px;
+	    /*width:171px;*/
+	    padding-left: 54px;
+	    padding-right: 20px;
+	}
+
+
+/* -------------- child no-03 styles -------------- */
+
+div#menu ul.sub li.normal ul.sub li.normal ul.sub li a.menu-default {
+    background-position: 48px 2px;
+    /*width:155px;*/
+    padding-left: 70px;
+    padding-right: 20px;
+}
+
+	/* ----------- child no-03 (disabled) styles ------------------- */
+	
+	div#menu ul.sub li.normal ul.sub li.normal ul.sub li.menu-disabled-link {
+	    background-position: 48px 2px;
+	    /*width:155px;*/
+	    padding-left: 70px;
+	    padding-right: 20px;
+	}
+	
+/* -------------- child no-04 styles -------------- */
+
+div#menu ul.sub li.normal ul.sub li.normal ul.sub li.normal ul.sub li a.menu-default {
+    background-position: 64px 2px;
+    /*width:139px;*/
+    padding-left: 86px;
+    padding-right: 20px;
+}
+
+	/* ----------- child no-04 (disabled) styles ------------------- */
+	
+	div#menu ul.sub li.normal ul.sub li.normal ul.sub li.normal ul.sub li.menu-disabled-link {
+	    background-position: 64px 2px;
+	    /*width:139px;*/
+	    padding-left: 86px;
+	    padding-right: 20px;
+	}
+	
+/* -------------- child no-05 styles -------------- */
+
+div#menu ul.sub li.normal ul.sub li.normal ul.sub li.normal ul.sub li.normal ul.sub li a.menu-default {
+    background-position: 80px 2px;
+    /*width:123px;*/
+    padding-left: 102px;
+    padding-right: 20px;
+}
+
+	/* ----------- child no-05 (disabled) styles ------------------- */
+	
+	div#menu ul.sub li.normal ul.sub li.normal ul.sub li.normal ul.sub li.normal ul.sub li.menu-disabled-link {
+	    background-position: 80px 2px;
+	    /*width:123px;*/
+	    padding-left: 102px;
+	    padding-right: 20px;
+	}
+
+/* ------------- footer styles -------------------- */
+
+div#footer-div {
+	height: 27px;
+	width: 100%;
+}
+
+div#footer-div div.footer-content {
+	height: 27px;
+	margin: auto;
+	padding: 0px;
+}
+
+div#footer-div div.footer-content div.copyright {
+	padding-top: 5px;
+	color: #fff;
+	width: 450px;
+	float: left;
+	margin-left: 20px;
+}
+
+div#footer-div div.footer-content div.poweredby {
+	background-image: url( ../images/powered.gif);
+    background-repeat: no-repeat;
+    background-position: left 3px;
+    width: 127px;
+    height: 27px;
+    float: right;
+    margin-right: 20px;
+}
+
+/* --------------- middle content styles ----------------- */
+
+div#middle {
+    background-color: #F4F4F4;
+    width: 100%;
+}
+
+div#middle div#workArea {
+    padding: 10px;
+    background-color: white;
+}
+
+div#middle h2 {
+    color: #0D4d79;
+    margin-top: 0px;
+    margin-bottom: 10px;
+    font-size: 150%;
+    font-weight: normal;
+    padding-bottom: 5px;
+    border-bottom: solid 1px #96A9CA;
+}
+
+div#middle div#workArea h3 {
+	font-size: 140%;
+    font-weight: normal;
+    margin-top: 5px;
+    margin-bottom: 10px;
+}
+div#middle div#workArea h4 {
+	font-size: 130%;
+    font-weight: normal;
+    margin-top: 5px;
+    margin-bottom: 10px;
+}
+div#middle div#workArea h5 {
+	font-size: 120%;
+    font-weight: normal;
+    margin-top: 5px;
+    margin-bottom: 10px;
+}
+div#middle div#workArea h3.mediator {
+	font-size: 120%;
+    font-weight: bold;
+    margin-top: 5px;
+    margin-bottom: 5px;
+    padding-bottom: 4px;
+    border-bottom: solid 1px #ccc;
+    
+}
+/* ---- login styles ----- */
+
+div#middle div#features {
+	padding-right: 30px;
+}
+div#features tr.feature {
+}
+div#features tr.feature td {
+	border-top: solid 1px #BCBEC0;
+	padding-top: 20px;
+	padding-bottom: 20px;
+}
+div#features tr.feature-top {
+}
+div#features tr.feature-top td {
+	border-top: solid 0px #BCBEC0;
+	padding-top: 0px;
+	padding-bottom: 20px;
+}
+tr.feature td img {
+	float: left;
+	margin-right: 20px;
+}
+
+tr.feature h3 {
+	font-weight: normal;
+	font-size: 120%;
+	color: #0067B1;
+}
+
+div#middle div#loginbox {
+	background-color: #fff;
+	border: solid 1px #BCBEC0;
+	padding: 20px;
+	margin-top: 10px;
+}
+
+div#loginbox {
+	text-align: center;
+}
+
+div#loginbox h2 {
+	font-weight: normal;
+	font-size: 150%;
+	text-align: center;
+	color: #0067B1;
+	margin-bottom: 10px;
+	padding-bottom: 15px;
+}
+
+div#loginbox table {
+	margin: auto;
+}
+
+div#loginbox table tr td {
+	padding: 3px;
+}
+
+div#loginbox a{
+}
+
+div#loginbox input.user {
+	width: 150px !important;
+}
+
+div#loginbox input.password {
+	width: 150px !important;
+}
+
+/* ------------- REFINED ------------------ */
+/* ------------- Table Styled Left -------- */
+div#workArea table.styledLeft {
+    border-collapse: collapse;
+    margin-left: 2px;
+    width: 100%;
+}
+
+div#workArea table.styledLeft thead th {
+    background-image:url(../images/table-header.gif);
+    background-position: left bottom;
+    background-repeat:repeat-x;
+    border:1px solid #cccccc;
+    font-weight:normal;
+    height:22px;
+    line-height:20px;
+    margin-bottom:5px;
+    padding-left:8px;
+}
+
+div#workArea table.styledLeft tbody tr td.middle-header {
+    background-image:url(../images/table-header.gif);
+    background-position: left bottom;
+    background-repeat:repeat-x;
+    border:1px solid #cccccc;
+    font-weight:normal;
+    height:22px;
+    line-height:20px;
+    margin-bottom:5px;
+    padding-left:8px;
+}
+
+div#workArea table.styledLeft tbody tr td.sub-header {
+	background-image:url(../images/table-header.gif);
+    background-position: left bottom;
+    background-repeat:repeat-x;
+    border:1px solid #cccccc;
+    border-bottom: 0px solid #666;
+    border-top: 1px solid #666;
+    font-weight:normal;
+    height:22px;
+    line-height:20px;
+    margin-bottom:5px;
+    padding-left:8px;
+}
+
+div#workArea table.styledLeft tbody tr td {
+    border: solid 1px #cccccc;
+    height: 25px;
+    padding-top: 2px;
+    padding-bottom: 2px;
+    padding-left: 8px !important;
+    padding-right: 8px !important;
+    vertical-align: middle !important;
+}
+
+div#workArea table.styledLeft tbody tr td.nopadding {
+    border: solid 1px #cccccc;
+    height: 25px;
+    padding-top: 0px;
+    padding-bottom: 0px;
+    padding-left: 0px !important;
+    padding-right: 0px !important;
+    vertical-align: middle !important;
+}
+div#workArea table.styledLeft tbody tr td.formRow {
+     padding-top: 10px;
+     padding-bottom: 10px;
+     border-right: solid 1px #cccccc;
+ }
+div#workArea table.styledLeft tbody tr td.buttonRow {
+    padding-top: 5px;
+    padding-bottom: 5px;
+    background-image: url(../images/buttonRow-bg.gif);
+    background-position: left top;
+    background-repeat: repeat-x;
+}
+/* ------------Stand alone styles inside tables -------*/
+.noDataBox {
+	border:1px solid #CCCCCC;
+	color:#999999;
+	font-style:italic;
+	padding:5px;
+}
+div.buttonRow {
+    padding-top: 5px;
+    padding-bottom: 5px;
+    padding-left:10px;
+    margin-left:5px;
+    background-image: url(../images/buttonRow-bg.gif);
+    background-position: left top;
+    background-repeat: repeat-x;
+    border:1px solid #CCCCCC;
+}
+div.tabTen{
+padding-left:15px;
+}
+/* ------------- Table Styled Inner -------- */
+div#workArea table.styledInner {
+    border-collapse: collapse;
+    margin-left: 2px;
+    width: 100%;
+}
+
+div#workArea table.styledInner thead th {
+	background-image: none;
+	background-color: #E7E7E8;
+    border:1px solid #cccccc;
+    font-weight:normal;
+    height:22px;
+    line-height:20px;
+    margin-bottom:5px;
+    padding-left:8px;
+}
+div#workArea table.styledInner tbody tr td {
+    border: solid 1px #cccccc !important;
+    height: 25px;
+    padding-top: 2px;
+    padding-bottom: 2px;
+    padding-left: 8px !important;
+    padding-right: 8px !important;
+    vertical-align: middle !important;
+}
+.buttonRowAlone {
+    padding-top: 5px;
+    padding-bottom: 5px;
+    background-image: url(../images/buttonRow-bg.gif);
+    background-position: left top;
+    background-repeat: repeat-x;
+    border-bottom: solid 1px #cccccc;
+    border-top: solid 1px #cccccc;
+}
+div#workArea table.noBorders tbody tr td {
+    border:none;
+}
+div#workArea table.noBorders tbody tr td table.styledLeft td {
+    border: solid 1px #cccccc;
+}
+div#workArea table.noBorders{
+border: solid 1px #cccccc;
+}
+div#workArea table.normal {
+	border-collapse: separate;
+	padding: 3px;
+}
+div#workArea table.normal-nopadding {
+	border-collapse: separate;
+	padding: 0px;
+	width: 100%;
+}
+div#workArea table.normal tbody tr td {
+	border: 0px;
+}
+div#workArea table.normal-nopadding tbody tr td {
+    border: solid 0px #cccccc !important;
+    height: 25px;
+    padding-top: 3px;
+    padding-bottom: 3px;
+    padding-left: 8px !important;
+    padding-right: 8px !important;
+    vertical-align: middle !important;
+}
+div#workArea table.normal-nopadding tbody tr td.top-align {
+    vertical-align: top !important;
+}
+div#workArea table.normal-nopadding tbody tr td.middle-header {
+    background-image:url(../images/table-header.gif);
+    background-position: left bottom;
+    background-repeat:repeat-x;
+    border-top:1px solid #cccccc !important;
+    border-bottom:1px solid #cccccc !important;
+    border-left:0px solid #cccccc;
+    border-right:0px solid #cccccc;
+    font-weight:normal;
+    height:22px;
+    line-height:20px;
+    margin-bottom:5px;
+    padding-left:8px;
+}
+div#workArea table.normal-nopadding tbody tr td.sub-header {
+	background-image: none;
+    background-color: #ededed;
+    border-top:1px solid #cccccc;
+    border-bottom:1px solid #cccccc;
+    border-left:1px solid #cccccc;
+    border-right:1px solid #cccccc;
+    font-weight:normal;
+    height:22px;
+    line-height:20px;
+    margin-bottom:5px;
+    padding-left:8px;
+}
+div#workArea table.normal-nopadding tbody tr td.nopadding {
+padding: 0px !important;
+border: 0px !important;
+}
+div#workArea table.normal tbody tr td.nopadding {
+padding: 0px !important;
+border: 0px !important;
+}
+/* ---------------- table styles --------------------------- */
+.tableOddRow{background-color: white;}
+.tableEvenRow{background-color: #ededed;}
+
+/*.button, .button:visited {
+	background: #e7e7e7 url(../images/overlay.png) repeat-x;
+	display: inline-block; 
+	padding: 2px 5px 2px;
+	color: #000;
+	text-decoration: none;
+	-moz-border-radius: 6px;
+	-webkit-border-radius: 6px;
+	-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.6);
+	-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.6);
+	text-shadow: 0 -1px 1px rgba(0,0,0,0.25);
+	border-bottom: 1px solid rgba(0,0,0,0.25);
+	position: relative;
+	cursor: pointer
+}
+ 
+.button:hover{ 
+	background-color: #d9d9d9; color: #000;
+}
+.button:active{
+ 	top: 1px;
+}*/
+
+a.icon-link {
+background-image: url(../images/default-menu-icon.gif);
+background-repeat: no-repeat;
+background-position: left top;
+padding-left: 20px;
+line-height: 17px;
+height: 17px;
+float: left;
+position: relative;
+margin-left: 10px;
+margin-top: 5px;
+margin-bottom: 3px;
+white-space: nowrap;
+cursor:pointer;
+    color:#2F7ABD;
+}
+a.icon-link-nofloat {
+background-image: url(../images/default-menu-icon.gif);
+background-repeat: no-repeat;
+background-position: left top;
+padding-left: 20px !important;
+padding-bottom: 2px;
+line-height: 17px;
+height: 17px;
+margin-left: 10px;
+margin-right: 20px !important;
+margin-top: 5px;
+margin-bottom: 3px;
+white-space: nowrap;
+display: block;
+}
+a.delete-icon-link {
+    background-image: url( ../images/delete.gif );    
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    line-height: 17px;
+    height: 17px;
+    float: left;
+    position: relative;
+    margin-left: 10px;
+    margin-top: 5px;
+    margin-bottom: 3px;
+    white-space: nowrap;
+}
+a.delete-icon-link-nofloat {
+    background-image: url( ../images/delete.gif );    
+    background-repeat: no-repeat;
+    background-position: left 2px;
+    padding-left: 20px;
+    line-height: 23px;
+    height: 23px;
+    float: none;
+    margin-left: 10px;
+    margin-top: 0px;
+    margin-bottom: 0px;
+    white-space: nowrap;
+    padding-top: 0px;
+    padding-bottom: 0px;
+    display: block;
+}
+a#delete1, a#delete2 {
+    background-image: url( ../images/delete.gif );    
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    line-height: 17px;
+    height: 17px;
+    float: left;
+    position: relative;
+    margin-left: 10px;
+    margin-top: 0px;
+    margin-bottom: 0px;
+    white-space: nowrap;
+}
+
+.item-selector-link {
+    background-image: url( ../images/delete.gif );
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    line-height: 17px;
+    height: 17px;
+    float: left;
+    position: relative;
+    margin-left: 10px;
+    margin-top: 0px;
+    margin-bottom: 0px;
+    white-space: nowrap;
+}
+
+a.edit-icon-link {
+    background-image: url( ../images/edit.gif );    
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    line-height: 17px;
+    height: 17px;
+    float: left;
+    position: relative;
+    margin-left: 10px;
+    margin-top: 5px;
+    margin-bottom: 3px;
+    white-space: nowrap;
+}
+a.copy-icon-link {
+    background-image: url( ../images/copy.gif );    
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    line-height: 17px;
+    height: 17px;
+    float: left;
+    position: relative;
+    margin-left: 10px;
+    margin-top: 5px;
+    margin-bottom: 3px;
+    white-space: nowrap;
+}
+a.move-icon-link {
+    background-image: url( ../images/move.gif );    
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    line-height: 17px;
+    height: 17px;
+    float: left;
+    position: relative;
+    margin-left: 10px;
+    margin-top: 5px;
+    margin-bottom: 3px;
+    white-space: nowrap;
+}
+a.view-icon-link {
+    background-image: url( ../images/view.gif );    
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    line-height: 17px;
+    height: 17px;
+    float: left;
+    position: relative;
+    margin-left: 10px;
+    margin-top: 5px;
+    margin-bottom: 3px;
+    white-space: nowrap;
+}
+a.feed-small-res-icon-link {
+    background-image: url( ../images/icon-feed-small-res.gif );    
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    line-height: 17px;
+    height: 17px;
+    float: left;
+    position: relative;
+    margin-left: 10px;
+    margin-top: 5px;
+    margin-bottom: 3px;
+    white-space: nowrap;
+}
+a.registry-picker-icon-link {
+    background-image: url( ../images/registry_picker.gif );    
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    line-height: 17px;
+    height: 17px;
+    float: left;
+    position: relative;
+    margin-left: 10px;
+    margin-top: 5px;
+    margin-bottom: 3px;
+    white-space: nowrap;
+}
+a.nseditor-icon-link {
+    background-image: url( ../images/nseditor-icon.gif );    
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    line-height: 17px;
+    height: 17px;
+    float: left;
+    position: relative;
+    margin-left: 10px;
+    margin-top: 5px;
+    margin-bottom: 3px;
+    white-space: nowrap;
+}
+a.add-icon-link {
+    background-image: url( ../images/add.gif );    
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    line-height: 17px;
+    height: 17px;
+    float: left;
+    position: relative;
+    margin-left: 10px;
+    margin-top: 5px;
+    margin-bottom: 3px;
+    white-space: nowrap;
+}
+a.policie-icon-link {
+    background-image: url( ../images/policies.gif );
+    background-repeat: no-repeat;
+    background-position: left top;
+    padding-left: 20px;
+    line-height: 17px;
+    height: 17px;
+    float: left;
+    position: relative;
+    margin-left: 10px;
+    margin-top: 5px;
+    margin-bottom: 3px;
+    white-space: nowrap;
+}
+span.icon-text {
+background-image: url(../images/default-menu-icon.gif);
+background-repeat: no-repeat;
+background-position: left top;
+padding-left: 20px;
+line-height: 17px;
+height: 17px;
+float: left;
+position: relative;
+margin-left: 10px;
+margin-top: 3px;
+margin-bottom: 3px;
+white-space: nowrap;
+}
+span.icon-text-disabled {
+background-image: url(../images/default-menu-icon.gif);
+background-repeat: no-repeat;
+background-position: left top;
+padding-left: 20px;
+line-height: 17px;
+height: 17px;
+float: left;
+position: relative;
+margin-left: 10px;
+margin-top: 3px;
+margin-bottom: 3px;
+white-space: nowrap;
+color: #999;
+}
+select {
+font-size: 100%;
+}
+span.required,div.required{
+color:red;
+}
+form label.error {
+    color: #ed0000;
+    padding-left:10px;
+}
+.longInput{
+width:250px;
+}
+
+/*  Small column style*/
+.leftCol-small{
+    width:150px;
+}
+div.sectionSub div.sectionSub .leftCol-small{  /* Second level */
+    width:140px;
+}
+div.sectionSub div.sectionSub div.sectionSub .leftCol-small{  /*third level  */
+    width:130px;
+}
+div.sectionSub div.sectionSub div.sectionSub .leftCol-small{  /* Fourth level */
+    width:120px;
+}
+/*  Medium column style*/
+.leftCol-med{
+    width:250px;
+}
+div.sectionSub div.sectionSub .leftCol-med{  /* Second level */
+    width:240px;
+}
+div.sectionSub div.sectionSub div.sectionSub .leftCol-med{  /* third level */
+    width:230px;
+}
+div.sectionSub div.sectionSub div.sectionSub .leftCol-med{  /* Fourth level */
+    width:220px;
+}
+
+/*  Big column style*/
+.leftCol-big{
+    width:350px;
+}
+div.sectionSub div.sectionSub .leftCol-big{  /* Second level */
+    width:340px;
+}
+div.sectionSub div.sectionSub div.sectionSub .leftCol-big{  /* third level */
+    width:330px;
+}
+div.sectionSub div.sectionSub div.sectionSub .leftCol-big{  /* Fourth level */
+    width:320px;
+}
+
+
+.ajax-loading-message-small{
+position:relative;
+margin-left:150px;
+font-size:12px;
+font-weight:bold;
+color:#aaaaaa;
+}
+.ajax-loading-message img{
+margin-right:20px;
+}
+/*--- service parameter page styles ( use to remove the unwanted colors inherited from Highlightre styles ---- */
+div.dp-highlighter {
+background-color: transparent;
+}
+div.dp-highlighter ol {
+background-color: transparent;
+}
+div.dp-highlighter ol li.alt {
+background-color: transparent;
+}
+div.dp-highlighter ol li, .dp-highlighter .columns div {
+background-color: transparent;
+}
+input.text-box-big {
+width: 250px;
+}
+.info-box{
+background-color:#EEF3F6;
+border:1px solid #ABA7A7;
+font-size:13px;
+font-weight:bold;
+margin-bottom:10px;
+padding:10px;
+}
+.mSelected {
+    background-color: #DDDDDD !important;
+}
+div.clear  {
+font-size:4px;
+line-height:4px;
+}
+.panelClass{
+border: 1px solid #CCCCCC;
+padding:5px;
+-moz-border-radius: 5px;
+-moz-border-radius: 5px;
+border-radius: 5px;
+border-radius: 5px;
+
+-moz-box-shadow: 5px 5px 5px #888;
+-webkit-box-shadow: 5px 5px 5px #888;
+box-shadow: 5px 5px 5px #888;
+ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='../images/panelImage.png');
+ white-space:nowrap;
+ line-height:25px;
+}
+.panelClass[class] {
+background-image:url(../images/panelImage.png);
+}
+.defaultText{
+    color: #666666;
+    font-style:italic;
+}
+.vertical-menu-container{
+    width:15px;
+    background-color:#f0f0f0;
+    border-right:solid 1px #767676;
+    border-top:solid 1px #cccccc;
+}
+.menu-panel-buttons{
+    width:15px;
+    cursor:pointer;
+    background-color:#c8c8c8;
+    border-right: 1px solid #CCCCCC;
+    border-top: 1px solid #CCCCCC;
+    border-bottom: 1px solid #CCCCCC;
+
+    -moz-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+    border-radius: 3px;
+
+    margin-bottom:10px;
+    height:47px;
+    padding-top:10px;
+    padding-bottom:10px;
+}
+.menu-panel-buttons span{
+    background-color: #cccccc;
+    color: #333333;
+    display:block;
+    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
+    -webkit-transform: rotate(-90deg);
+    -moz-transform: rotate(-90deg);
+    -o-transform: rotate(-90deg);
+    white-space:nowrap;
+    display:block;
+    width:60px;
+    *position:absolute;
+    margin-left:-25px;
+    margin-top:15px;
+    padding-right:2px;
+    padding-left:2px;
+}
+.menu-panel-buttons span.ie{
+    margin-left:0px;
+    margin-top:-10px;
+}
+div.selected{
+    border:solid 1px #000;
+}
+.ie10 div.menu-panel-buttons span{
+    -ms-transform: rotate(-90deg);
+       margin-left:-25px;
+       margin-top:15px;
+}
+div.selected{
+    -moz-box-shadow: 3px 3px 3px #888;
+    -webkit-box-shadow: 3px 3px 3px #888;
+    box-shadow: 3px 3px 3px #888;
+}
+div.selected span{
+    color:#fff;
+    background-color: #a4a4a4;    
+}
+#menu-panel-button0{
+    height:20px;
+    margin-top:5px;
+    margin-bottom:5px;
+    margin-left:2px;
+    cursor:pointer;
+}
+
+.showToHidden{
+    background:transparent url(../images/leftRightSlider-dark.png) no-repeat 0 0;
+}
+.hiddenToShow{
+    background:transparent url(../images/leftRightSlider-dark.png) no-repeat -20px 0;
+}
+.vertical-menu{
+    background-color: #b0bcc3;
+    width:20px;
+}
+label.form-help{
+    color: #999999;
+    display:block;
+}
+
+
+/*---toggle styles --*/
+h2.active {
+   background-image:url(../images/down-arrow.png) !important;
+}
+h2.trigger {
+    border: solid 1px #c2c4c6;
+
+    -moz-box-shadow: 3px 3px 3px #888;
+    -webkit-box-shadow: 3px 3px 3px #888;
+    box-shadow: 3px 3px 3px #888;
+
+    padding: 0;
+    background-color: #e9e9e9;
+    background-image:url(../images/up-arrow.png);
+    background-repeat:no-repeat;
+    background-position:5px center;
+    padding-left: 30px;
+    padding-bottom:0px !important;
+    margin-bottom:0px !important;
+    margin: 0;
+    z-index: 1;
+    cursor: pointer;
+    height: 25px;
+}
+
+h2.trigger a {
+    line-height: 25px;
+    color: #000000;
+    font-weight: normal;
+    padding: 5px 5px;
+    outline-color: -moz-use-text-color;
+    outline-style: none;
+    outline-width: 0;
+    font-size: 0.7em;
+
+}
+
+.toggle_container {
+    background-color: #fff;
+    border: solid 1px #e1e1e1;
+    -moz-border-radius-bottomright: 3px;
+    border-bottom-right-radius: 3px;
+    -moz-border-radius-bottomleft: 3px;
+    border-bottom-left-radius: 3px;
+    padding:10px;
+
+    -moz-box-shadow: 5px 5px 5px #888;
+    -webkit-box-shadow: 5px 5px 5px #888;
+    box-shadow: 5px 5px 5px #888;
+    clear: both;
+    z-index: 0;
+}
+label.error{
+    color:red;
+    padding-left:5px;
+}
+.loadingDialogBox{
+    border-top:solid 5px #88afbd;
+    border-bottom:solid 1px #88afbd;
+    border-left:solid 1px #88afbd;
+    border-right:solid 1px #88afbd;
+    padding:10px 5px 10px 35px;
+    line-height:20px;
+    background:transparent url(../images/loading-small.gif) no-repeat 10px 10px;
+}
+.something-wrong{
+    background-color:#ffe886;
+    border:solid 1px #c4ad4d;
+    border-bottom:solid 5px #c4ad4d;
+    padding:5px;
+    width:950px;
+    margin:auto;
+    z-index:1000;
+}
+.something-wrong div.title{
+    font-size:14px;
+    font-weight: bold;
+}
+.something-wrong div.content{
+    font:11px;
+}
+.server-url-cell{
+    padding-left:5px;
+    text-align:right;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
new file mode 100644
index 0000000..5b5dab2
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
new file mode 100644
index 0000000..ac8b229
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100644
index 0000000..ad3d634
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100644
index 0000000..42ccba2
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
new file mode 100644
index 0000000..5a46b47
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
new file mode 100644
index 0000000..86c2baa
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
new file mode 100644
index 0000000..4443fdc
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
new file mode 100644
index 0000000..7c9fa6c
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_222222_256x240.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_222222_256x240.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_222222_256x240.png
new file mode 100644
index 0000000..b273ff1
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_222222_256x240.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_2e83ff_256x240.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_2e83ff_256x240.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_2e83ff_256x240.png
new file mode 100644
index 0000000..09d1cdc
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_2e83ff_256x240.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_454545_256x240.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_454545_256x240.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_454545_256x240.png
new file mode 100644
index 0000000..59bd45b
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_454545_256x240.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_888888_256x240.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_888888_256x240.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_888888_256x240.png
new file mode 100644
index 0000000..6d02426
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_888888_256x240.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_cd0a0a_256x240.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_cd0a0a_256x240.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_cd0a0a_256x240.png
new file mode 100644
index 0000000..2ab019b
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/images/ui-icons_cd0a0a_256x240.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/jquery-ui-1.8.11.custom.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/jquery-ui-1.8.11.custom.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/jquery-ui-1.8.11.custom.css
new file mode 100644
index 0000000..b2f72e9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/smoothness/jquery-ui-1.8.11.custom.css
@@ -0,0 +1,573 @@
+/*
+ * jQuery UI CSS Framework 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+ * jQuery UI CSS Framework 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighligh
 t=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
+.ui-widget-content a { color: #222222; }
+.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
+.ui-widget-header a { color: #222222; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary,  .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
+.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-right {  -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
+.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
+ * jQuery UI Resizable 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizable#theming
+ */
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
+ * jQuery UI Selectable 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectable#theming
+ */
+.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
+/*
+ * jQuery UI Accordion 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion { width: 100%; }
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
+.ui-accordion .ui-accordion-li-fix { display: inline; }
+.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
+.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
+.ui-accordion .ui-accordion-content-active { display: block; }
+/*
+ * jQuery UI Autocomplete 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete { position: absolute; cursor: default; }	
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.11
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu {
+	list-style:none;
+	padding: 2px;
+	margin: 0;
+	display:block;
+	float: left;
+}
+.ui-menu .ui-menu {
+	margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+	margin:0;
+	padding: 0;
+	zoom: 1;
+	float: left;
+	clear: left;
+	width: 100%;
+}
+.ui-menu .ui-menu-item a {
+	text-decoration:none;
+	display:block;
+	padding:.2em .4em;
+	line-height:1.5;
+	zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+	font-weight: normal;
+	margin: -1px;
+}
+/*
+ * jQuery UI Button 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; } 
+button.ui-button-icons-only { width: 3.7em; } 
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4;  }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+/*
+ * jQuery UI Dialog 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative;  }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } 
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+/*
+ * jQuery UI Slider 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
+ * jQuery UI Tabs 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs#theming
+ */
+.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
+.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
+.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tabs .ui-tabs-hide { display: none !important; }
+/*
+ * jQuery UI Datepicker 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px;  }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month, 
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+    display: none; /*sorry for IE5*/
+    display/**/: block; /*sorry for IE5*/
+    position: absolute; /*must have*/
+    z-index: -1; /*must have*/
+    filter: mask(); /*must have*/
+    top: -4px; /*must have*/
+    left: -4px; /*must have*/
+    width: 200px; /*must have*/
+    height: 200px; /*must have*/
+}/*
+ * jQuery UI Progressbar 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar { height:2em; text-align: left; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/docs/userguide.html
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/docs/userguide.html b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/docs/userguide.html
new file mode 100644
index 0000000..0190615
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/docs/userguide.html
@@ -0,0 +1,232 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!--
+ ~ Copyright (c) 2005-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~    http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied.  See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<html>
+<head>
+    <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"/>
+    <title>WSO2 Carbon Server Home</title>
+    <link href="../../admin/css/documentation.css" rel="stylesheet"
+          type="text/css" media="all"/>
+</head>
+<body>
+<h1>
+    WSO2 Carbon Server Home Page</h1>
+
+<p> When you log on to
+    the WSO2 Carbon Server, the home page displays information about
+    the server hosting envrionment, the JVM configuration information, the
+    deployed operating system and the logged in user information in four
+    separate tables. </p>
+
+<table cellspacing="0" class="styled">
+    <tbody>
+	<tr><td colspan="2" class="subHeader">Server</td></tr>
+    <tr>
+        <td>
+            Host
+        </td>
+        <td>
+            The server IP address
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Server URL
+        </td>
+        <td>
+            URL of the hosted services
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Server Start Time
+        </td>
+        <td>
+            The server start time, displayed precisely to the second.
+        </td>
+    </tr>
+    <tr>
+        <td>
+            System Up Time
+        </td>
+        <td>
+            The up time of the system, displayed precisely to the second.
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Version
+        </td>
+        <td>
+            Server version
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Repository Location
+        </td>
+        <td>
+            The respository location folder used by Carbon.
+        </td>
+    </tr>
+
+    <tr><td class="subHeader">Operating System</td></tr>
+    <tr>
+        <td>
+            OS Name
+        </td>
+        <td>The version of the operating system used by the server</td>
+    </tr>
+    <tr>
+        <td>
+            OS Version
+        </td>
+        <td>The version of the operating system</td>
+    </tr>
+
+    <tr><td class="subHeader">Operating System User</td></tr>
+    <tr>
+        <td>
+            Country
+        </td>
+        <td>
+            The locale of the operating system user running the Carbon server.
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Home
+        </td>
+        <td>
+            The home directory of the operating system user running Carbon.
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Name
+        </td>
+        <td>
+            The name of the operating system user running Carbon.
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Timezone
+        </td>
+        <td>
+            The timezone of the operating system user running Carbon.
+        </td>
+    </tr>
+
+    <tr><td class="subHeader">Java VM</td></tr>
+    <tr>
+        <td>
+            Java Home
+        </td>
+        <td>
+            The location of the Java runtime library
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Java Runtime Name
+        </td>
+        <td>
+            The Java runtime name ( For example : Java(TM) 2 Runtime
+            Environment, Standard Edition )
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Java Version
+        </td>
+        <td>
+            The version of the Java runtime library</td>
+    </tr>
+    <tr>
+        <td>
+            Java Vendor
+        </td>
+        <td>
+            The Java runtime vendor
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Java VM Version
+        </td>
+        <td>The version of the Java virtual machine</td>
+    </tr>
+
+    <tr><td class="subHeader">Registry</td></tr>
+    <tr>
+        <td>
+            Registry Type
+        </td>
+        <td>
+            Values can be 'Embedded' or 'Remote'. Indicates whether this server uses
+            an embedded Registry or remote Registry
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Registry Database Name
+        </td>
+        <td>
+            Name of the Registry DB
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Registry Database Version
+        </td>
+        <td>
+            Version of the Registry DB
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Database Driver Name
+        </td>
+        <td>
+            Name of the JDBC driver used
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Database Driver Version
+        </td>
+        <td>
+            Version of the JDBC driver used
+        </td>
+    </tr>
+    <tr>
+        <td>
+            Database URL
+        </td>
+        <td>
+            JDBC URL of the Embedded Registry DB
+        </td>
+    </tr>
+
+    </tbody>
+</table>
+
+</body>
+</html>


[24/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/effects.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/effects.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/effects.js
new file mode 100644
index 0000000..06f59b4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/effects.js
@@ -0,0 +1,1090 @@
+// script.aculo.us effects.js v1.7.0, Fri Jan 19 19:16:36 CET 2007
+
+// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Contributors:
+//  Justin Palmer (http://encytemedia.com/)
+//  Mark Pilgrim (http://diveintomark.org/)
+//  Martin Bialasinki
+// 
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/ 
+
+// converts rgb() and #xxx to #xxxxxx format,  
+// returns self (or first argument) if not convertable  
+String.prototype.parseColor = function() {  
+  var color = '#';
+  if(this.slice(0,4) == 'rgb(') {  
+    var cols = this.slice(4,this.length-1).split(',');  
+    var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);  
+  } else {  
+    if(this.slice(0,1) == '#') {  
+      if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();  
+      if(this.length==7) color = this.toLowerCase();  
+    }  
+  }  
+  return(color.length==7 ? color : (arguments[0] || this));  
+}
+
+/*--------------------------------------------------------------------------*/
+
+Element.collectTextNodes = function(element) {  
+  return $A($(element).childNodes).collect( function(node) {
+    return (node.nodeType==3 ? node.nodeValue : 
+      (node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
+  }).flatten().join('');
+}
+
+Element.collectTextNodesIgnoreClass = function(element, className) {  
+  return $A($(element).childNodes).collect( function(node) {
+    return (node.nodeType==3 ? node.nodeValue : 
+      ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? 
+        Element.collectTextNodesIgnoreClass(node, className) : ''));
+  }).flatten().join('');
+}
+
+Element.setContentZoom = function(element, percent) {
+  element = $(element);  
+  element.setStyle({fontSize: (percent/100) + 'em'});   
+  if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);
+  return element;
+}
+
+Element.getOpacity = function(element){
+  return $(element).getStyle('opacity');
+}
+
+Element.setOpacity = function(element, value){
+  return $(element).setStyle({opacity:value});
+}
+
+Element.getInlineOpacity = function(element){
+  return $(element).style.opacity || '';
+}
+
+Element.forceRerendering = function(element) {
+  try {
+    element = $(element);
+    var n = document.createTextNode(' ');
+    element.appendChild(n);
+    element.removeChild(n);
+  } catch(e) { }
+};
+
+/*--------------------------------------------------------------------------*/
+
+Array.prototype.call = function() {
+  var args = arguments;
+  this.each(function(f){ f.apply(this, args) });
+}
+
+/*--------------------------------------------------------------------------*/
+
+var Effect = {
+  _elementDoesNotExistError: {
+    name: 'ElementDoesNotExistError',
+    message: 'The specified DOM element does not exist, but is required for this effect to operate'
+  },
+  tagifyText: function(element) {
+    if(typeof Builder == 'undefined')
+      throw("Effect.tagifyText requires including script.aculo.us' builder.js library");
+      
+    var tagifyStyle = 'position:relative';
+    if(/MSIE/.test(navigator.userAgent) && !window.opera) tagifyStyle += ';zoom:1';
+    
+    element = $(element);
+    $A(element.childNodes).each( function(child) {
+      if(child.nodeType==3) {
+        child.nodeValue.toArray().each( function(character) {
+          element.insertBefore(
+            Builder.node('span',{style: tagifyStyle},
+              character == ' ' ? String.fromCharCode(160) : character), 
+              child);
+        });
+        Element.remove(child);
+      }
+    });
+  },
+  multiple: function(element, effect) {
+    var elements;
+    if(((typeof element == 'object') || 
+        (typeof element == 'function')) && 
+       (element.length))
+      elements = element;
+    else
+      elements = $(element).childNodes;
+      
+    var options = Object.extend({
+      speed: 0.1,
+      delay: 0.0
+    }, arguments[2] || {});
+    var masterDelay = options.delay;
+
+    $A(elements).each( function(element, index) {
+      new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
+    });
+  },
+  PAIRS: {
+    'slide':  ['SlideDown','SlideUp'],
+    'blind':  ['BlindDown','BlindUp'],
+    'appear': ['Appear','Fade']
+  },
+  toggle: function(element, effect) {
+    element = $(element);
+    effect = (effect || 'appear').toLowerCase();
+    var options = Object.extend({
+      queue: { position:'end', scope:(element.id || 'global'), limit: 1 }
+    }, arguments[2] || {});
+    Effect[element.visible() ? 
+      Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
+  }
+};
+
+var Effect2 = Effect; // deprecated
+
+/* ------------- transitions ------------- */
+
+Effect.Transitions = {
+  linear: Prototype.K,
+  sinoidal: function(pos) {
+    return (-Math.cos(pos*Math.PI)/2) + 0.5;
+  },
+  reverse: function(pos) {
+    return 1-pos;
+  },
+  flicker: function(pos) {
+    return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
+  },
+  wobble: function(pos) {
+    return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
+  },
+  pulse: function(pos, pulses) { 
+    pulses = pulses || 5; 
+    return (
+      Math.round((pos % (1/pulses)) * pulses) == 0 ? 
+            ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) : 
+        1 - ((pos * pulses * 2) - Math.floor(pos * pulses * 2))
+      );
+  },
+  none: function(pos) {
+    return 0;
+  },
+  full: function(pos) {
+    return 1;
+  }
+};
+
+/* ------------- core effects ------------- */
+
+Effect.ScopedQueue = Class.create();
+Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), {
+  initialize: function() {
+    this.effects  = [];
+    this.interval = null;
+  },
+  _each: function(iterator) {
+    this.effects._each(iterator);
+  },
+  add: function(effect) {
+    var timestamp = new Date().getTime();
+    
+    var position = (typeof effect.options.queue == 'string') ? 
+      effect.options.queue : effect.options.queue.position;
+    
+    switch(position) {
+      case 'front':
+        // move unstarted effects after this effect  
+        this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
+            e.startOn  += effect.finishOn;
+            e.finishOn += effect.finishOn;
+          });
+        break;
+      case 'with-last':
+        timestamp = this.effects.pluck('startOn').max() || timestamp;
+        break;
+      case 'end':
+        // start effect after last queued effect has finished
+        timestamp = this.effects.pluck('finishOn').max() || timestamp;
+        break;
+    }
+    
+    effect.startOn  += timestamp;
+    effect.finishOn += timestamp;
+
+    if(!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit))
+      this.effects.push(effect);
+    
+    if(!this.interval) 
+      this.interval = setInterval(this.loop.bind(this), 15);
+  },
+  remove: function(effect) {
+    this.effects = this.effects.reject(function(e) { return e==effect });
+    if(this.effects.length == 0) {
+      clearInterval(this.interval);
+      this.interval = null;
+    }
+  },
+  loop: function() {
+    var timePos = new Date().getTime();
+    for(var i=0, len=this.effects.length;i<len;i++) 
+      if(this.effects[i]) this.effects[i].loop(timePos);
+  }
+});
+
+Effect.Queues = {
+  instances: $H(),
+  get: function(queueName) {
+    if(typeof queueName != 'string') return queueName;
+    
+    if(!this.instances[queueName])
+      this.instances[queueName] = new Effect.ScopedQueue();
+      
+    return this.instances[queueName];
+  }
+}
+Effect.Queue = Effect.Queues.get('global');
+
+Effect.DefaultOptions = {
+  transition: Effect.Transitions.sinoidal,
+  duration:   1.0,   // seconds
+  fps:        60.0,  // max. 60fps due to Effect.Queue implementation
+  sync:       false, // true for combining
+  from:       0.0,
+  to:         1.0,
+  delay:      0.0,
+  queue:      'parallel'
+}
+
+Effect.Base = function() {};
+Effect.Base.prototype = {
+  position: null,
+  start: function(options) {
+    this.options      = Object.extend(Object.extend({},Effect.DefaultOptions), options || {});
+    this.currentFrame = 0;
+    this.state        = 'idle';
+    this.startOn      = this.options.delay*1000;
+    this.finishOn     = this.startOn + (this.options.duration*1000);
+    this.event('beforeStart');
+    if(!this.options.sync)
+      Effect.Queues.get(typeof this.options.queue == 'string' ? 
+        'global' : this.options.queue.scope).add(this);
+  },
+  loop: function(timePos) {
+    if(timePos >= this.startOn) {
+      if(timePos >= this.finishOn) {
+        this.render(1.0);
+        this.cancel();
+        this.event('beforeFinish');
+        if(this.finish) this.finish(); 
+        this.event('afterFinish');
+        return;  
+      }
+      var pos   = (timePos - this.startOn) / (this.finishOn - this.startOn);
+      var frame = Math.round(pos * this.options.fps * this.options.duration);
+      if(frame > this.currentFrame) {
+        this.render(pos);
+        this.currentFrame = frame;
+      }
+    }
+  },
+  render: function(pos) {
+    if(this.state == 'idle') {
+      this.state = 'running';
+      this.event('beforeSetup');
+      if(this.setup) this.setup();
+      this.event('afterSetup');
+    }
+    if(this.state == 'running') {
+      if(this.options.transition) pos = this.options.transition(pos);
+      pos *= (this.options.to-this.options.from);
+      pos += this.options.from;
+      this.position = pos;
+      this.event('beforeUpdate');
+      if(this.update) this.update(pos);
+      this.event('afterUpdate');
+    }
+  },
+  cancel: function() {
+    if(!this.options.sync)
+      Effect.Queues.get(typeof this.options.queue == 'string' ? 
+        'global' : this.options.queue.scope).remove(this);
+    this.state = 'finished';
+  },
+  event: function(eventName) {
+    if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
+    if(this.options[eventName]) this.options[eventName](this);
+  },
+  inspect: function() {
+    var data = $H();
+    for(property in this)
+      if(typeof this[property] != 'function') data[property] = this[property];
+    return '#<Effect:' + data.inspect() + ',options:' + $H(this.options).inspect() + '>';
+  }
+}
+
+Effect.Parallel = Class.create();
+Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), {
+  initialize: function(effects) {
+    this.effects = effects || [];
+    this.start(arguments[1]);
+  },
+  update: function(position) {
+    this.effects.invoke('render', position);
+  },
+  finish: function(position) {
+    this.effects.each( function(effect) {
+      effect.render(1.0);
+      effect.cancel();
+      effect.event('beforeFinish');
+      if(effect.finish) effect.finish(position);
+      effect.event('afterFinish');
+    });
+  }
+});
+
+Effect.Event = Class.create();
+Object.extend(Object.extend(Effect.Event.prototype, Effect.Base.prototype), {
+  initialize: function() {
+    var options = Object.extend({
+      duration: 0
+    }, arguments[0] || {});
+    this.start(options);
+  },
+  update: Prototype.emptyFunction
+});
+
+Effect.Opacity = Class.create();
+Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    if(!this.element) throw(Effect._elementDoesNotExistError);
+    // make this work on IE on elements without 'layout'
+    if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout))
+      this.element.setStyle({zoom: 1});
+    var options = Object.extend({
+      from: this.element.getOpacity() || 0.0,
+      to:   1.0
+    }, arguments[1] || {});
+    this.start(options);
+  },
+  update: function(position) {
+    this.element.setOpacity(position);
+  }
+});
+
+Effect.Move = Class.create();
+Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    if(!this.element) throw(Effect._elementDoesNotExistError);
+    var options = Object.extend({
+      x:    0,
+      y:    0,
+      mode: 'relative'
+    }, arguments[1] || {});
+    this.start(options);
+  },
+  setup: function() {
+    // Bug in Opera: Opera returns the "real" position of a static element or
+    // relative element that does not have top/left explicitly set.
+    // ==> Always set top and left for position relative elements in your stylesheets 
+    // (to 0 if you do not need them) 
+    this.element.makePositioned();
+    this.originalLeft = parseFloat(this.element.getStyle('left') || '0');
+    this.originalTop  = parseFloat(this.element.getStyle('top')  || '0');
+    if(this.options.mode == 'absolute') {
+      // absolute movement, so we need to calc deltaX and deltaY
+      this.options.x = this.options.x - this.originalLeft;
+      this.options.y = this.options.y - this.originalTop;
+    }
+  },
+  update: function(position) {
+    this.element.setStyle({
+      left: Math.round(this.options.x  * position + this.originalLeft) + 'px',
+      top:  Math.round(this.options.y  * position + this.originalTop)  + 'px'
+    });
+  }
+});
+
+// for backwards compatibility
+Effect.MoveBy = function(element, toTop, toLeft) {
+  return new Effect.Move(element, 
+    Object.extend({ x: toLeft, y: toTop }, arguments[3] || {}));
+};
+
+Effect.Scale = Class.create();
+Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), {
+  initialize: function(element, percent) {
+    this.element = $(element);
+    if(!this.element) throw(Effect._elementDoesNotExistError);
+    var options = Object.extend({
+      scaleX: true,
+      scaleY: true,
+      scaleContent: true,
+      scaleFromCenter: false,
+      scaleMode: 'box',        // 'box' or 'contents' or {} with provided values
+      scaleFrom: 100.0,
+      scaleTo:   percent
+    }, arguments[2] || {});
+    this.start(options);
+  },
+  setup: function() {
+    this.restoreAfterFinish = this.options.restoreAfterFinish || false;
+    this.elementPositioning = this.element.getStyle('position');
+    
+    this.originalStyle = {};
+    ['top','left','width','height','fontSize'].each( function(k) {
+      this.originalStyle[k] = this.element.style[k];
+    }.bind(this));
+      
+    this.originalTop  = this.element.offsetTop;
+    this.originalLeft = this.element.offsetLeft;
+    
+    var fontSize = this.element.getStyle('font-size') || '100%';
+    ['em','px','%','pt'].each( function(fontSizeType) {
+      if(fontSize.indexOf(fontSizeType)>0) {
+        this.fontSize     = parseFloat(fontSize);
+        this.fontSizeType = fontSizeType;
+      }
+    }.bind(this));
+    
+    this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
+    
+    this.dims = null;
+    if(this.options.scaleMode=='box')
+      this.dims = [this.element.offsetHeight, this.element.offsetWidth];
+    if(/^content/.test(this.options.scaleMode))
+      this.dims = [this.element.scrollHeight, this.element.scrollWidth];
+    if(!this.dims)
+      this.dims = [this.options.scaleMode.originalHeight,
+                   this.options.scaleMode.originalWidth];
+  },
+  update: function(position) {
+    var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
+    if(this.options.scaleContent && this.fontSize)
+      this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType });
+    this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
+  },
+  finish: function(position) {
+    if(this.restoreAfterFinish) this.element.setStyle(this.originalStyle);
+  },
+  setDimensions: function(height, width) {
+    var d = {};
+    if(this.options.scaleX) d.width = Math.round(width) + 'px';
+    if(this.options.scaleY) d.height = Math.round(height) + 'px';
+    if(this.options.scaleFromCenter) {
+      var topd  = (height - this.dims[0])/2;
+      var leftd = (width  - this.dims[1])/2;
+      if(this.elementPositioning == 'absolute') {
+        if(this.options.scaleY) d.top = this.originalTop-topd + 'px';
+        if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
+      } else {
+        if(this.options.scaleY) d.top = -topd + 'px';
+        if(this.options.scaleX) d.left = -leftd + 'px';
+      }
+    }
+    this.element.setStyle(d);
+  }
+});
+
+Effect.Highlight = Class.create();
+Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    if(!this.element) throw(Effect._elementDoesNotExistError);
+    var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {});
+    this.start(options);
+  },
+  setup: function() {
+    // Prevent executing on elements not in the layout flow
+    if(this.element.getStyle('display')=='none') { this.cancel(); return; }
+    // Disable background image during the effect
+    this.oldStyle = {};
+    if (!this.options.keepBackgroundImage) {
+      this.oldStyle.backgroundImage = this.element.getStyle('background-image');
+      this.element.setStyle({backgroundImage: 'none'});
+    }
+    if(!this.options.endcolor)
+      this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff');
+    if(!this.options.restorecolor)
+      this.options.restorecolor = this.element.getStyle('background-color');
+    // init color calculations
+    this._base  = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
+    this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
+  },
+  update: function(position) {
+    this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){
+      return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) });
+  },
+  finish: function() {
+    this.element.setStyle(Object.extend(this.oldStyle, {
+      backgroundColor: this.options.restorecolor
+    }));
+  }
+});
+
+Effect.ScrollTo = Class.create();
+Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    this.start(arguments[1] || {});
+  },
+  setup: function() {
+    Position.prepare();
+    var offsets = Position.cumulativeOffset(this.element);
+    if(this.options.offset) offsets[1] += this.options.offset;
+    var max = window.innerHeight ? 
+      window.height - window.innerHeight :
+      document.body.scrollHeight - 
+        (document.documentElement.clientHeight ? 
+          document.documentElement.clientHeight : document.body.clientHeight);
+    this.scrollStart = Position.deltaY;
+    this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart;
+  },
+  update: function(position) {
+    Position.prepare();
+    window.scrollTo(Position.deltaX, 
+      this.scrollStart + (position*this.delta));
+  }
+});
+
+/* ------------- combination effects ------------- */
+
+Effect.Fade = function(element) {
+  element = $(element);
+  var oldOpacity = element.getInlineOpacity();
+  var options = Object.extend({
+  from: element.getOpacity() || 1.0,
+  to:   0.0,
+  afterFinishInternal: function(effect) { 
+    if(effect.options.to!=0) return;
+    effect.element.hide().setStyle({opacity: oldOpacity}); 
+  }}, arguments[1] || {});
+  return new Effect.Opacity(element,options);
+}
+
+Effect.Appear = function(element) {
+  element = $(element);
+  var options = Object.extend({
+  from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0),
+  to:   1.0,
+  // force Safari to render floated elements properly
+  afterFinishInternal: function(effect) {
+    effect.element.forceRerendering();
+  },
+  beforeSetup: function(effect) {
+    effect.element.setOpacity(effect.options.from).show(); 
+  }}, arguments[1] || {});
+  return new Effect.Opacity(element,options);
+}
+
+Effect.Puff = function(element) {
+  element = $(element);
+  var oldStyle = { 
+    opacity: element.getInlineOpacity(), 
+    position: element.getStyle('position'),
+    top:  element.style.top,
+    left: element.style.left,
+    width: element.style.width,
+    height: element.style.height
+  };
+  return new Effect.Parallel(
+   [ new Effect.Scale(element, 200, 
+      { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), 
+     new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], 
+     Object.extend({ duration: 1.0, 
+      beforeSetupInternal: function(effect) {
+        Position.absolutize(effect.effects[0].element)
+      },
+      afterFinishInternal: function(effect) {
+         effect.effects[0].element.hide().setStyle(oldStyle); }
+     }, arguments[1] || {})
+   );
+}
+
+Effect.BlindUp = function(element) {
+  element = $(element);
+  element.makeClipping();
+  return new Effect.Scale(element, 0,
+    Object.extend({ scaleContent: false, 
+      scaleX: false, 
+      restoreAfterFinish: true,
+      afterFinishInternal: function(effect) {
+        effect.element.hide().undoClipping();
+      } 
+    }, arguments[1] || {})
+  );
+}
+
+Effect.BlindDown = function(element) {
+  element = $(element);
+  var elementDimensions = element.getDimensions();
+  return new Effect.Scale(element, 100, Object.extend({ 
+    scaleContent: false, 
+    scaleX: false,
+    scaleFrom: 0,
+    scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+    restoreAfterFinish: true,
+    afterSetup: function(effect) {
+      effect.element.makeClipping().setStyle({height: '0px'}).show(); 
+    },  
+    afterFinishInternal: function(effect) {
+      effect.element.undoClipping();
+    }
+  }, arguments[1] || {}));
+}
+
+Effect.SwitchOff = function(element) {
+  element = $(element);
+  var oldOpacity = element.getInlineOpacity();
+  return new Effect.Appear(element, Object.extend({
+    duration: 0.4,
+    from: 0,
+    transition: Effect.Transitions.flicker,
+    afterFinishInternal: function(effect) {
+      new Effect.Scale(effect.element, 1, { 
+        duration: 0.3, scaleFromCenter: true,
+        scaleX: false, scaleContent: false, restoreAfterFinish: true,
+        beforeSetup: function(effect) { 
+          effect.element.makePositioned().makeClipping();
+        },
+        afterFinishInternal: function(effect) {
+          effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity});
+        }
+      })
+    }
+  }, arguments[1] || {}));
+}
+
+Effect.DropOut = function(element) {
+  element = $(element);
+  var oldStyle = {
+    top: element.getStyle('top'),
+    left: element.getStyle('left'),
+    opacity: element.getInlineOpacity() };
+  return new Effect.Parallel(
+    [ new Effect.Move(element, {x: 0, y: 100, sync: true }), 
+      new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
+    Object.extend(
+      { duration: 0.5,
+        beforeSetup: function(effect) {
+          effect.effects[0].element.makePositioned(); 
+        },
+        afterFinishInternal: function(effect) {
+          effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle);
+        } 
+      }, arguments[1] || {}));
+}
+
+Effect.Shake = function(element) {
+  element = $(element);
+  var oldStyle = {
+    top: element.getStyle('top'),
+    left: element.getStyle('left') };
+    return new Effect.Move(element, 
+      { x:  20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {
+    new Effect.Move(effect.element,
+      { x: -40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {
+    new Effect.Move(effect.element,
+      { x:  40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {
+    new Effect.Move(effect.element,
+      { x: -40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {
+    new Effect.Move(effect.element,
+      { x:  40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {
+    new Effect.Move(effect.element,
+      { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {
+        effect.element.undoPositioned().setStyle(oldStyle);
+  }}) }}) }}) }}) }}) }});
+}
+
+Effect.SlideDown = function(element) {
+  element = $(element).cleanWhitespace();
+  // SlideDown need to have the content of the element wrapped in a container element with fixed height!
+  var oldInnerBottom = element.down().getStyle('bottom');
+  var elementDimensions = element.getDimensions();
+  return new Effect.Scale(element, 100, Object.extend({ 
+    scaleContent: false, 
+    scaleX: false, 
+    scaleFrom: window.opera ? 0 : 1,
+    scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+    restoreAfterFinish: true,
+    afterSetup: function(effect) {
+      effect.element.makePositioned();
+      effect.element.down().makePositioned();
+      if(window.opera) effect.element.setStyle({top: ''});
+      effect.element.makeClipping().setStyle({height: '0px'}).show(); 
+    },
+    afterUpdateInternal: function(effect) {
+      effect.element.down().setStyle({bottom:
+        (effect.dims[0] - effect.element.clientHeight) + 'px' }); 
+    },
+    afterFinishInternal: function(effect) {
+      effect.element.undoClipping().undoPositioned();
+      effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); }
+    }, arguments[1] || {})
+  );
+}
+
+Effect.SlideUp = function(element) {
+  element = $(element).cleanWhitespace();
+  var oldInnerBottom = element.down().getStyle('bottom');
+  return new Effect.Scale(element, window.opera ? 0 : 1,
+   Object.extend({ scaleContent: false, 
+    scaleX: false, 
+    scaleMode: 'box',
+    scaleFrom: 100,
+    restoreAfterFinish: true,
+    beforeStartInternal: function(effect) {
+      effect.element.makePositioned();
+      effect.element.down().makePositioned();
+      if(window.opera) effect.element.setStyle({top: ''});
+      effect.element.makeClipping().show();
+    },  
+    afterUpdateInternal: function(effect) {
+      effect.element.down().setStyle({bottom:
+        (effect.dims[0] - effect.element.clientHeight) + 'px' });
+    },
+    afterFinishInternal: function(effect) {
+      effect.element.hide().undoClipping().undoPositioned().setStyle({bottom: oldInnerBottom});
+      effect.element.down().undoPositioned();
+    }
+   }, arguments[1] || {})
+  );
+}
+
+// Bug in opera makes the TD containing this element expand for a instance after finish 
+Effect.Squish = function(element) {
+  return new Effect.Scale(element, window.opera ? 1 : 0, { 
+    restoreAfterFinish: true,
+    beforeSetup: function(effect) {
+      effect.element.makeClipping(); 
+    },  
+    afterFinishInternal: function(effect) {
+      effect.element.hide().undoClipping(); 
+    }
+  });
+}
+
+Effect.Grow = function(element) {
+  element = $(element);
+  var options = Object.extend({
+    direction: 'center',
+    moveTransition: Effect.Transitions.sinoidal,
+    scaleTransition: Effect.Transitions.sinoidal,
+    opacityTransition: Effect.Transitions.full
+  }, arguments[1] || {});
+  var oldStyle = {
+    top: element.style.top,
+    left: element.style.left,
+    height: element.style.height,
+    width: element.style.width,
+    opacity: element.getInlineOpacity() };
+
+  var dims = element.getDimensions();    
+  var initialMoveX, initialMoveY;
+  var moveX, moveY;
+  
+  switch (options.direction) {
+    case 'top-left':
+      initialMoveX = initialMoveY = moveX = moveY = 0; 
+      break;
+    case 'top-right':
+      initialMoveX = dims.width;
+      initialMoveY = moveY = 0;
+      moveX = -dims.width;
+      break;
+    case 'bottom-left':
+      initialMoveX = moveX = 0;
+      initialMoveY = dims.height;
+      moveY = -dims.height;
+      break;
+    case 'bottom-right':
+      initialMoveX = dims.width;
+      initialMoveY = dims.height;
+      moveX = -dims.width;
+      moveY = -dims.height;
+      break;
+    case 'center':
+      initialMoveX = dims.width / 2;
+      initialMoveY = dims.height / 2;
+      moveX = -dims.width / 2;
+      moveY = -dims.height / 2;
+      break;
+  }
+  
+  return new Effect.Move(element, {
+    x: initialMoveX,
+    y: initialMoveY,
+    duration: 0.01, 
+    beforeSetup: function(effect) {
+      effect.element.hide().makeClipping().makePositioned();
+    },
+    afterFinishInternal: function(effect) {
+      new Effect.Parallel(
+        [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
+          new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
+          new Effect.Scale(effect.element, 100, {
+            scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, 
+            sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
+        ], Object.extend({
+             beforeSetup: function(effect) {
+               effect.effects[0].element.setStyle({height: '0px'}).show(); 
+             },
+             afterFinishInternal: function(effect) {
+               effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle); 
+             }
+           }, options)
+      )
+    }
+  });
+}
+
+Effect.Shrink = function(element) {
+  element = $(element);
+  var options = Object.extend({
+    direction: 'center',
+    moveTransition: Effect.Transitions.sinoidal,
+    scaleTransition: Effect.Transitions.sinoidal,
+    opacityTransition: Effect.Transitions.none
+  }, arguments[1] || {});
+  var oldStyle = {
+    top: element.style.top,
+    left: element.style.left,
+    height: element.style.height,
+    width: element.style.width,
+    opacity: element.getInlineOpacity() };
+
+  var dims = element.getDimensions();
+  var moveX, moveY;
+  
+  switch (options.direction) {
+    case 'top-left':
+      moveX = moveY = 0;
+      break;
+    case 'top-right':
+      moveX = dims.width;
+      moveY = 0;
+      break;
+    case 'bottom-left':
+      moveX = 0;
+      moveY = dims.height;
+      break;
+    case 'bottom-right':
+      moveX = dims.width;
+      moveY = dims.height;
+      break;
+    case 'center':  
+      moveX = dims.width / 2;
+      moveY = dims.height / 2;
+      break;
+  }
+  
+  return new Effect.Parallel(
+    [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
+      new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
+      new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
+    ], Object.extend({            
+         beforeStartInternal: function(effect) {
+           effect.effects[0].element.makePositioned().makeClipping(); 
+         },
+         afterFinishInternal: function(effect) {
+           effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); }
+       }, options)
+  );
+}
+
+Effect.Pulsate = function(element) {
+  element = $(element);
+  var options    = arguments[1] || {};
+  var oldOpacity = element.getInlineOpacity();
+  var transition = options.transition || Effect.Transitions.sinoidal;
+  var reverser   = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) };
+  reverser.bind(transition);
+  return new Effect.Opacity(element, 
+    Object.extend(Object.extend({  duration: 2.0, from: 0,
+      afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }
+    }, options), {transition: reverser}));
+}
+
+Effect.Fold = function(element) {
+  element = $(element);
+  var oldStyle = {
+    top: element.style.top,
+    left: element.style.left,
+    width: element.style.width,
+    height: element.style.height };
+  element.makeClipping();
+  return new Effect.Scale(element, 5, Object.extend({   
+    scaleContent: false,
+    scaleX: false,
+    afterFinishInternal: function(effect) {
+    new Effect.Scale(element, 1, { 
+      scaleContent: false, 
+      scaleY: false,
+      afterFinishInternal: function(effect) {
+        effect.element.hide().undoClipping().setStyle(oldStyle);
+      } });
+  }}, arguments[1] || {}));
+};
+
+Effect.Morph = Class.create();
+Object.extend(Object.extend(Effect.Morph.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    if(!this.element) throw(Effect._elementDoesNotExistError);
+    var options = Object.extend({
+      style: {}
+    }, arguments[1] || {});
+    if (typeof options.style == 'string') {
+      if(options.style.indexOf(':') == -1) {
+        var cssText = '', selector = '.' + options.style;
+        $A(document.styleSheets).reverse().each(function(styleSheet) {
+          if (styleSheet.cssRules) cssRules = styleSheet.cssRules;
+          else if (styleSheet.rules) cssRules = styleSheet.rules;
+          $A(cssRules).reverse().each(function(rule) {
+            if (selector == rule.selectorText) {
+              cssText = rule.style.cssText;
+              throw $break;
+            }
+          });
+          if (cssText) throw $break;
+        });
+        this.style = cssText.parseStyle();
+        options.afterFinishInternal = function(effect){
+          effect.element.addClassName(effect.options.style);
+          effect.transforms.each(function(transform) {
+            if(transform.style != 'opacity')
+              effect.element.style[transform.style.camelize()] = '';
+          });
+        }
+      } else this.style = options.style.parseStyle();
+    } else this.style = $H(options.style)
+    this.start(options);
+  },
+  setup: function(){
+    function parseColor(color){
+      if(!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
+      color = color.parseColor();
+      return $R(0,2).map(function(i){
+        return parseInt( color.slice(i*2+1,i*2+3), 16 ) 
+      });
+    }
+    this.transforms = this.style.map(function(pair){
+      var property = pair[0].underscore().dasherize(), value = pair[1], unit = null;
+
+      if(value.parseColor('#zzzzzz') != '#zzzzzz') {
+        value = value.parseColor();
+        unit  = 'color';
+      } else if(property == 'opacity') {
+        value = parseFloat(value);
+        if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout))
+          this.element.setStyle({zoom: 1});
+      } else if(Element.CSS_LENGTH.test(value)) 
+        var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/),
+          value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null;
+
+      var originalValue = this.element.getStyle(property);
+      return $H({ 
+        style: property, 
+        originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), 
+        targetValue: unit=='color' ? parseColor(value) : value,
+        unit: unit
+      });
+    }.bind(this)).reject(function(transform){
+      return (
+        (transform.originalValue == transform.targetValue) ||
+        (
+          transform.unit != 'color' &&
+          (isNaN(transform.originalValue) || isNaN(transform.targetValue))
+        )
+      )
+    });
+  },
+  update: function(position) {
+    var style = $H(), value = null;
+    this.transforms.each(function(transform){
+      value = transform.unit=='color' ?
+        $R(0,2).inject('#',function(m,v,i){
+          return m+(Math.round(transform.originalValue[i]+
+            (transform.targetValue[i] - transform.originalValue[i])*position)).toColorPart() }) : 
+        transform.originalValue + Math.round(
+          ((transform.targetValue - transform.originalValue) * position) * 1000)/1000 + transform.unit;
+      style[transform.style] = value;
+    });
+    this.element.setStyle(style);
+  }
+});
+
+Effect.Transform = Class.create();
+Object.extend(Effect.Transform.prototype, {
+  initialize: function(tracks){
+    this.tracks  = [];
+    this.options = arguments[1] || {};
+    this.addTracks(tracks);
+  },
+  addTracks: function(tracks){
+    tracks.each(function(track){
+      var data = $H(track).values().first();
+      this.tracks.push($H({
+        ids:     $H(track).keys().first(),
+        effect:  Effect.Morph,
+        options: { style: data }
+      }));
+    }.bind(this));
+    return this;
+  },
+  play: function(){
+    return new Effect.Parallel(
+      this.tracks.map(function(track){
+        var elements = [$(track.ids) || $$(track.ids)].flatten();
+        return elements.map(function(e){ return new track.effect(e, Object.extend({ sync:true }, track.options)) });
+      }).flatten(),
+      this.options
+    );
+  }
+});
+
+Element.CSS_PROPERTIES = $w(
+  'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' + 
+  'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' +
+  'borderRightColor borderRightStyle borderRightWidth borderSpacing ' +
+  'borderTopColor borderTopStyle borderTopWidth bottom clip color ' +
+  'fontSize fontWeight height left letterSpacing lineHeight ' +
+  'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+
+  'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' +
+  'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' +
+  'right textIndent top width wordSpacing zIndex');
+  
+Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;
+
+String.prototype.parseStyle = function(){
+  var element = Element.extend(document.createElement('div'));
+  element.innerHTML = '<div style="' + this + '"></div>';
+  var style = element.down().style, styleRules = $H();
+  
+  Element.CSS_PROPERTIES.each(function(property){
+    if(style[property]) styleRules[property] = style[property]; 
+  });
+  if(/MSIE/.test(navigator.userAgent) && !window.opera && this.indexOf('opacity') > -1) {
+    styleRules.opacity = this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1];
+  }
+  return styleRules;
+};
+
+Element.morph = function(element, style) {
+  new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {}));
+  return element;
+};
+
+['setOpacity','getOpacity','getInlineOpacity','forceRerendering','setContentZoom',
+ 'collectTextNodes','collectTextNodesIgnoreClass','morph'].each( 
+  function(f) { Element.Methods[f] = Element[f]; }
+);
+
+Element.Methods.visualEffect = function(element, effect, options) {
+  s = effect.gsub(/_/, '-').camelize();
+  effect_class = s.charAt(0).toUpperCase() + s.substring(1);
+  new Effect[effect_class](element, options);
+  return $(element);
+};
+
+Element.addMethods();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/scriptaculous.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/scriptaculous.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/scriptaculous.js
new file mode 100644
index 0000000..585313c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/scriptaculous.js
@@ -0,0 +1,51 @@
+// script.aculo.us scriptaculous.js v1.7.0, Fri Jan 19 19:16:36 CET 2007
+
+// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+var Scriptaculous = {
+  Version: '1.7.0',
+  require: function(libraryName) {
+    // inserting via DOM fails in Safari 2.0, so brute force approach
+    document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
+  },
+  load: function() {
+    if((typeof Prototype=='undefined') || 
+       (typeof Element == 'undefined') || 
+       (typeof Element.Methods=='undefined') ||
+       parseFloat(Prototype.Version.split(".")[0] + "." +
+                  Prototype.Version.split(".")[1]) < 1.5)
+       throw("script.aculo.us requires the Prototype JavaScript framework >= 1.5.0");
+    
+    $A(document.getElementsByTagName("script")).findAll( function(s) {
+      return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
+    }).each( function(s) {
+      var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
+      var includes = s.src.match(/\?.*load=([a-z,]*)/);
+      (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each(
+       function(include) { Scriptaculous.require(path+include+'.js') });
+    });
+  }
+}
+
+Scriptaculous.load();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/slider.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/slider.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/slider.js
new file mode 100644
index 0000000..f24f282
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/slider.js
@@ -0,0 +1,278 @@
+// script.aculo.us slider.js v1.7.0, Fri Jan 19 19:16:36 CET 2007
+
+// Copyright (c) 2005, 2006 Marty Haught, Thomas Fuchs 
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+if(!Control) var Control = {};
+Control.Slider = Class.create();
+
+// options:
+//  axis: 'vertical', or 'horizontal' (default)
+//
+// callbacks:
+//  onChange(value)
+//  onSlide(value)
+Control.Slider.prototype = {
+  initialize: function(handle, track, options) {
+    var slider = this;
+    
+    if(handle instanceof Array) {
+      this.handles = handle.collect( function(e) { return $(e) });
+    } else {
+      this.handles = [$(handle)];
+    }
+    
+    this.track   = $(track);
+    this.options = options || {};
+
+    this.axis      = this.options.axis || 'horizontal';
+    this.increment = this.options.increment || 1;
+    this.step      = parseInt(this.options.step || '1');
+    this.range     = this.options.range || $R(0,1);
+    
+    this.value     = 0; // assure backwards compat
+    this.values    = this.handles.map( function() { return 0 });
+    this.spans     = this.options.spans ? this.options.spans.map(function(s){ return $(s) }) : false;
+    this.options.startSpan = $(this.options.startSpan || null);
+    this.options.endSpan   = $(this.options.endSpan || null);
+
+    this.restricted = this.options.restricted || false;
+
+    this.maximum   = this.options.maximum || this.range.end;
+    this.minimum   = this.options.minimum || this.range.start;
+
+    // Will be used to align the handle onto the track, if necessary
+    this.alignX = parseInt(this.options.alignX || '0');
+    this.alignY = parseInt(this.options.alignY || '0');
+    
+    this.trackLength = this.maximumOffset() - this.minimumOffset();
+
+    this.handleLength = this.isVertical() ? 
+      (this.handles[0].offsetHeight != 0 ? 
+        this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) : 
+      (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth : 
+        this.handles[0].style.width.replace(/px$/,""));
+
+    this.active   = false;
+    this.dragging = false;
+    this.disabled = false;
+
+    if(this.options.disabled) this.setDisabled();
+
+    // Allowed values array
+    this.allowedValues = this.options.values ? this.options.values.sortBy(Prototype.K) : false;
+    if(this.allowedValues) {
+      this.minimum = this.allowedValues.min();
+      this.maximum = this.allowedValues.max();
+    }
+
+    this.eventMouseDown = this.startDrag.bindAsEventListener(this);
+    this.eventMouseUp   = this.endDrag.bindAsEventListener(this);
+    this.eventMouseMove = this.update.bindAsEventListener(this);
+
+    // Initialize handles in reverse (make sure first handle is active)
+    this.handles.each( function(h,i) {
+      i = slider.handles.length-1-i;
+      slider.setValue(parseFloat(
+        (slider.options.sliderValue instanceof Array ? 
+          slider.options.sliderValue[i] : slider.options.sliderValue) || 
+         slider.range.start), i);
+      Element.makePositioned(h); // fix IE
+      Event.observe(h, "mousedown", slider.eventMouseDown);
+    });
+    
+    Event.observe(this.track, "mousedown", this.eventMouseDown);
+    Event.observe(document, "mouseup", this.eventMouseUp);
+    Event.observe(document, "mousemove", this.eventMouseMove);
+    
+    this.initialized = true;
+  },
+  dispose: function() {
+    var slider = this;    
+    Event.stopObserving(this.track, "mousedown", this.eventMouseDown);
+    Event.stopObserving(document, "mouseup", this.eventMouseUp);
+    Event.stopObserving(document, "mousemove", this.eventMouseMove);
+    this.handles.each( function(h) {
+      Event.stopObserving(h, "mousedown", slider.eventMouseDown);
+    });
+  },
+  setDisabled: function(){
+    this.disabled = true;
+  },
+  setEnabled: function(){
+    this.disabled = false;
+  },  
+  getNearestValue: function(value){
+    if(this.allowedValues){
+      if(value >= this.allowedValues.max()) return(this.allowedValues.max());
+      if(value <= this.allowedValues.min()) return(this.allowedValues.min());
+      
+      var offset = Math.abs(this.allowedValues[0] - value);
+      var newValue = this.allowedValues[0];
+      this.allowedValues.each( function(v) {
+        var currentOffset = Math.abs(v - value);
+        if(currentOffset <= offset){
+          newValue = v;
+          offset = currentOffset;
+        } 
+      });
+      return newValue;
+    }
+    if(value > this.range.end) return this.range.end;
+    if(value < this.range.start) return this.range.start;
+    return value;
+  },
+  setValue: function(sliderValue, handleIdx){
+    if(!this.active) {
+      this.activeHandleIdx = handleIdx || 0;
+      this.activeHandle    = this.handles[this.activeHandleIdx];
+      this.updateStyles();
+    }
+    handleIdx = handleIdx || this.activeHandleIdx || 0;
+    if(this.initialized && this.restricted) {
+      if((handleIdx>0) && (sliderValue<this.values[handleIdx-1]))
+        sliderValue = this.values[handleIdx-1];
+      if((handleIdx < (this.handles.length-1)) && (sliderValue>this.values[handleIdx+1]))
+        sliderValue = this.values[handleIdx+1];
+    }
+    sliderValue = this.getNearestValue(sliderValue);
+    this.values[handleIdx] = sliderValue;
+    this.value = this.values[0]; // assure backwards compat
+    
+    this.handles[handleIdx].style[this.isVertical() ? 'top' : 'left'] = 
+      this.translateToPx(sliderValue);
+    
+    this.drawSpans();
+    if(!this.dragging || !this.event) this.updateFinished();
+  },
+  setValueBy: function(delta, handleIdx) {
+    this.setValue(this.values[handleIdx || this.activeHandleIdx || 0] + delta, 
+      handleIdx || this.activeHandleIdx || 0);
+  },
+  translateToPx: function(value) {
+    return Math.round(
+      ((this.trackLength-this.handleLength)/(this.range.end-this.range.start)) * 
+      (value - this.range.start)) + "px";
+  },
+  translateToValue: function(offset) {
+    return ((offset/(this.trackLength-this.handleLength) * 
+      (this.range.end-this.range.start)) + this.range.start);
+  },
+  getRange: function(range) {
+    var v = this.values.sortBy(Prototype.K); 
+    range = range || 0;
+    return $R(v[range],v[range+1]);
+  },
+  minimumOffset: function(){
+    return(this.isVertical() ? this.alignY : this.alignX);
+  },
+  maximumOffset: function(){
+    return(this.isVertical() ? 
+      (this.track.offsetHeight != 0 ? this.track.offsetHeight :
+        this.track.style.height.replace(/px$/,"")) - this.alignY : 
+      (this.track.offsetWidth != 0 ? this.track.offsetWidth : 
+        this.track.style.width.replace(/px$/,"")) - this.alignY);
+  },  
+  isVertical:  function(){
+    return (this.axis == 'vertical');
+  },
+  drawSpans: function() {
+    var slider = this;
+    if(this.spans)
+      $R(0, this.spans.length-1).each(function(r) { slider.setSpan(slider.spans[r], slider.getRange(r)) });
+    if(this.options.startSpan)
+      this.setSpan(this.options.startSpan,
+        $R(0, this.values.length>1 ? this.getRange(0).min() : this.value ));
+    if(this.options.endSpan)
+      this.setSpan(this.options.endSpan, 
+        $R(this.values.length>1 ? this.getRange(this.spans.length-1).max() : this.value, this.maximum));
+  },
+  setSpan: function(span, range) {
+    if(this.isVertical()) {
+      span.style.top = this.translateToPx(range.start);
+      span.style.height = this.translateToPx(range.end - range.start + this.range.start);
+    } else {
+      span.style.left = this.translateToPx(range.start);
+      span.style.width = this.translateToPx(range.end - range.start + this.range.start);
+    }
+  },
+  updateStyles: function() {
+    this.handles.each( function(h){ Element.removeClassName(h, 'selected') });
+    Element.addClassName(this.activeHandle, 'selected');
+  },
+  startDrag: function(event) {
+    if(Event.isLeftClick(event)) {
+      if(!this.disabled){
+        this.active = true;
+        
+        var handle = Event.element(event);
+        var pointer  = [Event.pointerX(event), Event.pointerY(event)];
+        var track = handle;
+        if(track==this.track) {
+          var offsets  = Position.cumulativeOffset(this.track); 
+          this.event = event;
+          this.setValue(this.translateToValue( 
+           (this.isVertical() ? pointer[1]-offsets[1] : pointer[0]-offsets[0])-(this.handleLength/2)
+          ));
+          var offsets  = Position.cumulativeOffset(this.activeHandle);
+          this.offsetX = (pointer[0] - offsets[0]);
+          this.offsetY = (pointer[1] - offsets[1]);
+        } else {
+          // find the handle (prevents issues with Safari)
+          while((this.handles.indexOf(handle) == -1) && handle.parentNode) 
+            handle = handle.parentNode;
+            
+          if(this.handles.indexOf(handle)!=-1) {
+            this.activeHandle    = handle;
+            this.activeHandleIdx = this.handles.indexOf(this.activeHandle);
+            this.updateStyles();
+            
+            var offsets  = Position.cumulativeOffset(this.activeHandle);
+            this.offsetX = (pointer[0] - offsets[0]);
+            this.offsetY = (pointer[1] - offsets[1]);
+          }
+        }
+      }
+      Event.stop(event);
+    }
+  },
+  update: function(event) {
+   if(this.active) {
+      if(!this.dragging) this.dragging = true;
+      this.draw(event);
+      // fix AppleWebKit rendering
+      if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);
+      Event.stop(event);
+   }
+  },
+  draw: function(event) {
+    var pointer = [Event.pointerX(event), Event.pointerY(event)];
+    var offsets = Position.cumulativeOffset(this.track);
+    pointer[0] -= this.offsetX + offsets[0];
+    pointer[1] -= this.offsetY + offsets[1];
+    this.event = event;
+    this.setValue(this.translateToValue( this.isVertical() ? pointer[1] : pointer[0] ));
+    if(this.initialized && this.options.onSlide)
+      this.options.onSlide(this.values.length>1 ? this.values : this.value, this);
+  },
+  endDrag: function(event) {
+    if(this.active && this.dragging) {
+      this.finishDrag(event, true);
+      Event.stop(event);
+    }
+    this.active = false;
+    this.dragging = false;
+  },  
+  finishDrag: function(event, success) {
+    this.active = false;
+    this.dragging = false;
+    this.updateFinished();
+  },
+  updateFinished: function() {
+    if(this.initialized && this.options.onChange) 
+      this.options.onChange(this.values.length>1 ? this.values : this.value, this);
+    this.event = null;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/unittest.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/unittest.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/unittest.js
new file mode 100644
index 0000000..a447885
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/unittest.js
@@ -0,0 +1,564 @@
+// script.aculo.us unittest.js v1.7.0, Fri Jan 19 19:16:36 CET 2007
+
+// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//           (c) 2005, 2006 Jon Tirsen (http://www.tirsen.com)
+//           (c) 2005, 2006 Michael Schuerig (http://www.schuerig.de/michael/)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// experimental, Firefox-only
+Event.simulateMouse = function(element, eventName) {
+  var options = Object.extend({
+    pointerX: 0,
+    pointerY: 0,
+    buttons:  0,
+    ctrlKey:  false,
+    altKey:   false,
+    shiftKey: false,
+    metaKey:  false
+  }, arguments[2] || {});
+  var oEvent = document.createEvent("MouseEvents");
+  oEvent.initMouseEvent(eventName, true, true, document.defaultView, 
+    options.buttons, options.pointerX, options.pointerY, options.pointerX, options.pointerY, 
+    options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, 0, $(element));
+  
+  if(this.mark) Element.remove(this.mark);
+  this.mark = document.createElement('div');
+  this.mark.appendChild(document.createTextNode(" "));
+  document.body.appendChild(this.mark);
+  this.mark.style.position = 'absolute';
+  this.mark.style.top = options.pointerY + "px";
+  this.mark.style.left = options.pointerX + "px";
+  this.mark.style.width = "5px";
+  this.mark.style.height = "5px;";
+  this.mark.style.borderTop = "1px solid red;"
+  this.mark.style.borderLeft = "1px solid red;"
+  
+  if(this.step)
+    alert('['+new Date().getTime().toString()+'] '+eventName+'/'+Test.Unit.inspect(options));
+  
+  $(element).dispatchEvent(oEvent);
+};
+
+// Note: Due to a fix in Firefox 1.0.5/6 that probably fixed "too much", this doesn't work in 1.0.6 or DP2.
+// You need to downgrade to 1.0.4 for now to get this working
+// See https://bugzilla.mozilla.org/show_bug.cgi?id=289940 for the fix that fixed too much
+Event.simulateKey = function(element, eventName) {
+  var options = Object.extend({
+    ctrlKey: false,
+    altKey: false,
+    shiftKey: false,
+    metaKey: false,
+    keyCode: 0,
+    charCode: 0
+  }, arguments[2] || {});
+
+  var oEvent = document.createEvent("KeyEvents");
+  oEvent.initKeyEvent(eventName, true, true, window, 
+    options.ctrlKey, options.altKey, options.shiftKey, options.metaKey,
+    options.keyCode, options.charCode );
+  $(element).dispatchEvent(oEvent);
+};
+
+Event.simulateKeys = function(element, command) {
+  for(var i=0; i<command.length; i++) {
+    Event.simulateKey(element,'keypress',{charCode:command.charCodeAt(i)});
+  }
+};
+
+var Test = {}
+Test.Unit = {};
+
+// security exception workaround
+Test.Unit.inspect = Object.inspect;
+
+Test.Unit.Logger = Class.create();
+Test.Unit.Logger.prototype = {
+  initialize: function(log) {
+    this.log = $(log);
+    if (this.log) {
+      this._createLogTable();
+    }
+  },
+  start: function(testName) {
+    if (!this.log) return;
+    this.testName = testName;
+    this.lastLogLine = document.createElement('tr');
+    this.statusCell = document.createElement('td');
+    this.nameCell = document.createElement('td');
+    this.nameCell.className = "nameCell";
+    this.nameCell.appendChild(document.createTextNode(testName));
+    this.messageCell = document.createElement('td');
+    this.lastLogLine.appendChild(this.statusCell);
+    this.lastLogLine.appendChild(this.nameCell);
+    this.lastLogLine.appendChild(this.messageCell);
+    this.loglines.appendChild(this.lastLogLine);
+  },
+  finish: function(status, summary) {
+    if (!this.log) return;
+    this.lastLogLine.className = status;
+    this.statusCell.innerHTML = status;
+    this.messageCell.innerHTML = this._toHTML(summary);
+    this.addLinksToResults();
+  },
+  message: function(message) {
+    if (!this.log) return;
+    this.messageCell.innerHTML = this._toHTML(message);
+  },
+  summary: function(summary) {
+    if (!this.log) return;
+    this.logsummary.innerHTML = this._toHTML(summary);
+  },
+  _createLogTable: function() {
+    this.log.innerHTML =
+    '<div id="logsummary"></div>' +
+    '<table id="logtable">' +
+    '<thead><tr><th>Status</th><th>Test</th><th>Message</th></tr></thead>' +
+    '<tbody id="loglines"></tbody>' +
+    '</table>';
+    this.logsummary = $('logsummary')
+    this.loglines = $('loglines');
+  },
+  _toHTML: function(txt) {
+    return txt.escapeHTML().replace(/\n/g,"<br/>");
+  },
+  addLinksToResults: function(){ 
+    $$("tr.failed .nameCell").each( function(td){ // todo: limit to children of this.log
+      td.title = "Run only this test"
+      Event.observe(td, 'click', function(){ window.location.search = "?tests=" + td.innerHTML;});
+    });
+    $$("tr.passed .nameCell").each( function(td){ // todo: limit to children of this.log
+      td.title = "Run all tests"
+      Event.observe(td, 'click', function(){ window.location.search = "";});
+    });
+  }
+}
+
+Test.Unit.Runner = Class.create();
+Test.Unit.Runner.prototype = {
+  initialize: function(testcases) {
+    this.options = Object.extend({
+      testLog: 'testlog'
+    }, arguments[1] || {});
+    this.options.resultsURL = this.parseResultsURLQueryParameter();
+    this.options.tests      = this.parseTestsQueryParameter();
+    if (this.options.testLog) {
+      this.options.testLog = $(this.options.testLog) || null;
+    }
+    if(this.options.tests) {
+      this.tests = [];
+      for(var i = 0; i < this.options.tests.length; i++) {
+        if(/^test/.test(this.options.tests[i])) {
+          this.tests.push(new Test.Unit.Testcase(this.options.tests[i], testcases[this.options.tests[i]], testcases["setup"], testcases["teardown"]));
+        }
+      }
+    } else {
+      if (this.options.test) {
+        this.tests = [new Test.Unit.Testcase(this.options.test, testcases[this.options.test], testcases["setup"], testcases["teardown"])];
+      } else {
+        this.tests = [];
+        for(var testcase in testcases) {
+          if(/^test/.test(testcase)) {
+            this.tests.push(
+               new Test.Unit.Testcase(
+                 this.options.context ? ' -> ' + this.options.titles[testcase] : testcase, 
+                 testcases[testcase], testcases["setup"], testcases["teardown"]
+               ));
+          }
+        }
+      }
+    }
+    this.currentTest = 0;
+    this.logger = new Test.Unit.Logger(this.options.testLog);
+    setTimeout(this.runTests.bind(this), 1000);
+  },
+  parseResultsURLQueryParameter: function() {
+    return window.location.search.parseQuery()["resultsURL"];
+  },
+  parseTestsQueryParameter: function(){
+    if (window.location.search.parseQuery()["tests"]){
+        return window.location.search.parseQuery()["tests"].split(',');
+    };
+  },
+  // Returns:
+  //  "ERROR" if there was an error,
+  //  "FAILURE" if there was a failure, or
+  //  "SUCCESS" if there was neither
+  getResult: function() {
+    var hasFailure = false;
+    for(var i=0;i<this.tests.length;i++) {
+      if (this.tests[i].errors > 0) {
+        return "ERROR";
+      }
+      if (this.tests[i].failures > 0) {
+        hasFailure = true;
+      }
+    }
+    if (hasFailure) {
+      return "FAILURE";
+    } else {
+      return "SUCCESS";
+    }
+  },
+  postResults: function() {
+    if (this.options.resultsURL) {
+      new Ajax.Request(this.options.resultsURL, 
+        { method: 'get', parameters: 'result=' + this.getResult(), asynchronous: false });
+    }
+  },
+  runTests: function() {
+    var test = this.tests[this.currentTest];
+    if (!test) {
+      // finished!
+      this.postResults();
+      this.logger.summary(this.summary());
+      return;
+    }
+    if(!test.isWaiting) {
+      this.logger.start(test.name);
+    }
+    test.run();
+    if(test.isWaiting) {
+      this.logger.message("Waiting for " + test.timeToWait + "ms");
+      setTimeout(this.runTests.bind(this), test.timeToWait || 1000);
+    } else {
+      this.logger.finish(test.status(), test.summary());
+      this.currentTest++;
+      // tail recursive, hopefully the browser will skip the stackframe
+      this.runTests();
+    }
+  },
+  summary: function() {
+    var assertions = 0;
+    var failures = 0;
+    var errors = 0;
+    var messages = [];
+    for(var i=0;i<this.tests.length;i++) {
+      assertions +=   this.tests[i].assertions;
+      failures   +=   this.tests[i].failures;
+      errors     +=   this.tests[i].errors;
+    }
+    return (
+      (this.options.context ? this.options.context + ': ': '') + 
+      this.tests.length + " tests, " + 
+      assertions + " assertions, " + 
+      failures   + " failures, " +
+      errors     + " errors");
+  }
+}
+
+Test.Unit.Assertions = Class.create();
+Test.Unit.Assertions.prototype = {
+  initialize: function() {
+    this.assertions = 0;
+    this.failures   = 0;
+    this.errors     = 0;
+    this.messages   = [];
+  },
+  summary: function() {
+    return (
+      this.assertions + " assertions, " + 
+      this.failures   + " failures, " +
+      this.errors     + " errors" + "\n" +
+      this.messages.join("\n"));
+  },
+  pass: function() {
+    this.assertions++;
+  },
+  fail: function(message) {
+    this.failures++;
+    this.messages.push("Failure: " + message);
+  },
+  info: function(message) {
+    this.messages.push("Info: " + message);
+  },
+  error: function(error) {
+    this.errors++;
+    this.messages.push(error.name + ": "+ error.message + "(" + Test.Unit.inspect(error) +")");
+  },
+  status: function() {
+    if (this.failures > 0) return 'failed';
+    if (this.errors > 0) return 'error';
+    return 'passed';
+  },
+  assert: function(expression) {
+    var message = arguments[1] || 'assert: got "' + Test.Unit.inspect(expression) + '"';
+    try { expression ? this.pass() : 
+      this.fail(message); }
+    catch(e) { this.error(e); }
+  },
+  assertEqual: function(expected, actual) {
+    var message = arguments[2] || "assertEqual";
+    try { (expected == actual) ? this.pass() :
+      this.fail(message + ': expected "' + Test.Unit.inspect(expected) + 
+        '", actual "' + Test.Unit.inspect(actual) + '"'); }
+    catch(e) { this.error(e); }
+  },
+  assertInspect: function(expected, actual) {
+    var message = arguments[2] || "assertInspect";
+    try { (expected == actual.inspect()) ? this.pass() :
+      this.fail(message + ': expected "' + Test.Unit.inspect(expected) + 
+        '", actual "' + Test.Unit.inspect(actual) + '"'); }
+    catch(e) { this.error(e); }
+  },
+  assertEnumEqual: function(expected, actual) {
+    var message = arguments[2] || "assertEnumEqual";
+    try { $A(expected).length == $A(actual).length && 
+      expected.zip(actual).all(function(pair) { return pair[0] == pair[1] }) ?
+        this.pass() : this.fail(message + ': expected ' + Test.Unit.inspect(expected) + 
+          ', actual ' + Test.Unit.inspect(actual)); }
+    catch(e) { this.error(e); }
+  },
+  assertNotEqual: function(expected, actual) {
+    var message = arguments[2] || "assertNotEqual";
+    try { (expected != actual) ? this.pass() : 
+      this.fail(message + ': got "' + Test.Unit.inspect(actual) + '"'); }
+    catch(e) { this.error(e); }
+  },
+  assertIdentical: function(expected, actual) { 
+    var message = arguments[2] || "assertIdentical"; 
+    try { (expected === actual) ? this.pass() : 
+      this.fail(message + ': expected "' + Test.Unit.inspect(expected) +  
+        '", actual "' + Test.Unit.inspect(actual) + '"'); } 
+    catch(e) { this.error(e); } 
+  },
+  assertNotIdentical: function(expected, actual) { 
+    var message = arguments[2] || "assertNotIdentical"; 
+    try { !(expected === actual) ? this.pass() : 
+      this.fail(message + ': expected "' + Test.Unit.inspect(expected) +  
+        '", actual "' + Test.Unit.inspect(actual) + '"'); } 
+    catch(e) { this.error(e); } 
+  },
+  assertNull: function(obj) {
+    var message = arguments[1] || 'assertNull'
+    try { (obj==null) ? this.pass() : 
+      this.fail(message + ': got "' + Test.Unit.inspect(obj) + '"'); }
+    catch(e) { this.error(e); }
+  },
+  assertMatch: function(expected, actual) {
+    var message = arguments[2] || 'assertMatch';
+    var regex = new RegExp(expected);
+    try { (regex.exec(actual)) ? this.pass() :
+      this.fail(message + ' : regex: "' +  Test.Unit.inspect(expected) + ' did not match: ' + Test.Unit.inspect(actual) + '"'); }
+    catch(e) { this.error(e); }
+  },
+  assertHidden: function(element) {
+    var message = arguments[1] || 'assertHidden';
+    this.assertEqual("none", element.style.display, message);
+  },
+  assertNotNull: function(object) {
+    var message = arguments[1] || 'assertNotNull';
+    this.assert(object != null, message);
+  },
+  assertType: function(expected, actual) {
+    var message = arguments[2] || 'assertType';
+    try { 
+      (actual.constructor == expected) ? this.pass() : 
+      this.fail(message + ': expected "' + Test.Unit.inspect(expected) +  
+        '", actual "' + (actual.constructor) + '"'); }
+    catch(e) { this.error(e); }
+  },
+  assertNotOfType: function(expected, actual) {
+    var message = arguments[2] || 'assertNotOfType';
+    try { 
+      (actual.constructor != expected) ? this.pass() : 
+      this.fail(message + ': expected "' + Test.Unit.inspect(expected) +  
+        '", actual "' + (actual.constructor) + '"'); }
+    catch(e) { this.error(e); }
+  },
+  assertInstanceOf: function(expected, actual) {
+    var message = arguments[2] || 'assertInstanceOf';
+    try { 
+      (actual instanceof expected) ? this.pass() : 
+      this.fail(message + ": object was not an instance of the expected type"); }
+    catch(e) { this.error(e); } 
+  },
+  assertNotInstanceOf: function(expected, actual) {
+    var message = arguments[2] || 'assertNotInstanceOf';
+    try { 
+      !(actual instanceof expected) ? this.pass() : 
+      this.fail(message + ": object was an instance of the not expected type"); }
+    catch(e) { this.error(e); } 
+  },
+  assertRespondsTo: function(method, obj) {
+    var message = arguments[2] || 'assertRespondsTo';
+    try {
+      (obj[method] && typeof obj[method] == 'function') ? this.pass() : 
+      this.fail(message + ": object doesn't respond to [" + method + "]"); }
+    catch(e) { this.error(e); }
+  },
+  assertReturnsTrue: function(method, obj) {
+    var message = arguments[2] || 'assertReturnsTrue';
+    try {
+      var m = obj[method];
+      if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)];
+      m() ? this.pass() : 
+      this.fail(message + ": method returned false"); }
+    catch(e) { this.error(e); }
+  },
+  assertReturnsFalse: function(method, obj) {
+    var message = arguments[2] || 'assertReturnsFalse';
+    try {
+      var m = obj[method];
+      if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)];
+      !m() ? this.pass() : 
+      this.fail(message + ": method returned true"); }
+    catch(e) { this.error(e); }
+  },
+  assertRaise: function(exceptionName, method) {
+    var message = arguments[2] || 'assertRaise';
+    try { 
+      method();
+      this.fail(message + ": exception expected but none was raised"); }
+    catch(e) {
+      ((exceptionName == null) || (e.name==exceptionName)) ? this.pass() : this.error(e); 
+    }
+  },
+  assertElementsMatch: function() {
+    var expressions = $A(arguments), elements = $A(expressions.shift());
+    if (elements.length != expressions.length) {
+      this.fail('assertElementsMatch: size mismatch: ' + elements.length + ' elements, ' + expressions.length + ' expressions');
+      return false;
+    }
+    elements.zip(expressions).all(function(pair, index) {
+      var element = $(pair.first()), expression = pair.last();
+      if (element.match(expression)) return true;
+      this.fail('assertElementsMatch: (in index ' + index + ') expected ' + expression.inspect() + ' but got ' + element.inspect());
+    }.bind(this)) && this.pass();
+  },
+  assertElementMatches: function(element, expression) {
+    this.assertElementsMatch([element], expression);
+  },
+  benchmark: function(operation, iterations) {
+    var startAt = new Date();
+    (iterations || 1).times(operation);
+    var timeTaken = ((new Date())-startAt);
+    this.info((arguments[2] || 'Operation') + ' finished ' + 
+       iterations + ' iterations in ' + (timeTaken/1000)+'s' );
+    return timeTaken;
+  },
+  _isVisible: function(element) {
+    element = $(element);
+    if(!element.parentNode) return true;
+    this.assertNotNull(element);
+    if(element.style && Element.getStyle(element, 'display') == 'none')
+      return false;
+    
+    return this._isVisible(element.parentNode);
+  },
+  assertNotVisible: function(element) {
+    this.assert(!this._isVisible(element), Test.Unit.inspect(element) + " was not hidden and didn't have a hidden parent either. " + ("" || arguments[1]));
+  },
+  assertVisible: function(element) {
+    this.assert(this._isVisible(element), Test.Unit.inspect(element) + " was not visible. " + ("" || arguments[1]));
+  },
+  benchmark: function(operation, iterations) {
+    var startAt = new Date();
+    (iterations || 1).times(operation);
+    var timeTaken = ((new Date())-startAt);
+    this.info((arguments[2] || 'Operation') + ' finished ' + 
+       iterations + ' iterations in ' + (timeTaken/1000)+'s' );
+    return timeTaken;
+  }
+}
+
+Test.Unit.Testcase = Class.create();
+Object.extend(Object.extend(Test.Unit.Testcase.prototype, Test.Unit.Assertions.prototype), {
+  initialize: function(name, test, setup, teardown) {
+    Test.Unit.Assertions.prototype.initialize.bind(this)();
+    this.name           = name;
+    
+    if(typeof test == 'string') {
+      test = test.gsub(/(\.should[^\(]+\()/,'#{0}this,');
+      test = test.gsub(/(\.should[^\(]+)\(this,\)/,'#{1}(this)');
+      this.test = function() {
+        eval('with(this){'+test+'}');
+      }
+    } else {
+      this.test = test || function() {};
+    }
+    
+    this.setup          = setup || function() {};
+    this.teardown       = teardown || function() {};
+    this.isWaiting      = false;
+    this.timeToWait     = 1000;
+  },
+  wait: function(time, nextPart) {
+    this.isWaiting = true;
+    this.test = nextPart;
+    this.timeToWait = time;
+  },
+  run: function() {
+    try {
+      try {
+        if (!this.isWaiting) this.setup.bind(this)();
+        this.isWaiting = false;
+        this.test.bind(this)();
+      } finally {
+        if(!this.isWaiting) {
+          this.teardown.bind(this)();
+        }
+      }
+    }
+    catch(e) { this.error(e); }
+  }
+});
+
+// *EXPERIMENTAL* BDD-style testing to please non-technical folk
+// This draws many ideas from RSpec http://rspec.rubyforge.org/
+
+Test.setupBDDExtensionMethods = function(){
+  var METHODMAP = {
+    shouldEqual:     'assertEqual',
+    shouldNotEqual:  'assertNotEqual',
+    shouldEqualEnum: 'assertEnumEqual',
+    shouldBeA:       'assertType',
+    shouldNotBeA:    'assertNotOfType',
+    shouldBeAn:      'assertType',
+    shouldNotBeAn:   'assertNotOfType',
+    shouldBeNull:    'assertNull',
+    shouldNotBeNull: 'assertNotNull',
+    
+    shouldBe:        'assertReturnsTrue',
+    shouldNotBe:     'assertReturnsFalse',
+    shouldRespondTo: 'assertRespondsTo'
+  };
+  Test.BDDMethods = {};
+  for(m in METHODMAP) {
+    Test.BDDMethods[m] = eval(
+      'function(){'+
+      'var args = $A(arguments);'+
+      'var scope = args.shift();'+
+      'scope.'+METHODMAP[m]+'.apply(scope,(args || []).concat([this])); }');
+  }
+  [Array.prototype, String.prototype, Number.prototype].each(
+    function(p){ Object.extend(p, Test.BDDMethods) }
+  );
+}
+
+Test.context = function(name, spec, log){
+  Test.setupBDDExtensionMethods();
+  
+  var compiledSpec = {};
+  var titles = {};
+  for(specName in spec) {
+    switch(specName){
+      case "setup":
+      case "teardown":
+        compiledSpec[specName] = spec[specName];
+        break;
+      default:
+        var testName = 'test'+specName.gsub(/\s+/,'-').camelize();
+        var body = spec[specName].toString().split('\n').slice(1);
+        if(/^\{/.test(body[0])) body = body.slice(1);
+        body.pop();
+        body = body.map(function(statement){ 
+          return statement.strip()
+        });
+        compiledSpec[testName] = body.join('\n');
+        titles[testName] = specName;
+    }
+  }
+  new Test.Unit.Runner(compiledSpec, { titles: titles, testLog: log || 'testlog', context: name });
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/codepress.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/codepress.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/codepress.css
new file mode 100644
index 0000000..2186820
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/codepress.css
@@ -0,0 +1,21 @@
+body {
+	margin-top:13px;
+	_margin-top:14px;
+	background:white;
+	margin-left:32px;
+	font-family:monospace;
+	font-size:13px;
+	white-space:pre;
+	background-image:url("images/line-numbers.png");
+	background-repeat:repeat-y;
+	background-position:0 3px;
+	line-height:16px;
+	height:100%;
+}
+pre {margin:0;}
+html>body{background-position:0 2px;}
+P {margin:0;padding:0;border:0;outline:0;display:block;white-space:pre;}
+b, i, s, u, a, em, tt, ins, big, cite, strong, var, dfn {text-decoration:none;font-weight:normal;font-style:normal;font-size:13px;}
+
+body.hide-line-numbers {background:white;margin-left:16px;}
+body.show-line-numbers {background-image:url("images/line-numbers.png");margin-left:32px;}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/codepress.html
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/codepress.html b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/codepress.html
new file mode 100644
index 0000000..436483e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/codepress.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+ ~ Copyright (c) 2005-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~    http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied.  See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<html>
+<head>
+	<title>CodePress - Real Time Syntax Highlighting Editor written in JavaScript</title>
+	<meta name="description" content="CodePress - source code editor window" />
+
+	<script type="text/javascript">
+	var language = 'generic';
+	var engine = 'older';
+	var ua = navigator.userAgent;
+	var ts = (new Date).getTime(); // timestamp to avoid cache
+	var lh = location.href;
+	
+	if(ua.match('MSIE')) engine = 'msie';
+	else if(ua.match('AppleWebKit')) engine = 'webkit'; 
+	else if(ua.match('Opera')) engine = 'opera'; 
+	else if(ua.match('Gecko')) engine = 'gecko';
+
+	if(lh.match('language=')) language = lh.replace(/.*language=(.*?)(&.*)?$/,'$1');
+
+	document.write('<link type="text/css" href="codepress.css?ts='+ts+'" rel="stylesheet" />');
+	document.write('<link type="text/css" href="languages/'+language+'.css?ts='+ts+'" rel="stylesheet" id="cp-lang-style" />');
+	document.write('<scr'+'ipt type="text/javascript" src="engines/'+engine+'.js?ts='+ts+'"></scr'+'ipt>');
+	document.write('<scr'+'ipt type="text/javascript" src="languages/'+language+'.js?ts='+ts+'"></scr'+'ipt>');
+	</script>
+
+</head>
+
+<script type="text/javascript">
+if(engine == "msie" || engine == "gecko" || engine == "webkit") document.write('<body><pre> </pre></body>');
+else if(engine == "opera") document.write('<body></body>');
+</script>
+
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/codepress.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/codepress.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/codepress.js
new file mode 100644
index 0000000..96ea2e3
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/codepress.js
@@ -0,0 +1,138 @@
+/*
+ * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/
+ * 
+ * Copyright (C) 2006 Fernando M.A.d.S. <fe...@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the 
+ * GNU Lesser General Public License as published by the Free Software Foundation.
+ * 
+ * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php
+ */
+
+CodePress = function(obj) {
+	var self = document.createElement('iframe');
+	self.textarea = obj;
+	self.textarea.disabled = true;
+	self.textarea.style.overflow = 'hidden';
+	self.style.height = self.textarea.clientHeight +'px';
+	self.style.width = self.textarea.clientWidth +'px';
+	self.textarea.style.overflow = 'auto';
+	self.style.border = '1px solid gray';
+	self.frameBorder = 0; // remove IE internal iframe border
+	self.style.visibility = 'hidden';
+	self.style.position = 'absolute';
+	self.options = self.textarea.className;
+	
+	self.initialize = function() {
+		self.editor = self.contentWindow.CodePress;
+		self.editor.body = self.contentWindow.document.getElementsByTagName('body')[0];
+		self.editor.setCode(self.textarea.value);
+		self.setOptions();
+		self.editor.syntaxHighlight('init');
+		self.textarea.style.display = 'none';
+		self.style.position = 'static';
+		self.style.visibility = 'visible';
+		self.style.display = 'inline';
+	}
+	
+	// obj can by a textarea id or a string (code)
+	self.edit = function(obj,language) {
+		if(obj) self.textarea.value = document.getElementById(obj) ? document.getElementById(obj).value : obj;
+		if(!self.textarea.disabled) return;
+		self.language = language ? language : self.getLanguage();
+		self.src = CodePress.path+'codepress.html?language='+self.language+'&ts='+(new Date).getTime();
+		if(self.attachEvent) self.attachEvent('onload',self.initialize);
+		else self.addEventListener('load',self.initialize,false);
+	}
+
+	self.getLanguage = function() {
+		for (language in CodePress.languages) 
+			if(self.options.match('\\b'+language+'\\b')) 
+				return CodePress.languages[language] ? language : 'generic';
+	}
+	
+	self.setOptions = function() {
+		if(self.options.match('autocomplete-off')) self.toggleAutoComplete();
+		if(self.options.match('readonly-on')) self.toggleReadOnly();
+		if(self.options.match('linenumbers-off')) self.toggleLineNumbers();
+	}
+	
+	self.getCode = function() {
+		return self.textarea.disabled ? self.editor.getCode() : self.textarea.value;
+	}
+
+	self.setCode = function(code) {
+		self.textarea.disabled ? self.editor.setCode(code) : self.textarea.value = code;
+	}
+
+	self.toggleAutoComplete = function() {
+		self.editor.autocomplete = (self.editor.autocomplete) ? false : true;
+	}
+	
+	self.toggleReadOnly = function() {
+		self.textarea.readOnly = (self.textarea.readOnly) ? false : true;
+		if(self.style.display != 'none') // prevent exception on FF + iframe with display:none
+			self.editor.readOnly(self.textarea.readOnly ? true : false);
+	}
+	
+	self.toggleLineNumbers = function() {
+		var cn = self.editor.body.className;
+		self.editor.body.className = (cn==''||cn=='show-line-numbers') ? 'hide-line-numbers' : 'show-line-numbers';
+	}
+	
+	self.toggleEditor = function() {
+		if(self.textarea.disabled) {
+			self.textarea.value = self.getCode();
+			self.textarea.disabled = false;
+			self.style.display = 'none';
+			self.textarea.style.display = 'inline';
+		}
+		else {
+			self.textarea.disabled = true;
+			self.setCode(self.textarea.value);
+			self.editor.syntaxHighlight('init');
+			self.style.display = 'inline';
+			self.textarea.style.display = 'none';
+		}
+	}
+
+	self.edit();
+	return self;
+}
+
+CodePress.languages = {	
+	csharp : 'C#', 
+	css : 'CSS', 
+	generic : 'Generic',
+	html : 'HTML',
+	java : 'Java', 
+	javascript : 'JavaScript', 
+	perl : 'Perl', 
+	ruby : 'Ruby',	
+	php : 'PHP', 
+	text : 'Text', 
+	sql : 'SQL',
+	vbscript : 'VBScript'
+}
+
+
+CodePress.run = function() {
+	s = document.getElementsByTagName('script');
+	for(var i=0,n=s.length;i<n;i++) {
+		if(s[i].src.match('codepress.js')) {
+			CodePress.path = s[i].src.replace('codepress.js','');
+		}
+	}
+	t = document.getElementsByTagName('textarea');
+	for(var i=0,n=t.length;i<n;i++) {
+		if(t[i].className.match('codepress')) {
+			id = t[i].id;
+			t[i].id = id+'_cp';
+			eval(id+' = new CodePress(t[i])');
+			t[i].parentNode.insertBefore(eval(id), t[i]);
+		} 
+	}
+}
+
+if(window.attachEvent) window.attachEvent('onload',CodePress.run);
+else window.addEventListener('DOMContentLoaded',CodePress.run,false);


[51/52] [partial] git commit: forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/6b1dba58
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/6b1dba58
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/6b1dba58

Branch: refs/heads/master
Commit: 6b1dba5881ee99ed583e8d81332980d5358c66e9
Parents: fcdc799
Author: Pradeep Fernando <pr...@gmail.com>
Authored: Thu Apr 17 08:11:35 2014 +0530
Committer: Pradeep Fernando <pr...@gmail.com>
Committed: Thu Apr 17 08:11:35 2014 +0530

----------------------------------------------------------------------
 dependencies/org.wso2.carbon.ui/pom.xml         |  245 +
 .../ui/AbstractCarbonUIAuthenticator.java       |  516 +
 .../carbon/ui/BasicAuthUIAuthenticator.java     |  164 +
 .../org/wso2/carbon/ui/BreadCrumbGenerator.java |  343 +
 .../ui/BundleBasedUIResourceProvider.java       |  124 +
 .../wso2/carbon/ui/BundleProxyClassLoader.java  |   65 +
 .../carbon/ui/BundleResourcePathRegistry.java   |   38 +
 .../org/wso2/carbon/ui/CarbonConnection.java    |  127 +
 .../java/org/wso2/carbon/ui/CarbonProtocol.java |   49 +
 .../wso2/carbon/ui/CarbonSSOSessionManager.java |  213 +
 .../carbon/ui/CarbonSecuredHttpContext.java     |  497 +
 .../wso2/carbon/ui/CarbonUIAuthenticator.java   |  123 +
 .../org/wso2/carbon/ui/CarbonUILoginUtil.java   |  596 ++
 .../org/wso2/carbon/ui/CarbonUIMessage.java     |  148 +
 .../java/org/wso2/carbon/ui/CarbonUIUtil.java   |  469 +
 .../org/wso2/carbon/ui/ComponentDeployer.java   |  189 +
 .../ui/DefaultAuthenticatorCredentials.java     |   22 +
 .../carbon/ui/DefaultCarbonAuthenticator.java   |  186 +
 .../ui/DefaultComponentEntryHttpContext.java    |   79 +
 .../org/wso2/carbon/ui/DeploymentEngine.java    |   98 +
 .../org/wso2/carbon/ui/JSPContextFinder.java    |  193 +
 .../java/org/wso2/carbon/ui/JspClassLoader.java |  119 +
 .../java/org/wso2/carbon/ui/JspServlet.java     |  458 +
 .../org/wso2/carbon/ui/MenuAdminClient.java     |  735 ++
 .../ui/SecuredComponentEntryHttpContext.java    |   91 +
 .../wso2/carbon/ui/TextJavascriptHandler.java   |   22 +
 .../org/wso2/carbon/ui/TextPlainHandler.java    |   41 +
 .../org/wso2/carbon/ui/TilesJspServlet.java     |  107 +
 .../java/org/wso2/carbon/ui/UIAnnouncement.java |   26 +
 .../carbon/ui/UIAuthenticationExtender.java     |   40 +
 .../java/org/wso2/carbon/ui/UIExtender.java     |   22 +
 .../org/wso2/carbon/ui/UIResourceRegistry.java  |  107 +
 .../src/main/java/org/wso2/carbon/ui/Utils.java |  214 +
 .../org/wso2/carbon/ui/action/ActionHelper.java |   62 +
 .../wso2/carbon/ui/action/ComponentAction.java  |   35 +
 .../wso2/carbon/ui/action/ServiceAction.java    |   31 +
 .../ui/clients/FileDownloadServiceClient.java   |   62 +
 .../ui/clients/FileUploadServiceClient.java     |   66 +
 .../carbon/ui/clients/LoggedUserInfoClient.java |   66 +
 .../ui/clients/RegistryAdminServiceClient.java  |   94 +
 .../carbon/ui/deployment/ComponentBuilder.java  |  693 ++
 .../carbon/ui/deployment/UIBundleDeployer.java  |  515 +
 .../ui/deployment/beans/BreadCrumbItem.java     |   70 +
 .../deployment/beans/CarbonUIDefinitions.java   |  358 +
 .../carbon/ui/deployment/beans/Component.java   |  159 +
 .../carbon/ui/deployment/beans/Context.java     |   63 +
 .../deployment/beans/CustomUIDefenitions.java   |   48 +
 .../beans/FileUploadExecutorConfig.java         |   46 +
 .../wso2/carbon/ui/deployment/beans/Menu.java   |  247 +
 .../carbon/ui/deployment/beans/Servlet.java     |   71 +
 .../ui/internal/CarbonUIServiceComponent.java   |  548 +
 .../org/wso2/carbon/ui/taglibs/Breadcrumb.java  |  278 +
 .../carbon/ui/taglibs/ItemGroupSelector.java    |  157 +
 .../java/org/wso2/carbon/ui/taglibs/JSi18n.java |  162 +
 .../org/wso2/carbon/ui/taglibs/Paginator.java   |  260 +
 .../java/org/wso2/carbon/ui/taglibs/Report.java |  131 +
 .../carbon/ui/taglibs/ResourcePaginator.java    |  202 +
 .../ui/taglibs/SimpleItemGroupSelector.java     |  113 +
 .../carbon/ui/taglibs/TooltipsGenerator.java    |  214 +
 .../ui/tracker/AuthenticatorComparator.java     |   32 +
 .../ui/tracker/AuthenticatorRegistry.java       |   89 +
 .../ui/transports/FileDownloadServlet.java      |   74 +
 .../carbon/ui/transports/FileUploadServlet.java |   86 +
 .../fileupload/AbstractFileUploadExecutor.java  |  552 +
 .../fileupload/AnyFileUploadExecutor.java       |   41 +
 .../fileupload/DBSFileUploadExecutor.java       |  117 +
 .../FileSizeLimitExceededException.java         |   24 +
 .../fileupload/FileUploadExecutorManager.java   |  401 +
 .../fileupload/FileUploadFailedException.java   |   22 +
 .../fileupload/JarZipUploadExecutor.java        |  127 +
 .../fileupload/KeyStoreFileUploadExecutor.java  |   95 +
 .../fileupload/ToolsAnyFileUploadExecutor.java  |   90 +
 .../fileupload/ToolsFileUploadExecutor.java     |   79 +
 .../ui/util/CarbonUIAuthenticationUtil.java     |   48 +
 .../wso2/carbon/ui/util/CharacterEncoder.java   |   38 +
 .../wso2/carbon/ui/util/FileDownloadUtil.java   |  145 +
 .../carbon/ui/util/UIAnnouncementDeployer.java  |   54 +
 .../wso2/carbon/ui/util/UIResourceProvider.java |   59 +
 .../src/main/resources/FileDownloadService.wsdl |  138 +
 .../src/main/resources/FileUploadService.wsdl   |  141 +
 .../src/main/resources/LoggedUserInfoAdmin.wsdl |  120 +
 .../RegistryAdminService.wsdl                   |  173 +
 .../resources/web/WEB-INF/tiles/main_defs.xml   |   31 +
 .../resources/web/WEB-INF/tlds/ajaxtags.tld     | 1791 ++++
 .../resources/web/WEB-INF/tlds/c-1_0-rt.tld     |  393 +
 .../main/resources/web/WEB-INF/tlds/c-1_0.tld   |  416 +
 .../src/main/resources/web/WEB-INF/tlds/c.tld   |  572 ++
 .../resources/web/WEB-INF/tlds/carbontags.tld   |  366 +
 .../resources/web/WEB-INF/tlds/fmt-1_0-rt.tld   |  403 +
 .../main/resources/web/WEB-INF/tlds/fmt-1_0.tld |  442 +
 .../src/main/resources/web/WEB-INF/tlds/fmt.tld |  671 ++
 .../src/main/resources/web/WEB-INF/tlds/fn.tld  |  207 +
 .../main/resources/web/WEB-INF/tlds/json.tld    |  150 +
 .../web/WEB-INF/tlds/permittedTaglibs.tld       |   34 +
 .../resources/web/WEB-INF/tlds/scriptfree.tld   |   51 +
 .../resources/web/WEB-INF/tlds/sql-1_0-rt.tld   |  188 +
 .../main/resources/web/WEB-INF/tlds/sql-1_0.tld |  213 +
 .../src/main/resources/web/WEB-INF/tlds/sql.tld |  289 +
 .../resources/web/WEB-INF/tlds/tiles-jsp.tld    |  801 ++
 .../resources/web/WEB-INF/tlds/x-1_0-rt.tld     |  256 +
 .../main/resources/web/WEB-INF/tlds/x-1_0.tld   |  273 +
 .../src/main/resources/web/WEB-INF/tlds/x.tld   |  448 +
 .../src/main/resources/web/WEB-INF/web.xml      |   47 +
 .../web/admin/css/carbonFormStyles.css          |  274 +
 .../resources/web/admin/css/documentation.css   |   95 +
 .../src/main/resources/web/admin/css/global.css | 1445 +++
 .../images/ui-bg_flat_0_aaaaaa_40x100.png       |  Bin 0 -> 180 bytes
 .../images/ui-bg_flat_75_ffffff_40x100.png      |  Bin 0 -> 178 bytes
 .../images/ui-bg_glass_55_fbf9ee_1x400.png      |  Bin 0 -> 120 bytes
 .../images/ui-bg_glass_65_ffffff_1x400.png      |  Bin 0 -> 105 bytes
 .../images/ui-bg_glass_75_dadada_1x400.png      |  Bin 0 -> 111 bytes
 .../images/ui-bg_glass_75_e6e6e6_1x400.png      |  Bin 0 -> 110 bytes
 .../images/ui-bg_glass_95_fef1ec_1x400.png      |  Bin 0 -> 119 bytes
 .../ui-bg_highlight-soft_75_cccccc_1x100.png    |  Bin 0 -> 101 bytes
 .../images/ui-icons_222222_256x240.png          |  Bin 0 -> 4369 bytes
 .../images/ui-icons_2e83ff_256x240.png          |  Bin 0 -> 4369 bytes
 .../images/ui-icons_454545_256x240.png          |  Bin 0 -> 4369 bytes
 .../images/ui-icons_888888_256x240.png          |  Bin 0 -> 4369 bytes
 .../images/ui-icons_cd0a0a_256x240.png          |  Bin 0 -> 4369 bytes
 .../css/smoothness/jquery-ui-1.8.11.custom.css  |  573 ++
 .../resources/web/admin/docs/userguide.html     |  232 +
 .../src/main/resources/web/admin/error.jsp      |  182 +
 .../src/main/resources/web/admin/images/1px.gif |  Bin 0 -> 43 bytes
 .../web/admin/images/add-collection.gif         |  Bin 0 -> 628 bytes
 .../resources/web/admin/images/add-link.gif     |  Bin 0 -> 1027 bytes
 .../resources/web/admin/images/add-resource.gif |  Bin 0 -> 616 bytes
 .../web/admin/images/add-small-icon.gif         |  Bin 0 -> 938 bytes
 .../src/main/resources/web/admin/images/add.gif |  Bin 0 -> 407 bytes
 .../resources/web/admin/images/addNewTab.gif    |  Bin 0 -> 219 bytes
 .../resources/web/admin/images/am_logo_h23.gif  |  Bin 0 -> 1536 bytes
 .../web/admin/images/application_edit.gif       |  Bin 0 -> 1047 bytes
 .../web/admin/images/appserver_logo_h23.gif     |  Bin 0 -> 1574 bytes
 .../resources/web/admin/images/arrow-down.png   |  Bin 0 -> 284 bytes
 .../resources/web/admin/images/arrow-up.png     |  Bin 0 -> 319 bytes
 .../main/resources/web/admin/images/atom.gif    |  Bin 0 -> 204 bytes
 .../web/admin/images/axis2-powered.gif          |  Bin 0 -> 1813 bytes
 .../resources/web/admin/images/bam_logo_h23.gif |  Bin 0 -> 1808 bytes
 .../resources/web/admin/images/basket_put.gif   |  Bin 0 -> 599 bytes
 .../web/admin/images/basket_remove.gif          |  Bin 0 -> 599 bytes
 .../resources/web/admin/images/book_add.gif     |  Bin 0 -> 1086 bytes
 .../resources/web/admin/images/bps_logo_h23.gif |  Bin 0 -> 1725 bytes
 .../resources/web/admin/images/brick_edit.gif   |  Bin 0 -> 649 bytes
 .../resources/web/admin/images/brs_logo_h23.gif |  Bin 0 -> 2864 bytes
 .../web/admin/images/button-bg-focus.gif        |  Bin 0 -> 111 bytes
 .../web/admin/images/button-bg-hover.gif        |  Bin 0 -> 243 bytes
 .../resources/web/admin/images/button-bg.gif    |  Bin 0 -> 243 bytes
 .../resources/web/admin/images/buttonRow-bg.gif |  Bin 0 -> 130 bytes
 .../resources/web/admin/images/calculator.gif   |  Bin 0 -> 623 bytes
 .../resources/web/admin/images/calendar.gif     |  Bin 0 -> 610 bytes
 .../main/resources/web/admin/images/cancel.gif  |  Bin 0 -> 411 bytes
 .../resources/web/admin/images/cep_logo_h23.gif |  Bin 0 -> 1998 bytes
 .../resources/web/admin/images/cloneTab.gif     |  Bin 0 -> 170 bytes
 .../web/admin/images/control_play_blue.gif      |  Bin 0 -> 632 bytes
 .../main/resources/web/admin/images/copy.gif    |  Bin 0 -> 1036 bytes
 .../web/admin/images/create-checkpoint.gif      |  Bin 0 -> 384 bytes
 .../web/admin/images/default-menu-icon.gif      |  Bin 0 -> 86 bytes
 .../main/resources/web/admin/images/delete.gif  |  Bin 0 -> 555 bytes
 .../resources/web/admin/images/down-arrow.gif   |  Bin 0 -> 610 bytes
 .../resources/web/admin/images/down-arrow.png   |  Bin 0 -> 791 bytes
 .../resources/web/admin/images/ds_logo_h23.gif  |  Bin 0 -> 1686 bytes
 .../main/resources/web/admin/images/edit.gif    |  Bin 0 -> 1041 bytes
 .../resources/web/admin/images/elb_logo_h23.gif |  Bin 0 -> 1710 bytes
 .../resources/web/admin/images/esb_logo_h23.gif |  Bin 0 -> 1714 bytes
 .../resources/web/admin/images/excelicon.gif    |  Bin 0 -> 1080 bytes
 .../main/resources/web/admin/images/exlink.gif  |  Bin 0 -> 292 bytes
 .../main/resources/web/admin/images/favicon.ico |  Bin 0 -> 17542 bytes
 .../main/resources/web/admin/images/forum.gif   |  Bin 0 -> 1977 bytes
 .../web/admin/images/gadgetserver_logo_h23.gif  |  Bin 0 -> 1556 bytes
 .../resources/web/admin/images/header-bg.gif    |  Bin 0 -> 495 bytes
 .../resources/web/admin/images/header-logo.gif  |  Bin 0 -> 1506 bytes
 .../web/admin/images/header-region-bg.gif       |  Bin 0 -> 369 bytes
 .../main/resources/web/admin/images/help-bg.gif |  Bin 0 -> 465 bytes
 .../resources/web/admin/images/help-footer.gif  |  Bin 0 -> 1708 bytes
 .../resources/web/admin/images/help-header.gif  |  Bin 0 -> 9996 bytes
 .../web/admin/images/help-small-icon.png        |  Bin 0 -> 631 bytes
 .../main/resources/web/admin/images/help.gif    |  Bin 0 -> 411 bytes
 .../main/resources/web/admin/images/home-bg.gif |  Bin 0 -> 145 bytes
 .../resources/web/admin/images/htmlicon.gif     |  Bin 0 -> 1017 bytes
 .../web/admin/images/icon-feed-small-res.gif    |  Bin 0 -> 1022 bytes
 .../web/admin/images/identity_logo_h23.gif      |  Bin 0 -> 1499 bytes
 .../resources/web/admin/images/information.gif  |  Bin 0 -> 1025 bytes
 .../resources/web/admin/images/invisible.gif    |  Bin 0 -> 51 bytes
 .../web/admin/images/issue-tracker.gif          |  Bin 0 -> 1821 bytes
 .../web/admin/images/leftRightSlider-dark.png   |  Bin 0 -> 1421 bytes
 .../web/admin/images/leftRightSlider.png        |  Bin 0 -> 448 bytes
 .../web/admin/images/loading-small.gif          |  Bin 0 -> 673 bytes
 .../main/resources/web/admin/images/loading.gif |  Bin 0 -> 14367 bytes
 .../resources/web/admin/images/mailing-list.gif |  Bin 0 -> 2064 bytes
 .../resources/web/admin/images/mainIcons.png    |  Bin 0 -> 1891 bytes
 .../web/admin/images/mashup_logo_h23.gif        |  Bin 0 -> 1508 bytes
 .../resources/web/admin/images/mb_logo_h23.gif  |  Bin 0 -> 1603 bytes
 .../resources/web/admin/images/menu-header.gif  |  Bin 0 -> 237 bytes
 .../resources/web/admin/images/mgt-logo.gif     |  Bin 0 -> 2095 bytes
 .../resources/web/admin/images/minus-plus.png   |  Bin 0 -> 1113 bytes
 .../main/resources/web/admin/images/move.gif    |  Bin 0 -> 166 bytes
 .../web/admin/images/nseditor-icon.gif          |  Bin 0 -> 1065 bytes
 .../main/resources/web/admin/images/oops.gif    |  Bin 0 -> 678 bytes
 .../main/resources/web/admin/images/overlay.png |  Bin 0 -> 289 bytes
 .../resources/web/admin/images/panelImage.png   |  Bin 0 -> 144 bytes
 .../main/resources/web/admin/images/pdficon.gif |  Bin 0 -> 361 bytes
 .../resources/web/admin/images/plugin_add.gif   |  Bin 0 -> 1030 bytes
 .../web/admin/images/plugin_delete.gif          |  Bin 0 -> 1031 bytes
 .../resources/web/admin/images/policies.gif     |  Bin 0 -> 387 bytes
 .../web/admin/images/registry_logo_h23.gif      |  Bin 0 -> 1657 bytes
 .../web/admin/images/registry_picker.gif        |  Bin 0 -> 1053 bytes
 .../src/main/resources/web/admin/images/rss.gif |  Bin 0 -> 207 bytes
 .../main/resources/web/admin/images/spacer.gif  |  Bin 0 -> 43 bytes
 .../resources/web/admin/images/ss_logo_h23.png  |  Bin 0 -> 4097 bytes
 .../main/resources/web/admin/images/star.gif    |  Bin 0 -> 588 bytes
 .../web/admin/images/static-icon-disabled.gif   |  Bin 0 -> 935 bytes
 .../resources/web/admin/images/static-icon.gif  |  Bin 0 -> 935 bytes
 .../resources/web/admin/images/table-header.gif |  Bin 0 -> 873 bytes
 .../web/admin/images/trace-icon-disabled.gif    |  Bin 0 -> 950 bytes
 .../resources/web/admin/images/trace-icon.gif   |  Bin 0 -> 961 bytes
 .../resources/web/admin/images/up-arrow.gif     |  Bin 0 -> 615 bytes
 .../resources/web/admin/images/up-arrow.png     |  Bin 0 -> 822 bytes
 .../resources/web/admin/images/user-guide.gif   |  Bin 0 -> 2161 bytes
 .../main/resources/web/admin/images/user.gif    |  Bin 0 -> 604 bytes
 .../web/admin/images/view-disabled.gif          |  Bin 0 -> 998 bytes
 .../main/resources/web/admin/images/view.gif    |  Bin 0 -> 596 bytes
 .../main/resources/web/admin/images/zoom_in.gif |  Bin 0 -> 575 bytes
 .../resources/web/admin/images/zoom_out.gif     |  Bin 0 -> 563 bytes
 .../src/main/resources/web/admin/index.jsp      |  127 +
 .../main/resources/web/admin/js/WSRequest.js    | 1446 +++
 .../main/resources/web/admin/js/breadcrumbs.js  |  187 +
 .../src/main/resources/web/admin/js/cookies.js  |   84 +
 .../resources/web/admin/js/customControls.js    |  148 +
 .../main/resources/web/admin/js/dhtmlHistory.js |  925 ++
 .../src/main/resources/web/admin/js/excanvas.js |    1 +
 .../resources/web/admin/js/jquery-1.5.2.min.js  |   16 +
 .../web/admin/js/jquery-ui-1.8.11.custom.min.js |  783 ++
 .../resources/web/admin/js/jquery.cookie.js     |   96 +
 .../main/resources/web/admin/js/jquery.flot.js  |    6 +
 .../main/resources/web/admin/js/jquery.form.js  |  601 ++
 .../src/main/resources/web/admin/js/jquery.js   | 3549 +++++++
 .../web/admin/js/jquery.ui.core.min.js          |   17 +
 .../web/admin/js/jquery.ui.tabs.min.js          |   35 +
 .../web/admin/js/jquery.ui.widget.min.js        |   15 +
 .../resources/web/admin/js/jquery.validate.js   | 1188 +++
 .../src/main/resources/web/admin/js/main.js     | 1818 ++++
 .../resources/web/admin/js/prototype-1.6.js     | 4184 ++++++++
 .../src/main/resources/web/admin/js/template.js |  462 +
 .../src/main/resources/web/admin/js/widgets.js  |   88 +
 .../jsp/WSRequestXSSproxy_ajaxprocessor.jsp     |  253 +
 .../resources/web/admin/jsp/browser_checker.jsp |   12 +
 .../admin/jsp/registry_styles_ajaxprocessor.jsp |   44 +
 .../web/admin/jsp/session-validate.jsp          |   17 +
 .../resources/web/admin/layout/ajaxheader.jsp   |   30 +
 .../web/admin/layout/announcements.jsp          |   25 +
 .../resources/web/admin/layout/breadcrumb.jsp   |   54 +
 .../resources/web/admin/layout/defaultBody.jsp  |  126 +
 .../main/resources/web/admin/layout/footer.jsp  |   28 +
 .../main/resources/web/admin/layout/header.jsp  |  166 +
 .../main/resources/web/admin/layout/region1.jsp |   39 +
 .../main/resources/web/admin/layout/region2.jsp |   29 +
 .../main/resources/web/admin/layout/region3.jsp |   29 +
 .../main/resources/web/admin/layout/region4.jsp |   29 +
 .../main/resources/web/admin/layout/region5.jsp |   29 +
 .../resources/web/admin/layout/template.jsp     |  222 +
 .../src/main/resources/web/admin/login.jsp      |  272 +
 .../main/resources/web/ajax/js/ajax/ajaxtags.js | 1285 +++
 .../web/ajax/js/ajax/ajaxtags_controls.js       |  307 +
 .../web/ajax/js/ajax/ajaxtags_parser.js         |  305 +
 .../src/main/resources/web/ajax/js/all.js       | 4474 ++++++++
 .../src/main/resources/web/ajax/js/prototype.js | 2520 +++++
 .../src/main/resources/web/ajax/js/readme.txt   |   20 +
 .../web/ajax/js/scriptaculous/builder.js        |  131 +
 .../web/ajax/js/scriptaculous/controls.js       |  835 ++
 .../web/ajax/js/scriptaculous/dragdrop.js       |  944 ++
 .../web/ajax/js/scriptaculous/effects.js        | 1090 ++
 .../web/ajax/js/scriptaculous/scriptaculous.js  |   51 +
 .../web/ajax/js/scriptaculous/slider.js         |  278 +
 .../web/ajax/js/scriptaculous/unittest.js       |  564 +
 .../main/resources/web/codepress/codepress.css  |   21 +
 .../main/resources/web/codepress/codepress.html |   51 +
 .../main/resources/web/codepress/codepress.js   |  138 +
 .../resources/web/codepress/engines/gecko.js    |  293 +
 .../resources/web/codepress/engines/khtml.js    |    0
 .../resources/web/codepress/engines/msie.js     |  304 +
 .../resources/web/codepress/engines/older.js    |    0
 .../resources/web/codepress/engines/opera.js    |  260 +
 .../resources/web/codepress/engines/webkit.js   |  297 +
 .../web/codepress/images/line-numbers.png       |  Bin 0 -> 16556 bytes
 .../resources/web/codepress/languages/asp.css   |   71 +
 .../resources/web/codepress/languages/asp.js    |  117 +
 .../web/codepress/languages/autoit.css          |   13 +
 .../resources/web/codepress/languages/autoit.js |   32 +
 .../web/codepress/languages/csharp.css          |    9 +
 .../resources/web/codepress/languages/csharp.js |   25 +
 .../resources/web/codepress/languages/css.css   |   10 +
 .../resources/web/codepress/languages/css.js    |   23 +
 .../web/codepress/languages/generic.css         |    9 +
 .../web/codepress/languages/generic.js          |   25 +
 .../resources/web/codepress/languages/html.css  |   13 +
 .../resources/web/codepress/languages/html.js   |   59 +
 .../resources/web/codepress/languages/java.css  |    7 +
 .../resources/web/codepress/languages/java.js   |   24 +
 .../web/codepress/languages/javascript.css      |    8 +
 .../web/codepress/languages/javascript.js       |   30 +
 .../resources/web/codepress/languages/perl.css  |   11 +
 .../resources/web/codepress/languages/perl.js   |   27 +
 .../resources/web/codepress/languages/php.css   |   12 +
 .../resources/web/codepress/languages/php.js    |   61 +
 .../resources/web/codepress/languages/ruby.css  |   10 +
 .../resources/web/codepress/languages/ruby.js   |   26 +
 .../resources/web/codepress/languages/sql.css   |   10 +
 .../resources/web/codepress/languages/sql.js    |   30 +
 .../resources/web/codepress/languages/text.css  |    5 +
 .../resources/web/codepress/languages/text.js   |    9 +
 .../web/codepress/languages/vbscript.css        |   71 +
 .../web/codepress/languages/vbscript.js         |  117 +
 .../resources/web/codepress/languages/xsl.css   |   15 +
 .../resources/web/codepress/languages/xsl.js    |  103 +
 .../main/resources/web/codepress/license.txt    |  458 +
 .../resources/web/dialog/css/dialog-ie8.css     |    4 +
 .../main/resources/web/dialog/css/dialog.css    |  129 +
 .../jqueryui/images/222222_11x11_icon_close.gif |  Bin 0 -> 62 bytes
 .../images/222222_11x11_icon_resize_se.gif      |  Bin 0 -> 61 bytes
 .../jqueryui/images/222222_7x7_arrow_left.gif   |  Bin 0 -> 53 bytes
 .../jqueryui/images/222222_7x7_arrow_right.gif  |  Bin 0 -> 53 bytes
 .../jqueryui/images/454545_11x11_icon_close.gif |  Bin 0 -> 62 bytes
 .../jqueryui/images/454545_7x7_arrow_left.gif   |  Bin 0 -> 53 bytes
 .../jqueryui/images/454545_7x7_arrow_right.gif  |  Bin 0 -> 53 bytes
 .../jqueryui/images/888888_11x11_icon_close.gif |  Bin 0 -> 62 bytes
 .../jqueryui/images/888888_7x7_arrow_left.gif   |  Bin 0 -> 53 bytes
 .../jqueryui/images/888888_7x7_arrow_right.gif  |  Bin 0 -> 53 bytes
 .../dadada_40x100_textures_02_glass_75.png      |  Bin 0 -> 214 bytes
 .../e6e6e6_40x100_textures_02_glass_75.png      |  Bin 0 -> 211 bytes
 .../images/ffffff_40x100_textures_01_flat_0.png |  Bin 0 -> 178 bytes
 .../ffffff_40x100_textures_02_glass_65.png      |  Bin 0 -> 207 bytes
 .../css/jqueryui/jqueryui-themeroller.css       |  856 ++
 .../resources/web/dialog/display_messages.jsp   |   90 +
 .../main/resources/web/dialog/img/confirm.gif   |  Bin 0 -> 2324 bytes
 .../src/main/resources/web/dialog/img/error.gif |  Bin 0 -> 2258 bytes
 .../src/main/resources/web/dialog/img/info.gif  |  Bin 0 -> 2349 bytes
 .../main/resources/web/dialog/img/overlay.png   |  Bin 0 -> 144 bytes
 .../main/resources/web/dialog/img/warning.gif   |  Bin 0 -> 2345 bytes
 .../src/main/resources/web/dialog/js/dialog.js  |  369 +
 .../web/dialog/js/jqueryui/jquery-ui.min.js     |  331 +
 .../222222_11x11_icon_arrows_leftright.gif      |  Bin 0 -> 58 bytes
 .../images/222222_11x11_icon_arrows_updown.gif  |  Bin 0 -> 56 bytes
 .../tabs/images/222222_11x11_icon_doc.gif       |  Bin 0 -> 64 bytes
 .../tabs/images/222222_11x11_icon_minus.gif     |  Bin 0 -> 56 bytes
 .../tabs/images/222222_11x11_icon_plus.gif      |  Bin 0 -> 61 bytes
 .../tabs/images/222222_11x11_icon_resize_se.gif |  Bin 0 -> 61 bytes
 .../tabs/images/222222_7x7_arrow_down.gif       |  Bin 0 -> 52 bytes
 .../tabs/images/222222_7x7_arrow_left.gif       |  Bin 0 -> 53 bytes
 .../tabs/images/222222_7x7_arrow_right.gif      |  Bin 0 -> 53 bytes
 .../tabs/images/222222_7x7_arrow_up.gif         |  Bin 0 -> 52 bytes
 .../454545_11x11_icon_arrows_leftright.gif      |  Bin 0 -> 58 bytes
 .../images/454545_11x11_icon_arrows_updown.gif  |  Bin 0 -> 56 bytes
 .../tabs/images/454545_11x11_icon_close.gif     |  Bin 0 -> 62 bytes
 .../tabs/images/454545_11x11_icon_doc.gif       |  Bin 0 -> 64 bytes
 .../images/454545_11x11_icon_folder_closed.gif  |  Bin 0 -> 61 bytes
 .../images/454545_11x11_icon_folder_open.gif    |  Bin 0 -> 61 bytes
 .../tabs/images/454545_11x11_icon_minus.gif     |  Bin 0 -> 56 bytes
 .../tabs/images/454545_11x11_icon_plus.gif      |  Bin 0 -> 61 bytes
 .../tabs/images/454545_7x7_arrow_down.gif       |  Bin 0 -> 52 bytes
 .../tabs/images/454545_7x7_arrow_left.gif       |  Bin 0 -> 53 bytes
 .../tabs/images/454545_7x7_arrow_right.gif      |  Bin 0 -> 53 bytes
 .../tabs/images/454545_7x7_arrow_up.gif         |  Bin 0 -> 52 bytes
 .../888888_11x11_icon_arrows_leftright.gif      |  Bin 0 -> 58 bytes
 .../images/888888_11x11_icon_arrows_updown.gif  |  Bin 0 -> 56 bytes
 .../tabs/images/888888_11x11_icon_close.gif     |  Bin 0 -> 62 bytes
 .../tabs/images/888888_11x11_icon_doc.gif       |  Bin 0 -> 64 bytes
 .../images/888888_11x11_icon_folder_closed.gif  |  Bin 0 -> 61 bytes
 .../images/888888_11x11_icon_folder_open.gif    |  Bin 0 -> 61 bytes
 .../tabs/images/888888_11x11_icon_minus.gif     |  Bin 0 -> 56 bytes
 .../tabs/images/888888_11x11_icon_plus.gif      |  Bin 0 -> 61 bytes
 .../tabs/images/888888_7x7_arrow_down.gif       |  Bin 0 -> 52 bytes
 .../tabs/images/888888_7x7_arrow_left.gif       |  Bin 0 -> 53 bytes
 .../tabs/images/888888_7x7_arrow_right.gif      |  Bin 0 -> 53 bytes
 .../tabs/images/888888_7x7_arrow_up.gif         |  Bin 0 -> 52 bytes
 .../dadada_40x100_textures_02_glass_75.png      |  Bin 0 -> 214 bytes
 .../e6e6e6_40x100_textures_02_glass_75.png      |  Bin 0 -> 211 bytes
 .../ffffff_40x100_textures_01_flat_75.png       |  Bin 0 -> 178 bytes
 .../ffffff_40x100_textures_02_glass_65.png      |  Bin 0 -> 207 bytes
 .../dialog/js/jqueryui/tabs/jquery-1.2.6.min.js |   32 +
 .../jqueryui/tabs/jquery-ui-1.6.custom.min.js   |    1 +
 .../dialog/js/jqueryui/tabs/jquery.cookie.js    |   96 +
 .../web/dialog/js/jqueryui/tabs/ui.all.css      |  609 ++
 .../js/jqueryui/ui/i18n/jquery.ui.i18n.all.js   |  856 ++
 .../js/jqueryui/ui/i18n/ui.datepicker-ar.js     |   26 +
 .../js/jqueryui/ui/i18n/ui.datepicker-bg.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-ca.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-cs.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-da.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-de.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-eo.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-es.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-fi.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-fr.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-he.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-hr.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-hu.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-hy.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-id.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-is.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-it.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-ja.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-ko.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-lt.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-lv.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-nl.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-no.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-pl.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-pt-BR.js  |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-ro.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-ru.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-sk.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-sl.js     |   23 +
 .../js/jqueryui/ui/i18n/ui.datepicker-sv.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-th.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-tr.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-uk.js     |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-zh-CN.js  |   25 +
 .../js/jqueryui/ui/i18n/ui.datepicker-zh-TW.js  |   25 +
 .../src/main/resources/web/docs/about.html      |  132 +
 .../main/resources/web/docs/images/login.png    |  Bin 0 -> 5995 bytes
 .../resources/web/docs/signin_userguide.html    |   70 +
 .../resources/web/editarea/autocompletion.js    |  491 +
 .../main/resources/web/editarea/edit_area.css   |  530 +
 .../main/resources/web/editarea/edit_area.js    |  529 +
 .../web/editarea/edit_area_compressor.php       |  428 +
 .../resources/web/editarea/edit_area_full.gz    |  Bin 0 -> 30126 bytes
 .../resources/web/editarea/edit_area_full.js    |   38 +
 .../web/editarea/edit_area_functions.js         | 1209 +++
 .../resources/web/editarea/edit_area_loader.js  | 1081 ++
 .../web/editarea/elements_functions.js          |  336 +
 .../main/resources/web/editarea/highlight.js    |  407 +
 .../web/editarea/images/autocompletion.gif      |  Bin 0 -> 359 bytes
 .../resources/web/editarea/images/close.gif     |  Bin 0 -> 102 bytes
 .../web/editarea/images/fullscreen.gif          |  Bin 0 -> 198 bytes
 .../web/editarea/images/go_to_line.gif          |  Bin 0 -> 1053 bytes
 .../main/resources/web/editarea/images/help.gif |  Bin 0 -> 295 bytes
 .../resources/web/editarea/images/highlight.gif |  Bin 0 -> 256 bytes
 .../main/resources/web/editarea/images/load.gif |  Bin 0 -> 1041 bytes
 .../main/resources/web/editarea/images/move.gif |  Bin 0 -> 257 bytes
 .../web/editarea/images/newdocument.gif         |  Bin 0 -> 170 bytes
 .../resources/web/editarea/images/opacity.png   |  Bin 0 -> 147 bytes
 .../web/editarea/images/processing.gif          |  Bin 0 -> 825 bytes
 .../main/resources/web/editarea/images/redo.gif |  Bin 0 -> 169 bytes
 .../web/editarea/images/reset_highlight.gif     |  Bin 0 -> 168 bytes
 .../main/resources/web/editarea/images/save.gif |  Bin 0 -> 285 bytes
 .../resources/web/editarea/images/search.gif    |  Bin 0 -> 191 bytes
 .../web/editarea/images/smooth_selection.gif    |  Bin 0 -> 174 bytes
 .../resources/web/editarea/images/spacer.gif    |  Bin 0 -> 43 bytes
 .../web/editarea/images/statusbar_resize.gif    |  Bin 0 -> 79 bytes
 .../main/resources/web/editarea/images/undo.gif |  Bin 0 -> 175 bytes
 .../resources/web/editarea/images/word_wrap.gif |  Bin 0 -> 951 bytes
 .../src/main/resources/web/editarea/keyboard.js |  145 +
 .../src/main/resources/web/editarea/langs/bg.js |   54 +
 .../src/main/resources/web/editarea/langs/cs.js |   48 +
 .../src/main/resources/web/editarea/langs/de.js |   48 +
 .../src/main/resources/web/editarea/langs/dk.js |   48 +
 .../src/main/resources/web/editarea/langs/en.js |   48 +
 .../src/main/resources/web/editarea/langs/eo.js |   48 +
 .../src/main/resources/web/editarea/langs/es.js |   48 +
 .../src/main/resources/web/editarea/langs/fi.js |   48 +
 .../src/main/resources/web/editarea/langs/fr.js |   48 +
 .../src/main/resources/web/editarea/langs/hr.js |   48 +
 .../src/main/resources/web/editarea/langs/it.js |   48 +
 .../src/main/resources/web/editarea/langs/ja.js |   48 +
 .../src/main/resources/web/editarea/langs/mk.js |   48 +
 .../src/main/resources/web/editarea/langs/nl.js |   48 +
 .../src/main/resources/web/editarea/langs/pl.js |   48 +
 .../src/main/resources/web/editarea/langs/pt.js |   48 +
 .../src/main/resources/web/editarea/langs/ru.js |   48 +
 .../src/main/resources/web/editarea/langs/sk.js |   48 +
 .../src/main/resources/web/editarea/langs/zh.js |   48 +
 .../resources/web/editarea/license_apache.txt   |    7 +
 .../main/resources/web/editarea/license_bsd.txt |   10 +
 .../resources/web/editarea/license_lgpl.txt     |  458 +
 .../main/resources/web/editarea/manage_area.js  |  623 ++
 .../web/editarea/plugins/charmap/charmap.js     |   90 +
 .../editarea/plugins/charmap/css/charmap.css    |   64 +
 .../editarea/plugins/charmap/images/charmap.gif |  Bin 0 -> 245 bytes
 .../editarea/plugins/charmap/jscripts/map.js    |  373 +
 .../web/editarea/plugins/charmap/langs/bg.js    |   12 +
 .../web/editarea/plugins/charmap/langs/cs.js    |    6 +
 .../web/editarea/plugins/charmap/langs/de.js    |    6 +
 .../web/editarea/plugins/charmap/langs/dk.js    |    6 +
 .../web/editarea/plugins/charmap/langs/en.js    |    6 +
 .../web/editarea/plugins/charmap/langs/eo.js    |    6 +
 .../web/editarea/plugins/charmap/langs/es.js    |    6 +
 .../web/editarea/plugins/charmap/langs/fr.js    |    6 +
 .../web/editarea/plugins/charmap/langs/hr.js    |    6 +
 .../web/editarea/plugins/charmap/langs/it.js    |    6 +
 .../web/editarea/plugins/charmap/langs/ja.js    |    6 +
 .../web/editarea/plugins/charmap/langs/mk.js    |    6 +
 .../web/editarea/plugins/charmap/langs/nl.js    |    6 +
 .../web/editarea/plugins/charmap/langs/pl.js    |    6 +
 .../web/editarea/plugins/charmap/langs/pt.js    |    6 +
 .../web/editarea/plugins/charmap/langs/ru.js    |    6 +
 .../web/editarea/plugins/charmap/langs/sk.js    |    6 +
 .../web/editarea/plugins/charmap/langs/zh.js    |    6 +
 .../web/editarea/plugins/charmap/popup.html     |   24 +
 .../web/editarea/plugins/test/css/test.css      |    3 +
 .../web/editarea/plugins/test/images/Thumbs.db  |  Bin 0 -> 3584 bytes
 .../web/editarea/plugins/test/images/test.gif   |  Bin 0 -> 87 bytes
 .../web/editarea/plugins/test/langs/bg.js       |   10 +
 .../web/editarea/plugins/test/langs/cs.js       |    4 +
 .../web/editarea/plugins/test/langs/de.js       |    4 +
 .../web/editarea/plugins/test/langs/dk.js       |    4 +
 .../web/editarea/plugins/test/langs/en.js       |    4 +
 .../web/editarea/plugins/test/langs/eo.js       |    4 +
 .../web/editarea/plugins/test/langs/es.js       |    4 +
 .../web/editarea/plugins/test/langs/fr.js       |    4 +
 .../web/editarea/plugins/test/langs/hr.js       |    4 +
 .../web/editarea/plugins/test/langs/it.js       |    4 +
 .../web/editarea/plugins/test/langs/ja.js       |    4 +
 .../web/editarea/plugins/test/langs/mk.js       |    4 +
 .../web/editarea/plugins/test/langs/nl.js       |    4 +
 .../web/editarea/plugins/test/langs/pl.js       |    4 +
 .../web/editarea/plugins/test/langs/pt.js       |    4 +
 .../web/editarea/plugins/test/langs/ru.js       |    4 +
 .../web/editarea/plugins/test/langs/sk.js       |    4 +
 .../web/editarea/plugins/test/langs/zh.js       |    4 +
 .../resources/web/editarea/plugins/test/test.js |  110 +
 .../web/editarea/plugins/test/test2.js          |    1 +
 .../main/resources/web/editarea/reg_syntax.js   |  166 +
 .../resources/web/editarea/reg_syntax/basic.js  |   70 +
 .../web/editarea/reg_syntax/brainfuck.js        |   45 +
 .../main/resources/web/editarea/reg_syntax/c.js |   63 +
 .../web/editarea/reg_syntax/coldfusion.js       |  120 +
 .../resources/web/editarea/reg_syntax/cpp.js    |   66 +
 .../resources/web/editarea/reg_syntax/css.js    |   85 +
 .../resources/web/editarea/reg_syntax/html.js   |   51 +
 .../resources/web/editarea/reg_syntax/java.js   |   57 +
 .../resources/web/editarea/reg_syntax/js.js     |   94 +
 .../resources/web/editarea/reg_syntax/pas.js    |   83 +
 .../resources/web/editarea/reg_syntax/perl.js   |   88 +
 .../resources/web/editarea/reg_syntax/php.js    |  157 +
 .../resources/web/editarea/reg_syntax/python.js |  145 +
 .../web/editarea/reg_syntax/robotstxt.js        |   25 +
 .../resources/web/editarea/reg_syntax/ruby.js   |   68 +
 .../resources/web/editarea/reg_syntax/sql.js    |   56 +
 .../resources/web/editarea/reg_syntax/tsql.js   |   88 +
 .../resources/web/editarea/reg_syntax/vb.js     |   53 +
 .../resources/web/editarea/reg_syntax/xml.js    |   57 +
 .../src/main/resources/web/editarea/regexp.js   |  139 +
 .../main/resources/web/editarea/resize_area.js  |   73 +
 .../resources/web/editarea/search_replace.js    |  174 +
 .../main/resources/web/editarea/template.html   |  100 +
 .../web/highlighter/css/SyntaxHighlighter.css   |  185 +
 .../main/resources/web/highlighter/header.jsp   |   22 +
 .../resources/web/highlighter/js/clipboard.swf  |  Bin 0 -> 109 bytes
 .../web/highlighter/js/shBrushCSharp.js         |   10 +
 .../resources/web/highlighter/js/shBrushCpp.js  |   10 +
 .../resources/web/highlighter/js/shBrushCss.js  |   14 +
 .../web/highlighter/js/shBrushDelphi.js         |   10 +
 .../web/highlighter/js/shBrushJScript.js        |   10 +
 .../resources/web/highlighter/js/shBrushJava.js |   10 +
 .../resources/web/highlighter/js/shBrushPhp.js  |   10 +
 .../web/highlighter/js/shBrushPython.js         |   11 +
 .../resources/web/highlighter/js/shBrushRuby.js |   11 +
 .../resources/web/highlighter/js/shBrushSql.js  |   10 +
 .../resources/web/highlighter/js/shBrushVb.js   |   10 +
 .../resources/web/highlighter/js/shBrushXml.js  |   19 +
 .../main/resources/web/highlighter/js/shCore.js |  161 +
 .../src/main/resources/web/index.html           |   89 +
 .../resources/web/yui/build/animation/README    |   71 +
 .../web/yui/build/animation/animation-debug.js  | 1385 +++
 .../web/yui/build/animation/animation-min.js    |   23 +
 .../web/yui/build/animation/animation.js        | 1381 +++
 .../yui/build/assets/skins/sam/autocomplete.css |    7 +
 .../yui/build/assets/skins/sam/blankimage.png   |  Bin 0 -> 2314 bytes
 .../web/yui/build/assets/skins/sam/button.css   |    7 +
 .../web/yui/build/assets/skins/sam/calendar.css |    7 +
 .../yui/build/assets/skins/sam/colorpicker.css  |    7 +
 .../yui/build/assets/skins/sam/container.css    |    7 +
 .../yui/build/assets/skins/sam/datatable.css    |    7 +
 .../yui/build/assets/skins/sam/dt-arrow-dn.png  |  Bin 0 -> 116 bytes
 .../yui/build/assets/skins/sam/dt-arrow-up.png  |  Bin 0 -> 116 bytes
 .../yui/build/assets/skins/sam/editor-knob.gif  |  Bin 0 -> 138 bytes
 .../assets/skins/sam/editor-sprite-active.gif   |  Bin 0 -> 5614 bytes
 .../build/assets/skins/sam/editor-sprite.gif    |  Bin 0 -> 5690 bytes
 .../web/yui/build/assets/skins/sam/editor.css   |    7 +
 .../web/yui/build/assets/skins/sam/hue_bg.png   |  Bin 0 -> 1120 bytes
 .../web/yui/build/assets/skins/sam/logger.css   |    7 +
 .../skins/sam/menu-button-arrow-disabled.png    |  Bin 0 -> 173 bytes
 .../assets/skins/sam/menu-button-arrow.png      |  Bin 0 -> 173 bytes
 .../web/yui/build/assets/skins/sam/menu.css     |    7 +
 .../yui/build/assets/skins/sam/picker_mask.png  |  Bin 0 -> 12174 bytes
 .../web/yui/build/assets/skins/sam/skin.css     |   26 +
 .../skins/sam/split-button-arrow-active.png     |  Bin 0 -> 280 bytes
 .../skins/sam/split-button-arrow-disabled.png   |  Bin 0 -> 185 bytes
 .../skins/sam/split-button-arrow-focus.png      |  Bin 0 -> 185 bytes
 .../skins/sam/split-button-arrow-hover.png      |  Bin 0 -> 185 bytes
 .../assets/skins/sam/split-button-arrow.png     |  Bin 0 -> 185 bytes
 .../web/yui/build/assets/skins/sam/sprite.png   |  Bin 0 -> 3745 bytes
 .../web/yui/build/assets/skins/sam/tabview.css  |    7 +
 .../build/assets/skins/sam/treeview-loading.gif |  Bin 0 -> 2673 bytes
 .../build/assets/skins/sam/treeview-sprite.gif  |  Bin 0 -> 4326 bytes
 .../web/yui/build/assets/skins/sam/treeview.css |    7 +
 .../web/yui/build/assets/skins/sam/yuitest.css  |    7 +
 .../resources/web/yui/build/autocomplete/README |  212 +
 .../autocomplete/assets/autocomplete-core.css   |    7 +
 .../assets/skins/sam/autocomplete-skin.css      |   57 +
 .../assets/skins/sam/autocomplete.css           |    7 +
 .../build/autocomplete/autocomplete-debug.js    | 2917 ++++++
 .../yui/build/autocomplete/autocomplete-min.js  |   12 +
 .../web/yui/build/autocomplete/autocomplete.js  | 2873 ++++++
 .../main/resources/web/yui/build/base/README    |   29 +
 .../resources/web/yui/build/base/base-min.css   |    7 +
 .../main/resources/web/yui/build/base/base.css  |   82 +
 .../main/resources/web/yui/build/button/README  |  436 +
 .../web/yui/build/button/assets/button-core.css |   44 +
 .../button/assets/skins/sam/button-skin.css     |  240 +
 .../build/button/assets/skins/sam/button.css    |    7 +
 .../skins/sam/menu-button-arrow-disabled.png    |  Bin 0 -> 173 bytes
 .../assets/skins/sam/menu-button-arrow.png      |  Bin 0 -> 173 bytes
 .../skins/sam/split-button-arrow-active.png     |  Bin 0 -> 280 bytes
 .../skins/sam/split-button-arrow-disabled.png   |  Bin 0 -> 185 bytes
 .../skins/sam/split-button-arrow-focus.png      |  Bin 0 -> 185 bytes
 .../skins/sam/split-button-arrow-hover.png      |  Bin 0 -> 185 bytes
 .../assets/skins/sam/split-button-arrow.png     |  Bin 0 -> 185 bytes
 .../web/yui/build/button/button-beta-debug.js   | 4612 +++++++++
 .../web/yui/build/button/button-beta-min.js     |   11 +
 .../web/yui/build/button/button-beta.js         | 4534 ++++++++
 .../resources/web/yui/build/calendar/README     |  421 +
 .../yui/build/calendar/assets/calendar-core.css |  132 +
 .../web/yui/build/calendar/assets/calendar.css  |  320 +
 .../web/yui/build/calendar/assets/callt.gif     |  Bin 0 -> 93 bytes
 .../web/yui/build/calendar/assets/calrt.gif     |  Bin 0 -> 94 bytes
 .../web/yui/build/calendar/assets/calx.gif      |  Bin 0 -> 88 bytes
 .../calendar/assets/skins/sam/calendar-skin.css |  361 +
 .../calendar/assets/skins/sam/calendar.css      |    7 +
 .../web/yui/build/calendar/calendar-debug.js    | 7168 +++++++++++++
 .../web/yui/build/calendar/calendar-min.js      |   18 +
 .../web/yui/build/calendar/calendar.js          | 7138 +++++++++++++
 .../resources/web/yui/build/colorpicker/README  |   21 +
 .../colorpicker/assets/colorpicker_core.css     |    6 +
 .../yui/build/colorpicker/assets/hue_thumb.png  |  Bin 0 -> 195 bytes
 .../build/colorpicker/assets/picker_mask.png    |  Bin 0 -> 12174 bytes
 .../build/colorpicker/assets/picker_thumb.png   |  Bin 0 -> 192 bytes
 .../assets/skins/sam/colorpicker-skin.css       |  105 +
 .../assets/skins/sam/colorpicker.css            |    7 +
 .../colorpicker/assets/skins/sam/hue_bg.png     |  Bin 0 -> 1120 bytes
 .../assets/skins/sam/picker_mask.png            |  Bin 0 -> 12174 bytes
 .../build/colorpicker/colorpicker-beta-debug.js | 1751 ++++
 .../build/colorpicker/colorpicker-beta-min.js   |    9 +
 .../yui/build/colorpicker/colorpicker-beta.js   | 1731 ++++
 .../resources/web/yui/build/connection/README   |  302 +
 .../yui/build/connection/connection-debug.js    | 1409 +++
 .../web/yui/build/connection/connection-min.js  |    8 +
 .../web/yui/build/connection/connection.js      | 1379 +++
 .../resources/web/yui/build/container/README    | 1129 ++
 .../web/yui/build/container/assets/alrt16_1.gif |  Bin 0 -> 971 bytes
 .../web/yui/build/container/assets/blck16_1.gif |  Bin 0 -> 591 bytes
 .../yui/build/container/assets/close12_1.gif    |  Bin 0 -> 85 bytes
 .../build/container/assets/container-core.css   |  168 +
 .../yui/build/container/assets/container.css    |  325 +
 .../web/yui/build/container/assets/hlp16_1.gif  |  Bin 0 -> 928 bytes
 .../web/yui/build/container/assets/info16_1.gif |  Bin 0 -> 601 bytes
 .../assets/skins/sam/container-skin.css         |  242 +
 .../container/assets/skins/sam/container.css    |    7 +
 .../web/yui/build/container/assets/tip16_1.gif  |  Bin 0 -> 552 bytes
 .../web/yui/build/container/assets/warn16_1.gif |  Bin 0 -> 580 bytes
 .../web/yui/build/container/container-debug.js  | 8861 ++++++++++++++++
 .../web/yui/build/container/container-min.js    |   19 +
 .../web/yui/build/container/container.js        | 8837 ++++++++++++++++
 .../yui/build/container/container_core-debug.js | 5059 +++++++++
 .../yui/build/container/container_core-min.js   |   13 +
 .../web/yui/build/container/container_core.js   | 5049 +++++++++
 .../resources/web/yui/build/datasource/README   |  140 +
 .../build/datasource/datasource-beta-debug.js   | 1430 +++
 .../yui/build/datasource/datasource-beta-min.js |    8 +
 .../web/yui/build/datasource/datasource-beta.js | 1365 +++
 .../web/yui/build/datasource/datasource-min.js  |   12 +
 .../resources/web/yui/build/datatable/README    |  446 +
 .../build/datatable/assets/datatable-core.css   |   86 +
 .../yui/build/datatable/assets/datatable.css    |   49 +
 .../assets/skins/sam/datatable-skin.css         |  243 +
 .../datatable/assets/skins/sam/datatable.css    |    7 +
 .../datatable/assets/skins/sam/dt-arrow-dn.png  |  Bin 0 -> 116 bytes
 .../datatable/assets/skins/sam/dt-arrow-up.png  |  Bin 0 -> 116 bytes
 .../yui/build/datatable/datatable-beta-debug.js | 9538 +++++++++++++++++
 .../yui/build/datatable/datatable-beta-min.js   |   21 +
 .../web/yui/build/datatable/datatable-beta.js   | 9362 +++++++++++++++++
 .../src/main/resources/web/yui/build/dom/README |  135 +
 .../resources/web/yui/build/dom/dom-debug.js    | 1277 +++
 .../main/resources/web/yui/build/dom/dom-min.js |    8 +
 .../src/main/resources/web/yui/build/dom/dom.js | 1241 +++
 .../resources/web/yui/build/dragdrop/README     |  180 +
 .../web/yui/build/dragdrop/dragdrop-debug.js    | 3731 +++++++
 .../web/yui/build/dragdrop/dragdrop-min.js      |   10 +
 .../web/yui/build/dragdrop/dragdrop.js          | 3622 +++++++
 .../main/resources/web/yui/build/editor/README  |  270 +
 .../web/yui/build/editor/assets/editor-core.css |  573 ++
 .../build/editor/assets/simpleeditor-core.css   |  573 ++
 .../editor/assets/skins/sam/blankimage.png      |  Bin 0 -> 2314 bytes
 .../editor/assets/skins/sam/editor-knob.gif     |  Bin 0 -> 138 bytes
 .../editor/assets/skins/sam/editor-skin.css     |  707 ++
 .../assets/skins/sam/editor-sprite-active.gif   |  Bin 0 -> 5614 bytes
 .../editor/assets/skins/sam/editor-sprite.gif   |  Bin 0 -> 5690 bytes
 .../build/editor/assets/skins/sam/editor.css    |    7 +
 .../assets/skins/sam/simpleeditor-skin.css      |  707 ++
 .../editor/assets/skins/sam/simpleeditor.css    |    7 +
 .../web/yui/build/editor/editor-beta-debug.js   | 6133 +++++++++++
 .../web/yui/build/editor/editor-beta-min.js     |   22 +
 .../web/yui/build/editor/editor-beta.js         | 6082 +++++++++++
 .../web/yui/build/editor/editor-debug.js        | 8994 ++++++++++++++++
 .../web/yui/build/editor/editor-min.js          |   28 +
 .../resources/web/yui/build/editor/editor.js    | 8891 ++++++++++++++++
 .../web/yui/build/editor/simpleeditor-debug.js  | 6971 +++++++++++++
 .../web/yui/build/editor/simpleeditor-min.js    |   23 +
 .../web/yui/build/editor/simpleeditor.js        | 6890 +++++++++++++
 .../main/resources/web/yui/build/element/README |   34 +
 .../web/yui/build/element/element-beta-debug.js | 1017 ++
 .../web/yui/build/element/element-beta-min.js   |    8 +
 .../web/yui/build/element/element-beta.js       | 1003 ++
 .../web/yui/build/element/element-min.js        |    8 +
 .../build/event-delegate/event-delegate-min.js  |    7 +
 .../main/resources/web/yui/build/event/README   |  252 +
 .../web/yui/build/event/event-debug.js          | 2587 +++++
 .../resources/web/yui/build/event/event-min.js  |   11 +
 .../main/resources/web/yui/build/event/event.js | 2562 +++++
 .../main/resources/web/yui/build/fonts/README   |   50 +
 .../resources/web/yui/build/fonts/fonts-min.css |    7 +
 .../resources/web/yui/build/fonts/fonts.css     |   46 +
 .../main/resources/web/yui/build/grids/README   |   86 +
 .../resources/web/yui/build/grids/grids-min.css |    7 +
 .../resources/web/yui/build/grids/grids.css     |  285 +
 .../main/resources/web/yui/build/history/README |   62 +
 .../web/yui/build/history/assets/blank.html     |   18 +
 .../web/yui/build/history/history-beta-debug.js |  768 ++
 .../web/yui/build/history/history-beta-min.js   |    7 +
 .../web/yui/build/history/history-beta.js       |  768 ++
 .../resources/web/yui/build/imageloader/README  |   23 +
 .../imageloader-experimental-debug.js           |  442 +
 .../imageloader/imageloader-experimental-min.js |    7 +
 .../imageloader/imageloader-experimental.js     |  436 +
 .../main/resources/web/yui/build/json/README    |   22 +
 .../resources/web/yui/build/json/json-debug.js  |  396 +
 .../resources/web/yui/build/json/json-min.js    |    7 +
 .../main/resources/web/yui/build/json/json.js   |  396 +
 .../main/resources/web/yui/build/logger/README  |  116 +
 .../web/yui/build/logger/assets/logger-core.css |    7 +
 .../web/yui/build/logger/assets/logger.css      |   57 +
 .../logger/assets/skins/sam/logger-skin.css     |   55 +
 .../build/logger/assets/skins/sam/logger.css    |    7 +
 .../web/yui/build/logger/logger-debug.js        | 2044 ++++
 .../web/yui/build/logger/logger-min.js          |    9 +
 .../resources/web/yui/build/logger/logger.js    | 2044 ++++
 .../main/resources/web/yui/build/menu/README    | 1130 ++
 .../resources/web/yui/build/menu/assets/map.gif |  Bin 0 -> 236 bytes
 .../web/yui/build/menu/assets/menu-core.css     |  238 +
 .../web/yui/build/menu/assets/menu.css          |  497 +
 .../build/menu/assets/skins/sam/menu-skin.css   |  325 +
 .../yui/build/menu/assets/skins/sam/menu.css    |    7 +
 .../resources/web/yui/build/menu/menu-debug.js  | 9666 ++++++++++++++++++
 .../resources/web/yui/build/menu/menu-min.js    |   15 +
 .../main/resources/web/yui/build/menu/menu.js   | 9619 +++++++++++++++++
 .../web/yui/build/reset-fonts-grids/README      |   32 +
 .../reset-fonts-grids/reset-fonts-grids.css     |    7 +
 .../main/resources/web/yui/build/reset/README   |   64 +
 .../resources/web/yui/build/reset/reset-min.css |    7 +
 .../resources/web/yui/build/reset/reset.css     |   25 +
 .../web/yui/build/resize/assets/resize-core.css |  173 +
 .../resize/assets/skins/sam/layout_sprite.png   |  Bin 0 -> 1409 bytes
 .../resize/assets/skins/sam/resize-skin.css     |  142 +
 .../build/resize/assets/skins/sam/resize.css    |    7 +
 .../web/yui/build/resize/resize-min.js          |   10 +
 .../web/yui/build/selector/selector-min.js      |    8 +
 .../main/resources/web/yui/build/slider/README  |  114 +
 .../web/yui/build/slider/slider-debug.js        | 1976 ++++
 .../web/yui/build/slider/slider-min.js          |    9 +
 .../resources/web/yui/build/slider/slider.js    | 1935 ++++
 .../main/resources/web/yui/build/tabview/README |   51 +
 .../yui/build/tabview/assets/border_tabs.css    |   58 +
 .../web/yui/build/tabview/assets/loading.gif    |  Bin 0 -> 729 bytes
 .../web/yui/build/tabview/assets/skin-sam.css   |   77 +
 .../tabview/assets/skins/sam/tabview-skin.css   |  187 +
 .../build/tabview/assets/skins/sam/tabview.css  |    7 +
 .../yui/build/tabview/assets/tabview-core.css   |  122 +
 .../web/yui/build/tabview/assets/tabview.css    |  113 +
 .../web/yui/build/tabview/tabview-debug.js      |  949 ++
 .../web/yui/build/tabview/tabview-min.js        |    8 +
 .../resources/web/yui/build/tabview/tabview.js  |  941 ++
 .../resources/web/yui/build/treeview/README     |  211 +
 .../yui/build/treeview/assets/folder-styles.css |   66 +
 .../web/yui/build/treeview/assets/images/lm.gif |  Bin 0 -> 666 bytes
 .../yui/build/treeview/assets/images/lmh.gif    |  Bin 0 -> 677 bytes
 .../web/yui/build/treeview/assets/images/ln.gif |  Bin 0 -> 142 bytes
 .../build/treeview/assets/images/loading.gif    |  Bin 0 -> 2673 bytes
 .../web/yui/build/treeview/assets/images/lp.gif |  Bin 0 -> 641 bytes
 .../yui/build/treeview/assets/images/lph.gif    |  Bin 0 -> 651 bytes
 .../web/yui/build/treeview/assets/images/tm.gif |  Bin 0 -> 1281 bytes
 .../yui/build/treeview/assets/images/tmh.gif    |  Bin 0 -> 1295 bytes
 .../web/yui/build/treeview/assets/images/tn.gif |  Bin 0 -> 504 bytes
 .../web/yui/build/treeview/assets/images/tp.gif |  Bin 0 -> 1243 bytes
 .../yui/build/treeview/assets/images/tph.gif    |  Bin 0 -> 1263 bytes
 .../yui/build/treeview/assets/images/vline.gif  |  Bin 0 -> 503 bytes
 .../assets/skins/sam/treeview-loading.gif       |  Bin 0 -> 2673 bytes
 .../treeview/assets/skins/sam/treeview-skin.css |  198 +
 .../assets/skins/sam/treeview-sprite.gif        |  Bin 0 -> 4326 bytes
 .../treeview/assets/skins/sam/treeview.css      |    7 +
 .../yui/build/treeview/assets/sprite-menu.gif   |  Bin 0 -> 452 bytes
 .../yui/build/treeview/assets/sprite-orig.gif   |  Bin 0 -> 3289 bytes
 .../build/treeview/assets/treeview-2.8.1.css    |    7 +
 .../yui/build/treeview/assets/treeview-core.css |    6 +
 .../build/treeview/assets/treeview-loading.gif  |  Bin 0 -> 2673 bytes
 .../yui/build/treeview/assets/treeview-menu.css |   65 +
 .../web/yui/build/treeview/assets/treeview.css  |    7 +
 .../web/yui/build/treeview/treeview-2.8.1.js    | 3989 ++++++++
 .../web/yui/build/treeview/treeview-debug.js    | 3435 +++++++
 .../web/yui/build/treeview/treeview-min.js      |   11 +
 .../web/yui/build/treeview/treeview.js          | 3366 ++++++
 .../resources/web/yui/build/utilities/README    |   40 +
 .../web/yui/build/utilities/utilities.js        |   36 +
 .../web/yui/build/yahoo-dom-event/README        |   35 +
 .../build/yahoo-dom-event/yahoo-dom-event.js    |   12 +
 .../main/resources/web/yui/build/yahoo/README   |  106 +
 .../web/yui/build/yahoo/yahoo-debug.js          |  986 ++
 .../resources/web/yui/build/yahoo/yahoo-min.js  |    7 +
 .../main/resources/web/yui/build/yahoo/yahoo.js |  986 ++
 .../resources/web/yui/build/yuiloader/README    |   83 +
 .../yui/build/yuiloader/yuiloader-beta-debug.js | 1409 +++
 .../yui/build/yuiloader/yuiloader-beta-min.js   |    8 +
 .../web/yui/build/yuiloader/yuiloader-beta.js   | 1409 +++
 .../main/resources/web/yui/build/yuitest/README |   34 +
 .../yuitest/assets/skins/sam/yuitest-skin.css   |    7 +
 .../build/yuitest/assets/skins/sam/yuitest.css  |    7 +
 .../web/yui/build/yuitest/assets/testlogger.css |   33 +
 .../yui/build/yuitest/assets/yuitest-core.css   |    7 +
 .../web/yui/build/yuitest/yuitest-beta-debug.js | 2669 +++++
 .../web/yui/build/yuitest/yuitest-beta-min.js   |   10 +
 .../web/yui/build/yuitest/yuitest-beta.js       | 2669 +++++
 dependencies/pom.xml                            |    1 +
 products/stratos/modules/distribution/pom.xml   |    7 +-
 .../modules/distribution/src/assembly/bin.xml   |   13 +-
 832 files changed, 289792 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/pom.xml b/dependencies/org.wso2.carbon.ui/pom.xml
new file mode 100644
index 0000000..8b147d4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/pom.xml
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (c) WSO2 Inc. (http://wso2.com) All Rights Reserved.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~      http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.wso2.carbon</groupId>
+        <artifactId>carbon-kernel</artifactId>
+        <version>4.2.0</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.stratos</groupId>
+    <artifactId>org.wso2.carbon.ui</artifactId>
+    <packaging>bundle</packaging>
+    <name>WSO2 Carbon - UI</name>
+    <description>org.wso2.carbon.ui patch version for apache stratos</description>
+    <version>4.2.0-stratos</version>
+    <url>http://wso2.org</url>
+
+    <repositories>
+        <repository>
+            <id>wso2-nexus</id>
+            <name>WSO2 internal Repository</name>
+            <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
+            <releases>
+                <enabled>true</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>ignore</checksumPolicy>
+            </releases>
+        </repository>
+    </repositories> 
+   
+    <pluginRepositories>
+        <pluginRepository>
+            <id>wso2-maven2-repository-1</id>
+            <url>http://dist.wso2.org/maven2</url>
+        </pluginRepository>
+        <pluginRepository>
+            <id>wso2-maven2-repository-2</id>
+            <url>http://dist.wso2.org/snapshots/maven2</url>
+        </pluginRepository>
+    </pluginRepositories>    
+
+    <dependencies>
+        <dependency>
+            <groupId>org.eclipse.osgi</groupId>
+            <artifactId>org.eclipse.osgi</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.osgi</groupId>
+            <artifactId>org.eclipse.osgi.services</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons.axiom.wso2</groupId>
+            <artifactId>axiom</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tiles.wso2</groupId>
+            <artifactId>tiles-jsp</artifactId>
+            <version>2.0.5.wso2v2</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.tiles</groupId>
+                    <artifactId>tiles-jsp</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-digester</groupId>
+                    <artifactId>commons-digester</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-beanutils</groupId>
+                    <artifactId>commons-beanutils</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.core</artifactId>
+            <version>4.2.0</version>
+            <!--<exclusions>
+                <exclusion>
+                    <groupId>org.wso2.carbon</groupId>
+                    <artifactId>org.wso2.carbon.tomcat</artifactId>
+                </exclusion>
+            </exclusions>-->
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.authenticator.proxy</artifactId>
+            <version>4.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.core.common</artifactId>
+            <version>4.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.logging</artifactId>
+            <version>4.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.utils</artifactId>
+            <version>4.2.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+                </exclusion>
+                <!--exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion-->
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.registry.core</artifactId>
+            <version>4.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2.wso2</groupId>
+            <artifactId>axis2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.equinox</groupId>
+            <artifactId>org.eclipse.equinox.http.servlet</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.equinox</groupId>
+            <artifactId>org.apache.jasper.glassfish</artifactId>
+            <version>${version.equinox.jasper}</version>
+        </dependency>
+        <!--dependency>
+            <groupId>org.eclipse.equinox</groupId>
+            <artifactId>org.apache.jasper</artifactId>
+        </dependency-->
+        <dependency>
+            <groupId>org.eclipse.equinox</groupId>
+            <artifactId>javax.servlet.jsp</artifactId>
+            <version>${version.equinox.javax.servlet.jsp}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.core.commons.stub</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet.jsp.jstl.wso2</groupId>
+            <artifactId>jstl</artifactId>
+            <version>${orbit.version.jstl}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.servlet.jsp.jstl</groupId>
+                    <artifactId>jstl-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.servlet.jsp.jstl</groupId>
+                    <artifactId>jstl-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.equinox</groupId>
+            <artifactId>javax.servlet</artifactId>
+            <version>${version.equinox.javax.servlet}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Bundle-Name>${project.artifactId}</Bundle-Name>
+                        <Private-Package>
+                            org.wso2.carbon.ui.internal
+                        </Private-Package>
+                        <Export-Package>
+                            !org.wso2.carbon.ui.internal,
+                            org.wso2.carbon.ui.*
+                        </Export-Package>
+                        <Import-Package>
+                            !org.wso2.carbon.ui.*,
+                            org.wso2.carbon.core.commons.stub.*;version="${carbon.platform.package.import.version.range}",
+                            org.wso2.carbon.core.common;version="0.0.0",
+                            org.apache.axis2.*; version="${imp.pkg.version.axis2}",
+                            org.apache.axiom.*; version="${imp.pkg.version.axiom}",
+                            org.wso2.carbon.core.*,
+                            javax.xml.stream.*; version="1.0.1",
+                            javax.servlet; version="${imp.pkg.version.javax.servlet}",
+                            javax.servlet.http; version="${imp.pkg.version.javax.servlet}",
+                            javax.servlet.jsp; version="${imp.pkg.version.javax.servlet.jsp}"
+                            javax.servlet.jsp.tagext; version="${imp.pkg.version.javax.servlet.jsp}",
+                            org.eclipse.equinox.http.helper,
+                            org.apache.tiles.*;version="2.0.5",
+                            org.wso2.carbon.registry.core.service,
+                            *;resolution:=optional
+                        </Import-Package>
+                        <DynamicImport-Package>*</DynamicImport-Package>
+                        <Bundle-ClassPath>.</Bundle-ClassPath>
+                        <Carbon-Component>UIBundle</Carbon-Component>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/AbstractCarbonUIAuthenticator.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/AbstractCarbonUIAuthenticator.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/AbstractCarbonUIAuthenticator.java
new file mode 100644
index 0000000..f7a0489
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/AbstractCarbonUIAuthenticator.java
@@ -0,0 +1,516 @@
+/*
+ *  Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.wso2.carbon.ui;
+
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.description.WSDL2Constants;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.core.common.AuthenticationException;
+import org.wso2.carbon.core.commons.stub.loggeduserinfo.ExceptionException;
+import org.wso2.carbon.core.commons.stub.loggeduserinfo.LoggedUserInfo;
+import org.wso2.carbon.core.commons.stub.loggeduserinfo.LoggedUserInfoAdminStub;
+import org.wso2.carbon.core.security.AuthenticatorsConfiguration;
+import org.wso2.carbon.registry.core.utils.UUIDGenerator;
+import org.wso2.carbon.ui.internal.CarbonUIServiceComponent;
+import org.wso2.carbon.utils.CarbonUtils;
+import org.wso2.carbon.utils.ServerConstants;
+import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
+import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
+
+/**
+ * An abstract implementation if CarbonUIAuthenticator.
+ */
+public abstract class AbstractCarbonUIAuthenticator implements CarbonUIAuthenticator {
+
+    private static final int DEFAULT_PRIORITY_LEVEL = 5;
+
+    public static final String USERNAME = "username";
+    public static final String PASSWORD = "password";
+    public static final String REMEMBER_ME = "rememberMe";
+
+    protected static final Log log = LogFactory.getLog(AbstractCarbonUIAuthenticator.class);
+    private static Log audit = CarbonConstants.AUDIT_LOG;
+
+    /**
+     * In default implementation this will read the authenticator configuration and will return true
+     * if authenticator is disabled in the configuration.
+     * 
+     * @return <code>true</code> if authenticator is disabled, else <code>false</code>.
+     */
+    public boolean isDisabled() {
+        AuthenticatorsConfiguration.AuthenticatorConfig authenticatorConfig = getAuthenticatorConfig();
+        return authenticatorConfig != null && authenticatorConfig.isDisabled();
+    }
+
+    /**
+     * In default implementation this will read the priority from authenticator configuration.
+     * 
+     * @return The priority value.
+     */
+    public int getPriority() {
+        AuthenticatorsConfiguration.AuthenticatorConfig authenticatorConfig = getAuthenticatorConfig();
+        if (authenticatorConfig != null && authenticatorConfig.getPriority() > 0) {
+            return authenticatorConfig.getPriority();
+        }
+
+        return DEFAULT_PRIORITY_LEVEL;
+    }
+
+    /**
+     * In default implementation this will return some SSO links to be skipped. TODO : check whether
+     * we can move this t SSO authenticators.
+     * 
+     * @return A list with following urls.
+     */
+    public List<String> getSessionValidationSkippingUrls() {
+        List<String> skippingUrls = new ArrayList<String>(Arrays.asList("/samlsso",
+                "sso-saml/login.jsp", "stratos-sso/login_ajaxprocessor.jsp",
+                "sso-saml/redirect_ajaxprocessor.jsp", "stratos-sso/redirect_ajaxprocessor.jsp",
+                "sso-acs/redirect_ajaxprocessor.jsp", "stratos-auth/redirect_ajaxprocessor.jsp"));
+
+        AuthenticatorsConfiguration.AuthenticatorConfig authenticatorConfig = getAuthenticatorConfig();
+        if (authenticatorConfig != null && authenticatorConfig.getPriority() > 0) {
+            skippingUrls.addAll(authenticatorConfig.getSessionValidationSkippingUrls());
+        }
+
+        return skippingUrls;
+    }
+
+    /**
+     * In default implementation this will return an empty list.
+     * 
+     * @return An empty list.
+     */
+    public List<String> getAuthenticationSkippingUrls() {
+
+        AuthenticatorsConfiguration.AuthenticatorConfig authenticatorConfig = getAuthenticatorConfig();
+
+        if (authenticatorConfig != null) {
+            return authenticatorConfig.getAuthenticationSkippingUrls();
+        } else {
+            return new ArrayList<String>(0);
+        }
+    }
+
+    /**
+     * 
+     * @param credentials
+     * @param rememberMe
+     * @param client
+     * @param request
+     * @throws AuthenticationException
+     */
+    public abstract String doAuthentication(Object credentials, boolean isRememberMe,
+            ServiceClient client, HttpServletRequest request) throws AuthenticationException;
+
+    /**
+     * 
+     * @param serviceClient
+     * @param httpServletRequest
+     * @throws AxisFault
+     */
+    @SuppressWarnings("rawtypes")
+    public abstract void handleRememberMe(Map transportHeaders,
+            HttpServletRequest httpServletRequest) throws AuthenticationException;
+
+    /**
+     * 
+     */
+    protected boolean isAdminCookieSet() {
+        return false;
+    }
+    
+    
+    /**
+     * Regenerates session id after each login attempt.
+     * @param request
+     */
+	private void regenrateSession(HttpServletRequest request) {
+
+		HttpSession oldSession = request.getSession();
+
+		Enumeration attrNames = oldSession.getAttributeNames();
+		Properties props = new Properties();
+
+		while (attrNames != null && attrNames.hasMoreElements()) {
+			String key = (String) attrNames.nextElement();
+			props.put(key, oldSession.getAttribute(key));
+		}
+
+		oldSession.invalidate();
+		HttpSession newSession = request.getSession(true);
+		attrNames = props.keys();
+
+		while (attrNames != null && attrNames.hasMoreElements()) {
+			String key = (String) attrNames.nextElement();
+			newSession.setAttribute(key, props.get(key));
+		}
+	}
+    
+    /**
+     * 
+     * @param credentials
+     * @param rememberMe
+     * @param request
+     * @throws AxisFault
+     */
+    @SuppressWarnings("rawtypes")
+    public void handleSecurity(Object credentials, boolean rememberMe, HttpServletRequest request)
+            throws AuthenticationException {
+    	
+    	regenrateSession(request);
+
+        String backendServerURL = getBackendUrl(request);
+        HttpSession session = request.getSession();
+        LoggedUserInfoAdminStub stub;
+        String loggedinUser = null;
+
+        if (backendServerURL == null) {
+            throw new AuthenticationException("Server not initialized properly.");
+        }
+
+        try {
+
+            stub = getLoggedUserInfoAdminStub(backendServerURL, session);
+            ServiceClient client = stub._getServiceClient();
+
+            // In side this method - Authenticators should complete the authentication with the
+            // back-end service Or - it should set the required authentication headers, there are
+            // required in future service calls. Also each Authenticator should know how to handle
+            // the Remember Me logic.
+            loggedinUser = doAuthentication(credentials, rememberMe, client, request);
+
+            if (isAdminCookieSet()) {
+                // If the UI Authenticator takes the responsibility of setting the Admin Cookie,it
+                // has to set the value in the session with the key
+                // ServerConstants.ADMIN_SERVICE_AUTH_TOKEN.
+                client.getServiceContext().setProperty(HTTPConstants.COOKIE_STRING,
+                        session.getAttribute(ServerConstants.ADMIN_SERVICE_AUTH_TOKEN));
+            }
+
+            // By now, user is authenticated or proper authentication headers been set. This call
+            // set retrieve user authorization information from the back-end.
+            setUserAuthorizationInfo(stub, session);
+
+            if (!isAdminCookieSet()) {
+                // If authentication successful set the cookie.
+                // Authenticators them selves have not set the cookie.
+                setAdminCookie(session, client, null);
+            }
+
+            // Process remember me data in reply
+            if (rememberMe) {
+                OperationContext operationContext = client.getLastOperationContext();
+                MessageContext inMessageContext;
+                Map transportHeaders;
+                inMessageContext = operationContext
+                        .getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN);
+                transportHeaders = (Map) inMessageContext
+                        .getProperty(MessageContext.TRANSPORT_HEADERS);
+                handleRememberMe(transportHeaders, request);
+            }
+
+            onSuccessAdminLogin(request, loggedinUser);
+            
+        } catch (RemoteException e) {
+            throw new AuthenticationException(e.getMessage(), e);
+        } catch (Exception e) {
+            throw new AuthenticationException(
+                    "Exception occurred while accessing user authorization info", e);
+        }
+    }
+
+    /**
+     * 
+     */
+    public boolean skipLoginPage() {
+        return false;
+    }
+
+    /**
+     * 
+     * @param request
+     * @param userName
+     * @throws Exception
+     */
+    public void onSuccessAdminLogin(HttpServletRequest request, String userName) throws Exception {
+
+		HttpSession session = request.getSession();
+		
+    	String tenantDomain = MultitenantUtils.getTenantDomain(userName);
+        if (tenantDomain != null && tenantDomain.trim().length() > 0) {
+            session.setAttribute(MultitenantConstants.TENANT_DOMAIN, tenantDomain);
+            // we will make it an attribute on request as well
+            if (request.getAttribute(MultitenantConstants.TENANT_DOMAIN) == null) {
+                request.setAttribute(MultitenantConstants.TENANT_DOMAIN, tenantDomain);
+            }
+        } else {
+            audit.info("User with null domain tried to login.");
+            return;
+        }
+        
+		if (session.getAttribute(CarbonConstants.LOGGED_USER) != null) {
+			userName = (String) session
+					.getAttribute(CarbonConstants.LOGGED_USER);
+		}
+		request.setAttribute(AbstractCarbonUIAuthenticator.USERNAME, userName);
+
+        String serverURL = getBackendUrl(request);
+        if (serverURL == null) {
+            throw new AuthenticationException("Server not initialized properly.");
+        }
+
+        String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+
+        // For local transport, cookie might be null.
+        if ((serverURL == null || cookie == null) && (!CarbonUtils.isRunningOnLocalTransportMode())) {
+            throw new Exception("Cannot proceed logging in. The server URL and/or Cookie is null");
+        }
+
+        if (tenantDomain != null
+                && MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain.trim())) {
+            request.getSession().setAttribute(MultitenantConstants.IS_SUPER_TENANT, "true");
+        } else if (tenantDomain != null && tenantDomain.trim().length() > 0) {
+            session.setAttribute(MultitenantConstants.TENANT_DOMAIN, tenantDomain);
+            // we will make it an attribute on request as well
+            if (request.getAttribute(MultitenantConstants.TENANT_DOMAIN) == null) {
+                request.setAttribute(MultitenantConstants.TENANT_DOMAIN, tenantDomain);
+            }
+        } else {
+            audit.info("User with null domain tried to login.");
+            return;
+        }
+
+        String tenantAwareUserName = MultitenantUtils.getTenantAwareUsername(userName);
+
+        setUserInformation(cookie, serverURL, session);
+       
+		session.setAttribute(CarbonConstants.LOGGED_USER, tenantAwareUserName);
+        session.getServletContext().setAttribute(CarbonConstants.LOGGED_USER, tenantAwareUserName);
+        session.setAttribute("authenticated", Boolean.parseBoolean("true"));
+
+        UIAuthenticationExtender[] uiAuthenticationExtenders = CarbonUIServiceComponent
+                .getUIAuthenticationExtenders();
+        for (UIAuthenticationExtender uiAuthenticationExtender : uiAuthenticationExtenders) {
+            uiAuthenticationExtender.onSuccessAdminLogin(request, tenantAwareUserName,
+                    tenantDomain, serverURL);
+        }
+    }
+
+    /**
+     * 
+     * @param cookie
+     * @param backendServerURL
+     * @param session
+     * @throws RemoteException
+     */
+    protected void setUserInformation(String cookie, String backendServerURL, HttpSession session)
+            throws RemoteException {
+        try {
+
+            if (session.getAttribute(ServerConstants.USER_PERMISSIONS) != null) {
+                return;
+            }
+
+            ServletContext servletContext = session.getServletContext();
+            ConfigurationContext configContext = (ConfigurationContext) servletContext
+                    .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+
+            LoggedUserInfoAdminStub stub = new LoggedUserInfoAdminStub(configContext,
+                    backendServerURL + "LoggedUserInfoAdmin");
+            ServiceClient client = stub._getServiceClient();
+            Options options = client.getOptions();
+            options.setManageSession(true);
+            options.setProperty(HTTPConstants.COOKIE_STRING, cookie);
+            org.wso2.carbon.core.commons.stub.loggeduserinfo.LoggedUserInfo userInfo = stub
+                    .getUserInfo();
+
+            String[] permissionArray = userInfo.getUIPermissionOfUser();
+            ArrayList<String> list = new ArrayList<String>();
+            for (String permission : permissionArray) {
+                list.add(permission);
+            }
+
+            session.setAttribute(ServerConstants.USER_PERMISSIONS, list);
+            if (userInfo.getPasswordExpiration() != null) {
+                session.setAttribute(ServerConstants.PASSWORD_EXPIRATION,
+                        userInfo.getPasswordExpiration());
+            }
+        } catch (AxisFault e) {
+            throw e;
+        } catch (RemoteException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new AxisFault("Exception occured", e);
+        }
+    }
+
+    /**
+     * 
+     * @param cookieValue
+     * @return
+     */
+    protected static String getUserNameFromCookie(String cookieValue) {
+        int index = cookieValue.indexOf('-');
+        return cookieValue.substring(0, index);
+    }
+
+    /**
+     * 
+     * @param session
+     * @param serviceClient
+     * @param rememberMeCookie
+     * @throws AxisFault
+     */
+    protected void setAdminCookie(HttpSession session, ServiceClient serviceClient,
+            String rememberMeCookie) throws AxisFault {
+        String cookie = (String) serviceClient.getServiceContext().getProperty(
+                HTTPConstants.COOKIE_STRING);
+
+        if (cookie == null) {
+            // For local transport - the cookie will be null.
+            // This generated cookie cannot be used for any form authentication with the backend.
+            // This is done to be backward compatible.
+            cookie = UUIDGenerator.generateUUID();
+        }
+
+        if (rememberMeCookie != null) {
+            cookie = cookie + "; " + rememberMeCookie;
+        }
+
+        if (session != null) {
+            session.setAttribute(ServerConstants.ADMIN_SERVICE_AUTH_TOKEN, cookie);
+        }
+    }
+
+    /**
+     * 
+     * @param backendServerURL
+     * @param session
+     * @return
+     * @throws AxisFault
+     */
+    private LoggedUserInfoAdminStub getLoggedUserInfoAdminStub(String backendServerURL,
+            HttpSession session) throws AxisFault {
+
+        ServletContext servletContext = session.getServletContext();
+        ConfigurationContext configContext = (ConfigurationContext) servletContext
+                .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+
+        if (configContext == null) {
+            String msg = "Configuration context is null.";
+            log.error(msg);
+            throw new AxisFault(msg);
+        }
+
+        return new LoggedUserInfoAdminStub(configContext, backendServerURL + "LoggedUserInfoAdmin");
+    }
+
+    /**
+     * 
+     * @param loggedUserInfoAdminStub
+     * @param session
+     * @throws ExceptionException
+     * @throws RemoteException
+     */
+    private void setUserAuthorizationInfo(LoggedUserInfoAdminStub loggedUserInfoAdminStub,
+            HttpSession session) throws ExceptionException, RemoteException {
+
+        ServiceClient client = loggedUserInfoAdminStub._getServiceClient();
+        Options options = client.getOptions();
+        options.setManageSession(true);
+
+        LoggedUserInfo userInfo = loggedUserInfoAdminStub.getUserInfo();
+        
+        String[] permissionArray = userInfo.getUIPermissionOfUser();
+        ArrayList<String> list = new ArrayList<String>();
+
+        Collections.addAll(list, permissionArray);
+
+        session.setAttribute(ServerConstants.USER_PERMISSIONS, list);
+        if (userInfo.getPasswordExpiration() != null) {
+            session.setAttribute(ServerConstants.PASSWORD_EXPIRATION,
+                    userInfo.getPasswordExpiration());
+        }
+        
+		if (session.getAttribute(CarbonConstants.LOGGED_USER) == null) {
+			session.setAttribute(CarbonConstants.LOGGED_USER, userInfo.getUserName());
+		}
+
+    }
+
+    /**
+     * 
+     * @param request
+     * @return
+     */
+    private String getBackendUrl(HttpServletRequest request) {
+
+        HttpSession session = request.getSession();
+        ServletContext servletContext = session.getServletContext();
+
+        String backendServerURL = request.getParameter("backendURL");
+
+        if (backendServerURL == null) {
+            backendServerURL = CarbonUIUtil.getServerURL(servletContext, request.getSession());
+        }
+
+        if (backendServerURL != null) {
+            session.setAttribute(CarbonConstants.SERVER_URL, backendServerURL);
+        }
+
+        return backendServerURL;
+    }
+
+    /**
+     * 
+     * @return
+     */
+    private AuthenticatorsConfiguration.AuthenticatorConfig getAuthenticatorConfig() {
+
+        AuthenticatorsConfiguration authenticatorsConfiguration = AuthenticatorsConfiguration
+                .getInstance();
+        AuthenticatorsConfiguration.AuthenticatorConfig authenticatorConfig = authenticatorsConfiguration
+                .getAuthenticatorConfig(getAuthenticatorName());
+
+        return authenticatorConfig;
+    }
+
+}


[52/52] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos

Posted by pr...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/03c5c234
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/03c5c234
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/03c5c234

Branch: refs/heads/master
Commit: 03c5c234451d391cb015f32091211e8a6830a0d9
Parents: 6b1dba5 754df51
Author: Pradeep Fernando <pr...@gmail.com>
Authored: Thu Apr 17 08:11:42 2014 +0530
Committer: Pradeep Fernando <pr...@gmail.com>
Committed: Thu Apr 17 08:11:42 2014 +0530

----------------------------------------------------------------------
 .../cli/beans/cartridge/CartridgeInfoBean.java  |  35 +-
 .../controller/util/CloudControllerUtil.java    |   8 +
 .../console/app.js~                             |  14 -
 .../console/controllers/router.jag              |   4 +-
 .../console/default_page.jag                    |  25 -
 .../console/error-404.html                      | 110 +++++
 .../console/error.html                          | 118 +++++
 .../console/jaggery.conf                        |   7 +-
 .../console/themes/theme1/partials/404.hbs      |  52 --
 .../themes/theme1/renderers/default_page.js     |  59 ---
 .../repository/RepositoryNotification.java      |  34 +-
 .../manager/subscription/SubscriptionData.java  |  36 +-
 .../.TenantSelfRegistrationClient.java.swp      | Bin 16384 -> 0 bytes
 .../org/apache/stratos/rest/endpoint/Utils.java |  36 +-
 .../rest/endpoint/bean/CartridgeInfoBean.java   |  35 +-
 .../repositoryNotificationInfoBean/Payload.java |  34 +-
 .../Repository.java                             |  34 +-
 .../rest/endpoint/bean/topology/Cluster.java    |  35 +-
 .../rest/endpoint/bean/topology/Member.java     |  35 +-
 ...tractAuthenticationAuthorizationHandler.java |  36 +-
 .../handlers/CustomExceptionMapper.java         |  36 +-
 .../stratos/rest/endpoint/mock/MockContext.java |  36 +-
 .../rest/endpoint/services/ServiceUtils.java    |  36 +-
 .../pom.xml                                     |   1 -
 .../resources/conf/eula.xml                     | 187 -------
 .../resources/p2.inf                            |   1 -
 .../src/main/resources/conf/eula.xml            | 187 -------
 .../src/main/resources/p2.inf                   |   1 -
 .../pom.xml                                     |  29 +-
 .../src/main/conf/loadbalancer.conf             |   2 +-
 .../distribution/src/main/conf/log4j.properties |   5 +
 .../stratos/modules/distribution/LICENSE.txt    | 488 -------------------
 .../modules/distribution/src/assembly/bin.xml   |   1 -
 .../distribution/src/main/conf/log4j.properties |   2 +
 tools/puppet3/manifests/nodes.pp                |  12 +-
 .../templates/extensions/addons/_nodejs.erb     |  21 +
 .../agent/templates/extensions/addons/_php.erb  |  18 +
 .../extensions/artifacts-updated.sh.erb         |   4 +
 .../templates/extensions/start-servers.sh.erb   |   3 +
 .../repository/conf/activemq/jndi.properties    |  31 +-
 .../config/all/repository/conf/jndi.properties  |  31 +-
 .../all/repository/conf/wso2mb/jndi.properties  |  17 +
 .../repository/conf/activemq/jndi.properties    |  31 +-
 .../config/cep/repository/conf/jndi.properties  |  31 +-
 44 files changed, 638 insertions(+), 1320 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/03c5c234/products/stratos/modules/distribution/src/assembly/bin.xml
----------------------------------------------------------------------


[20/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/jquery-ui.min.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/jquery-ui.min.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/jquery-ui.min.js
new file mode 100644
index 0000000..0b5c357
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/jquery-ui.min.js
@@ -0,0 +1,331 @@
+;(function(jQuery){var _remove=jQuery.fn.remove;jQuery.fn.remove=function(){jQuery("*",this).add(this).triggerHandler("remove");return _remove.apply(this,arguments);};function isVisible(element){function checkStyles(element){var style=element.style;return(style.display!='none'&&style.visibility!='hidden');}
+var visible=checkStyles(element);(visible&&jQuery.each(jQuery.dir(element,'parentNode'),function(){return(visible=checkStyles(this));}));return visible;}
+jQuery.extend(jQuery.expr[':'],{data:function(a,i,m){return jQuery.data(a,m[3]);},tabbable:function(a,i,m){var nodeName=a.nodeName.toLowerCase();return(a.tabIndex>=0&&(('a'==nodeName&&a.href)||(/input|select|textarea|button/.test(nodeName)&&'hidden'!=a.type&&!a.disabled))&&isVisible(a));}});jQuery.keyCode={BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38};function getter(namespace,plugin,method,args){function getMethods(type){var methods=jQuery[namespace][plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods);}
+var methods=getMethods('getter');if(args.length==1&&typeof args[0]=='string'){methods=methods.concat(getMethods('getterSetter'));}
+return(jQuery.inArray(method,methods)!=-1);}
+jQuery.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];jQuery.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this;}
+if(isMethodCall&&getter(namespace,name,options,args)){var instance=jQuery.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
+return this.each(function(){var instance=jQuery.data(this,name);(!instance&&!isMethodCall&&jQuery.data(this,name,new jQuery[namespace][name](this,options)));(instance&&isMethodCall&&jQuery.isFunction(instance[options])&&instance[options].apply(instance,args));});};jQuery[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetEventPrefix=jQuery[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+'-'+name;this.options=jQuery.extend({},jQuery.widget.defaults,jQuery[namespace][name].defaults,jQuery.metadata&&jQuery.metadata.get(element)[name],options);this.element=jQuery(element).bind('setData.'+name,function(e,key,value){return self._setData(key,value);}).bind('getData.'+name,function(e,key){return self._getData(key);}).bind('remove',function(){return self.destroy();});this._init();};jQuery[namespace][name].prototype=jQuery.extend({},jQuery.widget.prototype,prototype);jQuery[namespace][name].getterSetter='option';};jQuery.widget.prototype
 ={_init:function(){},destroy:function(){this.element.removeData(this.widgetName);},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key);}
+options={};options[key]=value;}
+jQuery.each(options,function(key,value){self._setData(key,value);});},_getData:function(key){return this.options[key];},_setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled');}},enable:function(){this._setData('disabled',false);},disable:function(){this._setData('disabled',true);},_trigger:function(type,e,data){var eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);e=e||jQuery.event.fix({type:eventName,target:this.element[0]});return this.element.triggerHandler(eventName,[e,data],this.options[type]);}};jQuery.widget.defaults={disabled:false};jQuery.ui={plugin:{add:function(module,option,set){var proto=jQuery.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return;}
+for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},cssCache:{},css:function(name){if(jQuery.ui.cssCache[name]){return jQuery.ui.cssCache[name];}
+var tmp=jQuery('<div class="ui-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');jQuery.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{jQuery('body').get(0).removeChild(tmp.get(0));}catch(e){}
+return jQuery.ui.cssCache[name];},disableSelection:function(el){return jQuery(el).attr('unselectable','on').css('MozUserSelect','none').bind('selectstart.ui',function(){return false;});},enableSelection:function(el){return jQuery(el).attr('unselectable','off').css('MozUserSelect','').unbind('selectstart.ui');},hasScroll:function(e,a){if(jQuery(e).css('overflow')=='hidden'){return false;}
+var scroll=(a&&a=='left')?'scrollLeft':'scrollTop',has=false;if(e[scroll]>0){return true;}
+e[scroll]=1;has=(e[scroll]>0);e[scroll]=0;return has;}};jQuery.ui.mouse={_mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(e){return self._mouseDown(e);});if(jQuery.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
+this.started=false;},_mouseDestroy:function(){this.element.unbind('.'+this.widgetName);(jQuery.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},_mouseDown:function(e){(this._mouseStarted&&this._mouseUp(e));this._mouseDownEvent=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?jQuery(e.target).parents().add(e.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(e)){return true;}
+this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true;},this.options.delay);}
+if(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)){this._mouseStarted=(this._mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true;}}
+this._mouseMoveDelegate=function(e){return self._mouseMove(e);};this._mouseUpDelegate=function(e){return self._mouseUp(e);};jQuery(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);return false;},_mouseMove:function(e){if(jQuery.browser.msie&&!e.button){return this._mouseUp(e);}
+if(this._mouseStarted){this._mouseDrag(e);return false;}
+if(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,e)!==false);(this._mouseStarted?this._mouseDrag(e):this._mouseUp(e));}
+return!this._mouseStarted;},_mouseUp:function(e){jQuery(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._mouseStop(e);}
+return false;},_mouseDistanceMet:function(e){return(Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance);},_mouseDelayMet:function(e){return this.mouseDelayMet;},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return true;}};jQuery.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function(jQuery){jQuery.widget("ui.draggable",jQuery.extend({},jQuery.ui.mouse,{getHandle:function(e){var handle=!this.options.handle||!jQuery(this.options.handle,this.element).length?true:false;jQuery(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==e.target)handle=true;});return handle;},createHelper:function(){var o=this.options;var helper=jQuery.isFunction(o.helper)?jQuery(o.helper.apply(this.element[0],[e])):(o.helper=='clone'?this.element.clone():this.element);if(!helper.parents('body').length)
+helper.appendTo((o.appendTo=='parent'?this.element[0].parentNode:o.appendTo));if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position")))
+helper.css("position","absolute");return helper;},_init:function(){if(this.options.helper=='original'&&!(/^(?:r|a|f)/).test(this.element.css("position")))
+this.element[0].style.position='relative';(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-draggable"));(this.options.disabled&&this.element.addClass('ui-draggable-disabled'));this._mouseInit();},_mouseCapture:function(e){var o=this.options;if(this.helper||o.disabled||jQuery(e.target).is('.ui-resizable-handle'))
+return false;this.handle=this.getHandle(e);if(!this.handle)
+return false;return true;},_mouseStart:function(e){var o=this.options;this.helper=this.createHelper();if(jQuery.ui.ddmanager)
+jQuery.ui.ddmanager.current=this;this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top};this.cacheScrollParents();this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&jQuery.browser.mozilla)po={top:0,left:0};this.offset.parent={top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};if(this.cssPosition=="relative"){var p=this.element.position();this.offset.relative={top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollTopParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollLeftParent.sc
 rollLeft()};}else{this.offset.relative={top:0,left:0};}
+this.originalPosition=this._generatePosition(e);this.cacheHelperProportions();if(o.cursorAt)
+this.adjustOffsetFromHelper(o.cursorAt);jQuery.extend(this,{PAGEY_INCLUDES_SCROLL:(this.cssPosition=="absolute"&&(!this.scrollTopParent[0].tagName||(/(html|body)/i).test(this.scrollTopParent[0].tagName))),PAGEX_INCLUDES_SCROLL:(this.cssPosition=="absolute"&&(!this.scrollLeftParent[0].tagName||(/(html|body)/i).test(this.scrollLeftParent[0].tagName))),OFFSET_PARENT_NOT_SCROLL_PARENT_Y:this.scrollTopParent[0]!=this.offsetParent[0]&&!(this.scrollTopParent[0]==document&&(/(body|html)/i).test(this.offsetParent[0].tagName)),OFFSET_PARENT_NOT_SCROLL_PARENT_X:this.scrollLeftParent[0]!=this.offsetParent[0]&&!(this.scrollLeftParent[0]==document&&(/(body|html)/i).test(this.offsetParent[0].tagName))});if(o.containment)
+this.setContainment();this._propagate("start",e);this.cacheHelperProportions();if(jQuery.ui.ddmanager&&!o.dropBehaviour)
+jQuery.ui.ddmanager.prepareOffsets(this,e);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(e);return true;},cacheScrollParents:function(){this.scrollTopParent=function(el){do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-y')))return el;el=el.parent();}while(el[0].parentNode);return jQuery(document);}(this.helper);this.scrollLeftParent=function(el){do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-x')))return el;el=el.parent();}while(el[0].parentNode);return jQuery(document);}(this.helper);},adjustOffsetFromHelper:function(obj){if(obj.left!=undefined)this.offset.click.left=obj.left+this.margins.left;if(obj.right!=undefined)this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;if(obj.top!=undefined)this.offset.click.top=obj.top+this.margins.top;if(obj.bottom!=undefined)this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;},cacheHelperProportions:funct
 ion(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},setContainment:function(){var o=this.options;if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,jQuery(o.containment=='document'?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(jQuery(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];if(!(/^(document|window|parent)jQuery/).test(o.containment)){var ce=jQuery(o.containment)[0];var co=jQuery(o.containment).offset();var over=(jQuery(ce).css("overf
 low")!='hidden');this.containment=[co.left+(parseInt(jQuery(ce).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,co.top+(parseInt(jQuery(ce).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt(jQuery(ce).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt(jQuery(ce).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];}},_convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;return{top:(pos.top
++this.offset.relative.top*mod
++this.offset.parent.top*mod
+-(this.cssPosition=="fixed"||this.PAGEY_INCLUDES_SCROLL||this.OFFSET_PARENT_NOT_SCROLL_PARENT_Y?0:this.scrollTopParent.scrollTop())*mod
++(this.cssPosition=="fixed"?jQuery(document).scrollTop():0)*mod
++this.margins.top*mod),left:(pos.left
++this.offset.relative.left*mod
++this.offset.parent.left*mod
+-(this.cssPosition=="fixed"||this.PAGEX_INCLUDES_SCROLL||this.OFFSET_PARENT_NOT_SCROLL_PARENT_X?0:this.scrollLeftParent.scrollLeft())*mod
++(this.cssPosition=="fixed"?jQuery(document).scrollLeft():0)*mod
++this.margins.left*mod)};},_generatePosition:function(e){var o=this.options;var position={top:(e.pageY
+-this.offset.click.top
+-this.offset.relative.top
+-this.offset.parent.top
++(this.cssPosition=="fixed"||this.PAGEY_INCLUDES_SCROLL||this.OFFSET_PARENT_NOT_SCROLL_PARENT_Y?0:this.scrollTopParent.scrollTop())
+-(this.cssPosition=="fixed"?jQuery(document).scrollTop():0)),left:(e.pageX
+-this.offset.click.left
+-this.offset.relative.left
+-this.offset.parent.left
++(this.cssPosition=="fixed"||this.PAGEX_INCLUDES_SCROLL||this.OFFSET_PARENT_NOT_SCROLL_PARENT_X?0:this.scrollLeftParent.scrollLeft())
+-(this.cssPosition=="fixed"?jQuery(document).scrollLeft():0))};if(!this.originalPosition)return position;if(this.containment){if(position.left<this.containment[0])position.left=this.containment[0];if(position.top<this.containment[1])position.top=this.containment[1];if(position.left>this.containment[2])position.left=this.containment[2];if(position.top>this.containment[3])position.top=this.containment[3];}
+if(o.grid){var top=this.originalPosition.top+Math.round((position.top-this.originalPosition.top)/o.grid[1])*o.grid[1];position.top=this.containment?(!(top<this.containment[1]||top>this.containment[3])?top:(!(top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPosition.left+Math.round((position.left-this.originalPosition.left)/o.grid[0])*o.grid[0];position.left=this.containment?(!(left<this.containment[0]||left>this.containment[2])?left:(!(left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left;}
+return position;},_mouseDrag:function(e){this.position=this._generatePosition(e);this.positionAbs=this._convertPositionTo("absolute");this.position=this._propagate("drag",e)||this.position;if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+'px';if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+'px';if(jQuery.ui.ddmanager)jQuery.ui.ddmanager.drag(this,e);return false;},_mouseStop:function(e){var dropped=false;if(jQuery.ui.ddmanager&&!this.options.dropBehaviour)
+var dropped=jQuery.ui.ddmanager.drop(this,e);if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||(jQuery.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var self=this;jQuery(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10)||500,function(){self._propagate("stop",e);self._clear();});}else{this._propagate("stop",e);this._clear();}
+return false;},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!='original'&&!this.cancelHelperRemoval)this.helper.remove();this.helper=null;this.cancelHelperRemoval=false;},plugins:{},uiHash:function(e){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options};},_propagate:function(n,e){jQuery.ui.plugin.call(this,n,[e,this.uiHash()]);if(n=="drag")this.positionAbs=this._convertPositionTo("absolute");return this.element.triggerHandler(n=="drag"?n:"drag"+n,[e,this.uiHash()],this.options[n]);},destroy:function(){if(!this.element.data('draggable'))return;this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable ui-draggable-dragging ui-draggable-disabled');this._mouseDestroy();}}));jQuery.extend(jQuery.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original",scope:"default",cssNamespace:"ui"}});jQuery.ui.plugin.add("draggable"
 ,"cursor",{start:function(e,ui){var t=jQuery('body');if(t.css("cursor"))ui.options._cursor=t.css("cursor");t.css("cursor",ui.options.cursor);},stop:function(e,ui){if(ui.options._cursor)jQuery('body').css("cursor",ui.options._cursor);}});jQuery.ui.plugin.add("draggable","zIndex",{start:function(e,ui){var t=jQuery(ui.helper);if(t.css("zIndex"))ui.options._zIndex=t.css("zIndex");t.css('zIndex',ui.options.zIndex);},stop:function(e,ui){if(ui.options._zIndex)jQuery(ui.helper).css('zIndex',ui.options._zIndex);}});jQuery.ui.plugin.add("draggable","opacity",{start:function(e,ui){var t=jQuery(ui.helper);if(t.css("opacity"))ui.options._opacity=t.css("opacity");t.css('opacity',ui.options.opacity);},stop:function(e,ui){if(ui.options._opacity)jQuery(ui.helper).css('opacity',ui.options._opacity);}});jQuery.ui.plugin.add("draggable","iframeFix",{start:function(e,ui){jQuery(ui.options.iframeFix===true?"iframe":ui.options.iframeFix).each(function(){jQuery('<div class="ui-draggable-iframeFix" style="b
 ackground: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(jQuery(this).offset()).appendTo("body");});},stop:function(e,ui){jQuery("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this);});}});jQuery.ui.plugin.add("draggable","scroll",{start:function(e,ui){var o=ui.options;var i=jQuery(this).data("draggable");o.scrollSensitivity=o.scrollSensitivity||20;o.scrollSpeed=o.scrollSpeed||20;i.overflowY=function(el){do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-y')))return el;el=el.parent();}while(el[0].parentNode);return jQuery(document);}(this);i.overflowX=function(el){do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-x')))return el;el=el.parent();}while(el[0].parentNode);return jQuery(document);}(this);if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML')i.overflowYOffset=i.overflowY.offset();if(i.over
 flowX[0]!=document&&i.overflowX[0].tagName!='HTML')i.overflowXOffset=i.overflowX.offset();},drag:function(e,ui){var o=ui.options,scrolled=false;var i=jQuery(this).data("draggable");if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML'){if((i.overflowYOffset.top+i.overflowY[0].offsetHeight)-e.pageY<o.scrollSensitivity)
+i.overflowY[0].scrollTop=scrolled=i.overflowY[0].scrollTop+o.scrollSpeed;if(e.pageY-i.overflowYOffset.top<o.scrollSensitivity)
+i.overflowY[0].scrollTop=scrolled=i.overflowY[0].scrollTop-o.scrollSpeed;}else{if(e.pageY-jQuery(document).scrollTop()<o.scrollSensitivity)
+scrolled=jQuery(document).scrollTop(jQuery(document).scrollTop()-o.scrollSpeed);if(jQuery(window).height()-(e.pageY-jQuery(document).scrollTop())<o.scrollSensitivity)
+scrolled=jQuery(document).scrollTop(jQuery(document).scrollTop()+o.scrollSpeed);}
+if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML'){if((i.overflowXOffset.left+i.overflowX[0].offsetWidth)-e.pageX<o.scrollSensitivity)
+i.overflowX[0].scrollLeft=scrolled=i.overflowX[0].scrollLeft+o.scrollSpeed;if(e.pageX-i.overflowXOffset.left<o.scrollSensitivity)
+i.overflowX[0].scrollLeft=scrolled=i.overflowX[0].scrollLeft-o.scrollSpeed;}else{if(e.pageX-jQuery(document).scrollLeft()<o.scrollSensitivity)
+scrolled=jQuery(document).scrollLeft(jQuery(document).scrollLeft()-o.scrollSpeed);if(jQuery(window).width()-(e.pageX-jQuery(document).scrollLeft())<o.scrollSensitivity)
+scrolled=jQuery(document).scrollLeft(jQuery(document).scrollLeft()+o.scrollSpeed);}
+if(scrolled!==false)
+jQuery.ui.ddmanager.prepareOffsets(i,e);}});jQuery.ui.plugin.add("draggable","snap",{start:function(e,ui){var inst=jQuery(this).data("draggable");inst.snapElements=[];jQuery(ui.options.snap.constructor!=String?(ui.options.snap.items||':data(draggable)'):ui.options.snap).each(function(){var jQueryt=jQuery(this);var jQueryo=jQueryt.offset();if(this!=inst.element[0])inst.snapElements.push({item:this,width:jQueryt.outerWidth(),height:jQueryt.outerHeight(),top:jQueryo.top,left:jQueryo.left});});},drag:function(e,ui){var inst=jQuery(this).data("draggable");var d=ui.options.snapTolerance||20;var x1=ui.absolutePosition.left,x2=x1+inst.helperProportions.width,y1=ui.absolutePosition.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)|
 |(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d))){if(inst.snapElements[i].snapping)(inst.options.snap.release&&inst.options.snap.release.call(inst.element,null,jQuery.extend(inst.uiHash(),{snapItem:inst.snapElements[i].item})));inst.snapElements[i].snapping=false;continue;}
+if(ui.options.snapMode!='inner'){var ts=Math.abs(t-y2)<=d;var bs=Math.abs(b-y1)<=d;var ls=Math.abs(l-x2)<=d;var rs=Math.abs(r-x1)<=d;if(ts)ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top;if(bs)ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top;if(ls)ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left;if(rs)ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left;}
+var first=(ts||bs||ls||rs);if(ui.options.snapMode!='outer'){var ts=Math.abs(t-y1)<=d;var bs=Math.abs(b-y2)<=d;var ls=Math.abs(l-x1)<=d;var rs=Math.abs(r-x2)<=d;if(ts)ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top;if(bs)ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top;if(ls)ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left;if(rs)ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left;}
+if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first))
+(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,null,jQuery.extend(inst.uiHash(),{snapItem:inst.snapElements[i].item})));inst.snapElements[i].snapping=(ts||bs||ls||rs||first);};}});jQuery.ui.plugin.add("draggable","connectToSortable",{start:function(e,ui){var inst=jQuery(this).data("draggable");inst.sortables=[];jQuery(ui.options.connectToSortable).each(function(){if(jQuery.data(this,'sortable')){var sortable=jQuery.data(this,'sortable');inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable._refreshItems();sortable._propagate("activate",e,inst);}});},stop:function(e,ui){var inst=jQuery(this).data("draggable");jQuery.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(e);this.instance.element.triggerHandler("sortreceive",[e,jQuery.extend(this.instance.ui(),{se
 nder:inst.element})],this.instance.options["receive"]);this.instance.options.helper=this.instance.options._helper;}else{this.instance._propagate("deactivate",e,inst);}});},drag:function(e,ui){var inst=jQuery(this).data("draggable"),self=this;var checkPos=function(o){var l=o.left,r=l+o.width,t=o.top,b=t+o.height;return(l<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<r&&t<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<b);};jQuery.each(inst.sortables,function(i){if(checkPos.call(inst,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=jQuery(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0];};e.target=this.instance.currentItem[0];this.instance._mouseCapture(e,true);this.instance._mouseStart(e,true,true
 );this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._propagate("toSortable",e);}
+if(this.instance.currentItem)this.instance._mouseDrag(e);}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._mouseStop(e,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder)this.instance.placeholder.remove();inst._propagate("fromSortable",e);}};});}});jQuery.ui.plugin.add("draggable","stack",{start:function(e,ui){var group=jQuery.makeArray(jQuery(ui.options.stack.group)).sort(function(a,b){return(parseInt(jQuery(a).css("zIndex"),10)||ui.options.stack.min)-(parseInt(jQuery(b).css("zIndex"),10)||ui.options.stack.min);});jQuery(group).each(function(i){this.style.zIndex=ui.options.stack.min+i;});this[0].style.zIndex=ui.options.stack.min+group.length;}});})(jQuery);(function(jQuery){jQuery.widget("ui.resizable",jQuery.extend({},jQuery.ui.mouse,{_init:function(){var self=this,o=this.options;var elpos=this.element.css('posit
 ion');this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(elpos)?'relative':elpos});jQuery.extend(o,{_aspectRatio:!!(o.aspectRatio),helper:o.helper||o.ghost||o.animate?o.helper||'proxy':null,knobHandles:o.knobHandles===true?'ui-resizable-knob-handle':o.knobHandles});var aBorder='1px solid #DEDEDE';o.defaultTheme={'ui-resizable':{display:'block'},'ui-resizable-handle':{position:'absolute',background:'#F2F2F2',fontSize:'0.1px'},'ui-resizable-n':{cursor:'n-resize',height:'4px',left:'0px',right:'0px',borderTop:aBorder},'ui-resizable-s':{cursor:'s-resize',height:'4px',left:'0px',right:'0px',borderBottom:aBorder},'ui-resizable-e':{cursor:'e-resize',width:'4px',top:'0px',bottom:'0px',borderRight:aBorder},'ui-resizable-w':{cursor:'w-resize',width:'4px',top:'0px',bottom:'0px',borderLeft:aBorder},'ui-resizable-se':{cursor:'se-resize',width:'4px',height:'4px',borderRight:aBorder,borderBottom:aBorder},'ui-resizable-sw':{cursor:'sw-resize',width:'4
 px',height:'4px',borderBottom:aBorder,borderLeft:aBorder},'ui-resizable-ne':{cursor:'ne-resize',width:'4px',height:'4px',borderRight:aBorder,borderTop:aBorder},'ui-resizable-nw':{cursor:'nw-resize',width:'4px',height:'4px',borderLeft:aBorder,borderTop:aBorder}};o.knobTheme={'ui-resizable-handle':{background:'#F2F2F2',border:'1px solid #808080',height:'8px',width:'8px'},'ui-resizable-n':{cursor:'n-resize',top:'0px',left:'45%'},'ui-resizable-s':{cursor:'s-resize',bottom:'0px',left:'45%'},'ui-resizable-e':{cursor:'e-resize',right:'0px',top:'45%'},'ui-resizable-w':{cursor:'w-resize',left:'0px',top:'45%'},'ui-resizable-se':{cursor:'se-resize',right:'0px',bottom:'0px'},'ui-resizable-sw':{cursor:'sw-resize',left:'0px',bottom:'0px'},'ui-resizable-nw':{cursor:'nw-resize',left:'0px',top:'0px'},'ui-resizable-ne':{cursor:'ne-resize',right:'0px',top:'0px'}};o._nodeName=this.element[0].nodeName;if(o._nodeName.match(/canvas|textarea|input|select|button|img/i)){var el=this.element;if(/relative/.tes
 t(el.css('position'))&&jQuery.browser.opera)
+el.css({position:'relative',top:'auto',left:'auto'});el.wrap(jQuery('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:el.css('position'),width:el.outerWidth(),height:el.outerHeight(),top:el.css('top'),left:el.css('left')}));var oel=this.element;this.element=this.element.parent();this.element.data('resizable',this);this.element.css({marginLeft:oel.css("marginLeft"),marginTop:oel.css("marginTop"),marginRight:oel.css("marginRight"),marginBottom:oel.css("marginBottom")});oel.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(jQuery.browser.safari&&o.preventDefault)oel.css('resize','none');o.proportionallyResize=oel.css({position:'static',zoom:1,display:'block'});this.element.css({margin:oel.css('margin')});this._proportionallyResize();}
+if(!o.handles)o.handles=!jQuery('.ui-resizable-handle',this.element).length?"e,s,se":{n:'.ui-resizable-n',e:'.ui-resizable-e',s:'.ui-resizable-s',w:'.ui-resizable-w',se:'.ui-resizable-se',sw:'.ui-resizable-sw',ne:'.ui-resizable-ne',nw:'.ui-resizable-nw'};if(o.handles.constructor==String){o.zIndex=o.zIndex||1000;if(o.handles=='all')o.handles='n,e,s,w,se,sw,ne,nw';var n=o.handles.split(",");o.handles={};var insertionsDefault={handle:'position: absolute; display: none; overflow:hidden;',n:'top: 0pt; width:100%;',e:'right: 0pt; height:100%;',s:'bottom: 0pt; width:100%;',w:'left: 0pt; height:100%;',se:'bottom: 0pt; right: 0px;',sw:'bottom: 0pt; left: 0px;',ne:'top: 0pt; right: 0px;',nw:'top: 0pt; left: 0px;'};for(var i=0;i<n.length;i++){var handle=jQuery.trim(n[i]),dt=o.defaultTheme,hname='ui-resizable-'+handle,loadDefault=!jQuery.ui.css(hname)&&!o.knobHandles,userKnobClass=jQuery.ui.css('ui-resizable-knob-handle'),allDefTheme=jQuery.extend(dt[hname],dt['ui-resizable-handle']),allKnobThe
 me=jQuery.extend(o.knobTheme[hname],!userKnobClass?o.knobTheme['ui-resizable-handle']:{});var applyZIndex=/sw|se|ne|nw/.test(handle)?{zIndex:++o.zIndex}:{};var defCss=(loadDefault?insertionsDefault[handle]:''),axis=jQuery(['<div class="ui-resizable-handle ',hname,'" style="',defCss,insertionsDefault.handle,'"></div>'].join('')).css(applyZIndex);o.handles[handle]='.ui-resizable-'+handle;this.element.append(axis.css(loadDefault?allDefTheme:{}).css(o.knobHandles?allKnobTheme:{}).addClass(o.knobHandles?'ui-resizable-knob-handle':'').addClass(o.knobHandles));}
+if(o.knobHandles)this.element.addClass('ui-resizable-knob').css(!jQuery.ui.css('ui-resizable-knob')?{}:{});}
+this._renderAxis=function(target){target=target||this.element;for(var i in o.handles){if(o.handles[i].constructor==String)
+o.handles[i]=jQuery(o.handles[i],this.element).show();if(o.transparent)
+o.handles[i].css({opacity:0});if(this.element.is('.ui-wrapper')&&o._nodeName.match(/textarea|input|select|button/i)){var axis=jQuery(o.handles[i],this.element),padWrapper=0;padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth();var padPos=['padding',/ne|nw|n/.test(i)?'Top':/se|sw|s/.test(i)?'Bottom':/^ejQuery/.test(i)?'Right':'Left'].join("");if(!o.transparent)
+target.css(padPos,padWrapper);this._proportionallyResize();}
+if(!jQuery(o.handles[i]).length)continue;}};this._renderAxis(this.element);o._handles=jQuery('.ui-resizable-handle',self.element);if(o.disableSelection)
+o._handles.each(function(i,e){jQuery.ui.disableSelection(e);});o._handles.mouseover(function(){if(!o.resizing){if(this.className)
+var axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);self.axis=o.axis=axis&&axis[1]?axis[1]:'se';}});if(o.autoHide){o._handles.hide();jQuery(self.element).addClass("ui-resizable-autohide").hover(function(){jQuery(this).removeClass("ui-resizable-autohide");o._handles.show();},function(){if(!o.resizing){jQuery(this).addClass("ui-resizable-autohide");o._handles.hide();}});}
+this._mouseInit();},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,originalPosition:this.originalPosition};},_propagate:function(n,e){jQuery.ui.plugin.call(this,n,[e,this.ui()]);if(n!="resize")this.element.triggerHandler(["resize",n].join(""),[e,this.ui()],this.options[n]);},destroy:function(){var el=this.element,wrapped=el.children(".ui-resizable").get(0);this._mouseDestroy();var _destroy=function(exp){jQuery(exp).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();};_destroy(el);if(el.is('.ui-wrapper')&&wrapped){el.parent().append(jQuery(wrapped).css({position:el.css('position'),width:el.outerWidth(),height:el.outerHeight(),top:el.css('top'),left:el.css('left')})).end().remove();_destroy(wrapped);}},_mouseCapture:function(e){if(this.options.disabled)re
 turn false;var handle=false;for(var i in this.options.handles){if(jQuery(this.options.handles[i])[0]==e.target)handle=true;}
+if(!handle)return false;return true;},_mouseStart:function(e){var o=this.options,iniPos=this.element.position(),el=this.element,num=function(v){return parseInt(v,10)||0;},ie6=jQuery.browser.msie&&jQuery.browser.version<7;o.resizing=true;o.documentScroll={top:jQuery(document).scrollTop(),left:jQuery(document).scrollLeft()};if(el.is('.ui-draggable')||(/absolute/).test(el.css('position'))){var sOffset=jQuery.browser.msie&&!o.containment&&(/absolute/).test(el.css('position'))&&!(/relative/).test(el.parent().css('position'));var dscrollt=sOffset?o.documentScroll.top:0,dscrolll=sOffset?o.documentScroll.left:0;el.css({position:'absolute',top:(iniPos.top+dscrollt),left:(iniPos.left+dscrolll)});}
+if(jQuery.browser.opera&&/relative/.test(el.css('position')))
+el.css({position:'relative',top:'auto',left:'auto'});this._renderProxy();var curleft=num(this.helper.css('left')),curtop=num(this.helper.css('top'));if(o.containment){curleft+=jQuery(o.containment).scrollLeft()||0;curtop+=jQuery(o.containment).scrollTop()||0;}
+this.offset=this.helper.offset();this.position={left:curleft,top:curtop};this.size=o.helper||ie6?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalSize=o.helper||ie6?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalPosition={left:curleft,top:curtop};this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()};this.originalMousePosition={left:e.pageX,top:e.pageY};o.aspectRatio=(typeof o.aspectRatio=='number')?o.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);if(o.preserveCursor)
+jQuery('body').css('cursor',this.axis+'-resize');this._propagate("start",e);return true;},_mouseDrag:function(e){var el=this.helper,o=this.options,props={},self=this,smp=this.originalMousePosition,a=this.axis;var dx=(e.pageX-smp.left)||0,dy=(e.pageY-smp.top)||0;var trigger=this._change[a];if(!trigger)return false;var data=trigger.apply(this,[e,dx,dy]),ie6=jQuery.browser.msie&&jQuery.browser.version<7,csdif=this.sizeDiff;if(o._aspectRatio||e.shiftKey)
+data=this._updateRatio(data,e);data=this._respectSize(data,e);this._propagate("resize",e);el.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!o.helper&&o.proportionallyResize)
+this._proportionallyResize();this._updateCache(data);this.element.triggerHandler("resize",[e,this.ui()],this.options["resize"]);return false;},_mouseStop:function(e){this.options.resizing=false;var o=this.options,num=function(v){return parseInt(v,10)||0;},self=this;if(o.helper){var pr=o.proportionallyResize,ista=pr&&(/textarea/i).test(pr.get(0).nodeName),soffseth=ista&&jQuery.ui.hasScroll(pr.get(0),'left')?0:self.sizeDiff.height,soffsetw=ista?0:self.sizeDiff.width;var s={width:(self.size.width-soffsetw),height:(self.size.height-soffseth)},left=(parseInt(self.element.css('left'),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css('top'),10)+(self.position.top-self.originalPosition.top))||null;if(!o.animate)
+this.element.css(jQuery.extend(s,{top:top,left:left}));if(o.helper&&!o.animate)this._proportionallyResize();}
+if(o.preserveCursor)
+jQuery('body').css('cursor','auto');this._propagate("stop",e);if(o.helper)this.helper.remove();return false;},_updateCache:function(data){var o=this.options;this.offset=this.helper.offset();if(data.left)this.position.left=data.left;if(data.top)this.position.top=data.top;if(data.height)this.size.height=data.height;if(data.width)this.size.width=data.width;},_updateRatio:function(data,e){var o=this.options,cpos=this.position,csize=this.size,a=this.axis;if(data.height)data.width=(csize.height*o.aspectRatio);else if(data.width)data.height=(csize.width/o.aspectRatio);if(a=='sw'){data.left=cpos.left+(csize.width-data.width);data.top=null;}
+if(a=='nw'){data.top=cpos.top+(csize.height-data.height);data.left=cpos.left+(csize.width-data.width);}
+return data;},_respectSize:function(data,e){var el=this.helper,o=this.options,pRatio=o._aspectRatio||e.shiftKey,a=this.axis,ismaxw=data.width&&o.maxWidth&&o.maxWidth<data.width,ismaxh=data.height&&o.maxHeight&&o.maxHeight<data.height,isminw=data.width&&o.minWidth&&o.minWidth>data.width,isminh=data.height&&o.minHeight&&o.minHeight>data.height;if(isminw)data.width=o.minWidth;if(isminh)data.height=o.minHeight;if(ismaxw)data.width=o.maxWidth;if(ismaxh)data.height=o.maxHeight;var dw=this.originalPosition.left+this.originalSize.width,dh=this.position.top+this.size.height;var cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);if(isminw&&cw)data.left=dw-o.minWidth;if(ismaxw&&cw)data.left=dw-o.maxWidth;if(isminh&&ch)data.top=dh-o.minHeight;if(ismaxh&&ch)data.top=dh-o.maxHeight;var isNotwh=!data.width&&!data.height;if(isNotwh&&!data.left&&data.top)data.top=null;else if(isNotwh&&!data.top&&data.left)data.left=null;return data;},_proportionallyResize:function(){var o=this.options;if(!o.proportionallyRes
 ize)return;var prel=o.proportionallyResize,el=this.helper||this.element;if(!o.borderDif){var b=[prel.css('borderTopWidth'),prel.css('borderRightWidth'),prel.css('borderBottomWidth'),prel.css('borderLeftWidth')],p=[prel.css('paddingTop'),prel.css('paddingRight'),prel.css('paddingBottom'),prel.css('paddingLeft')];o.borderDif=jQuery.map(b,function(v,i){var border=parseInt(v,10)||0,padding=parseInt(p[i],10)||0;return border+padding;});}
+prel.css({height:(el.height()-o.borderDif[0]-o.borderDif[2])+"px",width:(el.width()-o.borderDif[1]-o.borderDif[3])+"px"});},_renderProxy:function(){var el=this.element,o=this.options;this.elementOffset=el.offset();if(o.helper){this.helper=this.helper||jQuery('<div style="overflow:hidden;"></div>');var ie6=jQuery.browser.msie&&jQuery.browser.version<7,ie6offset=(ie6?1:0),pxyoffset=(ie6?2:-1);this.helper.addClass(o.helper).css({width:el.outerWidth()+pxyoffset,height:el.outerHeight()+pxyoffset,position:'absolute',left:this.elementOffset.left-ie6offset+'px',top:this.elementOffset.top-ie6offset+'px',zIndex:++o.zIndex});this.helper.appendTo("body");if(o.disableSelection)
+jQuery.ui.disableSelection(this.helper.get(0));}else{this.helper=el;}},_change:{e:function(e,dx,dy){return{width:this.originalSize.width+dx};},w:function(e,dx,dy){var o=this.options,cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx};},n:function(e,dx,dy){var o=this.options,cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy};},s:function(e,dx,dy){return{height:this.originalSize.height+dy};},se:function(e,dx,dy){return jQuery.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,dx,dy]));},sw:function(e,dx,dy){return jQuery.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,dx,dy]));},ne:function(e,dx,dy){return jQuery.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,dx,dy]));},nw:function(e,dx,dy){return jQuery.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,dx,dy]));}}}));jQuery.extend(jQuery.ui.resizable,{defaults:{cancel
 :":input",distance:1,delay:0,preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autoHide:false,knobHandles:false}});jQuery.ui.plugin.add("resizable","containment",{start:function(e,ui){var o=ui.options,self=jQuery(this).data("resizable"),el=self.element;var oc=o.containment,ce=(oc instanceof jQuery)?oc.get(0):(/parent/.test(oc))?el.parent().get(0):oc;if(!ce)return;self.containerElement=jQuery(ce);if(/document/.test(oc)||oc==document){self.containerOffset={left:0,top:0};self.containerPosition={left:0,top:0};self.parentData={element:jQuery(document),left:0,top:0,width:jQuery(document).width(),height:jQuery(document).height()||document.body.parentNode.scrollHeight};}
+else{self.containerOffset=jQuery(ce).offset();self.containerPosition=jQuery(ce).position();self.containerSize={height:jQuery(ce).innerHeight(),width:jQuery(ce).innerWidth()};var co=self.containerOffset,ch=self.containerSize.height,cw=self.containerSize.width,width=(jQuery.ui.hasScroll(ce,"left")?ce.scrollWidth:cw),height=(jQuery.ui.hasScroll(ce)?ce.scrollHeight:ch);self.parentData={element:ce,left:co.left,top:co.top,width:width,height:height};}},resize:function(e,ui){var o=ui.options,self=jQuery(this).data("resizable"),ps=self.containerSize,co=self.containerOffset,cs=self.size,cp=self.position,pRatio=o._aspectRatio||e.shiftKey,cop={top:0,left:0},ce=self.containerElement;if(ce[0]!=document&&/static/.test(ce.css('position')))
+cop=self.containerPosition;if(cp.left<(o.helper?co.left:cop.left)){self.size.width=self.size.width+(o.helper?(self.position.left-co.left):(self.position.left-cop.left));if(pRatio)self.size.height=self.size.width/o.aspectRatio;self.position.left=o.helper?co.left:cop.left;}
+if(cp.top<(o.helper?co.top:0)){self.size.height=self.size.height+(o.helper?(self.position.top-co.top):self.position.top);if(pRatio)self.size.width=self.size.height*o.aspectRatio;self.position.top=o.helper?co.top:0;}
+var woset=(o.helper?self.offset.left-co.left:(self.position.left-cop.left))+self.sizeDiff.width,hoset=(o.helper?self.offset.top-co.top:self.position.top)+self.sizeDiff.height;if(woset+self.size.width>=self.parentData.width){self.size.width=self.parentData.width-woset;if(pRatio)self.size.height=self.size.width/o.aspectRatio;}
+if(hoset+self.size.height>=self.parentData.height){self.size.height=self.parentData.height-hoset;if(pRatio)self.size.width=self.size.height*o.aspectRatio;}},stop:function(e,ui){var o=ui.options,self=jQuery(this).data("resizable"),cp=self.position,co=self.containerOffset,cop=self.containerPosition,ce=self.containerElement;var helper=jQuery(self.helper),ho=helper.offset(),w=helper.innerWidth(),h=helper.innerHeight();if(o.helper&&!o.animate&&/relative/.test(ce.css('position')))
+jQuery(this).css({left:(ho.left-co.left),top:(ho.top-co.top),width:w,height:h});if(o.helper&&!o.animate&&/static/.test(ce.css('position')))
+jQuery(this).css({left:cop.left+(ho.left-co.left),top:cop.top+(ho.top-co.top),width:w,height:h});}});jQuery.ui.plugin.add("resizable","grid",{resize:function(e,ui){var o=ui.options,self=jQuery(this).data("resizable"),cs=self.size,os=self.originalSize,op=self.originalPosition,a=self.axis,ratio=o._aspectRatio||e.shiftKey;o.grid=typeof o.grid=="number"?[o.grid,o.grid]:o.grid;var ox=Math.round((cs.width-os.width)/(o.grid[0]||1))*(o.grid[0]||1),oy=Math.round((cs.height-os.height)/(o.grid[1]||1))*(o.grid[1]||1);if(/^(se|s|e)jQuery/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;}
+else if(/^(ne)jQuery/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.top=op.top-oy;}
+else if(/^(sw)jQuery/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.left=op.left-ox;}
+else{self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.top=op.top-oy;self.position.left=op.left-ox;}}});jQuery.ui.plugin.add("resizable","animate",{stop:function(e,ui){var o=ui.options,self=jQuery(this).data("resizable");var pr=o.proportionallyResize,ista=pr&&(/textarea/i).test(pr.get(0).nodeName),soffseth=ista&&jQuery.ui.hasScroll(pr.get(0),'left')?0:self.sizeDiff.height,soffsetw=ista?0:self.sizeDiff.width;var style={width:(self.size.width-soffsetw),height:(self.size.height-soffseth)},left=(parseInt(self.element.css('left'),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css('top'),10)+(self.position.top-self.originalPosition.top))||null;self.element.animate(jQuery.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration||"slow",easing:o.animateEasing||"swing",step:function(){var data={width:parseInt(self.element.css('width'),10),height:parseInt(self.element.css('height'),10),top:parseInt(self.element.css
 ('top'),10),left:parseInt(self.element.css('left'),10)};if(pr)pr.css({width:data.width,height:data.height});self._updateCache(data);self._propagate("animate",e);}});}});jQuery.ui.plugin.add("resizable","ghost",{start:function(e,ui){var o=ui.options,self=jQuery(this).data("resizable"),pr=o.proportionallyResize,cs=self.size;if(!pr)self.ghost=self.element.clone();else self.ghost=pr.clone();self.ghost.css({opacity:.25,display:'block',position:'relative',height:cs.height,width:cs.width,margin:0,left:0,top:0}).addClass('ui-resizable-ghost').addClass(typeof o.ghost=='string'?o.ghost:'');self.ghost.appendTo(self.helper);},resize:function(e,ui){var o=ui.options,self=jQuery(this).data("resizable"),pr=o.proportionallyResize;if(self.ghost)self.ghost.css({position:'relative',height:self.size.height,width:self.size.width});},stop:function(e,ui){var o=ui.options,self=jQuery(this).data("resizable"),pr=o.proportionallyResize;if(self.ghost&&self.helper)self.helper.get(0).removeChild(self.ghost.get(0)
 );}});jQuery.ui.plugin.add("resizable","alsoResize",{start:function(e,ui){var o=ui.options,self=jQuery(this).data("resizable"),_store=function(exp){jQuery(exp).each(function(){jQuery(this).data("resizable-alsoresize",{width:parseInt(jQuery(this).width(),10),height:parseInt(jQuery(this).height(),10),left:parseInt(jQuery(this).css('left'),10),top:parseInt(jQuery(this).css('top'),10)});});};if(typeof(o.alsoResize)=='object'){if(o.alsoResize.length){o.alsoResize=o.alsoResize[0];_store(o.alsoResize);}
+else{jQuery.each(o.alsoResize,function(exp,c){_store(exp);});}}else{_store(o.alsoResize);}},resize:function(e,ui){var o=ui.options,self=jQuery(this).data("resizable"),os=self.originalSize,op=self.originalPosition;var delta={height:(self.size.height-os.height)||0,width:(self.size.width-os.width)||0,top:(self.position.top-op.top)||0,left:(self.position.left-op.left)||0},_alsoResize=function(exp,c){jQuery(exp).each(function(){var start=jQuery(this).data("resizable-alsoresize"),style={},css=c&&c.length?c:['width','height','top','left'];jQuery.each(css||['width','height','top','left'],function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);if(sum&&sum>=0)
+style[prop]=sum||null;});jQuery(this).css(style);});};if(typeof(o.alsoResize)=='object'){jQuery.each(o.alsoResize,function(exp,c){_alsoResize(exp,c);});}else{_alsoResize(o.alsoResize);}},stop:function(e,ui){jQuery(this).removeData("resizable-alsoresize-start");}});})(jQuery);(function(jQuery){var setDataSwitch={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"};jQuery.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr('title');this.options.title=this.options.title||this.originalTitle;var self=this,options=this.options,uiDialogContent=this.element.removeAttr('title').addClass('ui-dialog-content').wrap('<div/>').wrap('<div/>'),uiDialogContainer=(this.uiDialogContainer=uiDialogContent.parent()).addClass('ui-dialog-container').css({posi
 tion:'relative',width:'100%',height:'100%'}),uiDialogTitlebar=(this.uiDialogTitlebar=jQuery('<div/>')).addClass('ui-dialog-titlebar').append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>').prependTo(uiDialogContainer),title=options.title||'&nbsp;',titleId=jQuery.ui.dialog.getTitleId(this.element),uiDialogTitle=jQuery('<span/>').addClass('ui-dialog-title').attr('id',titleId).html(title).prependTo(uiDialogTitlebar),uiDialog=(this.uiDialog=uiDialogContainer.parent()).appendTo(document.body).hide().addClass('ui-dialog').addClass(options.dialogClass).addClass(uiDialogContent.attr('className')).removeClass('ui-dialog-content').css({position:'absolute',width:options.width,height:options.height,overflow:'hidden',zIndex:options.zIndex}).attr('tabIndex',-1).css('outline',0).keydown(function(ev){(options.closeOnEscape&&ev.keyCode&&ev.keyCode==jQuery.keyCode.ESCAPE&&self.close());}).mousedown(function(){self._moveToTop();}),uiDialogButtonPane=(this.uiDialogButtonPane=jQuery('
 <div/>')).addClass('ui-dialog-buttonpane').css({position:'absolute',bottom:0}).appendTo(uiDialog);this.uiDialogTitlebarClose=jQuery('.ui-dialog-titlebar-close',uiDialogTitlebar).hover(function(){jQuery(this).addClass('ui-dialog-titlebar-close-hover');},function(){jQuery(this).removeClass('ui-dialog-titlebar-close-hover');}).mousedown(function(ev){ev.stopPropagation();}).click(function(){self.close();return false;});uiDialogTitlebar.find("*").add(uiDialogTitlebar).each(function(){jQuery.ui.disableSelection(this);});(options.draggable&&jQuery.fn.draggable&&this._makeDraggable());(options.resizable&&jQuery.fn.resizable&&this._makeResizable());this._createButtons(options.buttons);this._isOpen=false;(options.bgiframe&&jQuery.fn.bgiframe&&uiDialog.bgiframe());(options.autoOpen&&this.open());},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind('.dialog').removeData('dialog').removeClass('ui-dialog-content').hide().appendTo('body');this.uiDial
 og.remove();(this.originalTitle&&this.element.attr('title',this.originalTitle));},close:function(){if(false===this._trigger('beforeclose',null,{options:this.options})){return;}
+(this.overlay&&this.overlay.destroy());this.uiDialog.hide(this.options.hide).unbind('keypress.ui-dialog');this._trigger('close',null,{options:this.options});jQuery.ui.dialog.overlay.resize();this._isOpen=false;},isOpen:function(){return this._isOpen;},open:function(){if(this._isOpen){return;}
+this.overlay=this.options.modal?new jQuery.ui.dialog.overlay(this):null;(this.uiDialog.next().length&&this.uiDialog.appendTo('body'));this._position(this.options.position);this.uiDialog.show(this.options.show);(this.options.autoResize&&this._size());this._moveToTop(true);(this.options.modal&&this.uiDialog.bind('keypress.ui-dialog',function(e){if(e.keyCode!=jQuery.keyCode.TAB){return;}
+var tabbables=jQuery(':tabbable',this),first=tabbables.filter(':first')[0],last=tabbables.filter(':last')[0];if(e.target==last&&!e.shiftKey){setTimeout(function(){first.focus();},1);}else if(e.target==first&&e.shiftKey){setTimeout(function(){last.focus();},1);}}));this.uiDialog.find(':tabbable:first').focus();this._trigger('open',null,{options:this.options});this._isOpen=true;},_createButtons:function(buttons){var self=this,hasButtons=false,uiDialogButtonPane=this.uiDialogButtonPane;uiDialogButtonPane.empty().hide();jQuery.each(buttons,function(){return!(hasButtons=true);});if(hasButtons){uiDialogButtonPane.show();jQuery.each(buttons,function(name,fn){jQuery('<button type="button"></button>').text(name).click(function(){fn.apply(self.element[0],arguments);}).appendTo(uiDialogButtonPane);});}},_makeDraggable:function(){var self=this,options=this.options;this.uiDialog.draggable({cancel:'.ui-dialog-content',helper:options.dragHelper,handle:'.ui-dialog-titlebar',start:function(){self._m
 oveToTop();(options.dragStart&&options.dragStart.apply(self.element[0],arguments));},drag:function(){(options.drag&&options.drag.apply(self.element[0],arguments));},stop:function(){(options.dragStop&&options.dragStop.apply(self.element[0],arguments));jQuery.ui.dialog.overlay.resize();}});},_makeResizable:function(handles){handles=(handles===undefined?this.options.resizable:handles);var self=this,options=this.options,resizeHandles=typeof handles=='string'?handles:'n,e,s,w,se,sw,ne,nw';this.uiDialog.resizable({cancel:'.ui-dialog-content',helper:options.resizeHelper,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:options.minHeight,start:function(){(options.resizeStart&&options.resizeStart.apply(self.element[0],arguments));},resize:function(){(options.autoResize&&self._size.apply(self));(options.resize&&options.resize.apply(self.element[0],arguments));},handles:resizeHandles,stop:function(){(options.autoResize&&self._size.apply(self));(options.r
 esizeStop&&options.resizeStop.apply(self.element[0],arguments));jQuery.ui.dialog.overlay.resize();}});},_moveToTop:function(force){if((this.options.modal&&!force)||(!this.options.stack&&!this.options.modal)){return this._trigger('focus',null,{options:this.options});}
+var maxZ=this.options.zIndex,options=this.options;jQuery('.ui-dialog:visible').each(function(){maxZ=Math.max(maxZ,parseInt(jQuery(this).css('z-index'),10)||options.zIndex);});(this.overlay&&this.overlay.jQueryel.css('z-index',++maxZ));this.uiDialog.css('z-index',++maxZ);this._trigger('focus',null,{options:this.options});},_position:function(pos){var wnd=jQuery(window),doc=jQuery(document),pTop=doc.scrollTop(),pLeft=doc.scrollLeft(),minTop=pTop;if(jQuery.inArray(pos,['center','top','right','bottom','left'])>=0){pos=[pos=='right'||pos=='left'?pos:'center',pos=='top'||pos=='bottom'?pos:'middle'];}
+if(pos.constructor!=Array){pos=['center','middle'];}
+if(pos[0].constructor==Number){pLeft+=pos[0];}else{switch(pos[0]){case'left':pLeft+=0;break;case'right':pLeft+=wnd.width()-this.uiDialog.width();break;default:case'center':pLeft+=(wnd.width()-this.uiDialog.width())/2;}}
+if(pos[1].constructor==Number){pTop+=pos[1];}else{switch(pos[1]){case'top':pTop+=0;break;case'bottom':pTop+=wnd.height()-this.uiDialog.height();break;default:case'middle':pTop+=(wnd.height()-this.uiDialog.height())/2;}}
+pTop=Math.max(pTop,minTop);this.uiDialog.css({top:pTop,left:pLeft});},_setData:function(key,value){(setDataSwitch[key]&&this.uiDialog.data(setDataSwitch[key],value));switch(key){case"buttons":this._createButtons(value);break;case"draggable":(value?this._makeDraggable():this.uiDialog.draggable('destroy'));break;case"height":this.uiDialog.height(value);break;case"position":this._position(value);break;case"resizable":var uiDialog=this.uiDialog,isResizable=this.uiDialog.is(':data(resizable)');(isResizable&&!value&&uiDialog.resizable('destroy'));(isResizable&&typeof value=='string'&&uiDialog.resizable('option','handles',value));(isResizable||this._makeResizable(value));break;case"title":jQuery(".ui-dialog-title",this.uiDialogTitlebar).html(value||'&nbsp;');break;case"width":this.uiDialog.width(value);break;}
+jQuery.widget.prototype._setData.apply(this,arguments);},_size:function(){var container=this.uiDialogContainer,titlebar=this.uiDialogTitlebar,content=this.element,tbMargin=(parseInt(content.css('margin-top'),10)||0)
++(parseInt(content.css('margin-bottom'),10)||0),lrMargin=(parseInt(content.css('margin-left'),10)||0)
++(parseInt(content.css('margin-right'),10)||0);content.height(container.height()-titlebar.outerHeight()-tbMargin);content.width(container.width()-lrMargin);}});jQuery.extend(jQuery.ui.dialog,{defaults:{autoOpen:true,autoResize:true,bgiframe:false,buttons:{},closeOnEscape:true,draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:'center',resizable:true,stack:true,width:300,zIndex:1000},getter:'isOpen',uuid:0,getTitleId:function(jQueryel){return'ui-dialog-title-'+(jQueryel.attr('id')||++this.uuid);},overlay:function(dialog){this.jQueryel=jQuery.ui.dialog.overlay.create(dialog);}});jQuery.extend(jQuery.ui.dialog.overlay,{instances:[],events:jQuery.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),function(e){return e+'.dialog-overlay';}).join(' '),create:function(dialog){if(this.instances.length===0){setTimeout(function(){jQuery('a, :input').bind(jQuery.ui.dialog.overlay.events,function(){var allow=false;var jQuerydialog=jQuery(this).parent
 s('.ui-dialog');if(jQuerydialog.length){var jQueryoverlays=jQuery('.ui-dialog-overlay');if(jQueryoverlays.length){var maxZ=parseInt(jQueryoverlays.css('z-index'),10);jQueryoverlays.each(function(){maxZ=Math.max(maxZ,parseInt(jQuery(this).css('z-index'),10));});allow=parseInt(jQuerydialog.css('z-index'),10)>maxZ;}else{allow=true;}}
+return allow;});},1);jQuery(document).bind('keydown.dialog-overlay',function(e){(dialog.options.closeOnEscape&&e.keyCode&&e.keyCode==jQuery.keyCode.ESCAPE&&dialog.close());});jQuery(window).bind('resize.dialog-overlay',jQuery.ui.dialog.overlay.resize);}
+var jQueryel=jQuery('<div/>').appendTo(document.body).addClass('ui-dialog-overlay').css(jQuery.extend({borderWidth:0,margin:0,padding:0,position:'absolute',top:0,left:0,width:this.width(),height:this.height()},dialog.options.overlay));(dialog.options.bgiframe&&jQuery.fn.bgiframe&&jQueryel.bgiframe());this.instances.push(jQueryel);return jQueryel;},destroy:function(jQueryel){this.instances.splice(jQuery.inArray(this.instances,jQueryel),1);if(this.instances.length===0){jQuery('a, :input').add([document,window]).unbind('.dialog-overlay');}
+jQueryel.remove();},height:function(){if(jQuery.browser.msie&&jQuery.browser.version<7){var scrollHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var offsetHeight=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(scrollHeight<offsetHeight){return jQuery(window).height()+'px';}else{return scrollHeight+'px';}}else if(jQuery.browser.opera){return Math.max(window.innerHeight,jQuery(document).height())+'px';}else{return jQuery(document).height()+'px';}},width:function(){if(jQuery.browser.msie&&jQuery.browser.version<7){var scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(scrollWidth<offsetWidth){return jQuery(window).width()+'px';}else{return scrollWidth+'px';}}else if(jQuery.browser.opera){return Math.max(window.innerWidth,jQuery(document).width())+'px';}else{return jQuery(document).width()+'px';}},r
 esize:function(){var jQueryoverlays=jQuery([]);jQuery.each(jQuery.ui.dialog.overlay.instances,function(){jQueryoverlays=jQueryoverlays.add(this);});jQueryoverlays.css({width:0,height:0}).css({width:jQuery.ui.dialog.overlay.width(),height:jQuery.ui.dialog.overlay.height()});}});jQuery.extend(jQuery.ui.dialog.overlay.prototype,{destroy:function(){jQuery.ui.dialog.overlay.destroy(this.jQueryel);}});})(jQuery);(function(jQuery){var PROP_NAME='datepicker';function Datepicker(){this.debug=false;this._curInst=null;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId='ui-datepicker-div';this._inlineClass='ui-datepicker-inline';this._appendClass='ui-datepicker-append';this._triggerClass='ui-datepicker-trigger';this._dialogClass='ui-datepicker-dialog';this._promptClass='ui-datepicker-prompt';this._disableClass='ui-datepicker-disabled';this._unselectableClass='ui-datepicker-unselectable';this._currentClass='ui-datepicker-current-day';this.regional=[];this.
 regional['']={clearText:'Clear',clearStatus:'Erase the current date',closeText:'Close',closeStatus:'Close without change',prevText:'&#x3c;Prev',prevStatus:'Show the previous month',prevBigText:'&#x3c;&#x3c;',prevBigStatus:'Show the previous year',nextText:'Next&#x3e;',nextStatus:'Show the next month',nextBigText:'&#x3e;&#x3e;',nextBigStatus:'Show the next year',currentText:'Today',currentStatus:'Show the current month',monthNames:['January','February','March','April','May','June','July','August','September','October','November','December'],monthNamesShort:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],monthStatus:'Show a different month',yearStatus:'Show a different year',weekHeader:'Wk',weekStatus:'Week of the year',dayNames:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dayNamesShort:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],dayNamesMin:['Su','Mo','Tu','We','Th','Fr','Sa'],dayStatus:'Set DD as first week day',dateStatus:'Selec
 t DD, M d',dateFormat:'mm/dd/yy',firstDay:0,initStatus:'Select a date',isRTL:false};this._defaults={showOn:'focus',showAnim:'show',showOptions:{},defaultDate:null,appendText:'',buttonText:'...',buttonImage:'',buttonImageOnly:false,closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,showBigPrevNext:false,gotoCurrent:false,changeMonth:true,changeYear:true,showMonthAfterYear:false,yearRange:'-10:+10',changeFirstDay:true,highlightWeek:false,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:'+10',showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,duration:'normal',beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,rangeSelect:false,rangeSeparator:' - ',altField:'',altFormat:''};jQuery.extend(this._defaults,this.regional['']);this.dpDiv=jQuery('<div id="'+this._mainDivId+'" style="display: none;"></div>
 ');}
+jQuery.extend(Datepicker.prototype,{markerClassName:'hasDatepicker',log:function(){if(this.debug)
+console.log.apply('',arguments);},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this;},_attachDatepicker:function(target,settings){var inlineSettings=null;for(attrName in this._defaults){var attrValue=target.getAttribute('date:'+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue);}catch(err){inlineSettings[attrName]=attrValue;}}}
+var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=='div'||nodeName=='span');if(!target.id)
+target.id='dp'+(++this.uuid);var inst=this._newInst(jQuery(target),inline);inst.settings=jQuery.extend({},settings||{},inlineSettings||{});if(nodeName=='input'){this._connectDatepicker(target,inst);}else if(inline){this._inlineDatepicker(target,inst);}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,'\\\\jQuery1');return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:jQuery('<div class="'+this._inlineClass+'"></div>'))};},_connectDatepicker:function(target,inst){var input=jQuery(target);if(input.hasClass(this.markerClassName))
+return;var appendText=this._get(inst,'appendText');var isRTL=this._get(inst,'isRTL');if(appendText)
+input[isRTL?'before':'after']('<span class="'+this._appendClass+'">'+appendText+'</span>');var showOn=this._get(inst,'showOn');if(showOn=='focus'||showOn=='both')
+input.focus(this._showDatepicker);if(showOn=='button'||showOn=='both'){var buttonText=this._get(inst,'buttonText');var buttonImage=this._get(inst,'buttonImage');var trigger=jQuery(this._get(inst,'buttonImageOnly')?jQuery('<img/>').addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):jQuery('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==''?buttonText:jQuery('<img/>').attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?'before':'after'](trigger);trigger.click(function(){if(jQuery.datepicker._datepickerShowing&&jQuery.datepicker._lastInput==target)
+jQuery.datepicker._hideDatepicker();else
+jQuery.datepicker._showDatepicker(target);return false;});}
+input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value;}).bind("getData.datepicker",function(event,key){return this._get(inst,key);});jQuery.data(target,PROP_NAME,inst);},_inlineDatepicker:function(target,inst){var divSpan=jQuery(target);if(divSpan.hasClass(this.markerClassName))
+return;divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value;}).bind("getData.datepicker",function(event,key){return this._get(inst,key);});jQuery.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);},_inlineShow:function(inst){var numMonths=this._getNumberOfMonths(inst);inst.dpDiv.width(numMonths[1]*jQuery('.ui-datepicker',inst.dpDiv[0]).width());},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id='dp'+(++this.uuid);this._dialogInput=jQuery('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);jQuery('body').append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};jQuery.data(this._dialogInput[0],PROP_NAME,inst);}
+extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY];}
+this._dialogInput.css('left',this._pos[0]+'px').css('top',this._pos[1]+'px');inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if(jQuery.blockUI)
+jQuery.blockUI(this.dpDiv);jQuery.data(this._dialogInput[0],PROP_NAME,inst);return this;},_destroyDatepicker:function(target){var jQuerytarget=jQuery(target);if(!jQuerytarget.hasClass(this.markerClassName)){return;}
+var nodeName=target.nodeName.toLowerCase();jQuery.removeData(target,PROP_NAME);if(nodeName=='input'){jQuerytarget.siblings('.'+this._appendClass).remove().end().siblings('.'+this._triggerClass).remove().end().removeClass(this.markerClassName).unbind('focus',this._showDatepicker).unbind('keydown',this._doKeyDown).unbind('keypress',this._doKeyPress);}else if(nodeName=='div'||nodeName=='span')
+jQuerytarget.removeClass(this.markerClassName).empty();},_enableDatepicker:function(target){var jQuerytarget=jQuery(target);if(!jQuerytarget.hasClass(this.markerClassName)){return;}
+var nodeName=target.nodeName.toLowerCase();if(nodeName=='input'){target.disabled=false;jQuerytarget.siblings('button.'+this._triggerClass).each(function(){this.disabled=false;}).end().siblings('img.'+this._triggerClass).css({opacity:'1.0',cursor:''});}
+else if(nodeName=='div'||nodeName=='span'){jQuerytarget.children('.'+this._disableClass).remove();}
+this._disabledInputs=jQuery.map(this._disabledInputs,function(value){return(value==target?null:value);});},_disableDatepicker:function(target){var jQuerytarget=jQuery(target);if(!jQuerytarget.hasClass(this.markerClassName)){return;}
+var nodeName=target.nodeName.toLowerCase();if(nodeName=='input'){target.disabled=true;jQuerytarget.siblings('button.'+this._triggerClass).each(function(){this.disabled=true;}).end().siblings('img.'+this._triggerClass).css({opacity:'0.5',cursor:'default'});}
+else if(nodeName=='div'||nodeName=='span'){var inline=jQuerytarget.children('.'+this._inlineClass);var offset=inline.offset();var relOffset={left:0,top:0};inline.parents().each(function(){if(jQuery(this).css('position')=='relative'){relOffset=jQuery(this).offset();return false;}});jQuerytarget.prepend('<div class="'+this._disableClass+'" style="'+
+(jQuery.browser.msie?'background-color: transparent; ':'')+'width: '+inline.width()+'px; height: '+inline.height()+'px; left: '+(offset.left-relOffset.left)+'px; top: '+(offset.top-relOffset.top)+'px;"></div>');}
+this._disabledInputs=jQuery.map(this._disabledInputs,function(value){return(value==target?null:value);});this._disabledInputs[this._disabledInputs.length]=target;},_isDisabledDatepicker:function(target){if(!target)
+return false;for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target)
+return true;}
+return false;},_getInst:function(target){try{return jQuery.data(target,PROP_NAME);}
+catch(err){throw'Missing instance data for this datepicker';}},_changeDatepicker:function(target,name,value){var settings=name||{};if(typeof name=='string'){settings={};settings[name]=value;}
+var inst=this._getInst(target);if(inst){if(this._curInst==inst){this._hideDatepicker(null);}
+extendRemove(inst.settings,settings);var date=new Date();extendRemove(inst,{rangeStart:null,endDay:null,endMonth:null,endYear:null,selectedDay:date.getDate(),selectedMonth:date.getMonth(),selectedYear:date.getFullYear(),currentDay:date.getDate(),currentMonth:date.getMonth(),currentYear:date.getFullYear(),drawMonth:date.getMonth(),drawYear:date.getFullYear()});this._updateDatepicker(inst);}},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst);}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst);}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline)
+this._setDateFromField(inst);return(inst?this._getDate(inst):null);},_doKeyDown:function(e){var inst=jQuery.datepicker._getInst(e.target);var handled=true;if(jQuery.datepicker._datepickerShowing)
+switch(e.keyCode){case 9:jQuery.datepicker._hideDatepicker(null,'');break;case 13:jQuery.datepicker._selectDay(e.target,inst.selectedMonth,inst.selectedYear,jQuery('td.ui-datepicker-days-cell-over',inst.dpDiv)[0]);return false;break;case 27:jQuery.datepicker._hideDatepicker(null,jQuery.datepicker._get(inst,'duration'));break;case 33:jQuery.datepicker._adjustDate(e.target,(e.ctrlKey?-jQuery.datepicker._get(inst,'stepBigMonths'):-jQuery.datepicker._get(inst,'stepMonths')),'M');break;case 34:jQuery.datepicker._adjustDate(e.target,(e.ctrlKey?+jQuery.datepicker._get(inst,'stepBigMonths'):+jQuery.datepicker._get(inst,'stepMonths')),'M');break;case 35:if(e.ctrlKey)jQuery.datepicker._clearDate(e.target);handled=e.ctrlKey;break;case 36:if(e.ctrlKey)jQuery.datepicker._gotoToday(e.target);handled=e.ctrlKey;break;case 37:if(e.ctrlKey)jQuery.datepicker._adjustDate(e.target,-1,'D');handled=e.ctrlKey;break;case 38:if(e.ctrlKey)jQuery.datepicker._adjustDate(e.target,-7,'D');handled=e.ctrlKey;break;
 case 39:if(e.ctrlKey)jQuery.datepicker._adjustDate(e.target,+1,'D');handled=e.ctrlKey;break;case 40:if(e.ctrlKey)jQuery.datepicker._adjustDate(e.target,+7,'D');handled=e.ctrlKey;break;default:handled=false;}
+else if(e.keyCode==36&&e.ctrlKey)
+jQuery.datepicker._showDatepicker(this);else
+handled=false;if(handled){e.preventDefault();e.stopPropagation();}},_doKeyPress:function(e){var inst=jQuery.datepicker._getInst(e.target);var chars=jQuery.datepicker._possibleChars(jQuery.datepicker._get(inst,'dateFormat'));var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||(chr<' '||!chars||chars.indexOf(chr)>-1);},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!='input')
+input=jQuery('input',input.parentNode)[0];if(jQuery.datepicker._isDisabledDatepicker(input)||jQuery.datepicker._lastInput==input)
+return;var inst=jQuery.datepicker._getInst(input);var beforeShow=jQuery.datepicker._get(inst,'beforeShow');extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));jQuery.datepicker._hideDatepicker(null,'');jQuery.datepicker._lastInput=input;jQuery.datepicker._setDateFromField(inst);if(jQuery.datepicker._inDialog)
+input.value='';if(!jQuery.datepicker._pos){jQuery.datepicker._pos=jQuery.datepicker._findPos(input);jQuery.datepicker._pos[1]+=input.offsetHeight;}
+var isFixed=false;jQuery(input).parents().each(function(){isFixed|=jQuery(this).css('position')=='fixed';return!isFixed;});if(isFixed&&jQuery.browser.opera){jQuery.datepicker._pos[0]-=document.documentElement.scrollLeft;jQuery.datepicker._pos[1]-=document.documentElement.scrollTop;}
+var offset={left:jQuery.datepicker._pos[0],top:jQuery.datepicker._pos[1]};jQuery.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:'absolute',display:'block',top:'-1000px'});jQuery.datepicker._updateDatepicker(inst);inst.dpDiv.width(jQuery.datepicker._getNumberOfMonths(inst)[1]*jQuery('.ui-datepicker',inst.dpDiv[0])[0].offsetWidth);offset=jQuery.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:(jQuery.datepicker._inDialog&&jQuery.blockUI?'static':(isFixed?'fixed':'absolute')),display:'none',left:offset.left+'px',top:offset.top+'px'});if(!inst.inline){var showAnim=jQuery.datepicker._get(inst,'showAnim')||'show';var duration=jQuery.datepicker._get(inst,'duration');var postProcess=function(){jQuery.datepicker._datepickerShowing=true;if(jQuery.browser.msie&&parseInt(jQuery.browser.version,10)<7)
+jQuery('iframe.ui-datepicker-cover').css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4});};if(jQuery.effects&&jQuery.effects[showAnim])
+inst.dpDiv.show(showAnim,jQuery.datepicker._get(inst,'showOptions'),duration,postProcess);else
+inst.dpDiv[showAnim](duration,postProcess);if(duration=='')
+postProcess();if(inst.input[0].type!='hidden')
+inst.input[0].focus();jQuery.datepicker._curInst=inst;}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};inst.dpDiv.empty().append(this._generateHTML(inst)).find('iframe.ui-datepicker-cover').css({width:dims.width,height:dims.height});var numMonths=this._getNumberOfMonths(inst);inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?'add':'remove')+'Class']('ui-datepicker-multi');inst.dpDiv[(this._get(inst,'isRTL')?'add':'remove')+'Class']('ui-datepicker-rtl');if(inst.input&&inst.input[0].type!='hidden')
+jQuery(inst.input[0]).focus();},_checkOffset:function(inst,offset,isFixed){var pos=inst.input?this._findPos(inst.input[0]):null;var browserWidth=window.innerWidth||document.documentElement.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;if(this._get(inst,'isRTL')||(offset.left+inst.dpDiv.width()-scrollX)>browserWidth)
+offset.left=Math.max((isFixed?0:scrollX),pos[0]+(inst.input?inst.input.width():0)-(isFixed?scrollX:0)-inst.dpDiv.width()-
+(isFixed&&jQuery.browser.opera?document.documentElement.scrollLeft:0));else
+offset.left-=(isFixed?scrollX:0);if((offset.top+inst.dpDiv.height()-scrollY)>browserHeight)
+offset.top=Math.max((isFixed?0:scrollY),pos[1]-(isFixed?scrollY:0)-(this._inDialog?0:inst.dpDiv.height())-
+(isFixed&&jQuery.browser.opera?document.documentElement.scrollTop:0));else
+offset.top-=(isFixed?scrollY:0);return offset;},_findPos:function(obj){while(obj&&(obj.type=='hidden'||obj.nodeType!=1)){obj=obj.nextSibling;}
+var position=jQuery(obj).offset();return[position.left,position.top];},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=jQuery.data(input,PROP_NAME)))
+return;var rangeSelect=this._get(inst,'rangeSelect');if(rangeSelect&&inst.stayOpen)
+this._selectDate('#'+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,'duration'));var showAnim=this._get(inst,'showAnim');var postProcess=function(){jQuery.datepicker._tidyDialog(inst);};if(duration!=''&&jQuery.effects&&jQuery.effects[showAnim])
+inst.dpDiv.hide(showAnim,jQuery.datepicker._get(inst,'showOptions'),duration,postProcess);else
+inst.dpDiv[(duration==''?'hide':(showAnim=='slideDown'?'slideUp':(showAnim=='fadeIn'?'fadeOut':'hide')))](duration,postProcess);if(duration=='')
+this._tidyDialog(inst);var onClose=this._get(inst,'onClose');if(onClose)
+onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():''),inst]);this._datepickerShowing=false;this._lastInput=null;inst.settings.prompt=null;if(this._inDialog){this._dialogInput.css({position:'absolute',left:'0',top:'-100px'});if(jQuery.blockUI){jQuery.unblockUI();jQuery('body').append(this.dpDiv);}}
+this._inDialog=false;}
+this._curInst=null;},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker');jQuery('.'+this._promptClass,inst.dpDiv).remove();},_checkExternalClick:function(event){if(!jQuery.datepicker._curInst)
+return;var jQuerytarget=jQuery(event.target);if((jQuerytarget.parents('#'+jQuery.datepicker._mainDivId).length==0)&&!jQuerytarget.hasClass(jQuery.datepicker.markerClassName)&&!jQuerytarget.hasClass(jQuery.datepicker._triggerClass)&&jQuery.datepicker._datepickerShowing&&!(jQuery.datepicker._inDialog&&jQuery.blockUI))
+jQuery.datepicker._hideDatepicker(null,'');},_adjustDate:function(id,offset,period){var target=jQuery(id);var inst=this._getInst(target[0]);this._adjustInstDate(inst,offset,period);this._updateDatepicker(inst);},_gotoToday:function(id){var target=jQuery(id);var inst=this._getInst(target[0]);if(this._get(inst,'gotoCurrent')&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear;}
+else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();}
+this._notifyChange(inst);this._adjustDate(target);},_selectMonthYear:function(id,select,period){var target=jQuery(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst['selected'+(period=='M'?'Month':'Year')]=inst['draw'+(period=='M'?'Month':'Year')]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target);},_clickMonthYear:function(id){var target=jQuery(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!jQuery.browser.msie)
+inst.input[0].focus();inst._selectingMonthYear=!inst._selectingMonthYear;},_changeFirstDay:function(id,day){var target=jQuery(id);var inst=this._getInst(target[0]);inst.settings.firstDay=day;this._updateDatepicker(inst);},_selectDay:function(id,month,year,td){if(jQuery(td).hasClass(this._unselectableClass))
+return;var target=jQuery(id);var inst=this._getInst(target[0]);var rangeSelect=this._get(inst,'rangeSelect');if(rangeSelect){inst.stayOpen=!inst.stayOpen;if(inst.stayOpen){jQuery('.ui-datepicker td',inst.dpDiv).removeClass(this._currentClass);jQuery(td).addClass(this._currentClass);}}
+inst.selectedDay=inst.currentDay=jQuery('a',td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null;}
+else if(rangeSelect){inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear;}
+this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=new Date(inst.currentYear,inst.currentMonth,inst.currentDay);this._updateDatepicker(inst);}
+else if(rangeSelect){inst.selectedDay=inst.currentDay=inst.rangeStart.getDate();inst.selectedMonth=inst.currentMonth=inst.rangeStart.getMonth();inst.selectedYear=inst.currentYear=inst.rangeStart.getFullYear();inst.rangeStart=null;if(inst.inline)
+this._updateDatepicker(inst);}},_clearDate:function(id){var target=jQuery(id);var inst=this._getInst(target[0]);if(this._get(inst,'mandatory'))
+return;inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,'');},_selectDate:function(id,dateStr){var target=jQuery(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(this._get(inst,'rangeSelect')&&dateStr)
+dateStr=(inst.rangeStart?this._formatDate(inst,inst.rangeStart):dateStr)+this._get(inst,'rangeSeparator')+dateStr;if(inst.input)
+inst.input.val(dateStr);this._updateAlternate(inst);var onSelect=this._get(inst,'onSelect');if(onSelect)
+onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);else if(inst.input)
+inst.input.trigger('change');if(inst.inline)
+this._updateDatepicker(inst);else if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,'duration'));this._lastInput=inst.input[0];if(typeof(inst.input[0])!='object')
+inst.input[0].focus();this._lastInput=null;}},_updateAlternate:function(inst){var altField=this._get(inst,'altField');if(altField){var altFormat=this._get(inst,'altFormat');var date=this._getDate(inst);dateStr=(isArray(date)?(!date[0]&&!date[1]?'':this.formatDate(altFormat,date[0],this._getFormatConfig(inst))+
+this._get(inst,'rangeSeparator')+this.formatDate(altFormat,date[1]||date[0],this._getFormatConfig(inst))):this.formatDate(altFormat,date,this._getFormatConfig(inst)));jQuery(altField).each(function(){jQuery(this).val(dateStr);});}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),''];},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate(),(date.getTimezoneOffset()/-60));var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return jQuery.datepicker.iso8601Week(checkDate);}else if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1;}}
+return Math.floor(((checkDate-firstMon)/86400000)/7)+1;},dateStatus:function(date,inst){return jQuery.datepicker.formatDate(jQuery.datepicker._get(inst,'dateStatus'),date,jQuery.datepicker._getFormatConfig(inst));},parseDate:function(format,value,settings){if(format==null||value==null)
+throw'Invalid arguments';value=(typeof value=='object'?value.toString():value+'');if(value=='')
+return null;var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches)
+iFormat++;return matches;};var getNumber=function(match){lookAhead(match);var origSize=(match=='@'?14:(match=='y'?4:(match=='o'?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>='0'&&value.charAt(iValue)<='9'){num=num*10+parseInt(value.charAt(iValue++),10);size--;}
+if(size==origSize)
+throw'Missing number at position '+iValue;return num;};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++)
+size=Math.max(size,names[j].length);var name='';var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++)
+if(name==names[i])
+return i+1;size--;}
+throw'Unknown name at position '+iInit;};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat))
+throw'Unexpected literal at position '+iValue;iValue++;};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal)
+if(format.charAt(iFormat)=="'"&&!lookAhead("'"))
+literal=false;else
+checkLiteral();else
+switch(format.charAt(iFormat)){case'd':day=getNumber('d');break;case'D':getName('D',dayNamesShort,dayNames);break;case'o':doy=getNumber('o');break;case'm':month=getNumber('m');break;case'M':month=getName('M',monthNamesShort,monthNames);break;case'y':year=getNumber('y');break;case'@':var date=new Date(getNumber('@'));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'"))
+checkLiteral();else
+literal=true;break;default:checkLiteral();}}
+if(year<100)
+year+=new Date().getFullYear()-new Date().getFullYear()%100+
+(year<=shortYearCutoff?0:-100);if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim)
+break;month++;day-=dim;}while(true);}
+var date=new Date(year,month-1,day);if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day)
+throw'Invalid date';return date;},ATOM:'yy-mm-dd',COOKIE:'D, dd M yy',ISO_8601:'yy-mm-dd',RFC_822:'D, d M y',RFC_850:'DD, dd-M-y',RFC_1036:'D, d M y',RFC_1123:'D, d M yy',RFC_2822:'D, d M yy',RSS:'D, d M y',TIMESTAMP:'@',W3C:'yy-mm-dd',formatDate:function(format,date,settings){if(!date)
+return'';var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches)
+iFormat++;return matches;};var formatNumber=function(match,value,len){var num=''+value;if(lookAhead(match))
+while(num.length<len)
+num='0'+num;return num;};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value]);};var output='';var literal=false;if(date)
+for(var iFormat=0;iFormat<format.length;iFormat++){if(literal)
+if(format.charAt(iFormat)=="'"&&!lookAhead("'"))
+literal=false;else
+output+=format.charAt(iFormat);else
+switch(format.charAt(iFormat)){case'd':output+=formatNumber('d',date.getDate(),2);break;case'D':output+=formatName('D',date.getDay(),dayNamesShort,dayNames);break;case'o':var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--)
+doy+=this._getDaysInMonth(date.getFullYear(),m);output+=formatNumber('o',doy,3);break;case'm':output+=formatNumber('m',date.getMonth()+1,2);break;case'M':output+=formatName('M',date.getMonth(),monthNamesShort,monthNames);break;case'y':output+=(lookAhead('y')?date.getFullYear():(date.getYear()%100<10?'0':'')+date.getYear()%100);break;case'@':output+=date.getTime();break;case"'":if(lookAhead("'"))
+output+="'";else
+literal=true;break;default:output+=format.charAt(iFormat);}}
+return output;},_possibleChars:function(format){var chars='';var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++)
+if(literal)
+if(format.charAt(iFormat)=="'"&&!lookAhead("'"))
+literal=false;else
+chars+=format.charAt(iFormat);else
+switch(format.charAt(iFormat)){case'd':case'm':case'y':case'@':chars+='0123456789';break;case'D':case'M':return null;case"'":if(lookAhead("'"))
+chars+="'";else
+literal=true;break;default:chars+=format.charAt(iFormat);}
+return chars;},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name];},_setDateFromField:function(inst){var dateFormat=this._get(inst,'dateFormat');var dates=inst.input?inst.input.val().split(this._get(inst,'rangeSeparator')):null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);if(dates.length>0){var settings=this._getFormatConfig(inst);if(dates.length>1){date=this.parseDate(dateFor

<TRUNCATED>

[04/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-active.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-active.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-active.png
new file mode 100644
index 0000000..fa58c50
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-active.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-disabled.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-disabled.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-disabled.png
new file mode 100644
index 0000000..0a6a82c
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-disabled.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-focus.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-focus.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-focus.png
new file mode 100644
index 0000000..167d71e
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-focus.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-hover.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-hover.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-hover.png
new file mode 100644
index 0000000..167d71e
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow-hover.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow.png
new file mode 100644
index 0000000..b33a93f
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/split-button-arrow.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/sprite.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/sprite.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/sprite.png
new file mode 100644
index 0000000..73634d6
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/sprite.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/tabview.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/tabview.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/tabview.css
new file mode 100644
index 0000000..ece4ebd
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/tabview.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 0.5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 0.5em;}.yui-navset .yui-content .yui-hidden{display:none;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto;}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em;}.yui-navset-right{padding:0 6em 0 0;}.yui-navset-top,.yui-navset-bottom{padding:auto;}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none;}.yui-navset li em{font-style:normal;}.yui-navset{position:relative;zoom:1;}.yui-navset .yui-content{zoom:1;}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1;}.yui-
 navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block;}.yui-navset .yui-nav a{position:relative;}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1;}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block;}.yui-navset-bottom .yui-nav li a{vertical-align:text-top;}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static;}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto;}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto;}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{
 border:solid #2647a0;border-width:0 0 5px;Xposition:relative;zoom:1;}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 0.16em 0 0;padding:1px 0 0;zoom:1;}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 0.16em -1px 0;}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none;}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;cursor:hand;padding:0.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;colo
 r:#fff;}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0;}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:0.35em 0.75em;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356;}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff;}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:0.25em 0.5em;}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0;}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px;}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam
  .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 0.16em;padding:0 0 0 1px;}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0;}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px 0.16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 0.16em -1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0;}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:0.2em .75em;top:auto;left:-1px;}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-ski
 n-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none;}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356;}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px 0.16em 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li a,.yui-skin-sam .yui-navset-bottom .yui-nav li a{}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:
 auto;bottom:-1px;}.yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356;}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/treeview-loading.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/treeview-loading.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/treeview-loading.gif
new file mode 100644
index 0000000..0bbf3bc
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/treeview-loading.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/treeview-sprite.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/treeview-sprite.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/treeview-sprite.gif
new file mode 100644
index 0000000..8fb3f01
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/treeview-sprite.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/treeview.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/treeview.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/treeview.css
new file mode 100644
index 0000000..5798ff7
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/treeview.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.ygtvitem{}.ygtvitem table{margin-bottom:0;border:none;}.ygtvrow td{border:none;padding:0;}.ygtvrow td a{text-decoration:none;}.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh,.ygtvtmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph,.ygtvtphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh,.ygtvlmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;ba
 ckground:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvchildren{}* html .ygtvchildren{height:2%;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;cursor:pointer;}.ygtvcontent{cursor:default;}.ygtvspacer{height:22px;width:12px;}.ygtvfocus{background-color:#c0e0e0;border:none;}.ygtvfocus .ygtvlabel,.ygtvfocus .ygtvlabel:link,.ygtvfocus .ygtvlabel:visited,.ygtvfocus .ygtvlabel:hover{background-color:#c0e0e0;}.ygtvfocus a,.ygtvrow td a{outline-style:none;}.ygtvok{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8800px no-repeat;}.ygtvok:hover{background:url(tree
 view-sprite.gif) 0 -8844px no-repeat;}.ygtvcancel{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8822px no-repeat;}.ygtvcancel:hover{background:url(treeview-sprite.gif) 0 -8866px no-repeat;}.ygtv-label-editor{background-color:#f2f2f2;border:1px solid silver;position:absolute;display:none;overflow:hidden;margin:auto;z-index:9000;}.ygtv-edit-TextNode{width:190px;}.ygtv-edit-TextNode .ygtvcancel,.ygtv-edit-TextNode .ygtvok{border:none;}.ygtv-edit-TextNode .ygtv-button-container{float:right;}.ygtv-edit-TextNode .ygtv-input input{width:140px;}.ygtv-edit-DateNode .ygtvcancel{border:none;}.ygtv-edit-DateNode .ygtvok{display:none;}.ygtv-edit-DateNode .ygtv-button-container{text-align:right;margin:auto;}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/yuitest.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/yuitest.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/yuitest.css
new file mode 100644
index 0000000..85d776e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/yuitest.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/README
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/README b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/README
new file mode 100644
index 0000000..e56bf80
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/README
@@ -0,0 +1,212 @@
+AutoComplete Release Notes
+
+*** version 2.6.0 ***
+
+* AutoComplete has a new required dependency on YAHOO.util.DataSource,
+and the class YAHOO.widget.DataSource has been deprecated. As a result,
+the following YAHOO.widget.DataSource properties have been ported to YAHOO.widget.AutoComplete:
+   - queryMatchCase
+   - queryMatchContains
+   - queryMatchSubset
+
+* The following YAHOO.widget.DS_XHR properties have been deprecated in favor of
+the new customizeable YAHOO.widget.AutoComplete method generateRequest:
+   - scriptQueryParam
+   - scriptQueryAppend
+
+* The YAHOO.widget.DS_XHR property responseStripAfter has been deprecated in favor
+of the new customizeable YAHOO.util.DataSource method doBeforeParseData.
+
+* Now always fires either dataReturnEvent or dataErrorEvent upon a DataSource
+response, whether container opens or not due to instance losing focus. 
+
+* Added textboxChangeEvent and containerPopulateEvent Custom Events.
+
+* As a convenience, the formatResult() method now receives a third parameter which
+is the query matching string for the result.
+
+* In order to eliminate certain race conditions with the typeAhead feature, added
+typeAheadDelay of default 0.5.
+
+* Added new method filterResults() for an easily customizeable local string-
+matching algorithm.
+
+* The dataRequestEvent now passes along the request as well as the query string.
+ 
+* The style list-style:none has been set in the default CSS.
+
+
+*** version 2.5.2 ***
+
+* Empty responses of TYPE_FLAT no longer open empty container.
+
+* Mac FF no longer submits form on enter-to-select suggestion.
+
+
+
+*** version 2.5.1 ***
+
+* No changes.
+
+
+
+*** version 2.5.0 ***
+
+* Fixed bug where Mac users were not able to input "&" or "(" characters.
+
+
+
+*** version 2.4.0 ***
+
+* Support for YUI JSON Utility.
+
+* The allowBrowserAutocomplete property now supports cases when the user navigates
+away from page via mean other than a form submission.
+
+* Added support for integration with the Get Utility, for proxyless data
+retrieval from dynamically loaded script nodes.
+
+* Typing 'Enter' to select item no longer causes automatic form submission on
+Mac browsers.
+
+
+
+*** version 2.3.1 ***
+
+* AutoComplete no longer throw a JavaScript error due to an invalid or
+non-existent parent container. While a wrapper DIV element is still expected in
+order to enable skinning (see 2.3.0 release note), a lack of such will not
+cause an error.
+
+* When suggestion container is collapsed, Mac users no longer need to type
+Enter twice to submit input.
+
+
+
+*** version 2.3.0 ***
+
+* Applied new skinning model. Please note that in order to enable skinning,
+AutoComplete now expects a wrapper DIV element around the INPUT element and the
+container DIV element, in this fashion:
+
+<div id="myAutoComplete">
+    <input type="text" id="myInput">
+    <div id="myContainer"></div>
+</div>
+
+* The default queryDelay value has been changed to 0.2. In low-latency
+implementations (e.g., when queryDelay is set to 0 against a local
+JavaScript DataSource), typeAhead functionality may experience a race condition
+when retrieving the value of the textbox. To avoid this problem, implementers
+are advised not to set the queryDelay value too low.
+
+* Fixed runtime property value validation.
+
+* Implemented new method doBeforeSendQuery().
+
+* Implemented new method destroy().
+
+* Added support for latest JSON lib http://www.json.org/json.js.
+
+* Fixed forceSelection issues with matched selections and multiple selections.
+
+* No longer create var oAnim in global scope.
+
+* The properties alwaysShowContainer and useShadow should not be enabled together.
+
+* There is a known issue in Firefox where the native browser autocomplete
+attribute cannot be disabled programmatically on input boxes that are in use.
+
+
+
+
+
+**** version 2.2.2 ***
+
+* No changes.
+
+
+
+*** version 2.2.1 ***
+
+* Fixed form submission in Safari bug.
+* Fixed broken DS_JSArray support for minQueryLength=0.
+* Improved type checking with YAHOO.lang.
+
+
+
+*** version 2.2.0 ***
+
+* No changes.
+
+
+
+*** version 0.12.2 ***
+
+* No changes.
+
+
+
+*** version 0.12.1 ***
+
+* No longer trigger typeAhead feature when user is backspacing on input text.
+
+
+
+*** version 0.12.0 ***
+
+* The following constants must be defined as static class properties and are no longer
+available as instance properties:
+
+YAHOO.widget.DataSource.ERROR_DATANULL
+YAHOO.widget.DataSource.ERROR_DATAPARSE
+YAHOO.widget.DS_XHR.TYPE_JSON
+YAHOO.widget.DS_XHR.TYPE_XML
+YAHOO.widget.DS_XHR.TYPE_FLAT
+YAHOO.widget.DS_XHR.ERROR_DATAXHR
+
+* The property minQueryLength now supports zero and negative number values for
+DS_JSFunction and DS_XHR objects, to enable null or empty string queries and to disable
+AutoComplete functionality altogether, respectively.
+
+* Enabling the alwaysShowContainer feature will no longer send containerExpandEvent or
+containerCollapseEvent.
+
+
+
+**** version 0.11.3 ***
+
+* The iFrameSrc property has been deprecated. Implementers no longer need to
+specify an https URL to avoid IE security warnings when working with sites over
+SSL.
+
+
+
+*** version 0.11.0 ***
+
+* The method getListIds() has been deprecated for getListItems(), which returns
+an array of DOM references.
+
+* All classnames have been prefixed with "yui-ac-".
+
+* Container elements should no longer have CSS property "display" set to "none".
+
+* The useIFrame property can now be set after instantiation.
+
+* On some browsers, the unmatchedItemSelectEvent may not be fired properly when
+delimiter characters are defined.
+
+* On some browsers, defining delimiter characters while enabling forceSelection
+may result in unexpected behavior.
+
+
+
+*** version 0.10.0 ***
+
+* Initial release
+
+* In order to enable the useIFrame property, it should be set in the
+constructor.
+
+* On some browsers, defining delimiter characters while enabling forceSelection
+may result in unexpected behavior.

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/assets/autocomplete-core.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/assets/autocomplete-core.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/assets/autocomplete-core.css
new file mode 100644
index 0000000..5ebab9a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/assets/autocomplete-core.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+/* This file intentionally left blank */

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/assets/skins/sam/autocomplete-skin.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/assets/skins/sam/autocomplete-skin.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/assets/skins/sam/autocomplete-skin.css
new file mode 100644
index 0000000..c559bff
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/assets/skins/sam/autocomplete-skin.css
@@ -0,0 +1,57 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+/* styles for entire widget */
+.yui-skin-sam .yui-ac {
+    position:relative;font-family:arial;font-size:100%;
+}
+
+/* styles for input field */
+.yui-skin-sam .yui-ac-input {
+    position:absolute;width:100%;
+}
+
+/* styles for results container */
+.yui-skin-sam .yui-ac-container {
+    position:absolute;top:1.6em;width:100%;
+}
+
+/* styles for header/body/footer wrapper within container */
+.yui-skin-sam .yui-ac-content {
+    position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;
+}
+
+/* styles for container shadow */
+.yui-skin-sam .yui-ac-shadow {
+    position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity: 0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;
+}
+
+/* styles for container iframe */
+.yui-skin-sam .yui-ac iframe {
+    opacity:0;filter: alpha(opacity=0);
+    padding-right:.3em; padding-bottom:.3em; /* Bug 2026798: extend iframe to shim the shadow */
+}
+
+/* styles for results list */
+.yui-skin-sam .yui-ac-content ul{
+    margin:0;padding:0;width:100%;
+}
+
+/* styles for result item */
+.yui-skin-sam .yui-ac-content li {
+    margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;
+    zoom:1; /* For IE to trigger mouse events on LI */
+}
+
+/* styles for prehighlighted result item */
+.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight {
+    background:#B3D4FF;
+}
+
+/* styles for highlighted result item */
+.yui-skin-sam .yui-ac-content li.yui-ac-highlight {
+    background:#426FD9;color:#FFF;
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/assets/skins/sam/autocomplete.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/assets/skins/sam/autocomplete.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/assets/skins/sam/autocomplete.css
new file mode 100644
index 0000000..82cf7e5
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/assets/skins/sam/autocomplete.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;}


[45/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/Report.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/Report.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/Report.java
new file mode 100644
index 0000000..efcb8e8
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/Report.java
@@ -0,0 +1,131 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui.taglibs;
+
+import org.wso2.carbon.ui.CarbonUIUtil;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.BodyTagSupport;
+import java.io.IOException;
+
+/**
+ * used to generate reporting UI
+ */
+public class Report extends BodyTagSupport {
+
+    private String component;
+    private String template;
+    private boolean pdfReport;
+    private boolean htmlReport;
+    private boolean excelReport;
+    private String reportDataSession;
+
+    public String getReportDataSession() {
+        return reportDataSession;
+    }
+
+    public void setReportDataSession(String reportDataSession) {
+        this.reportDataSession = reportDataSession;
+    }
+
+
+
+
+    public String getComponent() {
+        return component;
+    }
+
+    public void setComponent(String component) {
+        this.component = component;
+    }
+
+    public String getTemplate() {
+        return template;
+    }
+
+    public void setTemplate(String template) {
+        this.template = template;
+    }
+
+    public boolean isPdfReport() {
+        return pdfReport;
+    }
+
+    public void setPdfReport(boolean pdfReport) {
+        this.pdfReport = pdfReport;
+    }
+
+    public boolean isHtmlReport() {
+        return htmlReport;
+    }
+
+    public void setHtmlReport(boolean htmlReport) {
+        this.htmlReport = htmlReport;
+    }
+
+    public boolean isExcelReport() {
+        return excelReport;
+    }
+
+    public void setExcelReport(boolean excelReport) {
+        this.excelReport = excelReport;
+    }
+
+
+    public int doStartTag() throws JspException {
+        //check permission.
+        HttpServletRequest req = (HttpServletRequest)
+                pageContext.getRequest();
+        if(!CarbonUIUtil.isUserAuthorized(req, "/permission/admin/manage/report")){
+          return EVAL_PAGE;
+        }
+        JspWriter writer = pageContext.getOut();
+
+        String context = "<div style='float:right;padding-bottom:5px;padding-right:15px;'>";
+
+        if(pdfReport){
+           context  = context+ "<a target='_blank' class='icon-link' style='background-image:url(../admin/images/pdficon.gif);' href=\"../report" + "?" +"reportDataSession="+ reportDataSession + "&component=" + component + "&template=" + template + "&type=pdf" +  "\">Generate Pdf Report</a>";
+        }
+        if(htmlReport){
+            context  = context+ "<a target='_blank' class='icon-link' style='background-image:url(../admin/images/htmlicon.gif);' href=\"../report" + "?" + "reportDataSession="+ reportDataSession + "&component=" + component + "&template=" + template + "&type=html" + "\">Generate Html Report</a>";
+
+        }
+        if(excelReport){
+            context  = context+ "<a target='_blank' class='icon-link' style='background-image:url(../admin/images/excelicon.gif);' href=\"../report" + "?" + "reportDataSession="+ reportDataSession + "&component=" + component + "&template=" + template + "&type=excel" +"\">Generate Excel Report</a>";
+
+        }
+        context  = context + "</div><div style='clear:both;'></div>";
+
+        try {
+            writer.write(context);
+        } catch (IOException e) {
+            String msg = "Cannot write reporting tag content";
+
+            throw new JspException(msg, e);
+        }
+        return EVAL_PAGE;
+
+
+    }
+}
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/ResourcePaginator.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/ResourcePaginator.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/ResourcePaginator.java
new file mode 100644
index 0000000..efa19b1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/ResourcePaginator.java
@@ -0,0 +1,202 @@
+/*
+ *  Copyright (c) 2005-2009, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ *
+ */
+package org.wso2.carbon.ui.taglibs;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.ui.CarbonUIUtil;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import java.io.IOException;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+public class ResourcePaginator extends Paginator {
+
+    private static final String END = "end";
+
+	private static final String MIDDLE = "middle";
+
+	private static final String START = "start";
+
+	private static final Log log = LogFactory.getLog(ResourcePaginator.class);
+
+    private String paginationFunction = null;
+    private int tdColSpan = 0;
+
+    public String getPaginationFunction() {
+        return paginationFunction;
+    }
+
+    public void setPaginationFunction(String paginationFunction) {
+        this.paginationFunction = paginationFunction;
+    }
+
+    public int getTdColSpan() {
+        return tdColSpan;
+    }
+
+    public void setTdColSpan(int tdColSpan) {
+        this.tdColSpan = tdColSpan;
+    }
+
+    public int doEndTag() throws JspException {
+        if (getNumberOfPages() < 2) {
+            // Pagination is not required.
+            return 0;
+        }
+        String next = "Next";
+        String prev = "Prev";
+        String pageName = "Page {0}";
+        if (getResourceBundle() != null) {
+            try {
+                Locale locale = JSi18n.getLocaleFromPageContext(pageContext);
+                ResourceBundle bundle = ResourceBundle.getBundle(getResourceBundle(),locale);
+                next = bundle.getString(getNextKey());
+                prev = bundle.getString(getPrevKey());
+            } catch (Exception e) {
+                log.warn("Error while i18ning paginator", e);
+            }
+        }
+
+        JspWriter writer = pageContext.getOut();
+
+        StringBuffer content = new StringBuffer("<tr><td ");
+        if (tdColSpan > 0) {
+            content.append("colspan=\"").append(tdColSpan).append("\" ");
+        }
+        content.append("class=\"pagingRow\" style=\"text-align:center;padding-top:10px; padding-bottom:10px;\">");
+
+        if (getPageNumber() == 1) {
+            content.append("<span class=\"disableLink\">< ").append(prev).append("</span>");
+        } else {
+            content.append("<a class=\"pageLinks\" title=\"").append(pageName.replace("{0}",
+                    Integer.toString(getPageNumber() - 1))).append("\"");
+            if (getPaginationFunction() != null) {
+                content.append("onclick=\"").append(getPaginationFunction().replace("{0}",
+                        Integer.toString(getPageNumber() - 1))).append("\"");
+            }
+            content.append(">< ").append(prev).append("</a>");
+        }
+        if (getNumberOfPages() <= 10) {
+            for (int pageItem = 1; pageItem <= getNumberOfPages(); pageItem++) {
+                content.append("<a title=\"").append(pageName.replace("{0}",
+                    Integer.toString(pageItem))).append("\" class=\"");
+                if (getPageNumber()==pageItem) {
+                    content.append("pageLinks-selected\"");
+                } else {
+                    content.append("pageLinks\"");
+                }
+                if (getPaginationFunction() != null) {
+                    content.append("onclick=\"").append(getPaginationFunction().replace("{0}",
+                            Integer.toString(pageItem))).append("\"");
+                }
+                content.append(">").append(pageItem).append("</a>");
+            }
+        } else {
+            // FIXME: The equals comparisons below looks buggy. Need to test whether the desired
+            // behaviour is met, when there are more than ten pages.
+            String place = MIDDLE;
+            int pageItemFrom = getPageNumber() - 2;
+            int pageItemTo = getPageNumber() + 2;
+
+            if (getNumberOfPages() - getPageNumber() <= 5) {
+            	place = END;
+            }
+            if (getPageNumber() <= 5) {
+            	place = START;
+            }
+
+            if (START.equals(place)) {
+                pageItemFrom = 1;
+                pageItemTo = 7;
+            }
+            if (END.equals(place)) {
+                pageItemFrom = getNumberOfPages() - 7;
+                pageItemTo = getNumberOfPages();
+            }
+
+            if (END.equals(place)  || MIDDLE.equals(place)) {
+                for (int pageItem = 1; pageItem <= 2; pageItem++) {
+                    content.append("<a title=\"").append(pageName.replace("{0}",
+                            Integer.toString(pageItem))).append("\" class=\"pageLinks\"");
+                    if (getPaginationFunction() != null) {
+                        content.append("onclick=\"").append(getPaginationFunction().replace("{0}",
+                                Integer.toString(pageItem))).append("\"");
+                    }
+                    content.append(">").append(pageItem).append("</a>");
+                }
+                content.append("...");
+            }
+
+            for (int pageItem = pageItemFrom; pageItem <= pageItemTo; pageItem++) {
+                content.append("<a title=\"").append(pageName.replace("{0}",
+                    Integer.toString(pageItem))).append("\" class=\"");
+                if (getPageNumber()==pageItem) {
+                    content.append("pageLinks-selected\"");
+                } else {
+                    content.append("pageLinks\"");
+                }
+                if (getPaginationFunction() != null) {
+                    content.append("onclick=\"").append(getPaginationFunction().replace("{0}",
+                            Integer.toString(pageItem))).append("\"");
+                }
+                content.append(">").append(pageItem).append("</a>");
+            }
+
+            if (START.equals(place) || MIDDLE.equals(place)) {
+                content.append("...");
+                for (int pageItem = (getNumberOfPages() - 1); pageItem <= getNumberOfPages(); pageItem++) {
+
+                    content.append("<a title=\"").append(pageName.replace("{0}",
+                            Integer.toString(pageItem))).append("\" class=\"pageLinks\"");
+                    if (getPaginationFunction() != null) {
+                        content.append("onclick=\"").append(getPaginationFunction().replace("{0}",
+                                Integer.toString(pageItem))).append("\"");
+                    }
+                    content.append("style=\"margin-left:5px;margin-right:5px;\">").append(
+                            pageItem).append("</a>");
+                }
+            }
+        }
+        if (getPageNumber() == getNumberOfPages()) {
+           content.append("<span class=\"disableLink\">").append(next).append(" ></span>");
+        } else {
+            content.append("<a class=\"pageLinks\" title=\"").append(pageName.replace("{0}",
+                    Integer.toString(getPageNumber() + 1))).append("\"");
+            if (getPaginationFunction() != null) {
+                content.append("onclick=\"").append(getPaginationFunction().replace("{0}",
+                        Integer.toString(getPageNumber() + 1))).append("\"");
+            }
+            content.append(">").append(next).append(" ></a>");
+        }
+        content.append("<span id=\"xx").append(getPageNumber()).append(
+                "\" style=\"display:none\" /></td></tr>");
+        try {
+            writer.write(content.toString());
+        } catch (IOException e) {
+            String msg = "Cannot write paginator tag content";
+            log.error(msg, e);
+            throw new JspException(msg, e);
+        }
+        return 0;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/SimpleItemGroupSelector.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/SimpleItemGroupSelector.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/SimpleItemGroupSelector.java
new file mode 100644
index 0000000..0ec97f7
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/SimpleItemGroupSelector.java
@@ -0,0 +1,113 @@
+/*                                                                             
+ * Copyright 2004,2005 The Apache Software Foundation.                         
+ *                                                                             
+ * Licensed under the Apache License, Version 2.0 (the "License");             
+ * you may not use this file except in compliance with the License.            
+ * You may obtain a copy of the License at                                     
+ *                                                                             
+ *      http://www.apache.org/licenses/LICENSE-2.0                             
+ *                                                                             
+ * Unless required by applicable law or agreed to in writing, software         
+ * distributed under the License is distributed on an "AS IS" BASIS,           
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    
+ * See the License for the specific language governing permissions and         
+ * limitations under the License.                                              
+ */
+package org.wso2.carbon.ui.taglibs;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.ui.CarbonUIUtil;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.BodyTagSupport;
+import java.io.IOException;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+/**
+ * A tag for selecting & deselecting a group of items. This does not have any fancy functionality
+ * like {@link org.wso2.carbon.ui.taglibs.ItemGroupSelector}. It simply select & deselect a group
+ * of items.
+ */
+public class SimpleItemGroupSelector extends BodyTagSupport {
+
+    private static final Log log = LogFactory.getLog(SimpleItemGroupSelector.class);
+    protected String selectAllFunction;
+    protected String selectNoneFunction;
+    protected String selectAllKey;
+    protected String selectNoneKey;
+    protected String resourceBundle;
+
+    public String getResourceBundle() {
+        return resourceBundle;
+    }
+
+    public void setResourceBundle(String resourceBundle) {
+        this.resourceBundle = resourceBundle;
+    }
+
+    public String getSelectAllFunction() {
+        return selectAllFunction;
+    }
+
+    public void setSelectAllFunction(String selectAllFunction) {
+        this.selectAllFunction = selectAllFunction;
+    }
+
+    public String getSelectNoneFunction() {
+        return selectNoneFunction;
+    }
+
+    public void setSelectNoneFunction(String selectNoneFunction) {
+        this.selectNoneFunction = selectNoneFunction;
+    }
+
+    public String getSelectAllKey() {
+        return selectAllKey;
+    }
+
+    public void setSelectAllKey(String selectAllKey) {
+        this.selectAllKey = selectAllKey;
+    }
+
+    public String getSelectNoneKey() {
+        return selectNoneKey;
+    }
+
+    public void setSelectNoneKey(String selectNoneKey) {
+        this.selectNoneKey = selectNoneKey;
+    }
+
+    public int doEndTag() throws JspException {
+        String selectAll = "Select all in all pages";
+        String selectNone = "Select none";
+        if (resourceBundle != null) {
+            try {
+                Locale locale = JSi18n.getLocaleFromPageContext(pageContext);
+                ResourceBundle bundle = ResourceBundle.getBundle(resourceBundle,locale);
+                selectAll = bundle.getString(selectAllKey);
+                selectNone = bundle.getString(selectNoneKey);
+            } catch (Exception e) {
+                log.warn("Error while i18ning SimpleItemGroupSelector", e);
+            }
+        }
+
+        JspWriter writer = pageContext.getOut();
+
+        String content = "<a href=\"#\" onclick=\"" +
+                         selectAllFunction + ";return false;\"  " +
+                         "style=\"cursor:pointer\">" + selectAll + "</a>&nbsp<b>|</b>&nbsp;" +
+                         "<a href=\"#\" onclick=\"" + selectNoneFunction + ";return false;\"  " +
+                         "style=\"cursor:pointer\">" + selectNone + "</a>";
+        try {
+            writer.write(content);
+        } catch (IOException e) {
+            String msg = "Cannot write SimpleItemGroupSelector tag content";
+            log.error(msg, e);
+            throw new JspException(msg, e);
+        }
+        return 0;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/TooltipsGenerator.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/TooltipsGenerator.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/TooltipsGenerator.java
new file mode 100644
index 0000000..59a28a9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/taglibs/TooltipsGenerator.java
@@ -0,0 +1,214 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.wso2.carbon.ui.taglibs;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.taglibs.standard.tag.common.fmt.BundleSupport;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.jstl.fmt.LocalizationContext;
+import javax.servlet.jsp.tagext.BodyTagSupport;
+import javax.servlet.jsp.tagext.Tag;
+import java.io.IOException;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+/**
+ * This Tag Handler class is used to add a tooltips for a image.
+ */
+public class TooltipsGenerator extends BodyTagSupport {
+
+    private static final Log log = LogFactory.getLog(TooltipsGenerator.class);
+    //image location. tooltips appears when mouse over on this image.
+    private String image;
+
+    //tooltips body content.
+    private String description;
+
+    //no of words in a single line. this use to design the tooltips body. default value has set to 10.
+    private int noOfWordsPerLine = 10;
+
+    //resource bundle name.
+    private String resourceBundle;
+
+    //element in resource file.
+    private String key;
+
+    public String getImage() {
+        return image;
+    }
+
+    public void setImage(String image) {
+        this.image = image;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public int getNoOfWordsPerLine() {
+        return noOfWordsPerLine;
+    }
+
+    public void setNoOfWordsPerLine(int noOfWordsPerLine) {
+        this.noOfWordsPerLine = noOfWordsPerLine;
+    }
+
+    public String getResourceBundle() {
+        return this.resourceBundle;
+    }
+
+    public void setResourceBundle(String resourceBundle) {
+        this.resourceBundle = resourceBundle;
+    }
+
+    public String getKey() {
+        return this.key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    /**
+     * This method is invoked when the custom end tag is encountered.
+     * The main function of this method is to add a image and display a tooltips when mouse over
+     * that image. This is done by calling the 'showTooltips' method in ../admin/js/widgets.js
+     * java script file.
+     * @return return EVAL_PAGE - continue processing the page.
+     * @throws JspException
+     */
+    public int doEndTag() throws JspException {
+        JspWriter writer = pageContext.getOut();
+        String context = "<link rel='stylesheet' type='text/css' " +
+                        "href='../yui/build/container/assets/skins/sam/container.css'>\n" +
+                        "<script type=\"text/javascript\" " +
+                        "src=\"../yui/build/yahoo-dom-event/yahoo-dom-event.js\"></script>\n" +
+                        "<script type=\"text/javascript\" " +
+                        "src=\"../yui/build/container/container-min.js\"></script>\n" +
+                        "<script type=\"text/javascript\" " +
+                        "src=\"../yui/build/element/element-min.js\"></script>\n" +
+                        "<script type=\"text/javascript\" src=\"../admin/js/widgets.js\"></script>\n";
+
+
+        if((getResourceBundle()!= null && getKey() != null) ||
+                (getResourceBundle() == null && getKey() != null)) { //create tooltips content from resource bundle.
+            context = context + "<a target='_blank' class='icon-link' " +
+                            "onmouseover=\"showTooltip(this,'" + getTooltipsContentFromKey() + "')\" " +
+                            "style='background-image:url(\"" + getImage() + "\")' ></a>";
+        }
+        else if(this.description != null) { //create the tooltips content from user given text.
+            context = context + "<a target='_blank' class='icon-link' " +
+                            "onmouseover=\"showTooltip(this,'" + createTooltipsBody(getNoOfWordsPerLine()) +
+                    "')\" " +"style='background-image:url(\"" + getImage() + "\")' ></a>";
+        }
+         
+        try {
+            writer.write(context);
+        } catch (IOException e) {
+            String msg = "Cannot write tag content";
+            throw new JspException(msg, e);
+        }
+        return EVAL_PAGE;
+    }
+
+
+
+    /**
+     * This method is used to design the tooltips content display window size.
+     * This takes the no of words that should contains in a single line as a argument.
+     * So when we create tooltips body, its size vary accordingly.
+     *
+     * @param noOfWordsPerLine no of words that should contain in single line of tooltips body.
+     * @return return the tooltips body content in displayable way in tooltips.
+     */
+    public String createTooltipsBody(int noOfWordsPerLine) {
+        String toolTipContent = getDescription();
+        if (toolTipContent != null) {
+            String[] words = toolTipContent.split(" ");
+            if (words.length > noOfWordsPerLine) {
+                int countWords = 0;
+                String descriptionNew = "";
+                for (String word : words) {
+                    if (countWords != noOfWordsPerLine) {
+                        descriptionNew = descriptionNew + " " + word;
+                        countWords++;
+                    } else {
+                        descriptionNew = descriptionNew + "<br>" + word;
+                        countWords = 0;
+                    }
+                }
+                setDescription(descriptionNew);
+            }
+        }
+        return getDescription();
+    }
+
+    /**
+     * This method is used to get the tooltips content from resource file.
+     * @return return the tooltips body content in displayable way in tooltips.
+     * @throws javax.servlet.jsp.JspException
+     */
+    public String getTooltipsContentFromKey() throws JspException {
+        String toolTipsContent;
+        ResourceBundle bundle = null;
+        try {
+            Locale locale = JSi18n.getLocaleFromPageContext(pageContext);
+            if (getResourceBundle() != null && getKey() != null) {
+                    bundle = ResourceBundle.getBundle(getResourceBundle(),locale);
+            }
+            //get the default bundle define in jsp page when only key is provided.
+            else if (getResourceBundle() == null && getKey() != null) {
+                    bundle = getCommonResourceBundleForJspPage();
+            }
+        } catch (Exception e) {
+                log.warn("Error while i18ning.", e);
+        }
+        if (bundle != null) {
+            toolTipsContent = bundle.getString(getKey());
+            setDescription(toolTipsContent);
+        }
+        return createTooltipsBody(getNoOfWordsPerLine());
+    }
+
+    /**
+     * This method is used to get the resource bundle define in a jsp page.
+     * @return return the resource bundle
+     */
+    public ResourceBundle getCommonResourceBundleForJspPage() {
+        Tag t = findAncestorWithClass(this, BundleSupport.class);
+        LocalizationContext localizationContext;
+        if (t != null) {
+            // use resource bundle from parent <bundle> tag
+            BundleSupport parent = (BundleSupport) t;
+            localizationContext = parent.getLocalizationContext();
+
+	    }  else {
+            localizationContext = BundleSupport.getLocalizationContext(pageContext);
+        }
+        return localizationContext.getResourceBundle();
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/tracker/AuthenticatorComparator.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/tracker/AuthenticatorComparator.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/tracker/AuthenticatorComparator.java
new file mode 100644
index 0000000..0d64b45
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/tracker/AuthenticatorComparator.java
@@ -0,0 +1,32 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui.tracker;
+
+import org.wso2.carbon.ui.CarbonUIAuthenticator;
+
+import java.util.Comparator;
+
+public class AuthenticatorComparator implements Comparator<CarbonUIAuthenticator>{
+
+    public int compare(CarbonUIAuthenticator o1, CarbonUIAuthenticator o2) {
+        return o2.getPriority()-o1.getPriority();
+    }
+    
+    
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/tracker/AuthenticatorRegistry.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/tracker/AuthenticatorRegistry.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/tracker/AuthenticatorRegistry.java
new file mode 100644
index 0000000..19e3570
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/tracker/AuthenticatorRegistry.java
@@ -0,0 +1,89 @@
+/*
+ *  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.wso2.carbon.ui.tracker;
+
+import java.util.Arrays;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
+import org.wso2.carbon.ui.CarbonSecuredHttpContext;
+import org.wso2.carbon.ui.CarbonUIAuthenticator;
+
+public class AuthenticatorRegistry {
+
+    private static Log log = LogFactory.getLog(AuthenticatorRegistry.class);
+    private static ServiceTracker authTracker;
+    private static CarbonUIAuthenticator[] authenticators;
+    private static Object lock = new Object();
+
+    public static final String AUTHENTICATOR_TYPE = "authenticator.type";
+
+    public static void init(BundleContext bc) throws Exception {
+        try {
+            authTracker = new ServiceTracker(bc, CarbonUIAuthenticator.class.getName(), null);
+            authTracker.open();
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            throw e;
+        }
+    }
+
+    // At the time getCarbonAuthenticator() method been invoked, all the authenticators should be
+    // registered.
+    public static CarbonUIAuthenticator getCarbonAuthenticator(HttpServletRequest request) {
+
+        HttpSession session = request.getSession();
+        CarbonUIAuthenticator authenticator;
+
+        if ((authenticator = (CarbonUIAuthenticator) session
+                .getAttribute(CarbonSecuredHttpContext.CARBON_AUTHNETICATOR)) != null) {
+            return authenticator;
+        }
+
+        if (authenticators == null || authenticators.length == 0 || authenticators[0] == null) {
+            synchronized (lock) {
+                if (authenticators == null || authenticators.length == 0
+                        || authenticators[0] == null) {
+                    Object[] objects = authTracker.getServices();
+                    // cast each object - cannot cast object array
+                    authenticators = new CarbonUIAuthenticator[objects.length];
+                    int i = 0;
+                    for (Object obj : objects) {
+                        authenticators[i] = (CarbonUIAuthenticator) obj;
+                        i++;
+                    }
+                    Arrays.sort(authenticators, new AuthenticatorComparator());
+                }
+            }
+        }
+
+        for (CarbonUIAuthenticator auth : authenticators) {
+            if (!auth.isDisabled() && auth.canHandle(request)) {
+                session.setAttribute(CarbonSecuredHttpContext.CARBON_AUTHNETICATOR, auth);
+                return auth;
+            }
+        }
+
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/FileDownloadServlet.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/FileDownloadServlet.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/FileDownloadServlet.java
new file mode 100644
index 0000000..f1f1035
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/FileDownloadServlet.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.carbon.ui.transports;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleContext;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.ui.util.FileDownloadUtil;
+import org.wso2.carbon.utils.ConfigurationContextService;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class FileDownloadServlet extends javax.servlet.http.HttpServlet {
+    private static final Log log = LogFactory.getLog(org.wso2.carbon.ui.transports.FileDownloadServlet.class);
+
+    private static final long serialVersionUID = 6074514253507510250L;
+
+    private FileDownloadUtil fileDownloadUtil;
+
+    private BundleContext context;
+
+    private ConfigurationContextService configContextService;
+
+    private ServletConfig servletConfig;
+
+    public FileDownloadServlet(BundleContext context, ConfigurationContextService configContextService) {
+        this.context = context;
+        this.configContextService = configContextService;
+    }
+
+    protected void doPost(HttpServletRequest req, HttpServletResponse res)
+            throws ServletException, IOException {
+        res.setStatus(HttpServletResponse.SC_NOT_ACCEPTABLE);
+    }
+
+    protected void doGet(HttpServletRequest req, HttpServletResponse res)
+            throws ServletException, IOException {
+        try {
+            fileDownloadUtil.acquireResource(configContextService, req, res);
+        } catch (CarbonException e) {
+            String msg = "Cannot download file";
+            log.error(msg, e);
+            throw new ServletException(e);
+        }
+    }
+
+    public void init(ServletConfig servletConfig) throws ServletException {
+        this.servletConfig = servletConfig;
+        fileDownloadUtil = new FileDownloadUtil(context);
+    }
+
+    public ServletConfig getServletConfig() {
+        return this.servletConfig;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/FileUploadServlet.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/FileUploadServlet.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/FileUploadServlet.java
new file mode 100644
index 0000000..f616ea5
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/FileUploadServlet.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.carbon.ui.transports;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleContext;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class FileUploadServlet extends javax.servlet.http.HttpServlet {
+    private static final Log log = LogFactory.getLog(org.wso2.carbon.ui.transports.FileUploadServlet.class);
+
+    private static final long serialVersionUID = 8089568022124816379L;
+
+    private FileUploadExecutorManager fileUploadExecutorManager;
+
+    private BundleContext bundleContext;
+
+    private ConfigurationContext configContext;
+
+    private String webContext;
+
+    private ServletConfig servletConfig;
+
+    public FileUploadServlet(BundleContext context, ConfigurationContext configCtx, String webContext) {
+        this.bundleContext = context;
+        this.configContext = configCtx;
+        this.webContext = webContext;
+    }
+
+    protected void doPost(HttpServletRequest request,
+                          HttpServletResponse response) throws ServletException, IOException {
+
+        try {
+            fileUploadExecutorManager.execute(request, response);
+        } catch (Exception e) {
+            String msg = "File upload failed ";
+            log.error(msg, e);
+            throw new ServletException(e);
+        }
+    }
+
+    protected void doGet(HttpServletRequest req, HttpServletResponse res)
+            throws ServletException, IOException {
+        res.setStatus(HttpServletResponse.SC_NOT_ACCEPTABLE);
+    }
+
+
+    public void init(ServletConfig servletConfig) throws ServletException {
+        this.servletConfig = servletConfig;
+        try {
+            fileUploadExecutorManager = new FileUploadExecutorManager(bundleContext, configContext, webContext);
+            //Registering FileUploadExecutor Manager as an OSGi service
+            bundleContext.registerService(FileUploadExecutorManager.class.getName(), fileUploadExecutorManager, null);
+        } catch (CarbonException e) {
+            log.error("Exception occurred while trying to initialize FileUploadServlet", e);
+            throw new ServletException(e);
+        }
+    }
+
+    public ServletConfig getServletConfig() {
+        return this.servletConfig;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/AbstractFileUploadExecutor.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/AbstractFileUploadExecutor.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/AbstractFileUploadExecutor.java
new file mode 100644
index 0000000..7514fac
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/AbstractFileUploadExecutor.java
@@ -0,0 +1,552 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui.transports.fileupload;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileItemFactory;
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.fileupload.servlet.ServletRequestContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.base.ServerConfiguration;
+import org.wso2.carbon.core.common.UploadedFileItem;
+import org.wso2.carbon.ui.CarbonUIMessage;
+import org.wso2.carbon.ui.clients.FileUploadServiceClient;
+import org.wso2.carbon.ui.internal.CarbonUIServiceComponent;
+import org.wso2.carbon.utils.CarbonUtils;
+import org.wso2.carbon.utils.FileItemData;
+import org.wso2.carbon.utils.FileManipulator;
+import org.wso2.carbon.utils.ServerConstants;
+import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
+
+import javax.activation.DataHandler;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * This class is responsible for handling File uploads of specific file types in Carbon. The file
+ * type is decided depending on the file extensio.
+ * 
+ * This class should be extended by all FileUploadExecutors
+ *
+ * @see FileUploadExecutorManager
+ */
+public abstract class AbstractFileUploadExecutor {
+
+    protected static final Log log = LogFactory.getLog(AbstractFileUploadExecutor.class);
+
+    protected ConfigurationContext configurationContext;
+
+    private ThreadLocal<Map<String, ArrayList<FileItemData>>> fileItemsMap =
+            new ThreadLocal<Map<String, ArrayList<FileItemData>>>();
+
+    private ThreadLocal<Map<String, ArrayList<String>>> formFieldsMap =
+            new ThreadLocal<Map<String, ArrayList<String>>>();
+    
+    private static final int DEFAULT_TOTAL_FILE_SIZE_LIMIT_IN_MB = 100;
+
+    public abstract boolean execute(HttpServletRequest request,
+                                    HttpServletResponse response) throws CarbonException,
+                                                                         IOException;
+
+    /**
+     * Total allowed file upload size in bytes
+     */
+    private long totalFileUploadSizeLimit;
+
+    protected AbstractFileUploadExecutor() {
+        totalFileUploadSizeLimit = getFileSizeLimit();
+    }
+
+    private long getFileSizeLimit() {
+        String totalFileSizeLimitInBytes =
+                CarbonUIServiceComponent.getServerConfiguration().
+                        getFirstProperty("FileUploadConfig.TotalFileSizeLimit");
+        return totalFileSizeLimitInBytes != null ?
+               Long.parseLong(totalFileSizeLimitInBytes) * 1024 * 1024 :
+               DEFAULT_TOTAL_FILE_SIZE_LIMIT_IN_MB * 1024 * 1024;
+    }
+
+    boolean executeGeneric(HttpServletRequest request,
+                           HttpServletResponse response,
+                           ConfigurationContext configurationContext) throws IOException {//,
+        //    CarbonException {
+        this.configurationContext = configurationContext;
+        try {
+            parseRequest(request);
+            return execute(request, response);
+        } catch (FileUploadFailedException e) {
+            sendErrorRedirect(request, response, e);
+        } catch (FileSizeLimitExceededException e) {
+            sendErrorRedirect(request, response, e);
+        } catch (CarbonException e) {
+            sendErrorRedirect(request, response, e);
+        }
+        return false;
+    }
+
+    private void sendErrorRedirect(HttpServletRequest request,
+                                   HttpServletResponse response,
+                                   Exception e) throws IOException {
+        String errorRedirectionPage = getErrorRedirectionPage();
+        if (errorRedirectionPage != null) {
+            CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request,
+                                                response, errorRedirectionPage);        //TODO: error msg i18n
+        } else {
+            throw new IOException("Could not send error. " +
+                                  "Please define the errorRedirectionPage in your UI page. " +
+                                  e.getMessage());
+        }
+    }
+
+
+    protected String getErrorRedirectionPage() {
+        List<String> errRedirValues = getFormFieldValue("errorRedirectionPage");
+        String errorRedirectionPage = null;
+        if (errRedirValues != null && !errRedirValues.isEmpty()) {
+            errorRedirectionPage = errRedirValues.get(0);
+        }
+        return errorRedirectionPage;
+    }
+
+    protected void parseRequest(HttpServletRequest request) throws FileUploadFailedException,
+                                                                 FileSizeLimitExceededException {
+        fileItemsMap.set(new HashMap<String, ArrayList<FileItemData>>());
+        formFieldsMap.set(new HashMap<String, ArrayList<String>>());
+
+        ServletRequestContext servletRequestContext = new ServletRequestContext(request);
+        boolean isMultipart = ServletFileUpload.isMultipartContent(servletRequestContext);
+        Long totalFileSize = 0L;
+
+        if (isMultipart) {
+
+            List items;
+            try {
+                items = parseRequest(servletRequestContext);
+            } catch (FileUploadException e) {
+                String msg = "File upload failed";
+                log.error(msg, e);
+                throw new FileUploadFailedException(msg, e);
+            }
+            boolean multiItems = false;
+            if (items.size() > 1) {
+                multiItems = true;
+            }
+
+            // Add the uploaded items to the corresponding maps.
+            for (Iterator iter = items.iterator(); iter.hasNext();) {
+                FileItem item = (FileItem) iter.next();
+                String fieldName = item.getFieldName().trim();
+                if (item.isFormField()) {
+                    if (formFieldsMap.get().get(fieldName) == null) {
+                        formFieldsMap.get().put(fieldName, new ArrayList<String>());
+                    }
+                    try {
+                        formFieldsMap.get().get(fieldName).add(new String(item.get(), "UTF-8"));
+                    } catch (UnsupportedEncodingException ignore) {
+                    }
+                } else {
+                    String fileName = item.getName();
+                    if ((fileName == null || fileName.length() == 0) && multiItems) {
+                        continue;
+                    }
+                    if (fileItemsMap.get().get(fieldName) == null) {
+                        fileItemsMap.get().put(fieldName, new ArrayList<FileItemData>());
+                    }
+                    totalFileSize += item.getSize();
+                    if (totalFileSize < totalFileUploadSizeLimit) {
+                        fileItemsMap.get().get(fieldName).add(new FileItemData(item));
+                    } else {
+                        throw new FileSizeLimitExceededException(getFileSizeLimit() / 1024 / 1024);
+                    }
+                }
+            }
+        }
+    }
+
+    protected String getWorkingDir() {
+        return (String) configurationContext.getProperty(ServerConstants.WORK_DIR);
+    }
+
+    protected String generateUUID() {
+        return String.valueOf(System.currentTimeMillis() + Math.random());
+    }
+
+    protected String getFileName(String fileName) {
+        String fileNameOnly;
+        if (fileName.indexOf("\\") < 0) {
+            fileNameOnly = fileName.substring(fileName.lastIndexOf('/') + 1,
+                                              fileName.length());
+        } else {
+            fileNameOnly = fileName.substring(fileName.lastIndexOf("\\") + 1,
+                                              fileName.length());
+        }
+        return fileNameOnly;
+    }
+
+    protected List parseRequest(ServletRequestContext requestContext) throws FileUploadException {
+        // Create a factory for disk-based file items
+        FileItemFactory factory = new DiskFileItemFactory();
+        // Create a new file upload handler
+        ServletFileUpload upload = new ServletFileUpload(factory);
+        // Parse the request
+        return upload.parseRequest(requestContext);
+    }
+
+    //Old methods, these should be refactored.
+
+    protected void checkServiceFileExtensionValidity(String fileExtension,
+                                                     String[] allowedExtensions)
+            throws FileUploadException {
+        boolean isExtensionValid = false;
+        StringBuffer allowedExtensionsStr = new StringBuffer();
+        for (String allowedExtension : allowedExtensions) {
+            allowedExtensionsStr.append(allowedExtension).append(",");
+            if (fileExtension.endsWith(allowedExtension)) {
+                isExtensionValid = true;
+                break;
+            }
+        }
+        if (!isExtensionValid) {
+            throw new FileUploadException(" Illegal file type." +
+                                          " Allowed file extensions are " + allowedExtensionsStr);
+        }
+    }
+
+    protected File uploadFile(HttpServletRequest request,
+                              String repoDir,
+                              HttpServletResponse response,
+                              String extension) throws FileUploadException {
+
+        response.setContentType("text/html; charset=utf-8");
+        ServletRequestContext servletRequestContext = new ServletRequestContext(request);
+        boolean isMultipart =
+                ServletFileUpload.isMultipartContent(servletRequestContext);
+        File uploadedFile = null;
+        if (isMultipart) {
+            try {
+                // Create a new file upload handler
+                List items = parseRequest(servletRequestContext);
+
+                // Process the uploaded items
+                for (Iterator iter = items.iterator(); iter.hasNext();) {
+                    FileItem item = (FileItem) iter.next();
+                    if (!item.isFormField()) {
+                        String fileName = item.getName();
+                        String fileExtension = fileName;
+                        fileExtension = fileExtension.toLowerCase();
+                        if (extension != null && !fileExtension.endsWith(extension)) {
+                            throw new Exception(" Illegal file type. Only " +
+                                                extension + " files can be uploaded");
+
+                        }
+                        String fileNameOnly = getFileName(fileName);
+                        uploadedFile = new File(repoDir, fileNameOnly);
+                        item.write(uploadedFile);
+                    }
+                }
+            } catch (Exception e) {
+                String msg = "File upload failed";
+                log.error(msg, e);
+                throw new FileUploadException(msg, e);
+            }
+        }
+        return uploadedFile;
+    }
+
+    /**
+     * This is the common method that can be used for Fileupload.
+     * extraStoreDirUUID is the name of the javascript that's going to
+     * execute on the client side at the secound run.
+     *
+     * @param request
+     * @param response
+     * @return Status true/fase.
+     * @throws org.apache.commons.fileupload.FileUploadException
+     *
+     */
+    protected boolean executeCommon(HttpServletRequest request, HttpServletResponse response)
+            throws FileUploadException {
+
+        String serverURL = (String) request.getAttribute(CarbonConstants.SERVER_URL);
+        HttpSession session = request.getSession();
+        String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+
+        PrintWriter out = null;
+        try {
+            out = response.getWriter();
+            FileUploadServiceClient client =
+                    new FileUploadServiceClient(configurationContext, serverURL, cookie);
+
+            response.setContentType("text/plain; charset=utf-8");
+            Set<String> keys = fileItemsMap.get().keySet();
+            boolean multiItems = false;
+            if (fileItemsMap.get().size() > 1) {
+                multiItems = true;
+            }
+            // Process the uploaded items
+            UploadedFileItem[] uploadedFileItems = new UploadedFileItem[fileItemsMap.get().size()];
+            Iterator<String> iterator = keys.iterator();
+            int i = 0;
+            while (iterator.hasNext()) {
+                String fieldName = iterator.next();
+                String fileName = fileItemsMap.get().get(fieldName).get(0).getFileItem().getName();
+                if ((fileName == null || fileName.length() == 0) && multiItems) {
+                    continue;
+                }
+                FileItemData fileItemData = fileItemsMap.get().get(fieldName).get(0);
+                UploadedFileItem uploadedFileItem = new UploadedFileItem();
+                uploadedFileItem.setDataHandler(fileItemData.getDataHandler());
+                uploadedFileItem.setFileName(fileName);
+                uploadedFileItem.setFileType("");
+                uploadedFileItems[i] = uploadedFileItem;
+                i++;
+            }
+            String[] uuidArray = client.uploadFiles(uploadedFileItems);
+            StringBuffer uuids = new StringBuffer();
+            for (String uuid : uuidArray) {
+                uuids.append(uuid).append(",");
+            }
+            out.write(uuids.toString().substring(0, uuids.length() - 1));
+            out.flush();
+        } catch (Exception e) {
+            String msg = "File upload FAILED. File may be non-existent or invalid.";
+            log.error(msg, e);
+            throw new FileUploadException(msg, e);
+        } finally {
+            if (out != null) {
+                out.close();
+            }
+        }
+        return true;
+    }
+
+
+    /**
+     * This is a helper method that will be used upload main entity (ex: wsdd, jar, class etc) and
+     * its resources to a given deployer.
+     *
+     * @param request
+     * @param response
+     * @param uploadDirName
+     * @param extensions
+     * @param utilityString
+     * @return boolean
+     * @throws IOException
+     */
+    protected boolean uploadArtifacts(HttpServletRequest request,
+                                      HttpServletResponse response,
+                                      String uploadDirName,
+                                      String[] extensions,
+                                      String utilityString)
+            throws FileUploadException, IOException {
+        String axis2Repo = ServerConfiguration.getInstance().
+                getFirstProperty(ServerConfiguration.AXIS2_CONFIG_REPO_LOCATION);
+        if (CarbonUtils.isURL(axis2Repo)) {
+            String msg = "You are not permitted to upload jars to URL repository";
+            throw new FileUploadException(msg);
+        }
+
+        String tmpDir = (String) configurationContext.getProperty(ServerConstants.WORK_DIR);
+        String uuid = String.valueOf(System.currentTimeMillis() + Math.random());
+        tmpDir = tmpDir + File.separator + "artifacts" + File.separator + uuid + File.separator;
+        File tmpDirFile = new File(tmpDir);
+        if (!tmpDirFile.exists() && !tmpDirFile.mkdirs()) {
+            log.warn("Could not create " + tmpDirFile.getAbsolutePath());
+        }
+
+        response.setContentType("text/html; charset=utf-8");
+
+        ServletRequestContext servletRequestContext = new ServletRequestContext(request);
+        boolean isMultipart =
+                ServletFileUpload.isMultipartContent(servletRequestContext);
+        if (isMultipart) {
+            PrintWriter out = null;
+            try {
+                out = response.getWriter();
+                // Create a new file upload handler
+                List items = parseRequest(servletRequestContext);
+                // Process the uploaded items
+                for (Iterator iter = items.iterator(); iter.hasNext();) {
+                    FileItem item = (FileItem) iter.next();
+                    if (!item.isFormField()) {
+                        String fileName = item.getName();
+                        String fileExtension = fileName;
+                        fileExtension = fileExtension.toLowerCase();
+
+                        String fileNameOnly = getFileName(fileName);
+                        File uploadedFile;
+
+                        String fieldName = item.getFieldName();
+
+                        if (fieldName != null && fieldName.equals("jarResource")) {
+                            if (fileExtension.endsWith(".jar")) {
+                                File servicesDir =
+                                        new File(tmpDir + File.separator + uploadDirName, "lib");
+                                if (!servicesDir.exists() && !servicesDir.mkdirs()){
+                                    log.warn("Could not create " + servicesDir.getAbsolutePath());
+                                }
+                                uploadedFile = new File(servicesDir, fileNameOnly);
+                                item.write(uploadedFile);
+                            }
+                        } else {
+                            File servicesDir = new File(tmpDir, uploadDirName);
+                            if (!servicesDir.exists() && !servicesDir.mkdirs()) {
+                                log.warn("Could not create " + servicesDir.getAbsolutePath());
+                            }
+                            uploadedFile = new File(servicesDir, fileNameOnly);
+                            item.write(uploadedFile);
+                        }
+                    }
+                }
+
+                //First lets filter for jar resources
+                String repo = configurationContext.getAxisConfiguration().getRepository().getPath();
+
+                //Writing the artifacts to the proper location
+                String parent = repo + File.separator + uploadDirName;
+                File mainDir = new File(tmpDir + File.separator + uploadDirName);
+                File libDir = new File(mainDir, "lib");
+                File[] resourceLibFile =
+                        FileManipulator.getMatchingFiles(libDir.getAbsolutePath(), null, "jar");
+
+
+                for (File src : resourceLibFile) {
+                    File dst = new File(parent, "lib");
+                    String[] files = libDir.list();
+                    for (String file : files) {
+                        copyFile(src, new File(dst, file));
+                    }
+                }
+
+                for (String extension : extensions) {
+                    File[] mainFiles =
+                            FileManipulator.getMatchingFiles(mainDir.getAbsolutePath(), null, extension);
+                    for (File mainFile : mainFiles) {
+                        File dst = new File(parent);
+                        String[] files = mainDir.list();
+                        for (String file : files) {
+                            File f = new File(dst, file);
+                            if (!f.isDirectory()) {
+                                copyFile(mainFile, f);
+                            }
+                        }
+
+                    }
+                }
+                response.sendRedirect(getContextRoot(request) + "/carbon/service-mgt/index.jsp?message=Files have been uploaded "
+                                      + "successfully. This page will be auto refreshed shortly with "
+                                      + "the status of the created " + utilityString + " service"); //TODO: why do we redirect to service-mgt ???
+                return true;
+            } catch (RuntimeException e) {
+                throw e;
+            } catch (Exception e) {
+                String msg = "File upload failed";
+                log.error(msg, e);
+                throw new FileUploadException(msg, e);
+            } finally {
+                if (out != null) {
+                    out.close();
+                }
+            }
+        }
+        return false;
+    }
+
+    private void copyFile(File src, File dst) throws IOException {
+        String dstAbsPath = dst.getAbsolutePath();
+        String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));
+        File dir = new File(dstDir);
+        if (!dir.exists() && !dir.mkdirs()) {
+            log.warn("Could not create " + dir.getAbsolutePath());
+        }
+        DataHandler dh = new DataHandler(src.toURL());
+        FileOutputStream out = null;
+        try {
+            out = new FileOutputStream(dst);
+            dh.writeTo(out);
+            out.flush();
+        } finally {
+            if (out != null) {
+                out.close();
+            }
+        }
+    }
+
+    protected List<FileItemData> getAllFileItems() {
+        Collection<ArrayList<FileItemData>> listCollection = fileItemsMap.get().values();
+        List<FileItemData> fileItems = new ArrayList<FileItemData>();
+        for (ArrayList<FileItemData> fileItemData : listCollection) {
+            fileItems.addAll(fileItemData);
+        }
+        return fileItems;
+    }
+
+    protected String getContextRoot(HttpServletRequest request) {
+        String contextPath = (request.getContextPath().equals("")) ? "" : request.getContextPath();
+        int index;
+        if (contextPath.equals("/fileupload")) {
+            contextPath = "";
+        } else {
+            if ((index = contextPath.indexOf("/fileupload")) > -1) {
+                contextPath = contextPath.substring(0, index);
+            }
+        }
+        // Make the context root tenant aware, eg: /t/wso2.com in a multi-tenant scenario
+        String tenantDomain = (String)request.getSession().getAttribute(MultitenantConstants.TENANT_DOMAIN);
+        if(!contextPath.startsWith("/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX + "/")
+                && (tenantDomain != null &&
+                !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) ){
+            contextPath = contextPath + "/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX + "/" +
+                          tenantDomain;
+            // replace the possible '//' with '/ '
+            contextPath = contextPath.replaceAll("//", "/");
+        }
+        return contextPath;
+    }
+
+    /**
+     * Retrieve the form field values of the provided form field with name <code>formFieldName</code>
+     *
+     * @param formFieldName Name of the form field to be retrieved
+     * @return List of form field values
+     */
+    public List<String> getFormFieldValue(String formFieldName) {
+        return formFieldsMap.get().get(formFieldName);
+    }
+
+    protected Map<String, ArrayList<FileItemData>> getFileItemsMap() {
+        return fileItemsMap.get();
+    }
+
+    protected Map<String, ArrayList<String>> getFormFieldsMap() {
+        return formFieldsMap.get();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/AnyFileUploadExecutor.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/AnyFileUploadExecutor.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/AnyFileUploadExecutor.java
new file mode 100644
index 0000000..da941a1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/AnyFileUploadExecutor.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.carbon.ui.transports.fileupload;
+
+import org.apache.commons.fileupload.FileUploadException;
+import org.wso2.carbon.CarbonException;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/*
+ * 
+ */
+public class AnyFileUploadExecutor extends AbstractFileUploadExecutor {
+
+    public boolean execute(HttpServletRequest request, HttpServletResponse response)
+            throws CarbonException, IOException {
+
+        try {
+            return super.executeCommon(request, response);
+        } catch (FileUploadException e) {
+            e.printStackTrace();  //Todo: change body of catch statement use File | Settings | File Templates.
+        }
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/DBSFileUploadExecutor.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/DBSFileUploadExecutor.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/DBSFileUploadExecutor.java
new file mode 100644
index 0000000..38e73d6
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/DBSFileUploadExecutor.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.carbon.ui.transports.fileupload;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.fileupload.servlet.ServletRequestContext;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.base.ServerConfiguration;
+import org.wso2.carbon.utils.CarbonUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.List;
+/*
+ *
+ */
+
+public class DBSFileUploadExecutor extends org.wso2.carbon.ui.transports.fileupload.AbstractFileUploadExecutor {
+
+    private static final String[] ALLOWED_FILE_EXTENSIONS = new String[]{".dbs"};
+
+    public boolean execute(HttpServletRequest request,
+                           HttpServletResponse response) throws CarbonException, IOException {
+        String axis2Repo = ServerConfiguration.getInstance().
+                getFirstProperty(ServerConfiguration.AXIS2_CONFIG_REPO_LOCATION);
+        PrintWriter out = response.getWriter();
+        if (CarbonUtils.isURL(axis2Repo)) {
+            out.write("<script type=\"text/javascript\">" +
+                      "alert('You are not permitted to upload services to URL repository " +
+                      axis2Repo + "');" +
+                      "</script>");
+            out.flush();
+            return false;
+        }
+        response.setContentType("text/html; charset=utf-8");
+        ServletRequestContext servletRequestContext = new ServletRequestContext(request);
+        boolean isMultipart =
+                ServletFileUpload.isMultipartContent(servletRequestContext);
+        if (isMultipart) {
+            try {
+                // Create a new file upload handler
+                List items = parseRequest(servletRequestContext);
+
+                // Process the uploaded items
+                for (Iterator iter = items.iterator(); iter.hasNext();) {
+                    FileItem item = (FileItem) iter.next();
+                    if (!item.isFormField()) {
+                        String fileName = item.getName();
+                        String fileExtension = fileName;
+                        fileExtension = fileExtension.toLowerCase();
+
+                        // check whether extension is valid
+                        checkServiceFileExtensionValidity(fileExtension, ALLOWED_FILE_EXTENSIONS);
+
+                        String fileNameOnly = getFileName(fileName);
+                        File uploadedFile;
+                        if (fileExtension.endsWith(".dbs")) {
+                            String repo =
+                                    configurationContext.getAxisConfiguration().
+                                            getRepository().getPath();
+                            String finalFolderName;
+                            if (fileExtension.endsWith(".dbs")) {
+                                finalFolderName = "dataservices";
+                            } else {
+                                throw new CarbonException(
+                                        "File with extension " + fileExtension + " is not supported!");
+                            }
+
+                            File servicesDir = new File(repo, finalFolderName);
+                            if (!servicesDir.exists()) {
+                                servicesDir.mkdir();
+                            }
+                            uploadedFile = new File(servicesDir, fileNameOnly);
+                            item.write(uploadedFile);
+                            //TODO: fix them
+                            out.write("<script type=\"text/javascript\" src=\"../main/admin/js/main.js\"></script>");
+                            out.write("<script type=\"text/javascript\">" +
+                                      "alert('File uploaded successfully');" +
+                                      "loadServiceListingPage();" +
+                                      "</script>");
+                        }
+                    }
+                return true;
+                }
+            } catch (Exception e) {
+                log.error("File upload failed", e);                
+                out.write("<script type=\"text/javascript\" src=\"../ds/extensions/core/js/data_service.js\"></script>");                
+                out.write("<script type=\"text/javascript\">" +
+                          "alert('Service file upload FAILED. You will be redirected to file upload screen. Reason :" +
+                          e.getMessage().replaceFirst(",","") + "');" +
+                          "loadDBSFileUploadPage();"+ //available in data_service.js
+                          "</script>");
+            }
+        }
+        return false;
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/FileSizeLimitExceededException.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/FileSizeLimitExceededException.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/FileSizeLimitExceededException.java
new file mode 100644
index 0000000..d82aaf0
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/FileSizeLimitExceededException.java
@@ -0,0 +1,24 @@
+package org.wso2.carbon.ui.transports.fileupload;
+
+/**
+ * This exception will be thrown when the maximum allowed file size limit is exceeded. This can
+ * be applicable to a single file or a collection of files.
+ */
+public class FileSizeLimitExceededException extends Exception {
+
+    public FileSizeLimitExceededException(long fileSizeLimitInMB) {
+        super("File size limit of " + fileSizeLimitInMB + " MB has been exceeded");
+    }
+
+    public FileSizeLimitExceededException(String msg, long fileSizeLimitInMB) {
+        super("File size limit of " + fileSizeLimitInMB + " MB has been exceeded. " + msg);
+    }
+
+    public FileSizeLimitExceededException(String msg, long fileSizeLimitInMB, Throwable throwable) {
+        super("File size limit of " + fileSizeLimitInMB + " MB has been exceeded. " + msg, throwable);
+    }
+
+    public FileSizeLimitExceededException(Throwable throwable, long fileSizeLimitInMB) {
+        super("File size limit of " + fileSizeLimitInMB + " MB has been exceeded", throwable);
+    }
+}


[22/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/ruby.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/ruby.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/ruby.css
new file mode 100644
index 0000000..b23166b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/ruby.css
@@ -0,0 +1,10 @@
+/*
+ * CodePress color styles for Ruby syntax highlighting
+ */
+
+b {color:#7F0055;font-weight:bold;} /* reserved words */
+i, i b, i s, i em, i a, i u {color:gray;font-weight:normal;} /* comments */
+s, s b, s a, s em, s u {color:#2A00FF;font-weight:normal;} /* strings */
+a {color:#006700;font-weight:bold;} /* variables */
+em {color:darkblue;font-weight:bold;} /* functions */
+u {font-weight:bold;} /* special chars */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/ruby.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/ruby.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/ruby.js
new file mode 100644
index 0000000..860f433
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/ruby.js
@@ -0,0 +1,26 @@
+/*
+ * CodePress regular expressions for Perl syntax highlighting
+ */
+
+// Ruby
+Language.syntax = [
+	{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote 
+	{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
+	{ input : /([\$\@\%]+)([\w\.]*)/g, output : '<a>$1$2</a>' }, // vars
+	{ input : /(def\s+)([\w\.]*)/g, output : '$1<em>$2</em>' }, // functions
+	{ input : /\b(alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\b/g, output : '<b>$1</b>' }, // reserved words
+	{ input  : /([\(\){}])/g, output : '<u>$1</u>' }, // special chars
+	{ input  : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' } // comments
+];
+
+Language.snippets = []
+
+Language.complete = [
+	{ input : '\'',output : '\'$0\'' },
+	{ input : '"', output : '"$0"' },
+	{ input : '(', output : '\($0\)' },
+	{ input : '[', output : '\[$0\]' },
+	{ input : '{', output : '{\n\t$0\n}' }		
+]
+
+Language.shortcuts = []

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/sql.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/sql.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/sql.css
new file mode 100644
index 0000000..17458c5
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/sql.css
@@ -0,0 +1,10 @@
+/*
+ * CodePress color styles for SQL syntax highlighting
+ * By Merlin Moncure
+ */
+ 
+b {color:#0000FF;font-style:normal;font-weight:bold;} /* reserved words */
+u {color:#FF0000;font-style:normal;} /* types */
+a {color:#CD6600;font-style:normal;font-weight:bold;} /* commands */
+i, i b, i u, i a, i s  {color:#A9A9A9;font-weight:normal;font-style:italic;} /* comments */
+s, s b, s u, s a, s i {color:#2A00FF;font-weight:normal;} /* strings */

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/sql.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/sql.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/sql.js
new file mode 100644
index 0000000..605c971
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/sql.js
@@ -0,0 +1,30 @@
+/*
+ * CodePress regular expressions for SQL syntax highlighting
+ * By Merlin Moncure
+ */
+ 
+// SQL
+Language.syntax = [
+	{ input : /\'(.*?)(\')/g, output : '<s>\'$1$2</s>' }, // strings single quote
+	{ input : /\b(add|after|aggregate|alias|all|and|as|authorization|between|by|cascade|cache|cache|called|case|check|column|comment|constraint|createdb|createuser|cycle|database|default|deferrable|deferred|diagnostics|distinct|domain|each|else|elseif|elsif|encrypted|except|exception|for|foreign|from|from|full|function|get|group|having|if|immediate|immutable|in|increment|initially|increment|index|inherits|inner|input|intersect|into|invoker|is|join|key|language|left|like|limit|local|loop|match|maxvalue|minvalue|natural|nextval|no|nocreatedb|nocreateuser|not|null|of|offset|oids|on|only|operator|or|order|outer|owner|partial|password|perform|plpgsql|primary|record|references|replace|restrict|return|returns|right|row|rule|schema|security|sequence|session|sql|stable|statistics|table|temp|temporary|then|time|to|transaction|trigger|type|unencrypted|union|unique|user|using|valid|value|values|view|volatile|when|where|with|without|zone)\b/gi, output : '<b>$1</b>' }, // reserved words
+	{ input : /\b(bigint|bigserial|bit|boolean|box|bytea|char|character|cidr|circle|date|decimal|double|float4|float8|inet|int2|int4|int8|integer|interval|line|lseg|macaddr|money|numeric|oid|path|point|polygon|precision|real|refcursor|serial|serial4|serial8|smallint|text|timestamp|varbit|varchar)\b/gi, output : '<u>$1</u>' }, // types
+	{ input : /\b(abort|alter|analyze|begin|checkpoint|close|cluster|comment|commit|copy|create|deallocate|declare|delete|drop|end|execute|explain|fetch|grant|insert|listen|load|lock|move|notify|prepare|reindex|reset|restart|revoke|rollback|select|set|show|start|truncate|unlisten|update)\b/gi, output : '<a>$1</a>' }, // commands
+	{ input : /([^:]|^)\-\-(.*?)(<br|<\/P)/g, output: '$1<i>--$2</i>$3' } // comments //	
+]
+
+Language.snippets = [
+	{ input : 'select', output : 'select $0 from  where ' }
+]
+
+Language.complete = [
+	{ input : '\'', output : '\'$0\'' },
+	{ input : '"', output : '"$0"' },
+	{ input : '(', output : '\($0\)' },
+	{ input : '[', output : '\[$0\]' },
+	{ input : '{', output : '{\n\t$0\n}' }		
+]
+
+Language.shortcuts = []
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/text.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/text.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/text.css
new file mode 100644
index 0000000..8e5ba28
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/text.css
@@ -0,0 +1,5 @@
+/*
+ * CodePress color styles for Text syntax highlighting
+ */
+
+/* do nothing as expected */

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/text.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/text.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/text.js
new file mode 100644
index 0000000..1895430
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/text.js
@@ -0,0 +1,9 @@
+/*
+ * CodePress regular expressions for Text syntax highlighting
+ */
+
+// plain text
+Language.syntax = []
+Language.snippets = []
+Language.complete = []
+Language.shortcuts = []

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/vbscript.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/vbscript.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/vbscript.css
new file mode 100644
index 0000000..d65663b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/vbscript.css
@@ -0,0 +1,71 @@
+/*
+ * CodePress color styles for ASP-VB syntax highlighting 
+ * By Martin D. Kirk
+ */
+
+/* tags */
+b {
+	color:#000080;
+} 
+/* comments */
+big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {
+	color:gray;
+	font-weight:normal;
+}
+/* ASP comments */
+strong dfn, strong dfn a,strong dfn var, strong dfn a u, strong dfn u{
+	color:gray;
+	font-weight:normal;
+}
+ /* attributes */ 
+s, s b, span s u, span s cite, strong span s {
+	color:#5656fa ;
+	font-weight:normal;
+}
+ /* strings */ 
+strong s,strong s b, strong s u, strong s cite {
+	color:#009900;
+	font-weight:normal;
+}
+strong ins{
+	color:#000000;
+	font-weight:bold;
+}
+ /* Syntax */
+strong a, strong a u {
+	color:#0000FF;
+	font-weight:;
+}
+ /* Native Keywords */
+strong u {
+	color:#990099;
+	font-weight:bold;
+}
+/* Numbers */
+strong var{
+	color:#FF0000;
+}
+/* ASP Language */
+span{
+	color:#990000;
+	font-weight:bold;
+}
+strong i,strong a i, strong u i {
+	color:#009999;
+}
+/* style */
+em {
+	color:#800080;
+	font-style:normal;
+}
+ /* script */ 
+ins {
+	color:#800000;
+	font-weight:bold;
+}
+
+/* <?php and ?> */
+cite, s cite {
+	color:red;
+	font-weight:bold;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/vbscript.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/vbscript.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/vbscript.js
new file mode 100644
index 0000000..7439539
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/vbscript.js
@@ -0,0 +1,117 @@
+/*
+ * CodePress regular expressions for ASP-vbscript syntax highlighting
+ */
+
+// ASP VBScript
+Language.syntax = [
+// all tags
+	{ input : /(&lt;[^!%|!%@]*?&gt;)/g, output : '<b>$1</b>' }, 
+// style tags	
+	{ input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, 
+// script tags	
+	{ input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' }, 
+// strings "" and attributes
+	{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, 
+// ASP Comment
+	{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<dfn>\'$1$2</dfn>'}, 
+// <%.*
+	{ input : /(&lt;%)/g, output : '<strong>$1' }, 
+// .*%>	
+	{ input : /(%&gt;)/g, output : '$1</strong>' }, 
+// <%@...%>	
+	{ input : /(&lt;%@)(.+?)(%&gt;)/gi, output : '$1<span>$2</span>$3' }, 
+//Numbers	
+	{ input : /\b([\d]+)\b/g, output : '<var>$1</var>' }, 
+// Reserved Words 1 (Blue)
+	{ input : /\b(And|As|ByRef|ByVal|Call|Case|Class|Const|Dim|Do|Each|Else|ElseIf|Empty|End|Eqv|Exit|False|For|Function)\b/gi, output : '<a>$1</a>' }, 
+	{ input : /\b(Get|GoTo|If|Imp|In|Is|Let|Loop|Me|Mod|Enum|New|Next|Not|Nothing|Null|On|Option|Or|Private|Public|ReDim|Rem)\b/gi, output : '<a>$1</a>' }, 
+	{ input : /\b(Resume|Select|Set|Stop|Sub|Then|To|True|Until|Wend|While|With|Xor|Execute|Randomize|Erase|ExecuteGlobal|Explicit|step)\b/gi, output : '<a>$1</a>' }, 
+// Reserved Words 2 (Purple)	
+	{ input : /\b(Abandon|Abs|AbsolutePage|AbsolutePosition|ActiveCommand|ActiveConnection|ActualSize|AddHeader|AddNew|AppendChunk)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(AppendToLog|Application|Array|Asc|Atn|Attributes|BeginTrans|BinaryRead|BinaryWrite|BOF|Bookmark|Boolean|Buffer|Byte)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(CacheControl|CacheSize|Cancel|CancelBatch|CancelUpdate|CBool|CByte|CCur|CDate|CDbl|Charset|Chr|CInt|Clear)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(ClientCertificate|CLng|Clone|Close|CodePage|CommandText|CommandType|CommandTimeout|CommitTrans|CompareBookmarks|ConnectionString|ConnectionTimeout)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(Contents|ContentType|Cookies|Cos|CreateObject|CreateParameter|CSng|CStr|CursorLocation|CursorType|DataMember|DataSource|Date|DateAdd|DateDiff)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(DatePart|DateSerial|DateValue|Day|DefaultDatabase|DefinedSize|Delete|Description|Double|EditMode|Eof|EOF|err|Error)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(Exp|Expires|ExpiresAbsolute|Filter|Find|Fix|Flush|Form|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(GetChunk|GetLastError|GetRows|GetString|Global|HelpContext|HelpFile|Hex|Hour|HTMLEncode|IgnoreCase|Index|InStr|InStrRev)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(Int|Integer|IsArray|IsClientConnected|IsDate|IsolationLevel|Join|LBound|LCase|LCID|Left|Len|Lock|LockType|Log|Long|LTrim)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(MapPath|MarshalOptions|MaxRecords|Mid|Minute|Mode|Month|MonthName|Move|MoveFirst|MoveLast|MoveNext|MovePrevious|Name|NextRecordset)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(Now|Number|NumericScale|ObjectContext|Oct|Open|OpenSchema|OriginalValue|PageCount|PageSize|Pattern|PICS|Precision|Prepared|Property)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(Provider|QueryString|RecordCount|Redirect|RegExp|Remove|RemoveAll|Replace|Requery|Request|Response|Resync|Right|Rnd)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(RollbackTrans|RTrim|Save|ScriptTimeout|Second|Seek|Server|ServerVariables|Session|SessionID|SetAbort|SetComplete|Sgn)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(Sin|Size|Sort|Source|Space|Split|Sqr|State|StaticObjects|Status|StayInSync|StrComp|String|StrReverse|Supports|Tan|Time)\b/gi, output : '<u>$1</u>' },
+	{ input : /\b(Timeout|Timer|TimeSerial|TimeValue|TotalBytes|Transfer|Trim|Type|Type|UBound|UCase|UnderlyingValue|UnLock|Update|UpdateBatch)\b/gi, output : '<u>$1</u>' }, 
+	{ input : /\b(URLEncode|Value|Value|Version|Weekday|WeekdayName|Write|Year)\b/gi, output : '<u>$1</u>' }, 
+// Reserved Words 3 (Turquis)
+	{ input : /\b(vbBlack|vbRed|vbGreen|vbYellow|vbBlue|vbMagenta|vbCyan|vbWhite|vbBinaryCompare|vbTextCompare)\b/gi, output : '<i>$1</i>' }, 
+  	{ input : /\b(vbSunday|vbMonday|vbTuesday|vbWednesday|vbThursday|vbFriday|vbSaturday|vbUseSystemDayOfWeek)\b/gi, output : '<i>$1</i>' }, 
+	{ input : /\b(vbFirstJan1|vbFirstFourDays|vbFirstFullWeek|vbGeneralDate|vbLongDate|vbShortDate|vbLongTime|vbShortTime)\b/gi, output : '<i>$1</i>' }, 
+	{ input : /\b(vbObjectError|vbCr|VbCrLf|vbFormFeed|vbLf|vbNewLine|vbNullChar|vbNullString|vbTab|vbVerticalTab|vbUseDefault|vbTrue)\b/gi, output : '<i>$1</i>' }, 
+	{ input : /\b(vbFalse|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant)\b/gi, output : '<i>$1</i>' }, 
+	{ input : /\b(vbDataObject|vbDecimal|vbByte|vbArray)\b/gi, output : '<i>$1</i>' },
+// html comments
+	{ input : /(&lt;!--.*?--&gt.)/g, output : '<big>$1</big>' } 
+]
+
+Language.Functions = [ 
+  	// Output at index 0, must be the desired tagname surrounding a $1
+	// Name is the index from the regex that marks the functionname
+	{input : /(function|sub)([ ]*?)(\w+)([ ]*?\()/gi , output : '<ins>$1</ins>', name : '$3'}
+]
+
+Language.snippets = [
+//Conditional
+	{ input : 'if', output : 'If $0 Then\n\t\nEnd If' },
+	{ input : 'ifelse', output : 'If $0 Then\n\t\n\nElse\n\t\nEnd If' },
+	{ input : 'case', output : 'Select Case $0\n\tCase ?\n\tCase Else\nEnd Select'},
+//Response
+	{ input : 'rw', output : 'Response.Write( $0 )' },
+	{ input : 'resc', output : 'Response.Cookies( $0 )' },
+	{ input : 'resb', output : 'Response.Buffer'},
+	{ input : 'resflu', output : 'Response.Flush()'},
+	{ input : 'resend', output : 'Response.End'},
+//Request
+	{ input : 'reqc', output : 'Request.Cookies( $0 )' },
+	{ input : 'rq', output : 'Request.Querystring("$0")' },
+	{ input : 'rf', output : 'Request.Form("$0")' },
+//FSO
+	{ input : 'fso', output : 'Set fso = Server.CreateObject("Scripting.FileSystemObject")\n$0' },
+	{ input : 'setfo', output : 'Set fo = fso.getFolder($0)' },
+	{ input : 'setfi', output : 'Set fi = fso.getFile($0)' },
+	{ input : 'twr', output : 'Set f = fso.CreateTextFile($0,true)\'overwrite\nf.WriteLine()\nf.Close'},
+	{ input : 'tre', output : 'Set f = fso.OpenTextFile($0, 1)\nf.ReadAll\nf.Close'},
+//Server
+	{ input : 'mapp', output : 'Server.Mappath($0)' },
+//Loops
+	{ input : 'foreach', output : 'For Each $0 in ?\n\t\nNext' },
+	{ input : 'for', output : 'For $0 to ? step ?\n\t\nNext' },
+	{ input : 'do', output : 'Do While($0)\n\t\nLoop' },
+	{ input : 'untilrs', output : 'do until rs.eof\n\t\nrs.movenext\nloop' },
+//ADO
+	{ input : 'adorec', output : 'Set rs = Server.CreateObject("ADODB.Recordset")' },
+	{ input : 'adocon', output : 'Set Conn = Server.CreateObject("ADODB.Connection")' },
+	{ input : 'adostr', output : 'Set oStr = Server.CreateObject("ADODB.Stream")' },
+//Http Request
+	{ input : 'xmlhttp', output : 'Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")\nxmlHttp.open("GET", $0, false)\nxmlHttp.send()\n?=xmlHttp.responseText' },
+	{ input : 'xmldoc', output : 'Set xmldoc = Server.CreateObject("Microsoft.XMLDOM")\nxmldoc.async=false\nxmldoc.load(request)'},
+//Functions
+	{ input : 'func', output : 'Function $0()\n\t\n\nEnd Function'},
+	{ input : 'sub', output : 'Sub $0()\n\t\nEnd Sub'}
+
+]
+
+Language.complete = [
+	//{ input : '\'', output : '\'$0\'' },
+	{ input : '"', output : '"$0"' },
+	{ input : '(', output : '\($0\)' },
+	{ input : '[', output : '\[$0\]' },
+	{ input : '{', output : '{\n\t$0\n}' }		
+]
+
+Language.shortcuts = [
+	{ input : '[space]', output : '&nbsp;' },
+	{ input : '[enter]', output : '<br />' } ,
+	{ input : '[j]', output : 'testing' },
+	{ input : '[7]', output : '&amp;' }
+]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/xsl.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/xsl.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/xsl.css
new file mode 100644
index 0000000..32634b6
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/xsl.css
@@ -0,0 +1,15 @@
+/*
+ * CodePress color styles for HTML syntax highlighting
+ * By RJ Bruneel
+ */
+ 
+b {color:#000080;} /* tags */
+ins, ins b, ins s, ins em {color:gray;} /* comments */
+s, s b {color:#7777e4;} /* attribute values */
+a {color:#E67300;} /* links */
+u {color:#CC66CC;} /* forms */
+big {color:#db0000;} /* images */
+em, em b {color:#800080;} /* style */
+strong {color:#800000;} /* script */
+tt i {color:darkblue;font-weight:bold;} /* script reserved words */
+xsl {color:green;} /* xsl */

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/xsl.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/xsl.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/xsl.js
new file mode 100644
index 0000000..b23d359
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/languages/xsl.js
@@ -0,0 +1,103 @@
+/*
+ * CodePress regular expressions for XSL syntax highlighting
+ * By RJ Bruneel
+ */
+
+Language.syntax = [ // XSL
+	{
+	input : /(&lt;[^!]*?&gt;)/g,
+	output : '<b>$1</b>' // all tags
+	},{
+	input : /(&lt;a.*?&gt;|&lt;\/a&gt;)/g,
+	output : '<a>$1</a>' // links
+	},{
+	input : /(&lt;img .*?&gt;)/g,
+	output : '<big>$1</big>' // images
+	},{
+	input : /(&lt;\/?(button|textarea|form|input|select|option|label).*?&gt;)/g,
+	output : '<u>$1</u>' // forms
+	},{
+	input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g,
+	output : '<em>$1</em><em>$2</em><em>$3</em>' // style tags
+	},{
+	input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g,
+	output : '<strong>$1</strong><tt>$2</tt><strong>$3</strong>' // script tags
+	},{	
+	input : /(&lt;xsl.*?&gt;|&lt;\/xsl.*?&gt;)/g,
+	output : '<xsl>$1</xsl>' // xsl
+	},{
+	input : /=(".*?")/g,
+	output : '=<s>$1</s>' // atributes double quote
+	},{
+	input : /=('.*?')/g,
+	output : '=<s>$1</s>' // atributes single quote
+	},{
+	input : /(&lt;!--.*?--&gt.)/g,
+	output : '<ins>$1</ins>' // comments 
+	},{
+	input : /\b(alert|window|document|break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g,
+	output : '<i>$1</i>' // script reserved words
+	}
+];
+
+Language.snippets = [
+	{input : 'aref', output : '<a href="$0"></a>' },
+	{input : 'h1', output : '<h1>$0</h1>' },
+	{input : 'h2', output : '<h2>$0</h2>' },
+	{input : 'h3', output : '<h3>$0</h3>' },
+	{input : 'h4', output : '<h4>$0</h4>' },
+	{input : 'h5', output : '<h5>$0</h5>' },
+	{input : 'h6', output : '<h6>$0</h6>' },
+	{input : 'html', output : '<html>\n\t$0\n</html>' },
+	{input : 'head', output : '<head>\n\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\t<title>$0</title>\n\t\n</head>' },
+	{input : 'img', output : '<img src="$0" width="" height="" alt="" border="0" />' },
+	{input : 'input', output : '<input name="$0" id="" type="" value="" />' },
+	{input : 'label', output : '<label for="$0"></label>' },
+	{input : 'legend', output : '<legend>\n\t$0\n</legend>' },
+	{input : 'link', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },		
+	{input : 'base', output : '<base href="$0" />' }, 
+	{input : 'body', output : '<body>\n\t$0\n</body>' }, 
+	{input : 'css', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
+	{input : 'div', output : '<div>\n\t$0\n</div>' },
+	{input : 'divid', output : '<div id="$0">\n\t\n</div>' },
+	{input : 'dl', output : '<dl>\n\t<dt>\n\t\t$0\n\t</dt>\n\t<dd></dd>\n</dl>' },
+	{input : 'fieldset', output : '<fieldset>\n\t$0\n</fieldset>' },
+	{input : 'form', output : '<form action="$0" method="" name="">\n\t\n</form>' },
+	{input : 'meta', output : '<meta name="$0" content="" />' },
+	{input : 'p', output : '<p>$0</p>' },
+	{input : 'b', output : '<b>$0</b>' },
+	{input : 'li', output : '<li>$0</li>' },
+	{input : 'ul', output : '<ul>$0</ul>' },
+	{input : 'ol', output : '<ol>$0</ol>' },
+	{input : 'strong', output : '<strong>$0</strong>' },
+	{input : 'br', output : '<br />' },
+	{input : 'script', output : '<script type="text/javascript" language="javascript" charset="utf-8">\n\t$0\t\n</script>' },
+	{input : 'scriptsrc', output : '<script src="$0" type="text/javascript" language="javascript" charset="utf-8"></script>' },
+	{input : 'span', output : '<span>$0</span>' },
+	{input : 'table', output : '<table border="$0" cellspacing="" cellpadding="">\n\t<tr><th></th></tr>\n\t<tr><td></td></tr>\n</table>' },
+	{input : 'style', output : '<style type="text/css" media="screen">\n\t$0\n</style>' },
+	{input : 'xsl:stylesheet', output : '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">' },
+	{input : 'xsl:template', output : '<xsl:template>$0</xsl:template>' },
+	{input : 'xsl:for-each', output : '<xsl:for-each select="$0"></xsl:for-each>' },
+	{input : 'xsl:choose', output : '<xsl:choose>$0<\xsl:choose>' },
+	{input : 'xsl:param', output : '<xsl:param name="$0" />' },
+	{input : 'xsl:variable', output : '<xsl:variable name="$0"></xsl:variable>' },
+	{input : 'xsl:if', output : '<xsl:if test="$0"></xsl:if>' },
+	{input : 'xsl:when', output : '<xsl:when test="$0"></xsl:when>' },
+	{input : 'xsl:otherwise', output : '<xsl:otherwise>$0</xsl:otherwise>' },
+	{input : 'xsl:attribute', output : '<xsl:attribute name="$0"></xsl:attribute>' },
+	{input : 'xsl:value-of', output : '<xsl:value-of select="$0"/>' },
+	{input : 'xsl:with-param', output : '<xsl:with-param name="$0" select="" />' },
+	{input : 'xsl:call-template', output : '<xsl:call-template name="$0">' }
+
+];
+	
+Language.complete = [ // Auto complete only for 1 character
+	{input : '\'',output : '\'$0\'' },
+	{input : '"', output : '"$0"' },
+	{input : '(', output : '\($0\)' },
+	{input : '[', output : '\[$0\]' },
+	{input : '{', output : '{\n\t$0\n}' }		
+];
+
+Language.shortcuts = [];
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/license.txt
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/license.txt b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/license.txt
new file mode 100644
index 0000000..81b55d9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/codepress/license.txt
@@ -0,0 +1,458 @@
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/dialog-ie8.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/dialog-ie8.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/dialog-ie8.css
new file mode 100644
index 0000000..ef4e298
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/dialog-ie8.css
@@ -0,0 +1,4 @@
+div.ui-dialog-overlay {
+    /*filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='../img/overlay.png');    */
+    background-image:none !important;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/dialog.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/dialog.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/dialog.css
new file mode 100644
index 0000000..72718e5
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/dialog.css
@@ -0,0 +1,129 @@
+div#messagebox {
+    background-image: url(../img/confirm.gif);
+    background-position: 15px 15px;
+    background-repeat: no-repeat;
+    background-attachment: scroll;
+    padding-left: 75px;
+    padding-right: 15px;
+    padding-top: 15px;
+    padding-bottom: 15px;
+    width: 360px;
+    height: 68px;
+    _height: 150px;
+    overflow: auto;
+}
+
+div#messagebox img {
+    float: left;
+    margin-right: 20px;
+}
+
+div#messagebox p {
+    font-size: 115%;
+    margin: 0px;
+}
+
+div#messagebox-warning {
+    background-image: url(../img/warning.gif);
+    background-position: 15px 15px;
+    background-repeat: no-repeat;
+    background-attachment: scroll;
+    padding-left: 75px;
+    padding-right: 15px;
+    padding-top: 15px;
+    padding-bottom: 15px;
+    width: 360px;
+    height: 68px;
+    _height: 150px;
+    overflow: auto;
+}
+
+div#messagebox-warning img {
+    float: left;
+    margin-right: 20px;
+}
+
+div#messagebox-warning p {
+    font-size: 115%;
+    margin: 0px;
+}
+div#messagebox-error { 
+	background-image: url(../img/error.gif); 
+	background-position: 15px 15px; 
+	background-repeat: no-repeat; 
+	background-attachment: scroll; 
+	height: 108px;
+	width: 400px; 
+	padding: 15px 15px 15px 75px;
+    overflow:auto;
+}
+
+div#messagebox-error img {
+    float: left;
+    margin-right: 20px;
+}
+
+div#messagebox-error p {
+    font-size: 115%;
+    margin: 0px;
+}
+div#messagebox-info {
+    background-image: url(../img/info.gif);
+    background-position: 15px 15px;
+    background-repeat: no-repeat;
+    background-attachment: scroll;
+    padding-left: 75px;
+    padding-right: 15px;
+    padding-top: 15px;
+    padding-bottom: 15px;
+    height: 68px;
+    _height: 150px;
+    width: 360px;
+    overflow: auto;
+}
+
+div#messagebox-info img {
+    float: left;
+    margin-right: 20px;
+}
+
+div#messagebox-info p {
+    font-size: 115%;
+    margin: 0px;
+}
+div#messagebox-confirm {
+    background-image: url(../img/confirm.gif);
+    background-position: 15px 15px;
+    background-repeat: no-repeat;
+    background-attachment: scroll;
+    padding-left: 75px;
+    padding-right: 15px;
+    padding-top: 15px;
+    padding-bottom: 15px;
+    width: 360px;
+    height: 68px;
+    _height: 150px;
+    overflow:auto;
+}
+
+div#messagebox-confirm img {
+    float: left;
+    margin-right: 20px;
+}
+
+div#messagebox-confirm p {
+    font-size: 115%;
+    margin: 0px;
+}
+div.ui-dialog-overlay{
+ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='../img/overlay.png');
+}
+div.ui-dialog-overlay[class] {
+    background-image:url(../img/overlay.png);
+}
+/* dialog overflow fix */
+.ui-dialog-content{
+padding:0px;
+overflow: auto;
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_11x11_icon_close.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_11x11_icon_close.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_11x11_icon_close.gif
new file mode 100644
index 0000000..70d0c82
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_11x11_icon_close.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_11x11_icon_resize_se.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_11x11_icon_resize_se.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_11x11_icon_resize_se.gif
new file mode 100644
index 0000000..251dc16
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_11x11_icon_resize_se.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_7x7_arrow_left.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_7x7_arrow_left.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_7x7_arrow_left.gif
new file mode 100644
index 0000000..9f95efa
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_7x7_arrow_left.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_7x7_arrow_right.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_7x7_arrow_right.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_7x7_arrow_right.gif
new file mode 100644
index 0000000..bc02050
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/222222_7x7_arrow_right.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/454545_11x11_icon_close.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/454545_11x11_icon_close.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/454545_11x11_icon_close.gif
new file mode 100644
index 0000000..390a759
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/454545_11x11_icon_close.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/454545_7x7_arrow_left.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/454545_7x7_arrow_left.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/454545_7x7_arrow_left.gif
new file mode 100644
index 0000000..cf01ff3
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/454545_7x7_arrow_left.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/454545_7x7_arrow_right.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/454545_7x7_arrow_right.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/454545_7x7_arrow_right.gif
new file mode 100644
index 0000000..3190e7a
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/454545_7x7_arrow_right.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/888888_11x11_icon_close.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/888888_11x11_icon_close.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/888888_11x11_icon_close.gif
new file mode 100644
index 0000000..326d015
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/888888_11x11_icon_close.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/888888_7x7_arrow_left.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/888888_7x7_arrow_left.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/888888_7x7_arrow_left.gif
new file mode 100644
index 0000000..d6c523b
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/888888_7x7_arrow_left.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/888888_7x7_arrow_right.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/888888_7x7_arrow_right.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/888888_7x7_arrow_right.gif
new file mode 100644
index 0000000..d65b2ed
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/888888_7x7_arrow_right.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/dadada_40x100_textures_02_glass_75.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/dadada_40x100_textures_02_glass_75.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/dadada_40x100_textures_02_glass_75.png
new file mode 100644
index 0000000..60ba001
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/dadada_40x100_textures_02_glass_75.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/e6e6e6_40x100_textures_02_glass_75.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/e6e6e6_40x100_textures_02_glass_75.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/e6e6e6_40x100_textures_02_glass_75.png
new file mode 100644
index 0000000..a8b7ba3
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/e6e6e6_40x100_textures_02_glass_75.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/ffffff_40x100_textures_01_flat_0.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/ffffff_40x100_textures_01_flat_0.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/ffffff_40x100_textures_01_flat_0.png
new file mode 100644
index 0000000..ac8b229
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/ffffff_40x100_textures_01_flat_0.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/ffffff_40x100_textures_02_glass_65.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/ffffff_40x100_textures_02_glass_65.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/ffffff_40x100_textures_02_glass_65.png
new file mode 100644
index 0000000..2c16183
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/images/ffffff_40x100_textures_02_glass_65.png differ


[32/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.ui.core.min.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.ui.core.min.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.ui.core.min.js
new file mode 100644
index 0000000..577548e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.ui.core.min.js
@@ -0,0 +1,17 @@
+/*!
+ * jQuery UI 1.8.14
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI
+ */
+(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.14",
+keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();
+b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,
+"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",
+function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,
+outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,"tabindex"),d=isNaN(b);
+return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=
+0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.ui.tabs.min.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.ui.tabs.min.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.ui.tabs.min.js
new file mode 100644
index 0000000..11a67c1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.ui.tabs.min.js
@@ -0,0 +1,35 @@
+/*
+ * jQuery UI Tabs 1.8.14
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.widget.js
+ */
+(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&&
+e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=
+d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]||
+(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
+this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected=
+this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
+if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
+this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+
+g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
+function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")};
+this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=
+-1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";
+d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=
+d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b,
+e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]);
+j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();
+if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,function(h){return h!=b}),function(h){return h>=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null,
+this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this},
+load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c,
+"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},
+url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.14"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&
+a.rotate(null)}:function(){t=c.selected;h()});if(b){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(a.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.ui.widget.min.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.ui.widget.min.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.ui.widget.min.js
new file mode 100644
index 0000000..39ab91a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.ui.widget.min.js
@@ -0,0 +1,15 @@
+/*!
+ * jQuery UI Widget 1.8.14
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
+a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
+e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
+this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
+widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
+enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.validate.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.validate.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.validate.js
new file mode 100644
index 0000000..b7ed45b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.validate.js
@@ -0,0 +1,1188 @@
+/**
+ * jQuery Validation Plugin 1.9.0
+ *
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
+ * http://docs.jquery.com/Plugins/Validation
+ *
+ * Copyright (c) 2006 - 2011 Jörn Zaefferer
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ *   http://www.opensource.org/licenses/mit-license.php
+ *   http://www.gnu.org/licenses/gpl.html
+ */
+
+(function($) {
+
+$.extend($.fn, {
+	// http://docs.jquery.com/Plugins/Validation/validate
+	validate: function( options ) {
+
+		// if nothing is selected, return nothing; can't chain anyway
+		if (!this.length) {
+			options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" );
+			return;
+		}
+
+		// check if a validator for this form was already created
+		var validator = $.data(this[0], 'validator');
+		if ( validator ) {
+			return validator;
+		}
+
+		// Add novalidate tag if HTML5.
+		this.attr('novalidate', 'novalidate');
+
+		validator = new $.validator( options, this[0] );
+		$.data(this[0], 'validator', validator);
+
+		if ( validator.settings.onsubmit ) {
+
+			var inputsAndButtons = this.find("input, button");
+
+			// allow suppresing validation by adding a cancel class to the submit button
+			inputsAndButtons.filter(".cancel").click(function () {
+				validator.cancelSubmit = true;
+			});
+
+			// when a submitHandler is used, capture the submitting button
+			if (validator.settings.submitHandler) {
+				inputsAndButtons.filter(":submit").click(function () {
+					validator.submitButton = this;
+				});
+			}
+
+			// validate the form on submit
+			this.submit( function( event ) {
+				if ( validator.settings.debug )
+					// prevent form submit to be able to see console output
+					event.preventDefault();
+
+				function handle() {
+					if ( validator.settings.submitHandler ) {
+						if (validator.submitButton) {
+							// insert a hidden input as a replacement for the missing submit button
+							var hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);
+						}
+						validator.settings.submitHandler.call( validator, validator.currentForm );
+						if (validator.submitButton) {
+							// and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+							hidden.remove();
+						}
+						return false;
+					}
+					return true;
+				}
+
+				// prevent submit for invalid forms or custom submit handlers
+				if ( validator.cancelSubmit ) {
+					validator.cancelSubmit = false;
+					return handle();
+				}
+				if ( validator.form() ) {
+					if ( validator.pendingRequest ) {
+						validator.formSubmitted = true;
+						return false;
+					}
+					return handle();
+				} else {
+					validator.focusInvalid();
+					return false;
+				}
+			});
+		}
+
+		return validator;
+	},
+	// http://docs.jquery.com/Plugins/Validation/valid
+	valid: function() {
+        if ( $(this[0]).is('form')) {
+            return this.validate().form();
+        } else {
+            var valid = true;
+            var validator = $(this[0].form).validate();
+            this.each(function() {
+				valid &= validator.element(this);
+            });
+            return valid;
+        }
+    },
+	// attributes: space seperated list of attributes to retrieve and remove
+	removeAttrs: function(attributes) {
+		var result = {},
+			$element = this;
+		$.each(attributes.split(/\s/), function(index, value) {
+			result[value] = $element.attr(value);
+			$element.removeAttr(value);
+		});
+		return result;
+	},
+	// http://docs.jquery.com/Plugins/Validation/rules
+	rules: function(command, argument) {
+		var element = this[0];
+
+		if (command) {
+			var settings = $.data(element.form, 'validator').settings;
+			var staticRules = settings.rules;
+			var existingRules = $.validator.staticRules(element);
+			switch(command) {
+			case "add":
+				$.extend(existingRules, $.validator.normalizeRule(argument));
+				staticRules[element.name] = existingRules;
+				if (argument.messages)
+					settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
+				break;
+			case "remove":
+				if (!argument) {
+					delete staticRules[element.name];
+					return existingRules;
+				}
+				var filtered = {};
+				$.each(argument.split(/\s/), function(index, method) {
+					filtered[method] = existingRules[method];
+					delete existingRules[method];
+				});
+				return filtered;
+			}
+		}
+
+		var data = $.validator.normalizeRules(
+		$.extend(
+			{},
+			$.validator.metadataRules(element),
+			$.validator.classRules(element),
+			$.validator.attributeRules(element),
+			$.validator.staticRules(element)
+		), element);
+
+		// make sure required is at front
+		if (data.required) {
+			var param = data.required;
+			delete data.required;
+			data = $.extend({required: param}, data);
+		}
+
+		return data;
+	}
+});
+
+// Custom selectors
+$.extend($.expr[":"], {
+	// http://docs.jquery.com/Plugins/Validation/blank
+	blank: function(a) {return !$.trim("" + a.value);},
+	// http://docs.jquery.com/Plugins/Validation/filled
+	filled: function(a) {return !!$.trim("" + a.value);},
+	// http://docs.jquery.com/Plugins/Validation/unchecked
+	unchecked: function(a) {return !a.checked;}
+});
+
+// constructor for validator
+$.validator = function( options, form ) {
+	this.settings = $.extend( true, {}, $.validator.defaults, options );
+	this.currentForm = form;
+	this.init();
+};
+
+$.validator.format = function(source, params) {
+	if ( arguments.length == 1 )
+		return function() {
+			var args = $.makeArray(arguments);
+			args.unshift(source);
+			return $.validator.format.apply( this, args );
+		};
+	if ( arguments.length > 2 && params.constructor != Array  ) {
+		params = $.makeArray(arguments).slice(1);
+	}
+	if ( params.constructor != Array ) {
+		params = [ params ];
+	}
+	$.each(params, function(i, n) {
+		source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n);
+	});
+	return source;
+};
+
+$.extend($.validator, {
+
+	defaults: {
+		messages: {},
+		groups: {},
+		rules: {},
+		errorClass: "error",
+		validClass: "valid",
+		errorElement: "label",
+		focusInvalid: true,
+		errorContainer: $( [] ),
+		errorLabelContainer: $( [] ),
+		onsubmit: true,
+		ignore: ":hidden",
+		ignoreTitle: false,
+		onfocusin: function(element, event) {
+			this.lastActive = element;
+
+			// hide error label and remove error class on focus if enabled
+			if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
+				this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
+				this.addWrapper(this.errorsFor(element)).hide();
+			}
+		},
+		onfocusout: function(element, event) {
+			if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
+				this.element(element);
+			}
+		},
+		onkeyup: function(element, event) {
+			if ( element.name in this.submitted || element == this.lastElement ) {
+				this.element(element);
+			}
+		},
+		onclick: function(element, event) {
+			// click on selects, radiobuttons and checkboxes
+			if ( element.name in this.submitted )
+				this.element(element);
+			// or option elements, check parent select in that case
+			else if (element.parentNode.name in this.submitted)
+				this.element(element.parentNode);
+		},
+		highlight: function(element, errorClass, validClass) {
+			if (element.type === 'radio') {
+				this.findByName(element.name).addClass(errorClass).removeClass(validClass);
+			} else {
+				$(element).addClass(errorClass).removeClass(validClass);
+			}
+		},
+		unhighlight: function(element, errorClass, validClass) {
+			if (element.type === 'radio') {
+				this.findByName(element.name).removeClass(errorClass).addClass(validClass);
+			} else {
+				$(element).removeClass(errorClass).addClass(validClass);
+			}
+		}
+	},
+
+	// http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
+	setDefaults: function(settings) {
+		$.extend( $.validator.defaults, settings );
+	},
+
+	messages: {
+		required: "This field is required.",
+		remote: "Please fix this field.",
+		email: "Please enter a valid email address.",
+		url: "Please enter a valid URL.",
+		date: "Please enter a valid date.",
+		dateISO: "Please enter a valid date (ISO).",
+		number: "Please enter a valid number.",
+		digits: "Please enter only digits.",
+		creditcard: "Please enter a valid credit card number.",
+		equalTo: "Please enter the same value again.",
+		accept: "Please enter a value with a valid extension.",
+		maxlength: $.validator.format("Please enter no more than {0} characters."),
+		minlength: $.validator.format("Please enter at least {0} characters."),
+		rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
+		range: $.validator.format("Please enter a value between {0} and {1}."),
+		max: $.validator.format("Please enter a value less than or equal to {0}."),
+		min: $.validator.format("Please enter a value greater than or equal to {0}.")
+	},
+
+	autoCreateRanges: false,
+
+	prototype: {
+
+		init: function() {
+			this.labelContainer = $(this.settings.errorLabelContainer);
+			this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
+			this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
+			this.submitted = {};
+			this.valueCache = {};
+			this.pendingRequest = 0;
+			this.pending = {};
+			this.invalid = {};
+			this.reset();
+
+			var groups = (this.groups = {});
+			$.each(this.settings.groups, function(key, value) {
+				$.each(value.split(/\s/), function(index, name) {
+					groups[name] = key;
+				});
+			});
+			var rules = this.settings.rules;
+			$.each(rules, function(key, value) {
+				rules[key] = $.validator.normalizeRule(value);
+			});
+
+			function delegate(event) {
+				var validator = $.data(this[0].form, "validator"),
+					eventType = "on" + event.type.replace(/^validate/, "");
+				validator.settings[eventType] && validator.settings[eventType].call(validator, this[0], event);
+			}
+			$(this.currentForm)
+			       .validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, " +
+						"[type='number'], [type='search'] ,[type='tel'], [type='url'], " +
+						"[type='email'], [type='datetime'], [type='date'], [type='month'], " +
+						"[type='week'], [type='time'], [type='datetime-local'], " +
+						"[type='range'], [type='color'] ",
+						"focusin focusout keyup", delegate)
+				.validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate);
+
+			if (this.settings.invalidHandler)
+				$(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Validator/form
+		form: function() {
+			this.checkForm();
+			$.extend(this.submitted, this.errorMap);
+			this.invalid = $.extend({}, this.errorMap);
+			if (!this.valid())
+				$(this.currentForm).triggerHandler("invalid-form", [this]);
+			this.showErrors();
+			return this.valid();
+		},
+
+		checkForm: function() {
+			this.prepareForm();
+			for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
+				this.check( elements[i] );
+			}
+			return this.valid();
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Validator/element
+		element: function( element ) {
+			element = this.validationTargetFor( this.clean( element ) );
+			this.lastElement = element;
+			this.prepareElement( element );
+			this.currentElements = $(element);
+			var result = this.check( element );
+			if ( result ) {
+				delete this.invalid[element.name];
+			} else {
+				this.invalid[element.name] = true;
+			}
+			if ( !this.numberOfInvalids() ) {
+				// Hide error containers on last error
+				this.toHide = this.toHide.add( this.containers );
+			}
+			this.showErrors();
+			return result;
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Validator/showErrors
+		showErrors: function(errors) {
+			if(errors) {
+				// add items to error list and map
+				$.extend( this.errorMap, errors );
+				this.errorList = [];
+				for ( var name in errors ) {
+					this.errorList.push({
+						message: errors[name],
+						element: this.findByName(name)[0]
+					});
+				}
+				// remove items from success list
+				this.successList = $.grep( this.successList, function(element) {
+					return !(element.name in errors);
+				});
+			}
+			this.settings.showErrors
+				? this.settings.showErrors.call( this, this.errorMap, this.errorList )
+				: this.defaultShowErrors();
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Validator/resetForm
+		resetForm: function() {
+			if ( $.fn.resetForm )
+				$( this.currentForm ).resetForm();
+			this.submitted = {};
+			this.lastElement = null;
+			this.prepareForm();
+			this.hideErrors();
+			this.elements().removeClass( this.settings.errorClass );
+		},
+
+		numberOfInvalids: function() {
+			return this.objectLength(this.invalid);
+		},
+
+		objectLength: function( obj ) {
+			var count = 0;
+			for ( var i in obj )
+				count++;
+			return count;
+		},
+
+		hideErrors: function() {
+			this.addWrapper( this.toHide ).hide();
+		},
+
+		valid: function() {
+			return this.size() == 0;
+		},
+
+		size: function() {
+			return this.errorList.length;
+		},
+
+		focusInvalid: function() {
+			if( this.settings.focusInvalid ) {
+				try {
+					$(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])
+					.filter(":visible")
+					.focus()
+					// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+					.trigger("focusin");
+				} catch(e) {
+					// ignore IE throwing errors when focusing hidden elements
+				}
+			}
+		},
+
+		findLastActive: function() {
+			var lastActive = this.lastActive;
+			return lastActive && $.grep(this.errorList, function(n) {
+				return n.element.name == lastActive.name;
+			}).length == 1 && lastActive;
+		},
+
+		elements: function() {
+			var validator = this,
+				rulesCache = {};
+
+			// select all valid inputs inside the form (no submit or reset buttons)
+			return $(this.currentForm)
+			.find("input, select, textarea")
+			.not(":submit, :reset, :image, [disabled]")
+			.not( this.settings.ignore )
+			.filter(function() {
+				!this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this);
+
+				// select only the first element for each name, and only those with rules specified
+				if ( this.name in rulesCache || !validator.objectLength($(this).rules()) )
+					return false;
+
+				rulesCache[this.name] = true;
+				return true;
+			});
+		},
+
+		clean: function( selector ) {
+			return $( selector )[0];
+		},
+
+		errors: function() {
+			return $( this.settings.errorElement + "." + this.settings.errorClass, this.errorContext );
+		},
+
+		reset: function() {
+			this.successList = [];
+			this.errorList = [];
+			this.errorMap = {};
+			this.toShow = $([]);
+			this.toHide = $([]);
+			this.currentElements = $([]);
+		},
+
+		prepareForm: function() {
+			this.reset();
+			this.toHide = this.errors().add( this.containers );
+		},
+
+		prepareElement: function( element ) {
+			this.reset();
+			this.toHide = this.errorsFor(element);
+		},
+
+		check: function( element ) {
+			element = this.validationTargetFor( this.clean( element ) );
+
+			var rules = $(element).rules();
+			var dependencyMismatch = false;
+			for (var method in rules ) {
+				var rule = { method: method, parameters: rules[method] };
+				try {
+					var result = $.validator.methods[method].call( this, element.value.replace(/\r/g, ""), element, rule.parameters );
+
+					// if a method indicates that the field is optional and therefore valid,
+					// don't mark it as valid when there are no other rules
+					if ( result == "dependency-mismatch" ) {
+						dependencyMismatch = true;
+						continue;
+					}
+					dependencyMismatch = false;
+
+					if ( result == "pending" ) {
+						this.toHide = this.toHide.not( this.errorsFor(element) );
+						return;
+					}
+
+					if( !result ) {
+						this.formatAndAdd( element, rule );
+						return false;
+					}
+				} catch(e) {
+					this.settings.debug && window.console && console.log("exception occured when checking element " + element.id
+						 + ", check the '" + rule.method + "' method", e);
+					throw e;
+				}
+			}
+			if (dependencyMismatch)
+				return;
+			if ( this.objectLength(rules) )
+				this.successList.push(element);
+			return true;
+		},
+
+		// return the custom message for the given element and validation method
+		// specified in the element's "messages" metadata
+		customMetaMessage: function(element, method) {
+			if (!$.metadata)
+				return;
+
+			var meta = this.settings.meta
+				? $(element).metadata()[this.settings.meta]
+				: $(element).metadata();
+
+			return meta && meta.messages && meta.messages[method];
+		},
+
+		// return the custom message for the given element name and validation method
+		customMessage: function( name, method ) {
+			var m = this.settings.messages[name];
+			return m && (m.constructor == String
+				? m
+				: m[method]);
+		},
+
+		// return the first defined argument, allowing empty strings
+		findDefined: function() {
+			for(var i = 0; i < arguments.length; i++) {
+				if (arguments[i] !== undefined)
+					return arguments[i];
+			}
+			return undefined;
+		},
+
+		defaultMessage: function( element, method) {
+			return this.findDefined(
+				this.customMessage( element.name, method ),
+				this.customMetaMessage( element, method ),
+				// title is never undefined, so handle empty string as undefined
+				!this.settings.ignoreTitle && element.title || undefined,
+				$.validator.messages[method],
+				"<strong>Warning: No message defined for " + element.name + "</strong>"
+			);
+		},
+
+		formatAndAdd: function( element, rule ) {
+			var message = this.defaultMessage( element, rule.method ),
+				theregex = /\$?\{(\d+)\}/g;
+			if ( typeof message == "function" ) {
+				message = message.call(this, rule.parameters, element);
+			} else if (theregex.test(message)) {
+				message = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters);
+			}
+			this.errorList.push({
+				message: message,
+				element: element
+			});
+
+			this.errorMap[element.name] = message;
+			this.submitted[element.name] = message;
+		},
+
+		addWrapper: function(toToggle) {
+			if ( this.settings.wrapper )
+				toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
+			return toToggle;
+		},
+
+		defaultShowErrors: function() {
+			for ( var i = 0; this.errorList[i]; i++ ) {
+				var error = this.errorList[i];
+				this.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );
+				this.showLabel( error.element, error.message );
+			}
+			if( this.errorList.length ) {
+				this.toShow = this.toShow.add( this.containers );
+			}
+			if (this.settings.success) {
+				for ( var i = 0; this.successList[i]; i++ ) {
+					this.showLabel( this.successList[i] );
+				}
+			}
+			if (this.settings.unhighlight) {
+				for ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {
+					this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );
+				}
+			}
+			this.toHide = this.toHide.not( this.toShow );
+			this.hideErrors();
+			this.addWrapper( this.toShow ).show();
+		},
+
+		validElements: function() {
+			return this.currentElements.not(this.invalidElements());
+		},
+
+		invalidElements: function() {
+			return $(this.errorList).map(function() {
+				return this.element;
+			});
+		},
+
+		showLabel: function(element, message) {
+			var label = this.errorsFor( element );
+			if ( label.length ) {
+				// refresh error/success class
+				label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
+
+				// check if we have a generated label, replace the message then
+				label.attr("generated") && label.html(message);
+			} else {
+				// create label
+				label = $("<" + this.settings.errorElement + "/>")
+					.attr({"for":  this.idOrName(element), generated: true})
+					.addClass(this.settings.errorClass)
+					.html(message || "");
+				if ( this.settings.wrapper ) {
+					// make sure the element is visible, even in IE
+					// actually showing the wrapped element is handled elsewhere
+					label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
+				}
+				if ( !this.labelContainer.append(label).length )
+					this.settings.errorPlacement
+						? this.settings.errorPlacement(label, $(element) )
+						: label.insertAfter(element);
+			}
+			if ( !message && this.settings.success ) {
+				label.text("");
+				typeof this.settings.success == "string"
+					? label.addClass( this.settings.success )
+					: this.settings.success( label );
+			}
+			this.toShow = this.toShow.add(label);
+		},
+
+		errorsFor: function(element) {
+			var name = this.idOrName(element);
+    		return this.errors().filter(function() {
+				return $(this).attr('for') == name;
+			});
+		},
+
+		idOrName: function(element) {
+			return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
+		},
+
+		validationTargetFor: function(element) {
+			// if radio/checkbox, validate first element in group instead
+			if (this.checkable(element)) {
+				element = this.findByName( element.name ).not(this.settings.ignore)[0];
+			}
+			return element;
+		},
+
+		checkable: function( element ) {
+			return /radio|checkbox/i.test(element.type);
+		},
+
+		findByName: function( name ) {
+			// select by name and filter by form for performance over form.find("[name=...]")
+			var form = this.currentForm;
+			return $(document.getElementsByName(name)).map(function(index, element) {
+				return element.form == form && element.name == name && element  || null;
+			});
+		},
+
+		getLength: function(value, element) {
+			switch( element.nodeName.toLowerCase() ) {
+			case 'select':
+				return $("option:selected", element).length;
+			case 'input':
+				if( this.checkable( element) )
+					return this.findByName(element.name).filter(':checked').length;
+			}
+			return value.length;
+		},
+
+		depend: function(param, element) {
+			return this.dependTypes[typeof param]
+				? this.dependTypes[typeof param](param, element)
+				: true;
+		},
+
+		dependTypes: {
+			"boolean": function(param, element) {
+				return param;
+			},
+			"string": function(param, element) {
+				return !!$(param, element.form).length;
+			},
+			"function": function(param, element) {
+				return param(element);
+			}
+		},
+
+		optional: function(element) {
+			return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch";
+		},
+
+		startRequest: function(element) {
+			if (!this.pending[element.name]) {
+				this.pendingRequest++;
+				this.pending[element.name] = true;
+			}
+		},
+
+		stopRequest: function(element, valid) {
+			this.pendingRequest--;
+			// sometimes synchronization fails, make sure pendingRequest is never < 0
+			if (this.pendingRequest < 0)
+				this.pendingRequest = 0;
+			delete this.pending[element.name];
+			if ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {
+				$(this.currentForm).submit();
+				this.formSubmitted = false;
+			} else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {
+				$(this.currentForm).triggerHandler("invalid-form", [this]);
+				this.formSubmitted = false;
+			}
+		},
+
+		previousValue: function(element) {
+			return $.data(element, "previousValue") || $.data(element, "previousValue", {
+				old: null,
+				valid: true,
+				message: this.defaultMessage( element, "remote" )
+			});
+		}
+
+	},
+
+	classRuleSettings: {
+		required: {required: true},
+		email: {email: true},
+		url: {url: true},
+		date: {date: true},
+		dateISO: {dateISO: true},
+		dateDE: {dateDE: true},
+		number: {number: true},
+		numberDE: {numberDE: true},
+		digits: {digits: true},
+		creditcard: {creditcard: true}
+	},
+
+	addClassRules: function(className, rules) {
+		className.constructor == String ?
+			this.classRuleSettings[className] = rules :
+			$.extend(this.classRuleSettings, className);
+	},
+
+	classRules: function(element) {
+		var rules = {};
+		var classes = $(element).attr('class');
+		classes && $.each(classes.split(' '), function() {
+			if (this in $.validator.classRuleSettings) {
+				$.extend(rules, $.validator.classRuleSettings[this]);
+			}
+		});
+		return rules;
+	},
+
+	attributeRules: function(element) {
+		var rules = {};
+		var $element = $(element);
+
+		for (var method in $.validator.methods) {
+			var value;
+			// If .prop exists (jQuery >= 1.6), use it to get true/false for required
+			if (method === 'required' && typeof $.fn.prop === 'function') {
+				value = $element.prop(method);
+			} else {
+				value = $element.attr(method);
+			}
+			if (value) {
+				rules[method] = value;
+			} else if ($element[0].getAttribute("type") === method) {
+				rules[method] = true;
+			}
+		}
+
+		// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
+		if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {
+			delete rules.maxlength;
+		}
+
+		return rules;
+	},
+
+	metadataRules: function(element) {
+		if (!$.metadata) return {};
+
+		var meta = $.data(element.form, 'validator').settings.meta;
+		return meta ?
+			$(element).metadata()[meta] :
+			$(element).metadata();
+	},
+
+	staticRules: function(element) {
+		var rules = {};
+		var validator = $.data(element.form, 'validator');
+		if (validator.settings.rules) {
+			rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
+		}
+		return rules;
+	},
+
+	normalizeRules: function(rules, element) {
+		// handle dependency check
+		$.each(rules, function(prop, val) {
+			// ignore rule when param is explicitly false, eg. required:false
+			if (val === false) {
+				delete rules[prop];
+				return;
+			}
+			if (val.param || val.depends) {
+				var keepRule = true;
+				switch (typeof val.depends) {
+					case "string":
+						keepRule = !!$(val.depends, element.form).length;
+						break;
+					case "function":
+						keepRule = val.depends.call(element, element);
+						break;
+				}
+				if (keepRule) {
+					rules[prop] = val.param !== undefined ? val.param : true;
+				} else {
+					delete rules[prop];
+				}
+			}
+		});
+
+		// evaluate parameters
+		$.each(rules, function(rule, parameter) {
+			rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
+		});
+
+		// clean number parameters
+		$.each(['minlength', 'maxlength', 'min', 'max'], function() {
+			if (rules[this]) {
+				rules[this] = Number(rules[this]);
+			}
+		});
+		$.each(['rangelength', 'range'], function() {
+			if (rules[this]) {
+				rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
+			}
+		});
+
+		if ($.validator.autoCreateRanges) {
+			// auto-create ranges
+			if (rules.min && rules.max) {
+				rules.range = [rules.min, rules.max];
+				delete rules.min;
+				delete rules.max;
+			}
+			if (rules.minlength && rules.maxlength) {
+				rules.rangelength = [rules.minlength, rules.maxlength];
+				delete rules.minlength;
+				delete rules.maxlength;
+			}
+		}
+
+		// To support custom messages in metadata ignore rule methods titled "messages"
+		if (rules.messages) {
+			delete rules.messages;
+		}
+
+		return rules;
+	},
+
+	// Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
+	normalizeRule: function(data) {
+		if( typeof data == "string" ) {
+			var transformed = {};
+			$.each(data.split(/\s/), function() {
+				transformed[this] = true;
+			});
+			data = transformed;
+		}
+		return data;
+	},
+
+	// http://docs.jquery.com/Plugins/Validation/Validator/addMethod
+	addMethod: function(name, method, message) {
+		$.validator.methods[name] = method;
+		$.validator.messages[name] = message != undefined ? message : $.validator.messages[name];
+		if (method.length < 3) {
+			$.validator.addClassRules(name, $.validator.normalizeRule(name));
+		}
+	},
+
+	methods: {
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/required
+		required: function(value, element, param) {
+			// check if dependency is met
+			if ( !this.depend(param, element) )
+				return "dependency-mismatch";
+			switch( element.nodeName.toLowerCase() ) {
+			case 'select':
+				// could be an array for select-multiple or a string, both are fine this way
+				var val = $(element).val();
+				return val && val.length > 0;
+			case 'input':
+				if ( this.checkable(element) )
+					return this.getLength(value, element) > 0;
+			default:
+				return $.trim(value).length > 0;
+			}
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/remote
+		remote: function(value, element, param) {
+			if ( this.optional(element) )
+				return "dependency-mismatch";
+
+			var previous = this.previousValue(element);
+			if (!this.settings.messages[element.name] )
+				this.settings.messages[element.name] = {};
+			previous.originalMessage = this.settings.messages[element.name].remote;
+			this.settings.messages[element.name].remote = previous.message;
+
+			param = typeof param == "string" && {url:param} || param;
+
+			if ( this.pending[element.name] ) {
+				return "pending";
+			}
+			if ( previous.old === value ) {
+				return previous.valid;
+			}
+
+			previous.old = value;
+			var validator = this;
+			this.startRequest(element);
+			var data = {};
+			data[element.name] = value;
+			$.ajax($.extend(true, {
+				url: param,
+				mode: "abort",
+				port: "validate" + element.name,
+				dataType: "json",
+				data: data,
+				success: function(response) {
+					validator.settings.messages[element.name].remote = previous.originalMessage;
+					var valid = response === true;
+					if ( valid ) {
+						var submitted = validator.formSubmitted;
+						validator.prepareElement(element);
+						validator.formSubmitted = submitted;
+						validator.successList.push(element);
+						validator.showErrors();
+					} else {
+						var errors = {};
+						var message = response || validator.defaultMessage( element, "remote" );
+						errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;
+						validator.showErrors(errors);
+					}
+					previous.valid = valid;
+					validator.stopRequest(element, valid);
+				}
+			}, param));
+			return "pending";
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/minlength
+		minlength: function(value, element, param) {
+			return this.optional(element) || this.getLength($.trim(value), element) >= param;
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/maxlength
+		maxlength: function(value, element, param) {
+			return this.optional(element) || this.getLength($.trim(value), element) <= param;
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/rangelength
+		rangelength: function(value, element, param) {
+			var length = this.getLength($.trim(value), element);
+			return this.optional(element) || ( length >= param[0] && length <= param[1] );
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/min
+		min: function( value, element, param ) {
+			return this.optional(element) || value >= param;
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/max
+		max: function( value, element, param ) {
+			return this.optional(element) || value <= param;
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/range
+		range: function( value, element, param ) {
+			return this.optional(element) || ( value >= param[0] && value <= param[1] );
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/email
+		email: function(value, element) {
+			// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
+			return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value);
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/url
+		url: function(value, element) {
+			// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
+			return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.
 |_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/date
+		date: function(value, element) {
+			return this.optional(element) || !/Invalid|NaN/.test(new Date(value));
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/dateISO
+		dateISO: function(value, element) {
+			return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/number
+		number: function(value, element) {
+			return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/digits
+		digits: function(value, element) {
+			return this.optional(element) || /^\d+$/.test(value);
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/creditcard
+		// based on http://en.wikipedia.org/wiki/Luhn
+		creditcard: function(value, element) {
+			if ( this.optional(element) )
+				return "dependency-mismatch";
+			// accept only spaces, digits and dashes
+			if (/[^0-9 -]+/.test(value))
+				return false;
+			var nCheck = 0,
+				nDigit = 0,
+				bEven = false;
+
+			value = value.replace(/\D/g, "");
+
+			for (var n = value.length - 1; n >= 0; n--) {
+				var cDigit = value.charAt(n);
+				var nDigit = parseInt(cDigit, 10);
+				if (bEven) {
+					if ((nDigit *= 2) > 9)
+						nDigit -= 9;
+				}
+				nCheck += nDigit;
+				bEven = !bEven;
+			}
+
+			return (nCheck % 10) == 0;
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/accept
+		accept: function(value, element, param) {
+			param = typeof param == "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif";
+			return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
+		},
+
+		// http://docs.jquery.com/Plugins/Validation/Methods/equalTo
+		equalTo: function(value, element, param) {
+			// bind to the blur event of the target in order to revalidate whenever the target field is updated
+			// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+			var target = $(param).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
+				$(element).valid();
+			});
+			return value == target.val();
+		}
+
+	}
+
+});
+
+// deprecated, use $.validator.format instead
+$.format = $.validator.format;
+
+})(jQuery);
+
+// ajax mode: abort
+// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
+// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
+;(function($) {
+	var pendingRequests = {};
+	// Use a prefilter if available (1.5+)
+	if ( $.ajaxPrefilter ) {
+		$.ajaxPrefilter(function(settings, _, xhr) {
+			var port = settings.port;
+			if (settings.mode == "abort") {
+				if ( pendingRequests[port] ) {
+					pendingRequests[port].abort();
+				}
+				pendingRequests[port] = xhr;
+			}
+		});
+	} else {
+		// Proxy ajax
+		var ajax = $.ajax;
+		$.ajax = function(settings) {
+			var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
+				port = ( "port" in settings ? settings : $.ajaxSettings ).port;
+			if (mode == "abort") {
+				if ( pendingRequests[port] ) {
+					pendingRequests[port].abort();
+				}
+				return (pendingRequests[port] = ajax.apply(this, arguments));
+			}
+			return ajax.apply(this, arguments);
+		};
+	}
+})(jQuery);
+
+// provides cross-browser focusin and focusout events
+// IE has native support, in other browsers, use event caputuring (neither bubbles)
+
+// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
+// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
+;(function($) {
+	// only implement if not provided by jQuery core (since 1.4)
+	// TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs
+	if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {
+		$.each({
+			focus: 'focusin',
+			blur: 'focusout'
+		}, function( original, fix ){
+			$.event.special[fix] = {
+				setup:function() {
+					this.addEventListener( original, handler, true );
+				},
+				teardown:function() {
+					this.removeEventListener( original, handler, true );
+				},
+				handler: function(e) {
+					arguments[0] = $.event.fix(e);
+					arguments[0].type = fix;
+					return $.event.handle.apply(this, arguments);
+				}
+			};
+			function handler(e) {
+				e = $.event.fix(e);
+				e.type = fix;
+				return $.event.handle.call(this, e);
+			}
+		});
+	};
+	$.extend($.fn, {
+		validateDelegate: function(delegate, type, handler) {
+			return this.bind(type, function(event) {
+				var target = $(event.target);
+				if (target.is(delegate)) {
+					return handler.apply(target, arguments);
+				}
+			});
+		}
+	});
+})(jQuery);


[39/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/error.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/error.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/error.jsp
new file mode 100644
index 0000000..80861cb
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/error.jsp
@@ -0,0 +1,182 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@page import="org.apache.axis2.AxisFault" %>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page import="org.wso2.carbon.CarbonError" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+
+<%@page import="javax.xml.namespace.QName" %>
+<%@page import="java.io.PrintWriter" %>
+<%@page import="java.io.StringWriter" %>
+<%@ page import="java.util.ArrayList" %>
+<%@ page import="org.wso2.carbon.ui.util.CharacterEncoder" %>
+<carbon:breadcrumb
+        label="error.occurred"
+        resourceBundle="org.wso2.carbon.i18n.Resources"
+        topPage="true"
+        request="<%=request%>"/>
+
+<%
+    //First checks whether there is a CarbonUIMessage in the request
+    CarbonUIMessage carbonMessage = (CarbonUIMessage) session.getAttribute(CarbonUIMessage.ID);
+
+    if (carbonMessage == null) {
+        carbonMessage = (CarbonUIMessage) request.getAttribute(CarbonUIMessage.ID);
+    } else {
+        session.removeAttribute(CarbonUIMessage.ID);
+    }
+    if (carbonMessage != null) {
+        session.removeAttribute(CarbonUIMessage.ID);
+        Exception e = carbonMessage.getException();
+        boolean authFailure = false;
+        boolean sessionTimedOut = false;
+        if (e != null) {
+            Throwable cause = e.getCause();
+            if (e instanceof AxisFault) {
+                AxisFault axisFault = (AxisFault) e;
+                QName name = axisFault.getFaultCode();
+                if (name != null && name.getLocalPart() != null && name.getLocalPart().equals(CarbonConstants.AUTHZ_FAULT_CODE)) {
+                    authFailure = true;
+                }
+                if(e.getMessage().toLowerCase().indexOf("session timed out") != -1){
+                     sessionTimedOut = true;
+                }
+            } else if ((cause != null) && (cause instanceof AxisFault)) {
+                AxisFault axisFault = (AxisFault) cause;
+                QName name = axisFault.getFaultCode();
+                if (name != null && name.getLocalPart() != null && name.getLocalPart().equals(CarbonConstants.AUTHZ_FAULT_CODE)) {
+                    authFailure = true;
+                }
+            }
+        }
+
+%>
+<div id="middle">
+    <%
+        if (authFailure) {
+    %>
+    <h2><img src='../dialog/img/error.gif'/> Authorization Failure</h2>
+    <% } else if(sessionTimedOut) {
+           session.invalidate();
+           return;
+    } else { %>
+    <h2><img src='../dialog/img/error.gif'/> System Error Occurred</h2>
+    <%
+        }
+    %>
+
+    <div id="workArea">
+        <table class="styledLeft">
+            <tbody>
+            <%
+                if (e != null) {
+                    if (authFailure) {
+            %>
+            <tr>
+                <td><b>Authorization Failure</b></td>
+            </tr>
+            <tr>
+                <td>
+                    <%
+                        out.write("You are not authorized to perform this action.");
+                    %>
+                </td>
+            </tr>
+            <%
+            } else {
+            %>
+            <tr>
+                <td><b><%=carbonMessage.getMessage()%></b></td>
+            </tr>
+            <tr>
+                <td>
+                    <%
+	                    StringWriter sw = new StringWriter();
+	                    PrintWriter pw = new PrintWriter(sw);
+                    	if(carbonMessage.isShowStackTrace()){
+                    	    pw.write("<b>The following error details are available. Please refer logs for more details.</b><br/>");
+                            e.printStackTrace(pw);
+                            String errorStr = sw.toString();
+                            errorStr = errorStr.replaceAll("\n", "<br/>");
+                            for (int i = 0; i < errorStr.length(); i++) {
+                                out.write(errorStr.charAt(i));
+                            }
+                        }else{
+                        	pw.write("<b>Please refer log for details.</b><br/>");
+                        }
+                        sw.close();
+                        pw.close();
+                        out.flush();
+            	}
+                    %>
+                </td>
+            </tr>
+            <%
+            } else {
+            %>
+            <tr>
+                <td><b><%=carbonMessage.getMessage()%>
+                </b></td>
+            </tr>
+            <%
+                }
+            %>
+            </tbody>
+        </table>
+    </div>
+</div>
+<%
+    }
+%>
+
+
+<%
+    String errorMsg = CharacterEncoder.getSafeText(request.getParameter("errorMsg"));
+    CarbonError error = null;
+    boolean retrievedFromSession = false;
+    error = (CarbonError) request.getAttribute(CarbonError.ID);
+    if (error == null) {
+        //look for error object in session
+        error = (CarbonError) request.getSession().getAttribute(CarbonError.ID);
+        retrievedFromSession = true;
+    }
+    if (error != null) {
+%>
+<p>
+    <label>Error occurred</label>
+        <%
+
+     ArrayList<String> list = (ArrayList<String>) error.getErrors();
+     String[] errors = (String[])list.toArray(new String[list.size()]);
+     for(int a = 0;a < errors.length;a++){
+
+    %>
+<li><%=errors[a]%>
+</li>
+<%
+    }
+%>
+</p>
+<%
+        if (retrievedFromSession) {
+            request.getSession().setAttribute(CarbonError.ID, null);
+        }
+    }
+%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/1px.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/1px.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/1px.gif
new file mode 100644
index 0000000..f866f1d
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/1px.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-collection.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-collection.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-collection.gif
new file mode 100644
index 0000000..b5b64e9
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-collection.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-link.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-link.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-link.gif
new file mode 100644
index 0000000..6126362
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-link.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-resource.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-resource.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-resource.gif
new file mode 100644
index 0000000..de45602
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-resource.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-small-icon.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-small-icon.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-small-icon.gif
new file mode 100644
index 0000000..dfb342f
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add-small-icon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add.gif
new file mode 100644
index 0000000..4bfdd79
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/add.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/addNewTab.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/addNewTab.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/addNewTab.gif
new file mode 100644
index 0000000..6be28f5
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/addNewTab.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/am_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/am_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/am_logo_h23.gif
new file mode 100644
index 0000000..9d6af9f
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/am_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/application_edit.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/application_edit.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/application_edit.gif
new file mode 100644
index 0000000..c5e39ca
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/application_edit.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/appserver_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/appserver_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/appserver_logo_h23.gif
new file mode 100644
index 0000000..3b4d1b5
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/appserver_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/arrow-down.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/arrow-down.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/arrow-down.png
new file mode 100644
index 0000000..dc86429
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/arrow-down.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/arrow-up.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/arrow-up.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/arrow-up.png
new file mode 100644
index 0000000..8ba09a8
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/arrow-up.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/atom.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/atom.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/atom.gif
new file mode 100644
index 0000000..b6bc882
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/atom.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/axis2-powered.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/axis2-powered.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/axis2-powered.gif
new file mode 100644
index 0000000..3555199
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/axis2-powered.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/bam_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/bam_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/bam_logo_h23.gif
new file mode 100644
index 0000000..5f987a0
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/bam_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/basket_put.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/basket_put.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/basket_put.gif
new file mode 100644
index 0000000..2905fe3
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/basket_put.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/basket_remove.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/basket_remove.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/basket_remove.gif
new file mode 100644
index 0000000..8a33c33
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/basket_remove.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/book_add.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/book_add.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/book_add.gif
new file mode 100644
index 0000000..1904abc
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/book_add.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/bps_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/bps_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/bps_logo_h23.gif
new file mode 100644
index 0000000..667ff35
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/bps_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/brick_edit.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/brick_edit.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/brick_edit.gif
new file mode 100644
index 0000000..4e18c36
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/brick_edit.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/brs_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/brs_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/brs_logo_h23.gif
new file mode 100644
index 0000000..ee6cafc
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/brs_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/button-bg-focus.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/button-bg-focus.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/button-bg-focus.gif
new file mode 100644
index 0000000..be3943d
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/button-bg-focus.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/button-bg-hover.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/button-bg-hover.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/button-bg-hover.gif
new file mode 100644
index 0000000..fe59129
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/button-bg-hover.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/button-bg.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/button-bg.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/button-bg.gif
new file mode 100644
index 0000000..6c75daa
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/button-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/buttonRow-bg.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/buttonRow-bg.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/buttonRow-bg.gif
new file mode 100644
index 0000000..c6bf2b0
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/buttonRow-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/calculator.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/calculator.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/calculator.gif
new file mode 100644
index 0000000..ce0436d
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/calculator.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/calendar.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/calendar.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/calendar.gif
new file mode 100644
index 0000000..2b1c1e7
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/calendar.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/cancel.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/cancel.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/cancel.gif
new file mode 100644
index 0000000..6c71ebc
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/cancel.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/cep_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/cep_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/cep_logo_h23.gif
new file mode 100644
index 0000000..b80554a
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/cep_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/cloneTab.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/cloneTab.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/cloneTab.gif
new file mode 100644
index 0000000..3f23ab7
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/cloneTab.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/control_play_blue.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/control_play_blue.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/control_play_blue.gif
new file mode 100644
index 0000000..7ef21ab
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/control_play_blue.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/copy.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/copy.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/copy.gif
new file mode 100644
index 0000000..dcea9c1
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/copy.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/create-checkpoint.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/create-checkpoint.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/create-checkpoint.gif
new file mode 100644
index 0000000..c9995c3
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/create-checkpoint.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/default-menu-icon.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/default-menu-icon.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/default-menu-icon.gif
new file mode 100644
index 0000000..5a3db6f
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/default-menu-icon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/delete.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/delete.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/delete.gif
new file mode 100644
index 0000000..471f55c
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/delete.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/down-arrow.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/down-arrow.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/down-arrow.gif
new file mode 100755
index 0000000..e4092cf
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/down-arrow.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/down-arrow.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/down-arrow.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/down-arrow.png
new file mode 100644
index 0000000..ed06ba1
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/down-arrow.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/ds_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/ds_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/ds_logo_h23.gif
new file mode 100644
index 0000000..e07159d
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/ds_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/edit.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/edit.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/edit.gif
new file mode 100644
index 0000000..f44da7b
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/edit.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/elb_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/elb_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/elb_logo_h23.gif
new file mode 100644
index 0000000..0bbeb20
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/elb_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/esb_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/esb_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/esb_logo_h23.gif
new file mode 100644
index 0000000..70c44f7
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/esb_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/excelicon.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/excelicon.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/excelicon.gif
new file mode 100644
index 0000000..0e874cc
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/excelicon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/exlink.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/exlink.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/exlink.gif
new file mode 100644
index 0000000..f870f43
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/exlink.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/favicon.ico
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/favicon.ico b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/favicon.ico
new file mode 100644
index 0000000..f7b2bbf
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/favicon.ico differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/forum.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/forum.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/forum.gif
new file mode 100755
index 0000000..e92779a
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/forum.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/gadgetserver_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/gadgetserver_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/gadgetserver_logo_h23.gif
new file mode 100644
index 0000000..cb856ea
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/gadgetserver_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/header-bg.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/header-bg.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/header-bg.gif
new file mode 100644
index 0000000..1fe88f1
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/header-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/header-logo.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/header-logo.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/header-logo.gif
new file mode 100644
index 0000000..738e3fd
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/header-logo.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/header-region-bg.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/header-region-bg.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/header-region-bg.gif
new file mode 100644
index 0000000..dc9c627
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/header-region-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-bg.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-bg.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-bg.gif
new file mode 100644
index 0000000..733b8fa
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-footer.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-footer.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-footer.gif
new file mode 100644
index 0000000..04f18c1
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-footer.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-header.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-header.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-header.gif
new file mode 100644
index 0000000..c0f815e
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-header.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-small-icon.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-small-icon.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-small-icon.png
new file mode 100644
index 0000000..f7e93c4
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help-small-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help.gif
new file mode 100644
index 0000000..368068d
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/help.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/home-bg.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/home-bg.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/home-bg.gif
new file mode 100644
index 0000000..ac00910
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/home-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/htmlicon.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/htmlicon.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/htmlicon.gif
new file mode 100644
index 0000000..9e4d5af
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/htmlicon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/icon-feed-small-res.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/icon-feed-small-res.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/icon-feed-small-res.gif
new file mode 100644
index 0000000..06205c5
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/icon-feed-small-res.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/identity_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/identity_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/identity_logo_h23.gif
new file mode 100644
index 0000000..6a1f285
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/identity_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/information.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/information.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/information.gif
new file mode 100644
index 0000000..a9c63b1
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/information.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/invisible.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/invisible.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/invisible.gif
new file mode 100755
index 0000000..c0b332e
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/invisible.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/issue-tracker.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/issue-tracker.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/issue-tracker.gif
new file mode 100644
index 0000000..9029c12
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/issue-tracker.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/leftRightSlider-dark.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/leftRightSlider-dark.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/leftRightSlider-dark.png
new file mode 100644
index 0000000..b32cad7
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/leftRightSlider-dark.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/leftRightSlider.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/leftRightSlider.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/leftRightSlider.png
new file mode 100644
index 0000000..a6a4bf9
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/leftRightSlider.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/loading-small.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/loading-small.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/loading-small.gif
new file mode 100644
index 0000000..f2a1bc0
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/loading-small.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/loading.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/loading.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/loading.gif
new file mode 100644
index 0000000..5b200ed
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/loading.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mailing-list.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mailing-list.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mailing-list.gif
new file mode 100644
index 0000000..06d61e3
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mailing-list.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mainIcons.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mainIcons.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mainIcons.png
new file mode 100644
index 0000000..c0dac71
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mainIcons.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mashup_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mashup_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mashup_logo_h23.gif
new file mode 100644
index 0000000..59c6db6
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mashup_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mb_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mb_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mb_logo_h23.gif
new file mode 100644
index 0000000..aa5c5ba
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mb_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/menu-header.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/menu-header.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/menu-header.gif
new file mode 100644
index 0000000..43c8a07
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/menu-header.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mgt-logo.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mgt-logo.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mgt-logo.gif
new file mode 100644
index 0000000..914c9bf
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/mgt-logo.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/minus-plus.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/minus-plus.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/minus-plus.png
new file mode 100644
index 0000000..6f9feba
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/minus-plus.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/move.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/move.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/move.gif
new file mode 100644
index 0000000..3cbbde4
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/move.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/nseditor-icon.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/nseditor-icon.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/nseditor-icon.gif
new file mode 100644
index 0000000..5b4ab69
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/nseditor-icon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/oops.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/oops.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/oops.gif
new file mode 100644
index 0000000..6484f57
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/oops.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/overlay.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/overlay.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/overlay.png
new file mode 100644
index 0000000..681a207
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/overlay.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/panelImage.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/panelImage.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/panelImage.png
new file mode 100644
index 0000000..dfb863d
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/panelImage.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/pdficon.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/pdficon.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/pdficon.gif
new file mode 100644
index 0000000..bb5edca
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/pdficon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/plugin_add.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/plugin_add.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/plugin_add.gif
new file mode 100644
index 0000000..ac22da9
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/plugin_add.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/plugin_delete.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/plugin_delete.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/plugin_delete.gif
new file mode 100644
index 0000000..4721397
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/plugin_delete.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/policies.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/policies.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/policies.gif
new file mode 100644
index 0000000..f07a520
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/policies.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/registry_logo_h23.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/registry_logo_h23.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/registry_logo_h23.gif
new file mode 100644
index 0000000..697a924
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/registry_logo_h23.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/registry_picker.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/registry_picker.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/registry_picker.gif
new file mode 100644
index 0000000..de78940
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/registry_picker.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/rss.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/rss.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/rss.gif
new file mode 100644
index 0000000..fae3a68
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/rss.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/spacer.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/spacer.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/spacer.gif
new file mode 100755
index 0000000..5bfd67a
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/spacer.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/ss_logo_h23.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/ss_logo_h23.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/ss_logo_h23.png
new file mode 100644
index 0000000..cedec45
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/ss_logo_h23.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/star.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/star.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/star.gif
new file mode 100644
index 0000000..20aeeef
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/star.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/static-icon-disabled.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/static-icon-disabled.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/static-icon-disabled.gif
new file mode 100644
index 0000000..ec24847
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/static-icon-disabled.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/static-icon.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/static-icon.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/static-icon.gif
new file mode 100644
index 0000000..3f7d61f
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/static-icon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/table-header.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/table-header.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/table-header.gif
new file mode 100644
index 0000000..92283f0
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/table-header.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/trace-icon-disabled.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/trace-icon-disabled.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/trace-icon-disabled.gif
new file mode 100644
index 0000000..ddcd94c
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/trace-icon-disabled.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/trace-icon.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/trace-icon.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/trace-icon.gif
new file mode 100644
index 0000000..02d399e
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/trace-icon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/up-arrow.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/up-arrow.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/up-arrow.gif
new file mode 100755
index 0000000..325a93a
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/up-arrow.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/up-arrow.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/up-arrow.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/up-arrow.png
new file mode 100644
index 0000000..de79e03
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/up-arrow.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/user-guide.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/user-guide.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/user-guide.gif
new file mode 100644
index 0000000..9342adc
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/user-guide.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/user.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/user.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/user.gif
new file mode 100644
index 0000000..1ac306d
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/user.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/view-disabled.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/view-disabled.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/view-disabled.gif
new file mode 100644
index 0000000..ac912d5
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/view-disabled.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/view.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/view.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/view.gif
new file mode 100644
index 0000000..9a1c6e2
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/view.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/zoom_in.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/zoom_in.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/zoom_in.gif
new file mode 100644
index 0000000..92d1d55
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/zoom_in.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/zoom_out.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/zoom_out.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/zoom_out.gif
new file mode 100644
index 0000000..2866fe6
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/images/zoom_out.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/index.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/index.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/index.jsp
new file mode 100644
index 0000000..bff9bf1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/index.jsp
@@ -0,0 +1,127 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@page import="org.apache.commons.httpclient.HttpMethod"%>
+<%@page import="org.apache.axis2.transport.http.HTTPConstants"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
+<%@ page import="org.wso2.carbon.ui.util.CharacterEncoder" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+
+
+<%@page import="org.wso2.carbon.utils.ServerConstants"%><jsp:include page="../dialog/display_messages.jsp"/>
+
+<fmt:bundle basename="org.wso2.carbon.i18n.Resources">
+
+<%
+                Object param = session.getAttribute("authenticated");
+				String passwordExpires = (String) session
+						.getAttribute(ServerConstants.PASSWORD_EXPIRATION);
+				boolean loggedIn = false;
+				if (param != null) {
+					loggedIn = (Boolean) param;
+				}
+				boolean serverAdminComponentFound = CarbonUIUtil
+						.isContextRegistered(config, "/server-admin/");
+				
+				if (CharacterEncoder.getSafeText(request.getParameter("skipLoginPage"))!=null){
+					response.sendRedirect("../admin/login_action.jsp");
+					return;
+				}
+%>
+    <div id="middle">
+        <%
+            String serverName = CarbonUIUtil
+        						.getServerConfigurationProperty("Name");
+        %>
+        <h2>
+            <fmt:message key="carbon.server.home">
+                <fmt:param value="<%= serverName%>"/>
+            </fmt:message>
+        </h2>
+
+        <p>
+            <fmt:message key="carbon.console.welcome">
+                <fmt:param value="<%= serverName%>"/>
+            </fmt:message>
+        </p>
+
+        <p>&nbsp;</p>
+
+        <div id="workArea">
+        <div id="systemInfoDiv">
+            <%
+                if (loggedIn && passwordExpires != null) {
+            %>
+                 <div class="info-box"><p>Your password expires at <%=passwordExpires%>. Please change by visiting <a href="../user/change-passwd.jsp?isUserChange=true&returnPath=../admin/index.jsp">here</a></p></div>
+            <%
+                }
+            				if (loggedIn && serverAdminComponentFound) {
+            %>
+            <div id="result"></div>
+            <script type="text/javascript">
+                jQuery.noConflict();
+                var refresh;
+                function refreshStats() {
+                    var url = "../server-admin/system_status_ajaxprocessor.jsp";
+                    var data = null;
+                    try {
+                        jQuery.ajax({
+                            url: "../admin/jsp/session-validate.jsp",
+                            type: "GET",
+                            dataType: "html",
+                            data: data,
+                            complete: function(res, status){
+                                if (res.responseText.search(/----valid----/) != -1) {
+                                    jQuery("#result").load(url, null, function (responseText, status, XMLHttpRequest) {
+                                        if (status != "success") {
+                                            stopRefreshStats();
+                                        }
+                                    });
+                                } else {
+                                    stopRefreshStats();
+                                }
+                            },error: function(res, status, error){
+                            	stopRefreshStats();
+                            }
+                        });
+                    } catch (e) {
+                    	stopRefreshStats();
+                    }
+                }
+                function stopRefreshStats() {
+                    if (refresh) {
+                        clearInterval(refresh);
+                    }
+                }
+                try {
+                    jQuery(document).ready(function() {
+                        refreshStats();
+                        if (document.getElementById('systemInfoDiv').style.display == '') {
+                            refresh = setInterval("refreshStats()", 6000);
+                        }
+                    });
+                } catch (e) {
+                } // ignored
+            </script>
+            <%
+                }
+            %>
+        </div>
+        </div>
+    </div>
+</fmt:bundle>


[14/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_full.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_full.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_full.js
new file mode 100644
index 0000000..85c9d4e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_full.js
@@ -0,0 +1,38 @@
+ function EAL(){var t=this;t.version="0.8.2";date=new Date();t.start_time=date.getTime();t.win="loading";t.error=false;t.baseURL="";t.template="";t.lang={};t.load_syntax={};t.syntax={};t.loadedFiles=[];t.waiting_loading={};t.scripts_to_load=[];t.sub_scripts_to_load=[];t.syntax_display_name={'basic':'Basic','brainfuck':'Brainfuck','c':'C','coldfusion':'Coldfusion','cpp':'CPP','css':'CSS','html':'HTML','java':'Java','js':'Javascript','pas':'Pascal','perl':'Perl','php':'Php','python':'Python','robotstxt':'Robots txt','ruby':'Ruby','sql':'SQL','tsql':'T-SQL','vb':'Visual Basic','xml':'XML'};t.resize=[];t.hidden={};t.default_settings={debug:false,smooth_selection:true,font_size:"10",font_family:"monospace",start_highlight:false,toolbar:"search,go_to_line,fullscreen,|,undo,redo,|,select_font,|,change_smooth_selection,highlight,reset_highlight,word_wrap,|,help",begin_toolbar:"",end_toolbar:"",is_multi_files:false,allow_resize:"both",show_line_colors:false,min_width:400,min_height:125,repla
 ce_tab_by_spaces:false,allow_toggle:true,language:"en",syntax:"",syntax_selection_allow:"basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml",display:"onload",max_undo:30,browsers:"known",plugins:"",gecko_spellcheck:false,fullscreen:false,is_editable:true,cursor_position:"begin",word_wrap:false,autocompletion:false,load_callback:"",save_callback:"",change_callback:"",submit_callback:"",EA_init_callback:"",EA_delete_callback:"",EA_load_callback:"",EA_unload_callback:"",EA_toggle_on_callback:"",EA_toggle_off_callback:"",EA_file_switch_on_callback:"",EA_file_switch_off_callback:"",EA_file_close_callback:""};t.advanced_buttons=[ ['new_document','newdocument.gif','new_document',false],['search','search.gif','show_search',false],['go_to_line','go_to_line.gif','go_to_line',false],['undo','undo.gif','undo',true],['redo','redo.gif','redo',true],['change_smooth_selection','smooth_selection.gif','change_smooth_selection_mode',true],['reset_highl
 ight','reset_highlight.gif','resync_highlight',true],['highlight','highlight.gif','change_highlight',true],['help','help.gif','show_help',false],['save','save.gif','save',false],['load','load.gif','load',false],['fullscreen','fullscreen.gif','toggle_full_screen',false],['word_wrap','word_wrap.gif','toggle_word_wrap',true],['autocompletion','autocompletion.gif','toggle_autocompletion',true] ];t.set_browser_infos(t);if(t.isIE>=6||t.isGecko||(t.isWebKit&&!t.isSafari<3)||t.isOpera>=9||t.isCamino)t.isValidBrowser=true;
+else t.isValidBrowser=false;t.set_base_url();for(var i=0;i<t.scripts_to_load.length;i++){setTimeout("eAL.load_script('"+t.baseURL+t.scripts_to_load[i]+".js');",1);t.waiting_loading[t.scripts_to_load[i]+".js"]=false;}t.add_event(window,"load",EAL.prototype.window_loaded);};EAL.prototype={has_error:function(){this.error=true;for(var i in EAL.prototype){EAL.prototype[i]=function(){};}},set_browser_infos:function(o){ua=navigator.userAgent;o.isWebKit=/WebKit/.test(ua);o.isGecko=!o.isWebKit&&/Gecko/.test(ua);o.isMac=/Mac/.test(ua);o.isIE=(navigator.appName=="Microsoft Internet Explorer");if(o.isIE){o.isIE=ua.replace(/^.*?MSIE\s+([0-9\.]+).*$/,"$1");if(o.isIE<6)o.has_error();}if(o.isOpera=(ua.indexOf('Opera')!=-1)){o.isOpera=ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i,"$1");if(o.isOpera<9)o.has_error();o.isIE=false;}if(o.isFirefox=(ua.indexOf('Firefox')!=-1))o.isFirefox=ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('Iceweasel')!=-1)o.isFirefox=ua.replace(/^.*?Iceweasel.*?([0-9\
 .]+).*$/i,"$1");if(ua.indexOf('GranParadiso')!=-1)o.isFirefox=ua.replace(/^.*?GranParadiso.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('BonEcho')!=-1)o.isFirefox=ua.replace(/^.*?BonEcho.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('SeaMonkey')!=-1)o.isFirefox=(ua.replace(/^.*?SeaMonkey.*?([0-9\.]+).*$/i,"$1"))+1;if(o.isCamino=(ua.indexOf('Camino')!=-1))o.isCamino=ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i,"$1");if(o.isSafari=(ua.indexOf('Safari')!=-1))o.isSafari=ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i,"$1");if(o.isChrome=(ua.indexOf('Chrome')!=-1)){o.isChrome=ua.replace(/^.*?Chrome.*?([0-9\.]+).*$/i,"$1");o.isSafari=false;}},window_loaded:function(){eAL.win="loaded";if(document.forms){for(var i=0;i<document.forms.length;i++){var form=document.forms[i];form.edit_area_replaced_submit=null;try{form.edit_area_replaced_submit=form.onsubmit;form.onsubmit="";}catch(e){}eAL.add_event(form,"submit",EAL.prototype.submit);eAL.add_event(form,"reset",EAL.prototype.reset);}}eAL.add_event(window,"unload",
 function(){for(var i in eAs){eAL.delete_instance(i);}});},init_ie_textarea:function(id){var a=document.getElementById(id);try{if(a&&typeof(a.focused)=="undefined"){a.focus();a.focused=true;a.selectionStart=a.selectionEnd=0;get_IE_selection(a);eAL.add_event(a,"focus",IE_textarea_focus);eAL.add_event(a,"blur",IE_textarea_blur);}}catch(ex){}},init:function(settings){var t=this,s=settings,i;if(!s["id"])t.has_error();if(t.error)return;if(eAs[s["id"]])t.delete_instance(s["id"]);for(i in t.default_settings){if(typeof(s[i])=="undefined")s[i]=t.default_settings[i];}if(s["browsers"]=="known"&&t.isValidBrowser==false){return;}if(s["begin_toolbar"].length>0)s["toolbar"]=s["begin_toolbar"]+","+s["toolbar"];if(s["end_toolbar"].length>0)s["toolbar"]=s["toolbar"]+","+s["end_toolbar"];s["tab_toolbar"]=s["toolbar"].replace(/ /g,"").split(",");s["plugins"]=s["plugins"].replace(/ /g,"").split(",");for(i=0;i<s["plugins"].length;i++){if(s["plugins"][i].length==0)s["plugins"].splice(i,1);}t.get_template()
 ;t.load_script(t.baseURL+"langs/"+s["language"]+".js");if(s["syntax"].length>0){s["syntax"]=s["syntax"].toLowerCase();t.load_script(t.baseURL+"reg_syntax/"+s["syntax"]+".js");}eAs[s["id"]]={"settings":s};eAs[s["id"]]["displayed"]=false;eAs[s["id"]]["hidden"]=false;t.start(s["id"]);},delete_instance:function(id){var d=document,fs=window.frames,span,iframe;eAL.execCommand(id,"EA_delete");if(fs["frame_"+id]&&fs["frame_"+id].editArea){if(eAs[id]["displayed"])eAL.toggle(id,"off");fs["frame_"+id].editArea.execCommand("EA_unload");}span=d.getElementById("EditAreaArroundInfos_"+id);if(span)span.parentNode.removeChild(span);iframe=d.getElementById("frame_"+id);if(iframe){iframe.parentNode.removeChild(iframe);try{delete fs["frame_"+id];}catch(e){}}delete eAs[id];},start:function(id){var t=this,d=document,f,span,father,next,html='',html_toolbar_content='',template,content,i;if(t.win!="loaded"){setTimeout("eAL.start('"+id+"');",50);return;}for(i in t.waiting_loading){if(t.waiting_loading[i]!="l
 oaded"&&typeof(t.waiting_loading[i])!="function"){setTimeout("eAL.start('"+id+"');",50);return;}}if(!t.lang[eAs[id]["settings"]["language"]]||(eAs[id]["settings"]["syntax"].length>0&&!t.load_syntax[eAs[id]["settings"]["syntax"]])){setTimeout("eAL.start('"+id+"');",50);return;}if(eAs[id]["settings"]["syntax"].length>0)t.init_syntax_regexp();if(!d.getElementById("EditAreaArroundInfos_"+id)&&(eAs[id]["settings"]["debug"]||eAs[id]["settings"]["allow_toggle"])){span=d.createElement("span");span.id="EditAreaArroundInfos_"+id;if(eAs[id]["settings"]["allow_toggle"]){checked=(eAs[id]["settings"]["display"]=="onload")?"checked='checked'":"";html+="<div id='edit_area_toggle_"+i+"'>";html+="<input id='edit_area_toggle_checkbox_"+id+"' class='toggle_"+id+"' type='checkbox' onclick='eAL.toggle(\""+id+"\");' accesskey='e' "+checked+" />";html+="<label for='edit_area_toggle_checkbox_"+id+"'>{$toggle}</label></div>";}if(eAs[id]["settings"]["debug"])html+="<textarea id='edit_area_debug_"+id+"' spellc
 heck='off' style='z-index:20;width:100%;height:120px;overflow:auto;border:solid black 1px;'></textarea><br />";html=t.translate(html,eAs[id]["settings"]["language"]);span.innerHTML=html;father=d.getElementById(id).parentNode;next=d.getElementById(id).nextSibling;if(next==null)father.appendChild(span);
+else father.insertBefore(span,next);}if(!eAs[id]["initialized"]){t.execCommand(id,"EA_init");if(eAs[id]["settings"]["display"]=="later"){eAs[id]["initialized"]=true;return;}}if(t.isIE){t.init_ie_textarea(id);}var area=eAs[id];for(i=0;i<area["settings"]["tab_toolbar"].length;i++){html_toolbar_content+=t.get_control_html(area["settings"]["tab_toolbar"][i],area["settings"]["language"]);}html_toolbar_content=t.translate(html_toolbar_content,area["settings"]["language"],"template");if(!t.iframe_script){t.iframe_script="";for(i=0;i<t.sub_scripts_to_load.length;i++)t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+t.sub_scripts_to_load[i]+'.js"></script>';}for(i=0;i<area["settings"]["plugins"].length;i++){if(!t.all_plugins_loaded)t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+'plugins/'+area["settings"]["plugins"][i]+'/'+area["settings"]["plugins"][i]+'.js"></script>';t.iframe_script+='<script language="javascri
 pt" type="text/javascript" src="'+t.baseURL+'plugins/'+area["settings"]["plugins"][i]+'/langs/'+area["settings"]["language"]+'.js"></script>';}if(!t.iframe_css){t.iframe_css="<link href='"+t.baseURL+"edit_area.css' rel='stylesheet' type='text/css' />";}template=t.template.replace(/\[__BASEURL__\]/g,t.baseURL);template=template.replace("[__TOOLBAR__]",html_toolbar_content);template=t.translate(template,area["settings"]["language"],"template");template=template.replace("[__CSSRULES__]",t.iframe_css);template=template.replace("[__JSCODE__]",t.iframe_script);template=template.replace("[__EA_VERSION__]",t.version);area.textarea=d.getElementById(area["settings"]["id"]);eAs[area["settings"]["id"]]["textarea"]=area.textarea;if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined')delete window.frames["frame_"+area["settings"]["id"]];father=area.textarea.parentNode;content=d.createElement("iframe");content.name="frame_"+area["settings"]["id"];content.id="frame_"+area["settings"
 ]["id"];content.style.borderWidth="0px";setAttribute(content,"frameBorder","0");content.style.overflow="hidden";content.style.display="none";next=area.textarea.nextSibling;if(next==null)father.appendChild(content);
+else father.insertBefore(content,next);f=window.frames["frame_"+area["settings"]["id"]];f.document.open();f.eAs=eAs;f.area_id=area["settings"]["id"];f.document.area_id=area["settings"]["id"];f.document.write(template);f.document.close();},toggle:function(id,toggle_to){if(!toggle_to)toggle_to=(eAs[id]["displayed"]==true)?"off":"on";if(eAs[id]["displayed"]==true&&toggle_to=="off"){this.toggle_off(id);}
+else if(eAs[id]["displayed"]==false&&toggle_to=="on"){this.toggle_on(id);}return false;},toggle_off:function(id){var fs=window.frames,f,t,parNod,nxtSib,selStart,selEnd,scrollTop,scrollLeft;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];if(f.editArea.fullscreen['isFull'])f.editArea.toggle_full_screen(false);eAs[id]["displayed"]=false;t.wrap="off";setAttribute(t,"wrap","off");parNod=t.parentNode;nxtSib=t.nextSibling;parNod.removeChild(t);parNod.insertBefore(t,nxtSib);t.value=f.editArea.textarea.value;selStart=f.editArea.last_selection["selectionStart"];selEnd=f.editArea.last_selection["selectionEnd"];scrollTop=f.document.getElementById("result").scrollTop;scrollLeft=f.document.getElementById("result").scrollLeft;document.getElementById("frame_"+id).style.display='none';t.style.display="inline";try{t.focus();}catch(e){};if(this.isIE){t.selectionStart=selStart;t.selectionEnd=selEnd;t.focused=true;set_IE_selection(t);}
+else{if(this.isOpera&&this.isOpera < 9.6){t.setSelectionRange(0,0);}try{t.setSelectionRange(selStart,selEnd);}catch(e){};}t.scrollTop=scrollTop;t.scrollLeft=scrollLeft;f.editArea.execCommand("toggle_off");}},toggle_on:function(id){var fs=window.frames,f,t,selStart=0,selEnd=0,scrollTop=0,scrollLeft=0,curPos,elem;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];area=f.editArea;area.textarea.value=t.value;curPos=eAs[id]["settings"]["cursor_position"];if(t.use_last==true){selStart=t.last_selectionStart;selEnd=t.last_selectionEnd;scrollTop=t.last_scrollTop;scrollLeft=t.last_scrollLeft;t.use_last=false;}
+else if(curPos=="auto"){try{selStart=t.selectionStart;selEnd=t.selectionEnd;scrollTop=t.scrollTop;scrollLeft=t.scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id,document.getElementById("frame_"+id));t.style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[id]["displayed"]=true;area.execCommand("update_size");f.document.getElementById("result").scrollTop=scrollTop;f.document.getElementById("result").scrollLeft=scrollLeft;area.area_select(selStart,selEnd-selStart);area.execCommand("toggle_on");}
+else{elem=document.getElementById(id);elem.last_selectionStart=elem.selectionStart;elem.last_selectionEnd=elem.selectionEnd;elem.last_scrollTop=elem.scrollTop;elem.last_scrollLeft=elem.scrollLeft;elem.use_last=true;eAL.start(id);}},set_editarea_size_from_textarea:function(id,frame){var elem,width,height;elem=document.getElementById(id);width=Math.max(eAs[id]["settings"]["min_width"],elem.offsetWidth)+"px";height=Math.max(eAs[id]["settings"]["min_height"],elem.offsetHeight)+"px";if(elem.style.width.indexOf("%")!=-1)width=elem.style.width;if(elem.style.height.indexOf("%")!=-1)height=elem.style.height;frame.style.width=width;frame.style.height=height;},set_base_url:function(){var t=this,elems,i,docBasePath;if(!this.baseURL){elems=document.getElementsByTagName('script');for(i=0;i<elems.length;i++){if(elems[i].src&&elems[i].src.match(/edit_area_[^\\\/]*$/i)){var src=unescape(elems[i].src);src=src.substring(0,src.lastIndexOf('/'));this.baseURL=src;this.file_name=elems[i].src.substr(elems[
 i].src.lastIndexOf("/")+1);break;}}}docBasePath=document.location.href;if(docBasePath.indexOf('?')!=-1)docBasePath=docBasePath.substring(0,docBasePath.indexOf('?'));docBasePath=docBasePath.substring(0,docBasePath.lastIndexOf('/'));if(t.baseURL.indexOf('://')==-1&&t.baseURL.charAt(0)!='/'){t.baseURL=docBasePath+"/"+t.baseURL;}t.baseURL+="/";},get_button_html:function(id,img,exec,isFileSpecific,baseURL){var cmd,html;if(!baseURL)baseURL=this.baseURL;cmd='editArea.execCommand(\''+exec+'\')';html='<a id="a_'+id+'" href="javascript:'+cmd+'" onclick="'+cmd+';return false;" onmousedown="return false;" target="_self" fileSpecific="'+(isFileSpecific?'yes':'no')+'">';html+='<img id="'+id+'" src="'+baseURL+'images/'+img+'" title="{$'+id+'}" width="20" height="20" class="editAreaButtonNormal" onmouseover="editArea.switchClass(this,\'editAreaButtonOver\');" onmouseout="editArea.restoreClass(this);" onmousedown="editArea.restoreAndSwitchClass(this,\'editAreaButtonDown\');" /></a>';return html;},ge
 t_control_html:function(button_name,lang){var t=this,i,but,html,si;for(i=0;i<t.advanced_buttons.length;i++){but=t.advanced_buttons[i];if(but[0]==button_name){return t.get_button_html(but[0],but[1],but[2],but[3]);}}switch(button_name){case "*":case "return":return "<br />";case "|":case "separator":return '<img src="'+t.baseURL+'images/spacer.gif" width="1" height="15" class="editAreaSeparatorLine">';case "select_font":html="<select id='area_font_size' onchange='javascript:editArea.execCommand(\"change_font_size\")' fileSpecific='yes'>";html+="<option value='-1'>{$font_size}</option>";si=[8,9,10,11,12,14];for(i=0;i<si.length;i++){html+="<option value='"+si[i]+"'>"+si[i]+" pt</option>";}html+="</select>";return html;case "syntax_selection":html="<select id='syntax_selection' onchange='javascript:editArea.execCommand(\"change_syntax\",this.value)' fileSpecific='yes'>";html+="<option value='-1'>{$syntax_selection}</option>";html+="</select>";return html;}return "<span id='tmp_tool_"+but
 ton_name+"'>["+button_name+"]</span>";},get_template:function(){if(this.template==""){var xhr_object=null;if(window.XMLHttpRequest)xhr_object=new XMLHttpRequest();
+else if(window.ActiveXObject)xhr_object=new ActiveXObject("Microsoft.XMLHTTP");
+else{alert("XMLHTTPRequest not supported. EditArea not loaded");return;}xhr_object.open("GET",this.baseURL+"template.html",false);xhr_object.send(null);if(xhr_object.readyState==4)this.template=xhr_object.responseText;
+else this.has_error();}},translate:function(text,lang,mode){if(mode=="word")text=eAL.get_word_translation(text,lang);
+else if(mode="template"){eAL.current_language=lang;text=text.replace(/\{\$([^\}]+)\}/gm,eAL.translate_template);}return text;},translate_template:function(){return eAL.get_word_translation(EAL.prototype.translate_template.arguments[1],eAL.current_language);},get_word_translation:function(val,lang){var i;for(i in eAL.lang[lang]){if(i==val)return eAL.lang[lang][i];}return "_"+val;},load_script:function(url){var t=this,d=document,script,head;if(t.loadedFiles[url])return;try{script=d.createElement("script");script.type="text/javascript";script.src=url;script.charset="UTF-8";d.getElementsByTagName("head")[0].appendChild(script);}catch(e){d.write('<sc'+'ript language="javascript" type="text/javascript" src="'+url+'" charset="UTF-8"></sc'+'ript>');}t.loadedFiles[url]=true;},add_event:function(obj,name,handler){try{if(obj.attachEvent){obj.attachEvent("on"+name,handler);}
+else{obj.addEventListener(name,handler,false);}}catch(e){}},remove_event:function(obj,name,handler){try{if(obj.detachEvent)obj.detachEvent("on"+name,handler);
+else obj.removeEventListener(name,handler,false);}catch(e){}},reset:function(e){var formObj,is_child,i,x;formObj=eAL.isIE ? window.event.srcElement:e.target;if(formObj.tagName!='FORM')formObj=formObj.form;for(i in eAs){is_child=false;for(x=0;x<formObj.elements.length;x++){if(formObj.elements[x].id==i)is_child=true;}if(window.frames["frame_"+i]&&is_child&&eAs[i]["displayed"]==true){var exec='window.frames["frame_'+i+'"].editArea.textarea.value=document.getElementById("'+i+'").value;';exec+='window.frames["frame_'+i+'"].editArea.execCommand("focus");';exec+='window.frames["frame_'+i+'"].editArea.check_line_selection();';exec+='window.frames["frame_'+i+'"].editArea.execCommand("reset");';window.setTimeout(exec,10);}}return;},submit:function(e){var formObj,is_child,fs=window.frames,i,x;formObj=eAL.isIE ? window.event.srcElement:e.target;if(formObj.tagName!='FORM')formObj=formObj.form;for(i in eAs){is_child=false;for(x=0;x<formObj.elements.length;x++){if(formObj.elements[x].id==i)is_chil
 d=true;}if(is_child){if(fs["frame_"+i]&&eAs[i]["displayed"]==true)document.getElementById(i).value=fs["frame_"+i].editArea.textarea.value;eAL.execCommand(i,"EA_submit");}}if(typeof(formObj.edit_area_replaced_submit)=="function"){res=formObj.edit_area_replaced_submit();if(res==false){if(eAL.isIE)return false;
+else e.preventDefault();}}return;},getValue:function(id){if(window.frames["frame_"+id]&&eAs[id]["displayed"]==true){return window.frames["frame_"+id].editArea.textarea.value;}
+else if(elem=document.getElementById(id)){return elem.value;}return false;},setValue:function(id,new_val){var fs=window.frames;if((f=fs["frame_"+id])&&eAs[id]["displayed"]==true){f.editArea.textarea.value=new_val;f.editArea.execCommand("focus");f.editArea.check_line_selection(false);f.editArea.execCommand("onchange");}
+else if(elem=document.getElementById(id)){elem.value=new_val;}},getSelectionRange:function(id){var sel,eA,fs=window.frames;sel={"start":0,"end":0};if(fs["frame_"+id]&&eAs[id]["displayed"]==true){eA=fs["frame_"+id].editArea;sel["start"]=eA.textarea.selectionStart;sel["end"]=eA.textarea.selectionEnd;}
+else if(elem=document.getElementById(id)){sel=getSelectionRange(elem);}return sel;},setSelectionRange:function(id,new_start,new_end){var fs=window.frames;if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].editArea.area_select(new_start,new_end-new_start);if(!this.isIE){fs["frame_"+id].editArea.check_line_selection(false);fs["frame_"+id].editArea.scroll_to_view();}}
+else if(elem=document.getElementById(id)){setSelectionRange(elem,new_start,new_end);}},getSelectedText:function(id){var sel=this.getSelectionRange(id);return this.getValue(id).substring(sel["start"],sel["end"]);},setSelectedText:function(id,new_val){var fs=window.frames,d=document,sel,text,scrollTop,scrollLeft,new_sel_end;new_val=new_val.replace(/\r/g,"");sel=this.getSelectionRange(id);text=this.getValue(id);if(fs["frame_"+id]&&eAs[id]["displayed"]==true){scrollTop=fs["frame_"+id].document.getElementById("result").scrollTop;scrollLeft=fs["frame_"+id].document.getElementById("result").scrollLeft;}
+else{scrollTop=d.getElementById(id).scrollTop;scrollLeft=d.getElementById(id).scrollLeft;}text=text.substring(0,sel["start"])+new_val+text.substring(sel["end"]);this.setValue(id,text);new_sel_end=sel["start"]+new_val.length;this.setSelectionRange(id,sel["start"],new_sel_end);if(new_val !=this.getSelectedText(id).replace(/\r/g,"")){this.setSelectionRange(id,sel["start"],new_sel_end+new_val.split("\n").length-1);}if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].document.getElementById("result").scrollTop=scrollTop;fs["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;fs["frame_"+id].editArea.execCommand("onchange");}
+else{d.getElementById(id).scrollTop=scrollTop;d.getElementById(id).scrollLeft=scrollLeft;}},insertTags:function(id,open_tag,close_tag){var old_sel,new_sel;old_sel=this.getSelectionRange(id);text=open_tag+this.getSelectedText(id)+close_tag;eAL.setSelectedText(id,text);new_sel=this.getSelectionRange(id);if(old_sel["end"] > old_sel["start"])this.setSelectionRange(id,new_sel["end"],new_sel["end"]);
+else this.setSelectionRange(id,old_sel["start"]+open_tag.length,old_sel["start"]+open_tag.length);},hide:function(id){var fs=window.frames,d=document,t=this,scrollTop,scrollLeft,span;if(d.getElementById(id)&&!t.hidden[id]){t.hidden[id]={};t.hidden[id]["selectionRange"]=t.getSelectionRange(id);if(d.getElementById(id).style.display!="none"){t.hidden[id]["scrollTop"]=d.getElementById(id).scrollTop;t.hidden[id]["scrollLeft"]=d.getElementById(id).scrollLeft;}if(fs["frame_"+id]){t.hidden[id]["toggle"]=eAs[id]["displayed"];if(fs["frame_"+id]&&eAs[id]["displayed"]==true){scrollTop=fs["frame_"+id].document.getElementById("result").scrollTop;scrollLeft=fs["frame_"+id].document.getElementById("result").scrollLeft;}
+else{scrollTop=d.getElementById(id).scrollTop;scrollLeft=d.getElementById(id).scrollLeft;}t.hidden[id]["scrollTop"]=scrollTop;t.hidden[id]["scrollLeft"]=scrollLeft;if(eAs[id]["displayed"]==true)eAL.toggle_off(id);}span=d.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='none';}d.getElementById(id).style.display="none";}},show:function(id){var fs=window.frames,d=document,t=this,span;if((elem=d.getElementById(id))&&t.hidden[id]){elem.style.display="inline";elem.scrollTop=t.hidden[id]["scrollTop"];elem.scrollLeft=t.hidden[id]["scrollLeft"];span=d.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='inline';}if(fs["frame_"+id]){elem.style.display="inline";if(t.hidden[id]["toggle"]==true)eAL.toggle_on(id);scrollTop=t.hidden[id]["scrollTop"];scrollLeft=t.hidden[id]["scrollLeft"];if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].document.getElementById("result").scrollTop=scrollTop;fs["frame_"+id].document.getElementById("result").scro
 llLeft=scrollLeft;}
+else{elem.scrollTop=scrollTop;elem.scrollLeft=scrollLeft;}}sel=t.hidden[id]["selectionRange"];t.setSelectionRange(id,sel["start"],sel["end"]);delete t.hidden[id];}},getCurrentFile:function(id){return this.execCommand(id,'get_file',this.execCommand(id,'curr_file'));},getFile:function(id,file_id){return this.execCommand(id,'get_file',file_id);},getAllFiles:function(id){return this.execCommand(id,'get_all_files()');},openFile:function(id,file_infos){return this.execCommand(id,'open_file',file_infos);},closeFile:function(id,file_id){return this.execCommand(id,'close_file',file_id);},setFileEditedMode:function(id,file_id,to){var reg1,reg2;reg1=new RegExp('\\\\','g');reg2=new RegExp('"','g');return this.execCommand(id,'set_file_edited_mode("'+file_id.replace(reg1,'\\\\').replace(reg2,'\\"')+'",'+to+')');},execCommand:function(id,cmd,fct_param){switch(cmd){case "EA_init":if(eAs[id]['settings']["EA_init_callback"].length>0)eval(eAs[id]['settings']["EA_init_callback"]+"('"+id+"');");break;ca
 se "EA_delete":if(eAs[id]['settings']["EA_delete_callback"].length>0)eval(eAs[id]['settings']["EA_delete_callback"]+"('"+id+"');");break;case "EA_submit":if(eAs[id]['settings']["submit_callback"].length>0)eval(eAs[id]['settings']["submit_callback"]+"('"+id+"');");break;}if(window.frames["frame_"+id]&&window.frames["frame_"+id].editArea){if(fct_param!=undefined)return eval('window.frames["frame_'+id+'"].editArea.'+cmd+'(fct_param);');
+else return eval('window.frames["frame_'+id+'"].editArea.'+cmd+';');}return false;}};var eAL=new EAL();var eAs={}; function getAttribute(elm,aName){var aValue,taName,i;try{aValue=elm.getAttribute(aName);}catch(exept){}if(! aValue){for(i=0;i < elm.attributes.length;i++){taName=elm.attributes[i] .name.toLowerCase();if(taName==aName){aValue=elm.attributes[i] .value;return aValue;}}}return aValue;};function setAttribute(elm,attr,val){if(attr=="class"){elm.setAttribute("className",val);elm.setAttribute("class",val);}
+else{elm.setAttribute(attr,val);}};function getChildren(elem,elem_type,elem_attribute,elem_attribute_match,option,depth){if(!option)var option="single";if(!depth)var depth=-1;if(elem){var children=elem.childNodes;var result=null;var results=[];for(var x=0;x<children.length;x++){strTagName=new String(children[x].tagName);children_class="?";if(strTagName!="undefined"){child_attribute=getAttribute(children[x],elem_attribute);if((strTagName.toLowerCase()==elem_type.toLowerCase()||elem_type=="")&&(elem_attribute==""||child_attribute==elem_attribute_match)){if(option=="all"){results.push(children[x]);}
+else{return children[x];}}if(depth!=0){result=getChildren(children[x],elem_type,elem_attribute,elem_attribute_match,option,depth-1);if(option=="all"){if(result.length>0){results=results.concat(result);}}
+else if(result!=null){return result;}}}}if(option=="all")return results;}return null;};function isChildOf(elem,parent){if(elem){if(elem==parent)return true;while(elem.parentNode !='undefined'){return isChildOf(elem.parentNode,parent);}}return false;};function getMouseX(e){if(e!=null&&typeof(e.pageX)!="undefined"){return e.pageX;}
+else{return(e!=null?e.x:event.x)+document.documentElement.scrollLeft;}};function getMouseY(e){if(e!=null&&typeof(e.pageY)!="undefined"){return e.pageY;}
+else{return(e!=null?e.y:event.y)+document.documentElement.scrollTop;}};function calculeOffsetLeft(r){return calculeOffset(r,"offsetLeft")};function calculeOffsetTop(r){return calculeOffset(r,"offsetTop")};function calculeOffset(element,attr){var offset=0;while(element){offset+=element[attr];element=element.offsetParent}return offset;};function get_css_property(elem,prop){if(document.defaultView){return document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop);}
+else if(elem.currentStyle){var prop=prop.replace(/-\D/gi,function(sMatch){return sMatch.charAt(sMatch.length-1).toUpperCase();});return elem.currentStyle[prop];}
+else return null;}var _mCE;function start_move_element(e,id,frame){var elem_id=(e.target||e.srcElement).id;if(id)elem_id=id;if(!frame)frame=window;if(frame.event)e=frame.event;_mCE=frame.document.getElementById(elem_id);_mCE.frame=frame;frame.document.onmousemove=move_element;frame.document.onmouseup=end_move_element;mouse_x=getMouseX(e);mouse_y=getMouseY(e);_mCE.start_pos_x=mouse_x-(_mCE.style.left.replace("px","")||calculeOffsetLeft(_mCE));_mCE.start_pos_y=mouse_y-(_mCE.style.top.replace("px","")||calculeOffsetTop(_mCE));return false;};function end_move_element(e){_mCE.frame.document.onmousemove="";_mCE.frame.document.onmouseup="";_mCE=null;};function move_element(e){var newTop,newLeft,maxLeft;if(_mCE.frame&&_mCE.frame.event)e=_mCE.frame.event;newTop=getMouseY(e)-_mCE.start_pos_y;newLeft=getMouseX(e)-_mCE.start_pos_x;maxLeft=_mCE.frame.document.body.offsetWidth-_mCE.offsetWidth;max_top=_mCE.frame.document.body.offsetHeight-_mCE.offsetHeight;newTop=Math.min(Math.max(0,newTop),max_t
 op);newLeft=Math.min(Math.max(0,newLeft),maxLeft);_mCE.style.top=newTop+"px";_mCE.style.left=newLeft+"px";return false;};var nav=eAL.nav;function getSelectionRange(textarea){return{"start":textarea.selectionStart,"end":textarea.selectionEnd};};function setSelectionRange(t,start,end){t.focus();start=Math.max(0,Math.min(t.value.length,start));end=Math.max(start,Math.min(t.value.length,end));if(nav.isOpera&&nav.isOpera < 9.6){t.selectionEnd=1;t.selectionStart=0;t.selectionEnd=1;t.selectionStart=0;}t.selectionStart=start;t.selectionEnd=end;if(nav.isIE)set_IE_selection(t);};function get_IE_selection(t){var d=document,div,range,stored_range,elem,scrollTop,relative_top,line_start,line_nb,range_start,range_end,tab;if(t&&t.focused){if(!t.ea_line_height){div=d.createElement("div");div.style.fontFamily=get_css_property(t,"font-family");div.style.fontSize=get_css_property(t,"font-size");div.style.visibility="hidden";div.innerHTML="0";d.body.appendChild(div);t.ea_line_height=div.offsetHeight;d.b
 ody.removeChild(div);}range=d.selection.createRange();try{stored_range=range.duplicate();stored_range.moveToElementText(t);stored_range.setEndPoint('EndToEnd',range);if(stored_range.parentElement()==t){elem=t;scrollTop=0;while(elem.parentNode){scrollTop+=elem.scrollTop;elem=elem.parentNode;}relative_top=range.offsetTop-calculeOffsetTop(t)+scrollTop;line_start=Math.round((relative_top / t.ea_line_height)+1);line_nb=Math.round(range.boundingHeight / t.ea_line_height);range_start=stored_range.text.length-range.text.length;tab=t.value.substr(0,range_start).split("\n");range_start+=(line_start-tab.length)*2;t.selectionStart=range_start;range_end=t.selectionStart+range.text.length;tab=t.value.substr(0,range_start+range.text.length).split("\n");range_end+=(line_start+line_nb-1-tab.length)*2;t.selectionEnd=range_end;}}catch(e){}}if(t&&t.id){setTimeout("get_IE_selection(document.getElementById('"+t.id+"'));",50);}};function IE_textarea_focus(){event.srcElement.focused=true;}function IE_texta
 rea_blur(){event.srcElement.focused=false;}function set_IE_selection(t){var nbLineStart,nbLineStart,nbLineEnd,range;if(!window.closed){nbLineStart=t.value.substr(0,t.selectionStart).split("\n").length-1;nbLineEnd=t.value.substr(0,t.selectionEnd).split("\n").length-1;try{range=document.selection.createRange();range.moveToElementText(t);range.setEndPoint('EndToStart',range);range.moveStart('character',t.selectionStart-nbLineStart);range.moveEnd('character',t.selectionEnd-nbLineEnd-(t.selectionStart-nbLineStart));range.select();}catch(e){}}};eAL.waiting_loading["elements_functions.js"]="loaded";
+ EAL.prototype.start_resize_area=function(){var d=document,a,div,width,height,father;d.onmouseup=eAL.end_resize_area;d.onmousemove=eAL.resize_area;eAL.toggle(eAL.resize["id"]);a=eAs[eAL.resize["id"]]["textarea"];div=d.getElementById("edit_area_resize");if(!div){div=d.createElement("div");div.id="edit_area_resize";div.style.border="dashed #888888 1px";}width=a.offsetWidth-2;height=a.offsetHeight-2;div.style.display="block";div.style.width=width+"px";div.style.height=height+"px";father=a.parentNode;father.insertBefore(div,a);a.style.display="none";eAL.resize["start_top"]=calculeOffsetTop(div);eAL.resize["start_left"]=calculeOffsetLeft(div);};EAL.prototype.end_resize_area=function(e){var d=document,div,a,width,height;d.onmouseup="";d.onmousemove="";div=d.getElementById("edit_area_resize");a=eAs[eAL.resize["id"]]["textarea"];width=Math.max(eAs[eAL.resize["id"]]["settings"]["min_width"],div.offsetWidth-4);height=Math.max(eAs[eAL.resize["id"]]["settings"]["min_height"],div.offsetHeight-4)
 ;if(eAL.isIE==6){width-=2;height-=2;}a.style.width=width+"px";a.style.height=height+"px";div.style.display="none";a.style.display="inline";a.selectionStart=eAL.resize["selectionStart"];a.selectionEnd=eAL.resize["selectionEnd"];eAL.toggle(eAL.resize["id"]);return false;};EAL.prototype.resize_area=function(e){var allow,newHeight,newWidth;allow=eAs[eAL.resize["id"]]["settings"]["allow_resize"];if(allow=="both"||allow=="y"){newHeight=Math.max(20,getMouseY(e)-eAL.resize["start_top"]);document.getElementById("edit_area_resize").style.height=newHeight+"px";}if(allow=="both"||allow=="x"){newWidth=Math.max(20,getMouseX(e)-eAL.resize["start_left"]);document.getElementById("edit_area_resize").style.width=newWidth+"px";}return false;};eAL.waiting_loading["resize_area.js"]="loaded";
+	EAL.prototype.get_regexp=function(text_array){res="(\\b)(";for(i=0;i<text_array.length;i++){if(i>0)res+="|";res+=this.get_escaped_regexp(text_array[i]);}res+=")(\\b)";reg=new RegExp(res);return res;};EAL.prototype.get_escaped_regexp=function(str){return str.toString().replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g,"\\$1");};EAL.prototype.init_syntax_regexp=function(){var lang_style={};for(var lang in this.load_syntax){if(!this.syntax[lang]){this.syntax[lang]={};this.syntax[lang]["keywords_reg_exp"]={};this.keywords_reg_exp_nb=0;if(this.load_syntax[lang]['KEYWORDS']){param="g";if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false)param+="i";for(var i in this.load_syntax[lang]['KEYWORDS']){if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function")continue;this.syntax[lang]["keywords_reg_exp"][i]=new RegExp(this.get_regexp(this.load_syntax[lang]['KEYWORDS'][i]),param);this.keywords_reg_exp_nb++;}}if(this.load_syntax[lang]['OPERATORS']){var str="";var nb=0;for(var i in
  this.load_syntax[lang]['OPERATORS']){if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function")continue;if(nb>0)str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);nb++;}if(str.length>0)this.syntax[lang]["operators_reg_exp"]=new RegExp("("+str+")","g");}if(this.load_syntax[lang]['DELIMITERS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['DELIMITERS']){if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function")continue;if(nb>0)str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);nb++;}if(str.length>0)this.syntax[lang]["delimiters_reg_exp"]=new RegExp("("+str+")","g");}var syntax_trace=[];this.syntax[lang]["quotes"]={};var quote_tab=[];if(this.load_syntax[lang]['QUOTEMARKS']){for(var i in this.load_syntax[lang]['QUOTEMARKS']){if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function")continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);this.syntax[lang]["quotes"][x]=x;quote_tab[quot
 e_tab.length]="("+x+"(\\\\.|[^"+x+"])*(?:"+x+"|$))";syntax_trace.push(x);}}this.syntax[lang]["comments"]={};if(this.load_syntax[lang]['COMMENT_SINGLE']){for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function")continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";syntax_trace.push(x);this.syntax[lang]["comments"][x]="\n";}}if(this.load_syntax[lang]['COMMENT_MULTI']){for(var i in this.load_syntax[lang]['COMMENT_MULTI']){if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function")continue;var start=this.get_escaped_regexp(i);var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";syntax_trace.push(start);syntax_trace.push(end);this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];}}if(quote_tab.length>0)this.syntax[lang]["c
 omment_or_quote_reg_exp"]=new RegExp("("+quote_tab.join("|")+")","gi");if(syntax_trace.length>0)this.syntax[lang]["syntax_trace_regexp"]=new RegExp("((.|\n)*?)(\\\\*("+syntax_trace.join("|")+"|$))","gmi");if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){this.syntax[lang]["script_delimiters"]={};for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function")continue;this.syntax[lang]["script_delimiters"][i]=this.load_syntax[lang]['SCRIPT_DELIMITERS'];}}this.syntax[lang]["custom_regexp"]={};if(this.load_syntax[lang]['REGEXPS']){for(var i in this.load_syntax[lang]['REGEXPS']){if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function")continue;var val=this.load_syntax[lang]['REGEXPS'][i];if(!this.syntax[lang]["custom_regexp"][val['execute']])this.syntax[lang]["custom_regexp"][val['execute']]={};this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp':new RegExp(val['search'],val['modifiers']),'class':val['class']};}
 }if(this.load_syntax[lang]['STYLES']){lang_style[lang]={};for(var i in this.load_syntax[lang]['STYLES']){if(typeof(this.load_syntax[lang]['STYLES'][i])=="function")continue;if(typeof(this.load_syntax[lang]['STYLES'][i])!="string"){for(var j in this.load_syntax[lang]['STYLES'][i]){lang_style[lang][j]=this.load_syntax[lang]['STYLES'][i][j];}}
+else{lang_style[lang][i]=this.load_syntax[lang]['STYLES'][i];}}}var style="";for(var i in lang_style[lang]){if(lang_style[lang][i].length>0){style+="."+lang+" ."+i.toLowerCase()+" span{"+lang_style[lang][i]+"}\n";style+="."+lang+" ."+i.toLowerCase()+"{"+lang_style[lang][i]+"}\n";}}this.syntax[lang]["styles"]=style;}}};eAL.waiting_loading["reg_syntax.js"]="loaded";
+var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;editAreaLoader.iframe_script= "<script type='text/javascript'> Ã EA(){var t=Á;t.error=Ì;t.inlinePopup=[{popup_id:\"area_search_replace\",icon_id:\"search\"},{popup_id:\"edit_area_help\",icon_id:\"help\"}];t.plugins={};t.line_number=0;È.eAL.set_browser_infos(t);if(t.isIE==8)t.isIE=7;if(t.isIE==9)t.isIE=Ì;t.É={};t.last_text_to_highlight=\"\";t.last_hightlighted_text=\"\";t.syntax_list=[];t.allready_used_syntax={};t.check_line_selection_timer=50;t.ÂFocused=Ì;t.highlight_selection_line=null;t.previous=[];t.next=[];t.last_undo=\"\";t.files={};t.filesIdAssoc={};t.curr_file='';t.assocBracket={};t.revertAssocBracket={};t.assocBracket[\"(\"]=\")\";t.assocBracket[\"{\"]=\"}\";t.assocBracket[\"[\"]=\"]\";for(var index in t.assocBracket){t.revertAssocBracket[t.assocBracket[index]]=index;}t.is_editable=Ë;t.lineHeight=16;t.tab_nb_char=8;if(t.isOpera)t.tab_nb_ch
 ar=6;t.is_tabbing=Ì;t.fullscreen={'isFull':Ì};t.isResizing=Ì;t.id=area_id;t.Å=eAs[t.id][\"Å\"];if((\"\"+t.Å['replace_tab_by_spaces']).match(/^[0-9]+$/)){t.tab_nb_char=t.Å['replace_tab_by_spaces'];t.tabulation=\"\";for(var i=0;i<t.tab_nb_char;i++)t.tabulation+=\" \";}\nelse{t.tabulation=\"\t\";}if(t.Å[\"syntax_selection_allow\"]&&t.Å[\"syntax_selection_allow\"].Æ>0)t.syntax_list=t.Å[\"syntax_selection_allow\"].replace(/ /g,\"\").split(\",\");if(t.Å['syntax'])t.allready_used_syntax[t.Å['syntax']]=Ë;};EA.Ä.init=Ã(){var t=Á,a,s=t.Å;t.Â=_$(\"Â\");t.container=_$(\"container\");t.result=_$(\"result\");t.content_highlight=_$(\"content_highlight\");t.selection_field=_$(\"selection_field\");t.selection_field_text=_$(\"selection_field_text\");t.processing_screen=_$(\"processing\");t.editor_area=_$(\"editor\")
 ;t.tab_browsing_area=_$(\"tab_browsing_area\");t.test_font_size=_$(\"test_font_size\");a=t.Â;if(!s['is_editable'])t.set_editable(Ì);t.set_show_line_colors(s['show_line_colors']);if(syntax_selec=_$(\"syntax_selection\")){for(var i=0;i<t.syntax_list.Æ;i++){var syntax=t.syntax_list[i];var option=document.createElement(\"option\");option.Ê=syntax;if(syntax==s['syntax'])option.selected=\"selected\";dispSyntax=È.eAL.syntax_display_name[ syntax ];option.innerHTML=typeof(dispSyntax)=='undefined' ? syntax.substring(0,1).toUpperCase()+syntax.substring(1):dispSyntax;syntax_selec.appendChild(option);}}spans=È.getChildren(_$(\"toolbar_1\"),\"span\",\"\",\"\",\"all\",-1);for(var i=0;i<spans.Æ;i++){id=spans[i].id.replace(/tmp_tool_(.*)/,\"$1\");if(id!=spans[i].id){for(var j in t.plugins){if(typeof(t.plugins[j].get_control_html)==\"Ã\"){html=t.plugins[j].get_control_html(id);if(html!=Ì){html=t.get_translation(html,\"template\
 ");var new_span=document.createElement(\"span\");new_span.innerHTML=html;var father=spans[i].ÈNode;spans[i].ÈNode.replaceChild(new_span,spans[i]);break;}}}}}if(s[\"debug\"]){t.debug=È.document.getElementById(\"edit_area_debug_\"+t.id);}if(_$(\"redo\")!=null)t.switchClassSticky(_$(\"redo\"),'editAreaButtonDisabled',Ë);if(typeof(È.eAL.syntax[s[\"syntax\"]])!=\"undefined\"){for(var i in È.eAL.syntax){if(typeof(È.eAL.syntax[i][\"Çs\"])!=\"undefined\"){t.add_Ç(È.eAL.syntax[i][\"Çs\"]);}}}if(t.isOpera)_$(\"editor\").onkeypress=keyDown;\nelse _$(\"editor\").onkeydown=keyDown;for(var i=0;i<t.inlinePopup.Æ;i++){if(t.isOpera)_$(t.inlinePopup[i][\"popup_id\"]).onkeypress=keyDown;\nelse _$(t.inlinePopup[i][\"popup_id\"]).onkeydown=keyDown;}if(s[\"allow_resize\"]==\"both\"||s[\"allow_resize\"]==\"x\"||s[\"allow_resize\"]==\"y\")t.allow_resize(Ë);È.eAL.toggle(t.id,\"on\");t.c
 hange_smooth_selection_mode(eA.smooth_selection);t.execCommand(\"change_highlight\",s[\"start_highlight\"]);t.set_font(eA.Å[\"font_family\"],eA.Å[\"font_size\"]);children=È.getChildren(document.body,\"\",\"selec\",\"none\",\"all\",-1);for(var i=0;i<children.Æ;i++){if(t.isIE)children[i].unselectable=Ë;\nelse children[i].onmousedown=Ã(){return Ì};}a.spellcheck=s[\"gecko_spellcheck\"];if(t.isFirefox >='3'){t.content_highlight.Ç.paddingLeft=\"1px\";t.selection_field.Ç.paddingLeft=\"1px\";t.selection_field_text.Ç.paddingLeft=\"1px\";}if(t.isIE&&t.isIE < 8){a.Ç.marginTop=\"-1px\";}if(t.isSafari&&t.isSafari < 4.1){t.editor_area.Ç.position=\"absolute\";a.Ç.marginLeft=\"-3px\";if(t.isSafari < 3.2)a.Ç.marginTop=\"1px\";}È.eAL.add_event(t.result,\"click\",Ã(e){if((e.target||e.srcElement)==eA.result){eA.area_select(eA.Â.Ê.Æ
 ,0);}});if(s['is_multi_files']!=Ì)t.open_file({'id':t.curr_file,'text':''});t.set_word_wrap(s['word_wrap']);setTimeout(\"eA.focus();eA.manage_size();eA.execCommand('EA_load');\",10);t.check_undo();t.check_line_selection(Ë);t.scroll_to_view();for(var i in t.plugins){if(typeof(t.plugins[i].onload)==\"Ã\")t.plugins[i].onload();}if(s['fullscreen']==Ë)t.toggle_full_screen(Ë);È.eAL.add_event(window,\"resize\",eA.update_size);È.eAL.add_event(È.window,\"resize\",eA.update_size);È.eAL.add_event(top.window,\"resize\",eA.update_size);È.eAL.add_event(window,\"unload\",Ã(){if(È.eAL){È.eAL.remove_event(È.window,\"resize\",eA.update_size);È.eAL.remove_event(top.window,\"resize\",eA.update_size);}if(eAs[eA.id]&&eAs[eA.id][\"displayed\"]){eA.execCommand(\"EA_unload\");}});};EA.Ä.update_size=Ã(){var d=document,pd=È.document,height,width,popup,maxLeft,
 maxTop;if(typeof eAs !='undefined'&&eAs[eA.id]&&eAs[eA.id][\"displayed\"]==Ë){if(eA.fullscreen['isFull']){pd.getElementById(\"frame_\"+eA.id).Ç.width=pd.getElementsByTagName(\"html\")[0].clientWidth+\"px\";pd.getElementById(\"frame_\"+eA.id).Ç.height=pd.getElementsByTagName(\"html\")[0].clientHeight+\"px\";}if(eA.tab_browsing_area.Ç.display=='block'&&(!eA.isIE||eA.isIE >=8)){eA.tab_browsing_area.Ç.height=\"0px\";eA.tab_browsing_area.Ç.height=(eA.result.offsetTop-eA.tab_browsing_area.offsetTop-1)+\"px\";}height=d.body.offsetHeight-eA.get_all_toolbar_height()-4;eA.result.Ç.height=height+\"px\";width=d.body.offsetWidth-2;eA.result.Ç.width=width+\"px\";for(i=0;i < eA.inlinePopup.Æ;i++){popup=_$(eA.inlinePopup[i][\"popup_id\"]);maxLeft=d.body.offsetWidth-popup.offsetWidth;maxTop=d.body.offsetHeight-popup.offsetHeight;if(popup.offsetTop > maxTop)popup.Ç.top=maxTop+\"px\";if(popup.offsetLeft 
 > maxLeft)popup.Ç.left=maxLeft+\"px\";}eA.manage_size(Ë);eA.fixLinesHeight(eA.Â.Ê,0,-1);}};EA.Ä.manage_size=Ã(onlyOneTime){if(!eAs[Á.id])return Ì;if(eAs[Á.id][\"displayed\"]==Ë&&Á.ÂFocused){var area_height,resized=Ì;if(!Á.Å['word_wrap']){var area_width=Á.Â.scrollWidth;area_height=Á.Â.scrollHeight;if(Á.isOpera&&Á.isOpera < 9.6){area_width=10000;}if(Á.Â.previous_scrollWidth!=area_width){Á.container.Ç.width=area_width+\"px\";Á.Â.Ç.width=area_width+\"px\";Á.content_highlight.Ç.width=area_width+\"px\";Á.Â.previous_scrollWidth=area_width;resized=Ë;}}if(Á.Å['word_wrap']){newW=Á.Â.offsetWidth;if(Á.isFirefox||Á.isIE)newW-=2;if(Á.isSafari)newW-=6;Á.content
 _highlight.Ç.width=Á.selection_field_text.Ç.width=Á.selection_field.Ç.width=Á.test_font_size.Ç.width=newW+\"px\";}if(Á.isOpera||Á.isFirefox||Á.isSafari){area_height=Á.getLinePosTop(Á.É[\"nb_line\"]+1);}\nelse{area_height=Á.Â.scrollHeight;}if(Á.Â.previous_scrollHeight!=area_height){Á.container.Ç.height=(area_height+2)+\"px\";Á.Â.Ç.height=area_height+\"px\";Á.content_highlight.Ç.height=area_height+\"px\";Á.Â.previous_scrollHeight=area_height;resized=Ë;}if(Á.É[\"nb_line\"] >=Á.line_number){var newLines='',destDiv=_$(\"line_number\"),start=Á.line_number,end=Á.É[\"nb_line\"]+100;for(i=start+1;i < end;i++){newLines+='<div id=\"line_'+i+'\">'+i+\"</div>\";Á.line_number++;}destDiv.innerHTML=destDiv.innerHTML+newL
 ines;if(Á.Å['word_wrap']){Á.fixLinesHeight(Á.Â.Ê,start,-1);}}Á.Â.scrollTop=\"0px\";Á.Â.scrollLeft=\"0px\";if(resized==Ë){Á.scroll_to_view();}}if(!onlyOneTime)setTimeout(\"eA.manage_size();\",100);};EA.Ä.execCommand=Ã(cmd,param){for(var i in Á.plugins){if(typeof(Á.plugins[i].execCommand)==\"Ã\"){if(!Á.plugins[i].execCommand(cmd,param))return;}}switch(cmd){case \"save\":if(Á.Å[\"save_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"save_callback\"]+\"('\"+Á.id+\"',eA.Â.Ê);\");break;case \"load\":if(Á.Å[\"load_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"load_callback\"]+\"('\"+Á.id+\"');\");break;case \"onchange\":if(Á.Å[\"change_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"change_callback\"]+\"('\"
 +Á.id+\"');\");break;case \"EA_load\":if(Á.Å[\"EA_load_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_load_callback\"]+\"('\"+Á.id+\"');\");break;case \"EA_unload\":if(Á.Å[\"EA_unload_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_unload_callback\"]+\"('\"+Á.id+\"');\");break;case \"toggle_on\":if(Á.Å[\"EA_toggle_on_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_toggle_on_callback\"]+\"('\"+Á.id+\"');\");break;case \"toggle_off\":if(Á.Å[\"EA_toggle_off_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_toggle_off_callback\"]+\"('\"+Á.id+\"');\");break;case \"re_sync\":if(!Á.do_highlight)break;case \"file_switch_on\":if(Á.Å[\"EA_file_switch_on_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_file_switch_on_callback\"]+\"(param);\");break;case \"fi
 le_switch_off\":if(Á.Å[\"EA_file_switch_off_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_file_switch_off_callback\"]+\"(param);\");break;case \"file_close\":if(Á.Å[\"EA_file_close_callback\"].Æ>0)return eval(\"È.\"+Á.Å[\"EA_file_close_callback\"]+\"(param);\");break;default:if(typeof(eval(\"eA.\"+cmd))==\"Ã\"){if(Á.Å[\"debug\"])eval(\"eA.\"+cmd+\"(param);\");\nelse try{eval(\"eA.\"+cmd+\"(param);\");}catch(e){};}}};EA.Ä.get_translation=Ã(word,mode){if(mode==\"template\")return È.eAL.translate(word,Á.Å[\"language\"],mode);\nelse return È.eAL.get_word_translation(word,Á.Å[\"language\"]);};EA.Ä.add_plugin=Ã(plug_name,plug_obj){for(var i=0;i<Á.Å[\"plugins\"].Æ;i++){if(Á.Å[\"plugins\"][i]==plug_name){Á.plugins[plug_name]=plug_obj;plug_ob
 j.baseURL=È.eAL.baseURL+\"plugins/\"+plug_name+\"/\";if(typeof(plug_obj.init)==\"Ã\")plug_obj.init();}}};EA.Ä.load_css=Ã(url){try{link=document.createElement(\"link\");link.type=\"text/css\";link.rel=\"Çsheet\";link.media=\"all\";link.href=url;head=document.getElementsByTagName(\"head\");head[0].appendChild(link);}catch(e){document.write(\"<link href='\"+url+\"' rel='Çsheet' type='text/css' />\");}};EA.Ä.load_script=Ã(url){try{script=document.createElement(\"script\");script.type=\"text/javascript\";script.src=url;script.charset=\"UTF-8\";head=document.getElementsByTagName(\"head\");head[0].appendChild(script);}catch(e){document.write(\"<script type='text/javascript' src='\"+url+\"' charset=\\\"UTF-8\\\"><\"+\"/script>\");}};EA.Ä.add_lang=Ã(language,Ês){if(!È.eAL.lang[language])È.eAL.lang[language]={};for(var i in Ês)È.eAL.lang[language][i]=Ês[i];};Ã
 Æ’ _$(id){return document.getElementById(id);};var eA=new EA();È.eAL.add_event(window,\"load\",init);à init(){setTimeout(\"eA.init();\",10);};	EA.Ä.focus=Ã(){Á.Â.focus();Á.ÂFocused=Ë;};EA.Ä.check_line_selection=Ã(timer_checkup){var changes,infos,new_top,new_width,i;var t1=t2=t2_1=t3=tLines=tend=new Date().getTime();if(!eAs[Á.id])return ÃŒ;if(!Á.smooth_selection&&!Á.do_highlight){}\nelse if(Á.ÂFocused&&eAs[Á.id][\"displayed\"]==Ë&&Á.isResizing==ÃŒ){infos=Á.get_selection_infos();changes=Á.checkTextEvolution(typeof(Á.É['full_text'])=='undefined' ? '':Á.É['full_text'],infos['full_text']);t2=new Date().getTime();if(Á.É[\"line_start\"] !=infos[\"line_start\"]||Á.É[\"line_nb\"] !=infos[\"line_nb\"]||infos[\"full_text\"] !=Á.Ãâ
 €°[\"full_text\"]||Á.reload_highlight||Á.É[\"selectionStart\"] !=infos[\"selectionStart\"]||Á.É[\"selectionEnd\"] !=infos[\"selectionEnd\"]||!timer_checkup){new_top=Á.getLinePosTop(infos[\"line_start\"]);new_width=Math.max(Á.Â.scrollWidth,Á.container.clientWidth-50);Á.selection_field.Ç.top=Á.selection_field_text.Ç.top=new_top+\"px\";if(!Á.Ã…['word_wrap']){Á.selection_field.Ç.width=Á.selection_field_text.Ç.width=Á.test_font_size.Ç.width=new_width+\"px\";}if(Á.do_highlight==Ë){var curr_text=infos[\"full_text\"].split(\"\\n\");var content=\"\";var start=Math.max(0,infos[\"line_start\"]-1);var end=Math.min(curr_text.Æ,infos[\"line_start\"]+infos[\"line_nb\"]-1);for(i=start;i< end;i++){content+=curr_text[i]+\"\\n\";}selLength=infos['selectionEnd']-infos['selectionStart'];content=content.su
 bstr(0,infos[\"curr_pos\"]-1)+\"\\r\\r\"+content.substr(infos[\"curr_pos\"]-1,selLength)+\"\\r\\r\"+content.substr(infos[\"curr_pos\"]-1+selLength);content='<span>'+content.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(\"\\r\\r\",'</span><strong>').replace(\"\\r\\r\",'</strong><span>')+'</span>';if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){Á.selection_field.innerHTML=\"<pre>\"+content.replace(/^\\r?\\n/,\"<br>\")+\"</pre>\";}\nelse{Á.selection_field.innerHTML=content;}Á.selection_field_text.innerHTML=Á.selection_field.innerHTML;t2_1=new Date().getTime();if(Á.reload_highlight||(infos[\"full_text\"] !=Á.last_text_to_highlight&&(Á.É[\"line_start\"]!=infos[\"line_start\"]||Á.show_line_colors||Á.Å['word_wrap']||Á.É[\"line_nb\"]!=infos[\"line_nb\"]||Á.É[\"nb_line\"]!=infos[\"nb_line\"]))){Á.maj_highlight(infos);}}}t3=n
 ew Date().getTime();if(Á.Å['word_wrap']&&infos[\"full_text\"] !=Á.É[\"full_text\"]){if(changes.newText.split(\"\\n\").Æ==1&&Á.É['nb_line']&&infos['nb_line']==Á.É['nb_line']){Á.fixLinesHeight(infos['full_text'],changes.lineStart,changes.lineStart);}\nelse{Á.fixLinesHeight(infos['full_text'],changes.lineStart,-1);}}tLines=new Date().getTime();if(infos[\"line_start\"] !=Á.É[\"line_start\"]||infos[\"curr_pos\"] !=Á.É[\"curr_pos\"]||infos[\"full_text\"].Æ!=Á.É[\"full_text\"].Æ||Á.reload_highlight||!timer_checkup){var selec_char=infos[\"curr_line\"].charAt(infos[\"curr_pos\"]-1);var no_real_move=Ë;if(infos[\"line_nb\"]==1&&(Á.assocBracket[selec_char]||Á.revertAssocBracket[selec_char])){no_real_move=Ì;if(Á.findEndBracket(infos,selec_char)===Ë){_$(\"end_bracket\").Ç.vi
 sibility=\"visible\";_$(\"cursor_pos\").Ç.visibility=\"visible\";_$(\"cursor_pos\").innerHTML=selec_char;_$(\"end_bracket\").innerHTML=(Á.assocBracket[selec_char]||Á.revertAssocBracket[selec_char]);}\nelse{_$(\"end_bracket\").Ç.visibility=\"hidden\";_$(\"cursor_pos\").Ç.visibility=\"hidden\";}}\nelse{_$(\"cursor_pos\").Ç.visibility=\"hidden\";_$(\"end_bracket\").Ç.visibility=\"hidden\";}Á.displayToCursorPosition(\"cursor_pos\",infos[\"line_start\"],infos[\"curr_pos\"]-1,infos[\"curr_line\"],no_real_move);if(infos[\"line_nb\"]==1&&infos[\"line_start\"]!=Á.É[\"line_start\"])Á.scroll_to_view();}Á.É=infos;}tend=new Date().getTime();if(timer_checkup){setTimeout(\"eA.check_line_selection(Ë)\",Á.check_line_selection_timer);}};EA.Ä.get_selection_infos=Ã(){var sel={},start,end,len,str;Á.getIESelection();start=Á.Â.selectionS
 tart;end=Á.Â.selectionEnd;if(Á.É[\"selectionStart\"]==start&&Á.É[\"selectionEnd\"]==end&&Á.É[\"full_text\"]==Á.Â.Ê){return Á.É;}if(Á.tabulation!=\"\t\"&&Á.Â.Ê.indexOf(\"\t\")!=-1){len=Á.Â.Ê.Æ;Á.Â.Ê=Á.replace_tab(Á.Â.Ê);start=end=start+(Á.Â.Ê.Æ-len);Á.area_select(start,0);}sel[\"selectionStart\"]=start;sel[\"selectionEnd\"]=end;sel[\"full_text\"]=Á.Â.Ê;sel[\"line_start\"]=1;sel[\"line_nb\"]=1;sel[\"curr_pos\"]=0;sel[\"curr_line\"]=\"\";sel[\"indexOfCursor\"]=0;sel[\"selec_direction\"]=Á.É[\"selec_direction\"];var splitTab=sel[\"full_text\"].split(\"\\n\");var nbLine=Math.max(0,splitTab.Æ);var nbChar=Math.max(0,sel[\"full_text\"].Æ-(nbLine-1));if(sel[\"full_text\"].index
 Of(\"\\r\")!=-1)nbChar=nbChar-(nbLine-1);sel[\"nb_line\"]=nbLine;sel[\"nb_char\"]=nbChar;if(start>0){str=sel[\"full_text\"].substr(0,start);sel[\"curr_pos\"]=start-str.lastIndexOf(\"\\n\");sel[\"line_start\"]=Math.max(1,str.split(\"\\n\").Æ);}\nelse{sel[\"curr_pos\"]=1;}if(end>start){sel[\"line_nb\"]=sel[\"full_text\"].substring(start,end).split(\"\\n\").Æ;}sel[\"indexOfCursor\"]=start;sel[\"curr_line\"]=splitTab[Math.max(0,sel[\"line_start\"]-1)];if(sel[\"selectionStart\"]==Á.É[\"selectionStart\"]){if(sel[\"selectionEnd\"]>Á.É[\"selectionEnd\"])sel[\"selec_direction\"]=\"down\";\nelse if(sel[\"selectionEnd\"]==Á.É[\"selectionStart\"])sel[\"selec_direction\"]=Á.É[\"selec_direction\"];}\nelse if(sel[\"selectionStart\"]==Á.É[\"selectionEnd\"]&&sel[\"selectionEnd\"]>Á.É[\"selectionEnd\"]){sel[\"selec_direction\"]=\"down\";}\nelse{sel[\"selec_direction\"]=\"up\";}_$(\"
 nbLine\").innerHTML=nbLine;_$(\"nbChar\").innerHTML=nbChar;_$(\"linePos\").innerHTML=sel[\"line_start\"];_$(\"currPos\").innerHTML=sel[\"curr_pos\"];return sel;};EA.Ä.getIESelection=Ã(){var selectionStart,selectionEnd,range,stored_range;if(!Á.isIE)return ÃŒ;if(Á.Ã…['word_wrap'])Á.Â.wrap='off';try{range=document.selection.createRange();stored_range=range.duplicate();stored_range.moveToElementText(Á.Â);stored_range.setEndPoint('EndToEnd',range);if(stored_range.ÈElement()!=Á.Â)throw \"invalid focus\";var scrollTop=Á.result.scrollTop+document.body.scrollTop;var relative_top=range.offsetTop-È.calculeOffsetTop(Á.Â)+scrollTop;var line_start=Math.round((relative_top / Á.lineHeight)+1);var line_nb=Math.round(range.boundingHeight / Á.lineHeight);selectionStart=stored_range.text.Æ-range.text.Æ;selectionStart+=(line_start-Ã
 .Â.Ê.substr(0,selectionStart).split(\"\\n\").Æ)*2;selectionStart-=(line_start-Á.Â.Ê.substr(0,selectionStart).split(\"\\n\").Æ)* 2;selectionEnd=selectionStart+range.text.Æ;selectionEnd+=(line_start+line_nb-1-Á.Â.Ê.substr(0,selectionEnd).split(\"\\n\").Æ)*2;Á.Â.selectionStart=selectionStart;Á.Â.selectionEnd=selectionEnd;}catch(e){}if(Á.Ã…['word_wrap'])Á.Â.wrap='soft';};EA.Ä.setIESelection=Ã(){var a=Á.Â,nbLineStart,nbLineEnd,range;if(!Á.isIE)return ÃŒ;nbLineStart=a.Ê.substr(0,a.selectionStart).split(\"\\n\").Æ-1;nbLineEnd=a.Ê.substr(0,a.selectionEnd).split(\"\\n\").Æ-1;range=document.selection.createRange();range.moveToElementText(a);range.setEndPoint('EndToStart',range);range.moveStart('character',a.selectionStart-nbLineStart);range.moveEnd(
 'character',a.selectionEnd-nbLineEnd-(a.selectionStart-nbLineStart));range.select();};EA.Ä.checkTextEvolution=Ã(lastText,newText){var ch={},baseStep=200,cpt=0,end,step,tStart=new Date().getTime();end=Math.min(newText.Æ,lastText.Æ);step=baseStep;while(cpt<end&&step>=1){if(lastText.substr(cpt,step)==newText.substr(cpt,step)){cpt+=step;}\nelse{step=Math.floor(step/2);}}ch.posStart=cpt;ch.lineStart=newText.substr(0,ch.posStart).split(\"\\n\").Æ-1;cpt_last=lastText.Æ;cpt=newText.Æ;step=baseStep;while(cpt>=0&&cpt_last>=0&&step>=1){if(lastText.substr(cpt_last-step,step)==newText.substr(cpt-step,step)){cpt-=step;cpt_last-=step;}\nelse{step=Math.floor(step/2);}}ch.posNewEnd=cpt;ch.posLastEnd=cpt_last;if(ch.posNewEnd<=ch.posStart){if(lastText.Æ < newText.Æ){ch.posNewEnd=ch.posStart+newText.Æ-lastText.Æ;ch.posLastEnd=ch.posStart;}\nelse{ch.posLastEnd=ch.posStart+lastText.Æ-newText.Ãâ
 € ;ch.posNewEnd=ch.posStart;}}ch.newText=newText.substring(ch.posStart,ch.posNewEnd);ch.lastText=lastText.substring(ch.posStart,ch.posLastEnd);ch.lineNewEnd=newText.substr(0,ch.posNewEnd).split(\"\\n\").Æ-1;ch.lineLastEnd=lastText.substr(0,ch.posLastEnd).split(\"\\n\").Æ-1;ch.newTextLine=newText.split(\"\\n\").slice(ch.lineStart,ch.lineNewEnd+1).join(\"\\n\");ch.lastTextLine=lastText.split(\"\\n\").slice(ch.lineStart,ch.lineLastEnd+1).join(\"\\n\");return ch;};EA.Ä.tab_selection=Ã(){if(Á.is_tabbing)return;Á.is_tabbing=Ë;Á.getIESelection();var start=Á.Â.selectionStart;var end=Á.Â.selectionEnd;var insText=Á.Â.Ê.substring(start,end);var pos_start=start;var pos_end=end;if(insText.Æ==0){Á.Â.Ê=Á.Â.Ê.substr(0,start)+Á.tabulation+Á.Â.Ê.substr(end);pos_start=start+Á.tabulation.
 Æ;pos_end=pos_start;}\nelse{start=Math.max(0,Á.Â.Ê.substr(0,start).lastIndexOf(\"\\n\")+1);endText=Á.Â.Ê.substr(end);startText=Á.Â.Ê.substr(0,start);tmp=Á.Â.Ê.substring(start,end).split(\"\\n\");insText=Á.tabulation+tmp.join(\"\\n\"+Á.tabulation);Á.Â.Ê=startText+insText+endText;pos_start=start;pos_end=Á.Â.Ê.indexOf(\"\\n\",startText.Æ+insText.Æ);if(pos_end==-1)pos_end=Á.Â.Ê.Æ;}Á.Â.selectionStart=pos_start;Á.Â.selectionEnd=pos_end;if(Á.isIE){Á.setIESelection();setTimeout(\"eA.is_tabbing=Ì;\",100);}\nelse{Á.is_tabbing=Ì;}};EA.Ä.invert_tab_selection=Ã(){var t=Á,a=Á.Â;if(t.is_tabbing)return;t.is_tabbing=Ë;t.getIESelection();var start=a.selectionStart;var end=
 a.selectionEnd;var insText=a.Ê.substring(start,end);var pos_start=start;var pos_end=end;if(insText.Æ==0){if(a.Ê.substring(start-t.tabulation.Æ,start)==t.tabulation){a.Ê=a.Ê.substr(0,start-t.tabulation.Æ)+a.Ê.substr(end);pos_start=Math.max(0,start-t.tabulation.Æ);pos_end=pos_start;}}\nelse{start=a.Ê.substr(0,start).lastIndexOf(\"\\n\")+1;endText=a.Ê.substr(end);startText=a.Ê.substr(0,start);tmp=a.Ê.substring(start,end).split(\"\\n\");insText=\"\";for(i=0;i<tmp.Æ;i++){for(j=0;j<t.tab_nb_char;j++){if(tmp[i].charAt(0)==\"\t\"){tmp[i]=tmp[i].substr(1);j=t.tab_nb_char;}\nelse if(tmp[i].charAt(0)==\" \")tmp[i]=tmp[i].substr(1);}insText+=tmp[i];if(i<tmp.Æ-1)insText+=\"\\n\";}a.Ê=startText+insText+endText;pos_start=start;pos_end=a.Ê.indexOf(\"\\n\",startText.Æ+insText.Æ);if(pos_end==-1)pos_end=a.Ê.Æ;}a.selectionStart=pos_start;a.selectionEnd
 =pos_end;if(t.isIE){t.setIESelection();setTimeout(\"eA.is_tabbing=Ì;\",100);}\nelse t.is_tabbing=Ì;};EA.Ä.press_enter=Ã(){if(!Á.smooth_selection)return Ì;Á.getIESelection();var scrollTop=Á.result.scrollTop;var scrollLeft=Á.result.scrollLeft;var start=Á.Â.selectionStart;var end=Á.Â.selectionEnd;var start_last_line=Math.max(0,Á.Â.Ê.substring(0,start).lastIndexOf(\"\\n\")+1);var begin_line=Á.Â.Ê.substring(start_last_line,start).replace(/^([ \t]*).*/gm,\"$1\");var lineStart=Á.Â.Ê.substring(0,start).split(\"\\n\").Æ;if(begin_line==\"\\n\"||begin_line==\"\\r\"||begin_line.Æ==0){return Ì;}if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){begin_line=\"\\r\\n\"+begin_line;}\nelse{begin_line=\"\\n\"+begin_line;}Á.Â.Ê=Á.Â.Ê.substring(0,start
 )+begin_line+Á.Â.Ê.substring(end);Á.area_select(start+begin_line.Æ,0);if(Á.isIE){Á.result.scrollTop=scrollTop;Á.result.scrollLeft=scrollLeft;}return Ë;};EA.Ä.findEndBracket=Ã(infos,bracket){var start=infos[\"indexOfCursor\"];var normal_order=Ë;if(Á.assocBracket[bracket])endBracket=Á.assocBracket[bracket];\nelse if(Á.revertAssocBracket[bracket]){endBracket=Á.revertAssocBracket[bracket];normal_order=Ì;}var end=-1;var nbBracketOpen=0;for(var i=start;i<infos[\"full_text\"].Æ&&i>=0;){if(infos[\"full_text\"].charAt(i)==endBracket){nbBracketOpen--;if(nbBracketOpen<=0){end=i;break;}}\nelse if(infos[\"full_text\"].charAt(i)==bracket)nbBracketOpen++;if(normal_order)i++;\nelse i--;}if(end==-1)return Ì;var endLastLine=infos[\"full_text\"].substr(0,end).lastIndexOf(\"\\n\");if(endLastLine==-1)line=1;\nelse line=infos[\"full_text\"].substr(0,endLas
 tLine).split(\"\\n\").Æ+1;var curPos=end-endLastLine-1;var endLineLength=infos[\"full_text\"].substring(end).split(\"\\n\")[0].Æ;Á.displayToCursorPosition(\"end_bracket\",line,curPos,infos[\"full_text\"].substring(endLastLine+1,end+endLineLength));return Ë;};EA.Ä.displayToCursorPosition=Ã(id,start_line,cur_pos,lineContent,no_real_move){var elem,dest,content,posLeft=0,posTop,fixPadding,topOffset,endElem;elem=Á.test_font_size;dest=_$(id);content=\"<span id='test_font_size_inner'>\"+lineContent.substr(0,cur_pos).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\")+\"</span><span id='endTestFont'>\"+lineContent.substr(cur_pos).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\")+\"</span>\";if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){elem.innerHTML=\"<pre>\"+content.replace(/^\\r?\\n/,\"<br>\")+\"</pre>\";}\nelse{elem.innerHTML=content;}endElem=_$('endTestFont');topOffset=endElem.offsetTop;fixPadding=parseInt(Á.con
 tent_highlight.Ç.paddingLeft.replace(\"px\",\"\"));posLeft=45+endElem.offsetLeft+(!isNaN(fixPadding)&&topOffset > 0 ? fixPadding:0);posTop=Á.getLinePosTop(start_line)+topOffset;if(Á.isIE&&cur_pos > 0&&endElem.offsetLeft==0){posTop+=Á.lineHeight;}if(no_real_move!=Ë){dest.Ç.top=posTop+\"px\";dest.Ç.left=posLeft+\"px\";}dest.cursor_top=posTop;dest.cursor_left=posLeft;};EA.Ä.getLinePosTop=Ã(start_line){var elem=_$('line_'+start_line),posTop=0;if(elem)posTop=elem.offsetTop;\nelse posTop=Á.lineHeight *(start_line-1);return posTop;};EA.Ä.getTextHeight=Ã(text){var t=Á,elem,height;elem=t.test_font_size;content=text.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\");if(t.isIE||(Á.isOpera&&Á.isOpera < 9.6)){elem.innerHTML=\"<pre>\"+content.replace(/^\\r?\\n/,\"<br>\")+\"</pre>\";}\nelse{elem.innerHTML=content;}height=elem.offsetHeight;height=Math.max(1,Math.floor(elem.offset
 Height / Á.lineHeight))* Á.lineHeight;return height;};EA.Ä.fixLinesHeight=Ã(textValue,lineStart,lineEnd){var aText=textValue.split(\"\\n\");if(lineEnd==-1)lineEnd=aText.Æ-1;for(var i=Math.max(0,lineStart);i <=lineEnd;i++){if(elem=_$('line_'+(i+1))){elem.Ç.height=typeof(aText[i])!=\"undefined\" ? Á.getTextHeight(aText[i])+\"px\":Á.lineHeight;}}};EA.Ä.area_select=Ã(start,Æ){Á.Â.focus();start=Math.max(0,Math.min(Á.Â.Ê.Æ,start));end=Math.max(start,Math.min(Á.Â.Ê.Æ,start+Æ));if(Á.isIE){Á.Â.selectionStart=start;Á.Â.selectionEnd=end;Á.setIESelection();}\nelse{if(Á.isOpera&&Á.isOpera < 9.6){Á.Â.setSelectionRange(0,0);}Á.Â.setSelectionRange(start,end);}Á.check_line_selection();};EA.Ä.area_get_selection
 =Ã(){var text=\"\";if(document.selection){var range=document.selection.createRange();text=range.text;}\nelse{text=Á.Â.Ê.substring(Á.Â.selectionStart,Á.Â.selectionEnd);}return text;}; EA.Ä.replace_tab=Ã(text){return text.replace(/((\\n?)([^\t\\n]*)\t)/gi,eA.smartTab);};EA.Ä.smartTab=Ã(){val=\"                   \";return EA.Ä.smartTab.arguments[2]+EA.Ä.smartTab.arguments[3]+val.substr(0,eA.tab_nb_char-(EA.Ä.smartTab.arguments[3].Æ)%eA.tab_nb_char);};EA.Ä.show_waiting_screen=Ã(){width=Á.editor_area.offsetWidth;height=Á.editor_area.offsetHeight;if(!(Á.isIE&&Á.isIE<6)){width-=2;height-=2;}Á.processing_screen.Ç.display=\"block\";Á.processing_screen.Ç.width=width+\"px\";Á.processing_screen.Ç.height=height+\"px\";Á.waiting_screen_displayed=�
 �;};EA.Ä.hide_waiting_screen=Ã(){Á.processing_screen.Ç.display=\"none\";Á.waiting_screen_displayed=Ì;};EA.Ä.add_Ç=Ã(Çs){if(Çs.Æ>0){newcss=document.createElement(\"Ç\");newcss.type=\"text/css\";newcss.media=\"all\";if(newcss.ÇSheet){newcss.ÇSheet.cssText=Çs;}\nelse{newcss.appendChild(document.createTextNode(Çs));}document.getElementsByTagName(\"head\")[0].appendChild(newcss);}};EA.Ä.set_font=Ã(family,size){var t=Á,a=Á.Â,s=Á.Å,elem_font,i,elem;var elems=[\"Â\",\"content_highlight\",\"cursor_pos\",\"end_bracket\",\"selection_field\",\"selection_field_text\",\"line_number\"];if(family&&family!=\"\")s[\"font_family\"]=family;if(size&&size>0)s[\"font_size\"]=size;if(t.isOpera&&t.isOpera < 9.6)s['font_family']=\"monospace\";if(elem_font=_$(\"area_font_size\")){for(i=0
 ;i < elem_font.Æ;i++){if(elem_font.options[i].Ê&&elem_font.options[i].Ê==s[\"font_size\"])elem_font.options[i].selected=Ë;}}if(t.isFirefox){var nbTry=3;do{var div1=document.createElement('div'),text1=document.createElement('Â');var Çs={width:'40px',overflow:'scroll',zIndex:50,visibility:'hidden',fontFamily:s[\"font_family\"],fontSize:s[\"font_size\"]+\"pt\",lineHeight:t.lineHeight+\"px\",padding:'0',margin:'0',border:'none',whiteSpace:'nowrap'};var diff,changed=Ì;for(i in Çs){div1.Ç[ i ]=Çs[i];text1.Ç[ i ]=Çs[i];}text1.wrap='off';text1.setAttribute('wrap','off');t.container.appendChild(div1);t.container.appendChild(text1);div1.innerHTML=text1.Ê='azertyuiopqsdfghjklm';div1.innerHTML=text1.Ê=text1.Ê+'wxcvbn^p*ù$!:;,,';diff=text1.scrollWidth-div1.scrollWidth;if(Math.abs(diff)>=2){s[\"font_size\"]++;changed=Ë;}t.container.removeChild(div1);t.con
 tainer.removeChild(text1);nbTry--;}while(changed&&nbTry > 0);}elem=t.test_font_size;elem.Ç.fontFamily=\"\"+s[\"font_family\"];elem.Ç.fontSize=s[\"font_size\"]+\"pt\";elem.innerHTML=\"0\";t.lineHeight=elem.offsetHeight;for(i=0;i<elems.Æ;i++){elem=_$(elems[i]);elem.Ç.fontFamily=s[\"font_family\"];elem.Ç.fontSize=s[\"font_size\"]+\"pt\";elem.Ç.lineHeight=t.lineHeight+\"px\";}t.add_Ç(\"pre{font-family:\"+s[\"font_family\"]+\"}\");if((t.isOpera&&t.isOpera < 9.6)||t.isIE >=8){var parNod=a.ÈNode,nxtSib=a.nextSibling,start=a.selectionStart,end=a.selectionEnd;parNod.removeChild(a);parNod.insertBefore(a,nxtSib);t.area_select(start,end-start);}Á.focus();Á.update_size();Á.check_line_selection();};EA.Ä.change_font_size=Ã(){var size=_$(\"area_font_size\").Ê;if(size>0)Á.set_font(\"\",size);};EA.Ä.open_inline_popup=Ã(popup_id){Á.close_all_inline_p
 opup();var popup=_$(popup_id);var editor=_$(\"editor\");for(var i=0;i<Á.inlinePopup.Æ;i++){if(Á.inlinePopup[i][\"popup_id\"]==popup_id){var icon=_$(Á.inlinePopup[i][\"icon_id\"]);if(icon){Á.switchClassSticky(icon,'editAreaButtonSelected',Ë);break;}}}popup.Ç.height=\"auto\";popup.Ç.overflow=\"visible\";if(document.body.offsetHeight< popup.offsetHeight){popup.Ç.height=(document.body.offsetHeight-10)+\"px\";popup.Ç.overflow=\"auto\";}if(!popup.positionned){var new_left=editor.offsetWidth /2-popup.offsetWidth /2;var new_top=editor.offsetHeight /2-popup.offsetHeight /2;popup.Ç.left=new_left+\"px\";popup.Ç.top=new_top+\"px\";popup.positionned=Ë;}popup.Ç.visibility=\"visible\";};EA.Ä.close_inline_popup=Ã(popup_id){var popup=_$(popup_id);for(var i=0;i<Á.inlinePopup.Æ;i++){if(Á.inlinePopup[i][\"popup_id\"]==popup_id){var icon=
 _$(Á.inlinePopup[i][\"icon_id\"]);if(icon){Á.switchClassSticky(icon,'editAreaButtonNormal',Ì);break;}}}popup.Ç.visibility=\"hidden\";};EA.Ä.close_all_inline_popup=Ã(e){for(var i=0;i<Á.inlinePopup.Æ;i++){Á.close_inline_popup(Á.inlinePopup[i][\"popup_id\"]);}Á.Â.focus();};EA.Ä.show_help=Ã(){Á.open_inline_popup(\"edit_area_help\");};EA.Ä.new_document=Ã(){Á.Â.Ê=\"\";Á.area_select(0,0);};EA.Ä.get_all_toolbar_height=Ã(){var area=_$(\"editor\");var results=È.getChildren(area,\"div\",\"class\",\"area_toolbar\",\"all\",\"0\");var height=0;for(var i=0;i<results.Æ;i++){height+=results[i].offsetHeight;}return height;};EA.Ä.go_to_line=Ã(line){if(!line){var icon=_$(\"go_to_line\");if(icon !=null){Á.restoreClass(icon);Á.switchClassSticky(icon,'editAreaButtonSelecte
 d',Ë);}line=prompt(Á.get_translation(\"go_to_line_prompt\"));if(icon !=null)Á.switchClassSticky(icon,'editAreaButtonNormal',Ì);}if(line&&line!=null&&line.search(/^[0-9]+$/)!=-1){var start=0;var lines=Á.Â.Ê.split(\"\\n\");if(line > lines.Æ)start=Á.Â.Ê.Æ;\nelse{for(var i=0;i<Math.min(line-1,lines.Æ);i++)start+=lines[i].Æ+1;}Á.area_select(start,0);}};EA.Ä.change_smooth_selection_mode=Ã(setTo){if(Á.do_highlight)return;if(setTo !=null){if(setTo===Ì)Á.smooth_selection=Ë;\nelse Á.smooth_selection=Ì;}var icon=_$(\"change_smooth_selection\");Á.Â.focus();if(Á.smooth_selection===Ë){Á.switchClassSticky(icon,'editAreaButtonNormal',Ì);Á.smooth_selection=Ì;Á.selection_field.Ç.display=\"none\";_$(\"cursor_pos\").Ç.display=\"no
 ne\";_$(\"end_bracket\").Ç.display=\"none\";}\nelse{Á.switchClassSticky(icon,'editAreaButtonSelected',Ì);Á.smooth_selection=Ë;Á.selection_field.Ç.display=\"block\";_$(\"cursor_pos\").Ç.display=\"block\";_$(\"end_bracket\").Ç.display=\"block\";}};EA.Ä.scroll_to_view=Ã(show){var zone,lineElem;if(!Á.smooth_selection)return;zone=_$(\"result\");var cursor_pos_top=_$(\"cursor_pos\").cursor_top;if(show==\"bottom\"){cursor_pos_top+=Á.getLinePosTop(Á.É['line_start']+Á.É['line_nb']-1);}var max_height_visible=zone.clientHeight+zone.scrollTop;var miss_top=cursor_pos_top+Á.lineHeight-max_height_visible;if(miss_top>0){zone.scrollTop=zone.scrollTop+miss_top;}\nelse if(zone.scrollTop > cursor_pos_top){zone.scrollTop=cursor_pos_top;}var cursor_pos_left=_$(\"cursor_pos\").cursor_left;var max_width_visible=zone.clientWidth+zone.scrollLeft;var miss_left
 =cursor_pos_left+10-max_width_visible;if(miss_left>0){zone.scrollLeft=zone.scrollLeft+miss_left+50;}\nelse if(zone.scrollLeft > cursor_pos_left){zone.scrollLeft=cursor_pos_left;}\nelse if(zone.scrollLeft==45){zone.scrollLeft=0;}};EA.Ä.check_undo=Ã(only_once){if(!eAs[Á.id])return Ì;if(Á.ÂFocused&&eAs[Á.id][\"displayed\"]==Ë){var text=Á.Â.Ê;if(Á.previous.Æ<=1)Á.switchClassSticky(_$(\"undo\"),'editAreaButtonDisabled',Ë);if(!Á.previous[Á.previous.Æ-1]||Á.previous[Á.previous.Æ-1][\"text\"] !=text){Á.previous.push({\"text\":text,\"selStart\":Á.Â.selectionStart,\"selEnd\":Á.Â.selectionEnd});if(Á.previous.Æ > Á.Å[\"max_undo\"]+1)Á.previous.shift();}if(Á.previous.Æ >=2)Á.switchClassSticky(_$(\"undo\"),'editAreaButtonNormal'
 ,Ì);}if(!only_once)setTimeout(\"eA.check_undo()\",3000);};EA.Ä.undo=Ã(){if(Á.previous.Æ > 0){Á.getIESelection();Á.next.push({\"text\":Á.Â.Ê,\"selStart\":Á.Â.selectionStart,\"selEnd\":Á.Â.selectionEnd});var prev=Á.previous.pop();if(prev[\"text\"]==Á.Â.Ê&&Á.previous.Æ > 0)prev=Á.previous.pop();Á.Â.Ê=prev[\"text\"];Á.last_undo=prev[\"text\"];Á.area_select(prev[\"selStart\"],prev[\"selEnd\"]-prev[\"selStart\"]);Á.switchClassSticky(_$(\"redo\"),'editAreaButtonNormal',Ì);Á.resync_highlight(Ë);Á.check_file_changes();}};EA.Ä.redo=Ã(){if(Á.next.Æ > 0){var next=Á.next.pop();Á.previous.push(next);Á.Â.Ê=next[\"text\"];Á.last_undo=next[\"text\"];Á.area_select(next[\"selStart
 \"],next[\"selEnd\"]-next[\"selStart\"]);Á.switchClassSticky(_$(\"undo\"),'editAreaButtonNormal',Ì);Á.resync_highlight(Ë);Á.check_file_changes();}if(Á.next.Æ==0)Á.switchClassSticky(_$(\"redo\"),'editAreaButtonDisabled',Ë);};EA.Ä.check_redo=Ã(){if(eA.next.Æ==0||eA.Â.Ê!=eA.last_undo){eA.next=[];eA.switchClassSticky(_$(\"redo\"),'editAreaButtonDisabled',Ë);}\nelse{Á.switchClassSticky(_$(\"redo\"),'editAreaButtonNormal',Ì);}};EA.Ä.switchClass=Ã(element,class_name,lock_state){var lockChanged=Ì;if(typeof(lock_state)!=\"undefined\"&&element !=null){element.classLock=lock_state;lockChanged=Ë;}if(element !=null&&(lockChanged||!element.classLock)){element.oldClassName=element.className;element.className=class_name;}};EA.Ä.restoreAndSwitchClass=Ã(element,class_name){if(element !=null&&!element.classLock
 ){Á.restoreClass(element);Á.switchClass(element,class_name);}};EA.Ä.restoreClass=Ã(element){if(element !=null&&element.oldClassName&&!element.classLock){element.className=element.oldClassName;element.oldClassName=null;}};EA.Ä.setClassLock=Ã(element,lock_state){if(element !=null)element.classLock=lock_state;};EA.Ä.switchClassSticky=Ã(element,class_name,lock_state){var lockChanged=Ì;if(typeof(lock_state)!=\"undefined\"&&element !=null){element.classLock=lock_state;lockChanged=Ë;}if(element !=null&&(lockChanged||!element.classLock)){element.className=class_name;element.oldClassName=class_name;}};EA.Ä.scroll_page=Ã(params){var dir=params[\"dir\"],shift_pressed=params[\"shift\"];var lines=Á.Â.Ê.split(\"\\n\");var new_pos=0,Æ=0,char_left=0,line_nb=0,curLine=0;var toScrollAmount=_$(\"result\").clientHeight-30;var nbLineToScroll=0,diff=0;if(dir==\"up\"){nbL
 ineToScroll=Math.ceil(toScrollAmount / Á.lineHeight);for(i=Á.É[\"line_start\"];i-diff > Á.É[\"line_start\"]-nbLineToScroll;i--){if(elem=_$('line_'+i)){diff+=Math.floor((elem.offsetHeight-1)/ Á.lineHeight);}}nbLineToScroll-=diff;if(Á.É[\"selec_direction\"]==\"up\"){for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]-nbLineToScroll,lines.Æ);line_nb++){new_pos+=lines[line_nb].Æ+1;}char_left=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"]-1);if(shift_pressed)Æ=Á.É[\"selectionEnd\"]-new_pos-char_left;Á.area_select(new_pos+char_left,Æ);view=\"top\";}\nelse{view=\"bottom\";for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]+Á.É[\"line_nb\"]-1-nbLineToScroll,lines.Æ);line_nb++){new_pos+=lines[line_nb].Æ+1;}char_left=Math.min(lines[Math.min(lines.Ã
 †-1,line_nb)].Æ,Á.É[\"curr_pos\"]-1);if(shift_pressed){start=Math.min(Á.É[\"selectionStart\"],new_pos+char_left);Æ=Math.max(new_pos+char_left,Á.É[\"selectionStart\"])-start;if(new_pos+char_left < Á.É[\"selectionStart\"])view=\"top\";}\nelse start=new_pos+char_left;Á.area_select(start,Æ);}}\nelse{var nbLineToScroll=Math.floor(toScrollAmount / Á.lineHeight);for(i=Á.É[\"line_start\"];i+diff < Á.É[\"line_start\"]+nbLineToScroll;i++){if(elem=_$('line_'+i)){diff+=Math.floor((elem.offsetHeight-1)/ Á.lineHeight);}}nbLineToScroll-=diff;if(Á.É[\"selec_direction\"]==\"down\"){view=\"bottom\";for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]+Á.É[\"line_nb\"]-2+nbLineToScroll,lines.Æ);line_nb++){if(line_nb==Á.É[\"line_start\"]-1)char_left=Á.É[\"sele
 ctionStart\"]-new_pos;new_pos+=lines[line_nb].Æ+1;}if(shift_pressed){Æ=Math.abs(Á.É[\"selectionStart\"]-new_pos);Æ+=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"]);Á.area_select(Math.min(Á.É[\"selectionStart\"],new_pos),Æ);}\nelse{Á.area_select(new_pos+char_left,0);}}\nelse{view=\"top\";for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]+nbLineToScroll-1,lines.Æ,lines.Æ);line_nb++){if(line_nb==Á.É[\"line_start\"]-1)char_left=Á.É[\"selectionStart\"]-new_pos;new_pos+=lines[line_nb].Æ+1;}if(shift_pressed){Æ=Math.abs(Á.É[\"selectionEnd\"]-new_pos-char_left);Æ+=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"])-char_left-1;Á.area_select(Math.min(Á.É[\"selectionEnd\"],new_
 pos+char_left),Æ);if(new_pos+char_left > Á.É[\"selectionEnd\"])view=\"bottom\";}\nelse{Á.area_select(new_pos+char_left,0);}}}Á.check_line_selection();Á.scroll_to_view(view);};EA.Ä.start_resize=Ã(e){È.eAL.resize[\"id\"]=eA.id;È.eAL.resize[\"start_x\"]=(e)? e.pageX:event.x+document.body.scrollLeft;È.eAL.resize[\"start_y\"]=(e)? e.pageY:event.y+document.body.scrollTop;if(eA.isIE){eA.Â.focus();eA.getIESelection();}È.eAL.resize[\"selectionStart\"]=eA.Â.selectionStart;È.eAL.resize[\"selectionEnd\"]=eA.Â.selectionEnd;È.eAL.start_resize_area();};EA.Ä.toggle_full_screen=Ã(to){var t=Á,p=È,a=t.Â,html,frame,selStart,selEnd,old,icon;if(typeof(to)==\"undefined\")to=!t.fullscreen['isFull'];old=t.fullscreen['isFull'];t.fullscreen['isFull']=to;icon=_$(\"fullscreen\");selStart=t.Â.selectionStart;selEnd=t.�
 �‚.selectionEnd;html=p.document.getElementsByTagName(\"html\")[0];frame=p.document.getElementById(\"frame_\"+t.id);if(to&&to!=old){t.fullscreen['old_overflow']=p.get_css_property(html,\"overflow\");t.fullscreen['old_height']=p.get_css_property(html,\"height\");t.fullscreen['old_width']=p.get_css_property(html,\"width\");t.fullscreen['old_scrollTop']=html.scrollTop;t.fullscreen['old_scrollLeft']=html.scrollLeft;t.fullscreen['old_zIndex']=p.get_css_property(frame,\"z-index\");if(t.isOpera){html.Ç.height=\"100%\";html.Ç.width=\"100%\";}html.Ç.overflow=\"hidden\";html.scrollTop=0;html.scrollLeft=0;frame.Ç.position=\"absolute\";frame.Ç.width=html.clientWidth+\"px\";frame.Ç.height=html.clientHeight+\"px\";frame.Ç.display=\"block\";frame.Ç.zIndex=\"999999\";frame.Ç.top=\"0px\";frame.Ç.left=\"0px\";frame.Ç.top=\"-\"+p.calculeOffsetTop(frame)+\"px\";frame.Ç.left=\"-\"
 +p.calculeOffsetLeft(frame)+\"px\";t.switchClassSticky(icon,'editAreaButtonSelected',Ì);t.fullscreen['allow_resize']=t.resize_allowed;t.allow_resize(Ì);if(t.isFirefox){p.eAL.execCommand(t.id,\"update_size();\");t.area_select(selStart,selEnd-selStart);t.scroll_to_view();t.focus();}\nelse{setTimeout(\"È.eAL.execCommand('\"+t.id+\"','update_size();');eA.focus();\",10);}}\nelse if(to!=old){frame.Ç.position=\"static\";frame.Ç.zIndex=t.fullscreen['old_zIndex'];if(t.isOpera){html.Ç.height=\"auto\";html.Ç.width=\"auto\";html.Ç.overflow=\"auto\";}\nelse if(t.isIE&&p!=top){html.Ç.overflow=\"auto\";}\nelse{html.Ç.overflow=t.fullscreen['old_overflow'];}html.scrollTop=t.fullscreen['old_scrollTop'];html.scrollLeft=t.fullscreen['old_scrollLeft'];p.eAL.hide(t.id);p.eAL.show(t.id);t.switchClassSticky(icon,'editAreaButtonNormal',Ì);if(t.fullscreen['allow_resize'])t.allow_resize(t.fullscreen['allow_re
 size']);if(t.isFirefox){t.area_select(selStart,selEnd-selStart);setTimeout(\"eA.scroll_to_view();\",10);}}};EA.Ä.allow_resize=Ã(allow){var resize=_$(\"resize_area\");if(allow){resize.Ç.visibility=\"visible\";È.eAL.add_event(resize,\"mouseup\",eA.start_resize);}\nelse{resize.Ç.visibility=\"hidden\";È.eAL.remove_event(resize,\"mouseup\",eA.start_resize);}Á.resize_allowed=allow;};EA.Ä.change_syntax=Ã(new_syntax,is_waiting){if(new_syntax==Á.Å['syntax'])return Ë;var founded=Ì;for(var i=0;i<Á.syntax_list.Æ;i++){if(Á.syntax_list[i]==new_syntax)founded=Ë;}if(founded==Ë){if(!È.eAL.load_syntax[new_syntax]){if(!is_waiting)È.eAL.load_script(È.eAL.baseURL+\"reg_syntax/\"+new_syntax+\".js\");setTimeout(\"eA.change_syntax('\"+new_syntax+\"',Ë);\",100);Á.show_waiting_screen();}\nelse{if(!Á.allread
 y_used_syntax[new_syntax]){È.eAL.init_syntax_regexp();Á.add_Ç(È.eAL.syntax[new_syntax][\"Çs\"]);Á.allready_used_syntax[new_syntax]=Ë;}var sel=_$(\"syntax_selection\");if(sel&&sel.Ê!=new_syntax){for(var i=0;i<sel.Æ;i++){if(sel.options[i].Ê&&sel.options[i].Ê==new_syntax)sel.options[i].selected=Ë;}}Á.Ã…['syntax']=new_syntax;Á.resync_highlight(Ë);Á.hide_waiting_screen();return Ë;}}return ÃŒ;};EA.Ä.set_editable=Ã(is_editable){if(is_editable){document.body.className=\"\";Á.Â.readOnly=ÃŒ;Á.is_editable=Ë;}\nelse{document.body.className=\"non_editable\";Á.Â.readOnly=Ë;Á.is_editable=ÃŒ;}if(eAs[Á.id][\"displayed\"]==Ë)Á.update_size();};EA.Ä.toggle_word_wrap=Ã(){Á.set_word_wrap(!Á.Ãâ€
 ¦['word_wrap']);};EA.Ä.set_word_wrap=Ã(to){var t=Á,a=t.Â;if(t.isOpera&&t.isOpera < 9.8){Á.Ã…['word_wrap']=ÃŒ;t.switchClassSticky(_$(\"word_wrap\"),'editAreaButtonDisabled',Ë);return ÃŒ;}if(to){wrap_mode='soft';Á.container.className+=' word_wrap';Á.container.Ç.width=\"\";Á.content_highlight.Ç.width=\"\";a.Ç.width=\"100%\";if(t.isIE&&t.isIE < 7){a.Ç.width=(a.offsetWidth-5)+\"px\";}t.switchClassSticky(_$(\"word_wrap\"),'editAreaButtonSelected',ÃŒ);}\nelse{wrap_mode='off';Á.container.className=Á.container.className.replace(/word_wrap/g,'');t.switchClassSticky(_$(\"word_wrap\"),'editAreaButtonNormal',Ë);}Á.Â.previous_scrollWidth='';Á.Â.previous_scrollHeight='';a.wrap=wrap_mode;if((Á.isChrome||Á.isSafari)&&wrap_mode==='off'){a.Ç.whiteSpace='pre';a.Ç.wordWra
 p='normal';}a.setAttribute('wrap',wrap_mode);if(!Á.isIE){var start=a.selectionStart,end=a.selectionEnd;var parNod=a.ÈNode,nxtSib=a.nextSibling;parNod.removeChild(a);parNod.insertBefore(a,nxtSib);Á.area_select(start,end-start);}Á.Å['word_wrap']=to;Á.focus();Á.update_size();Á.check_line_selection();};EA.Ä.open_file=Ã(Å){if(Å['id']!=\"undefined\"){var id=Å['id'];var new_file={};new_file['id']=id;new_file['title']=id;new_file['text']=\"\";new_file['É']=\"\";new_file['last_text_to_highlight']=\"\";new_file['last_hightlighted_text']=\"\";new_file['previous']=[];new_file['next']=[];new_file['last_undo']=\"\";new_file['smooth_selection']=Á.Å['smooth_selection'];new_file['do_highlight']=Á.Å['start_highlight'];new_file['syntax']=Á.Å['syntax'];new_file['scroll_top']=0;new_file['scroll_left']=0;new_file['selection_start']=0;new_
 file['selection_end']=0;new_file['edited']=Ì;new_file['font_size']=Á.Å[\"font_size\"];new_file['font_family']=Á.Å[\"font_family\"];new_file['word_wrap']=Á.Å[\"word_wrap\"];new_file['toolbar']={'links':{},'selects':{}};new_file['compare_edited_text']=new_file['text'];Á.files[id]=new_file;Á.update_file(id,Å);Á.files[id]['compare_edited_text']=Á.files[id]['text'];var html_id='tab_file_'+encodeURIComponent(id);Á.filesIdAssoc[html_id]=id;Á.files[id]['html_id']=html_id;if(!_$(Á.files[id]['html_id'])&&id!=\"\"){Á.tab_browsing_area.Ç.display=\"block\";var elem=document.createElement('li');elem.id=Á.files[id]['html_id'];var close=\"<img src=\\\"\"+È.eAL.baseURL+\"images/close.gif\\\" title=\\\"\"+Á.get_translation('close_tab','word')+\"\\\" onclick=\\\"eA.execCommand('close_file',eA.filesIdAssoc['\"+html_id+\"']);return Ì;\\\" cl
 ass=\\\"hidden\\\" onmouseover=\\\"Á.className=''\\\" onmouseout=\\\"Á.className='hidden'\\\" />\";elem.innerHTML=\"<a onclick=\\\"javascript:eA.execCommand('switch_to_file',eA.filesIdAssoc['\"+html_id+\"']);\\\" selec=\\\"none\\\"><b><span><strong class=\\\"edited\\\">*</strong>\"+Á.files[id]['title']+close+\"</span></b></a>\";_$('tab_browsing_list').appendChild(elem);var elem=document.createElement('text');Á.update_size();}if(id!=\"\")Á.execCommand('file_open',Á.files[id]);Á.switch_to_file(id,Ë);return Ë;}\nelse return ÃŒ;};EA.Ä.close_file=Ã(id){if(Á.files[id]){Á.save_file(id);if(Á.execCommand('file_close',Á.files[id])!==ÃŒ){var li=_$(Á.files[id]['html_id']);li.ÈNode.removeChild(li);if(id==Á.curr_file){var next_file=\"\";var is_next=ÃŒ;for(var i in Á.files){if(is_next){next_file=i;break;}\nelse if(i==id)is_next=Ãâ�
 ��¹;\nelse next_file=i;}Á.switch_to_file(next_file);}delete(Á.files[id]);Á.update_size();}}};EA.Ä.save_file=Ã(id){var t=Á,save,a_links,a_selects,save_butt,img,i;if(t.files[id]){var save=t.files[id];save['É']=t.É;save['last_text_to_highlight']=t.last_text_to_highlight;save['last_hightlighted_text']=t.last_hightlighted_text;save['previous']=t.previous;save['next']=t.next;save['last_undo']=t.last_undo;save['smooth_selection']=t.smooth_selection;save['do_highlight']=t.do_highlight;save['syntax']=t.Ã…['syntax'];save['text']=t.Â.Ê;save['scroll_top']=t.result.scrollTop;save['scroll_left']=t.result.scrollLeft;save['selection_start']=t.É[\"selectionStart\"];save['selection_end']=t.É[\"selectionEnd\"];save['font_size']=t.Ã…[\"font_size\"];save['font_family']=t.Ã…[\"font_family\"];save['word_wrap']=t.Ã…[\"word_wrap\"];save['toolbar']={'links':{},'selects':{
 }};a_links=_$(\"toolbar_1\").getElementsByTagName(\"a\");for(i=0;i<a_links.Æ;i++){if(a_links[i].getAttribute('fileSpecific')=='yes'){save_butt={};img=a_links[i].getElementsByTagName('img')[0];save_butt['classLock']=img.classLock;save_butt['className']=img.className;save_butt['oldClassName']=img.oldClassName;save['toolbar']['links'][a_links[i].id]=save_butt;}}a_selects=_$(\"toolbar_1\").getElementsByTagName(\"select\");for(i=0;i<a_selects.Æ;i++){if(a_selects[i].getAttribute('fileSpecific')=='yes'){save['toolbar']['selects'][a_selects[i].id]=a_selects[i].Ê;}}t.files[id]=save;return save;}return Ì;};EA.Ä.update_file=Ã(id,new_Ês){for(var i in new_Ês){Á.files[id][i]=new_Ês[i];}};EA.Ä.display_file=Ã(id){var t=Á,a=t.Â,new_file,a_lis,a_selects,a_links,a_options,i,j;if(id==''){a.readOnly=Ë;t.tab_browsing_area.Ç.display=\"none\";_$(\"no_file_selected\").Ç
 .display=\"block\";t.result.className=\"empty\";if(!t.files['']){t.open_file({id:''});}}\nelse if(typeof(t.files[id])=='undefined'){return Ì;}\nelse{t.result.className=\"\";a.readOnly=!t.is_editable;_$(\"no_file_selected\").Ç.display=\"none\";t.tab_browsing_area.Ç.display=\"block\";}t.check_redo(Ë);t.check_undo(Ë);t.curr_file=id;a_lis=t.tab_browsing_area.getElementsByTagName('li');for(i=0;i<a_lis.Æ;i++){if(a_lis[i].id==t.files[id]['html_id'])a_lis[i].className='selected';\nelse a_lis[i].className='';}new_file=t.files[id];a.Ê=new_file['text'];t.set_font(new_file['font_family'],new_file['font_size']);t.area_select(new_file['selection_start'],new_file['selection_end']-new_file['selection_start']);t.manage_size(Ë);t.result.scrollTop=new_file['scroll_top'];t.result.scrollLeft=new_file['scroll_left'];t.previous=new_file['previous'];t.next=new_file['next'];t.last_undo=new_file['last_undo'];t.check_redo(Ë);t.
 check_undo(Ë);t.execCommand(\"change_highlight\",new_file['do_highlight']);t.execCommand(\"change_syntax\",new_file['syntax']);t.execCommand(\"change_smooth_selection_mode\",new_file['smooth_selection']);t.execCommand(\"set_word_wrap\",new_file['word_wrap']);a_links=new_file['toolbar']['links'];for(i in a_links){if(img=_$(i).getElementsByTagName('img')[0]){img.classLock=a_links[i]['classLock'];img.className=a_links[i]['className'];img.oldClassName=a_links[i]['oldClassName'];}}a_selects=new_file['toolbar']['selects'];for(i in a_selects){a_options=_$(i).options;for(j=0;j<a_options.Æ;j++){if(a_options[j].Ê==a_selects[i])_$(i).options[j].selected=Ë;}}};EA.Ä.switch_to_file=Ã(file_to_show,force_refresh){if(file_to_show!=Á.curr_file||force_refresh){Á.save_file(Á.curr_file);if(Á.curr_file!='')Á.execCommand('file_swit

<TRUNCATED>

[13/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_functions.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_functions.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_functions.js
new file mode 100644
index 0000000..e3bc3f5
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_functions.js
@@ -0,0 +1,1209 @@
+	//replace tabulation by the good number of white spaces
+	EditArea.prototype.replace_tab= function(text){
+		return text.replace(/((\n?)([^\t\n]*)\t)/gi, editArea.smartTab);		// slower than simple replace...	
+	};
+	
+	// call by the replace_tab function
+	EditArea.prototype.smartTab= function(){
+		val="                   ";
+		return EditArea.prototype.smartTab.arguments[2] + EditArea.prototype.smartTab.arguments[3] + val.substr(0, editArea.tab_nb_char - (EditArea.prototype.smartTab.arguments[3].length)%editArea.tab_nb_char);
+	};
+	
+	EditArea.prototype.show_waiting_screen= function(){
+		width	= this.editor_area.offsetWidth;
+		height	= this.editor_area.offsetHeight;
+		if( !(this.isIE && this.isIE<6) )
+		{
+			width	-= 2;
+			height	-= 2;
+		}
+		this.processing_screen.style.display= "block";
+		this.processing_screen.style.width	= width+"px";
+		this.processing_screen.style.height	= height+"px";
+		this.waiting_screen_displayed		= true;
+	};
+	
+	EditArea.prototype.hide_waiting_screen= function(){
+		this.processing_screen.style.display="none";
+		this.waiting_screen_displayed= false;
+	};
+	
+	EditArea.prototype.add_style= function(styles){
+		if(styles.length>0){
+			newcss = document.createElement("style");
+			newcss.type="text/css";
+			newcss.media="all";
+			if(newcss.styleSheet){ // IE
+				newcss.styleSheet.cssText = styles;
+			} else { // W3C
+				newcss.appendChild(document.createTextNode(styles));
+			}
+			document.getElementsByTagName("head")[0].appendChild(newcss);
+		}
+	};
+	
+	EditArea.prototype.set_font= function(family, size){
+		var t=this, a=this.textarea, s=this.settings, elem_font, i, elem;
+		// list all elements concerned by font changes
+		var elems= ["textarea", "content_highlight", "cursor_pos", "end_bracket", "selection_field", "selection_field_text", "line_number"];
+		
+		if(family && family!="")
+			s["font_family"]= family;
+		if(size && size>0)
+			s["font_size"]	= size;
+		if( t.isOpera && t.isOpera < 9.6 )	// opera<9.6 can't manage non monospace font
+			s['font_family']="monospace";
+			
+		// update the select tag
+		if( elem_font = _$("area_font_size") )
+		{	
+			for( i = 0; i < elem_font.length; i++ )
+			{
+				if( elem_font.options[i].value && elem_font.options[i].value == s["font_size"] )
+					elem_font.options[i].selected=true;
+			}
+		}
+		
+		/*
+		 * somethimes firefox has rendering mistake with non-monospace font for text width in textarea vs in div for changing font size (eg: verdana change between 11pt to 12pt)
+		 * => looks like a browser internal random bug as text width can change while content_highlight is updated
+		 * we'll check if the font-size produce the same text width inside textarea and div and if not, we'll increment the font-size
+		 * 
+		 * This is an ugly fix 
+		 */ 
+		if( t.isFirefox )
+		{
+			var nbTry = 3;
+			do {
+				var div1 = document.createElement( 'div' ), text1 = document.createElement( 'textarea' );
+				var styles = {
+					width:		'40px',
+					overflow:	'scroll',
+					zIndex: 	50,
+					visibility:	'hidden',
+					fontFamily:	s["font_family"],
+					fontSize:	s["font_size"]+"pt",
+					lineHeight:	t.lineHeight+"px",
+					padding:	'0',
+					margin:		'0',
+					border:		'none',
+					whiteSpace:	'nowrap'
+				};
+				var diff, changed = false;
+				for( i in styles )
+				{
+					div1.style[ i ]		= styles[i];
+					text1.style[ i ]	= styles[i];
+				}
+				// no wrap for this text
+				text1.wrap = 'off';
+				text1.setAttribute('wrap', 'off');
+				t.container.appendChild( div1 );
+				t.container.appendChild( text1 );
+				// try to make FF to bug
+				div1.innerHTML 		= text1.value	= 'azertyuiopqsdfghjklm';
+				div1.innerHTML 		= text1.value	= text1.value+'wxcvbn^p*ù$!:;,,';
+				diff	=  text1.scrollWidth - div1.scrollWidth;
+				
+				// firefox return here a diff of 1 px between equals scrollWidth (can't explain)
+				if( Math.abs( diff ) >= 2 )
+				{
+					s["font_size"]++;
+					changed	= true;
+				}
+				t.container.removeChild( div1 );
+				t.container.removeChild( text1 );
+				nbTry--;
+			}while( changed && nbTry > 0 );
+		}
+		
+		
+		// calc line height
+		elem					= t.test_font_size;
+		elem.style.fontFamily	= ""+s["font_family"];
+		elem.style.fontSize		= s["font_size"]+"pt";				
+		elem.innerHTML			= "0";		
+		t.lineHeight			= elem.offsetHeight;
+
+		// update font for all concerned elements
+		for( i=0; i<elems.length; i++)
+		{
+			elem	= _$(elems[i]);	
+			elem.style.fontFamily	= s["font_family"];
+			elem.style.fontSize		= s["font_size"]+"pt";
+			elem.style.lineHeight	= t.lineHeight+"px";
+		}
+		// define a css for <pre> tags
+		t.add_style("pre{font-family:"+s["font_family"]+"}");
+		
+		// old opera and IE>=8 doesn't update font changes to the textarea
+		if( ( t.isOpera && t.isOpera < 9.6 ) || t.isIE >= 8 )
+		{
+			var parNod = a.parentNode, nxtSib = a.nextSibling, start= a.selectionStart, end= a.selectionEnd;
+			parNod.removeChild(a);
+			parNod.insertBefore(a, nxtSib);
+			t.area_select(start, end-start);
+		}
+		
+		// force update of selection field
+		this.focus();
+		this.update_size();
+		this.check_line_selection();
+	};
+	
+	EditArea.prototype.change_font_size= function(){
+		var size=_$("area_font_size").value;
+		if(size>0)
+			this.set_font("", size);			
+	};
+	
+	
+	EditArea.prototype.open_inline_popup= function(popup_id){
+		this.close_all_inline_popup();
+		var popup= _$(popup_id);		
+		var editor= _$("editor");
+		
+		// search matching icon
+		for(var i=0; i<this.inlinePopup.length; i++){
+			if(this.inlinePopup[i]["popup_id"]==popup_id){
+				var icon= _$(this.inlinePopup[i]["icon_id"]);
+				if(icon){
+					this.switchClassSticky(icon, 'editAreaButtonSelected', true);			
+					break;
+				}
+			}
+		}
+		// check size
+		popup.style.height="auto";
+		popup.style.overflow= "visible";
+			
+		if(document.body.offsetHeight< popup.offsetHeight){
+			popup.style.height= (document.body.offsetHeight-10)+"px";
+			popup.style.overflow= "auto";
+		}
+		
+		if(!popup.positionned){
+			var new_left= editor.offsetWidth /2 - popup.offsetWidth /2;
+			var new_top= editor.offsetHeight /2 - popup.offsetHeight /2;
+			//var new_top= area.offsetHeight /2 - popup.offsetHeight /2;
+			//var new_left= area.offsetWidth /2 - popup.offsetWidth /2;
+			//alert("new_top: ("+new_top+") = calculeOffsetTop(area) ("+calculeOffsetTop(area)+") + area.offsetHeight /2("+ area.offsetHeight /2+") - popup.offsetHeight /2("+popup.offsetHeight /2+") - scrollTop: "+document.body.scrollTop);
+			popup.style.left= new_left+"px";
+			popup.style.top= new_top+"px";
+			popup.positionned=true;
+		}
+		popup.style.visibility="visible";
+		
+		//popup.style.display="block";
+	};
+
+	EditArea.prototype.close_inline_popup= function(popup_id){
+		var popup= _$(popup_id);		
+		// search matching icon
+		for(var i=0; i<this.inlinePopup.length; i++){
+			if(this.inlinePopup[i]["popup_id"]==popup_id){
+				var icon= _$(this.inlinePopup[i]["icon_id"]);
+				if(icon){
+					this.switchClassSticky(icon, 'editAreaButtonNormal', false);			
+					break;
+				}
+			}
+		}
+		
+		popup.style.visibility="hidden";	
+	};
+	
+	EditArea.prototype.close_all_inline_popup= function(e){
+		for(var i=0; i<this.inlinePopup.length; i++){
+			this.close_inline_popup(this.inlinePopup[i]["popup_id"]);		
+		}
+		this.textarea.focus();
+	};
+	
+	EditArea.prototype.show_help= function(){
+		
+		this.open_inline_popup("edit_area_help");
+		
+	};
+			
+	EditArea.prototype.new_document= function(){
+		this.textarea.value="";
+		this.area_select(0,0);
+	};
+	
+	EditArea.prototype.get_all_toolbar_height= function(){
+		var area= _$("editor");
+		var results= parent.getChildren(area, "div", "class", "area_toolbar", "all", "0");	// search only direct children
+		//results= results.concat(getChildren(area, "table", "class", "area_toolbar", "all", "0"));
+		var height=0;
+		for(var i=0; i<results.length; i++){			
+			height+= results[i].offsetHeight;
+		}
+		//alert("toolbar height: "+height);
+		return height;
+	};
+	
+	EditArea.prototype.go_to_line= function(line){	
+		if(!line)
+		{	
+			var icon= _$("go_to_line");
+			if(icon != null){
+				this.restoreClass(icon);
+				this.switchClassSticky(icon, 'editAreaButtonSelected', true);
+			}
+			
+			line= prompt(this.get_translation("go_to_line_prompt"));
+			if(icon != null)
+				this.switchClassSticky(icon, 'editAreaButtonNormal', false);
+		}
+		if(line && line!=null && line.search(/^[0-9]+$/)!=-1){
+			var start=0;
+			var lines= this.textarea.value.split("\n");
+			if(line > lines.length)
+				start= this.textarea.value.length;
+			else{
+				for(var i=0; i<Math.min(line-1, lines.length); i++)
+					start+= lines[i].length + 1;
+			}
+			this.area_select(start, 0);
+		}
+		
+		
+	};
+	
+	
+	EditArea.prototype.change_smooth_selection_mode= function(setTo){
+		//alert("setTo: "+setTo);
+		if(this.do_highlight)
+			return;
+			
+		if(setTo != null){
+			if(setTo === false)
+				this.smooth_selection=true;
+			else
+				this.smooth_selection=false;
+		}
+		var icon= _$("change_smooth_selection");
+		this.textarea.focus();
+		if(this.smooth_selection===true){
+			//setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );
+			/*setAttribute(icon, "oldClassName", "editAreaButtonNormal" );
+			setAttribute(icon, "className", "editAreaButtonNormal" );*/
+			//this.restoreClass(icon);
+			//this.restoreAndSwitchClass(icon,'editAreaButtonNormal');
+			this.switchClassSticky(icon, 'editAreaButtonNormal', false);
+			
+			this.smooth_selection=false;
+			this.selection_field.style.display= "none";
+			_$("cursor_pos").style.display= "none";
+			_$("end_bracket").style.display= "none";
+		}else{
+			//setAttribute(icon, "class", getAttribute(icon, "class") + " selected");
+			//this.switchClass(icon,'editAreaButtonSelected');
+			this.switchClassSticky(icon, 'editAreaButtonSelected', false);
+			this.smooth_selection=true;
+			this.selection_field.style.display= "block";
+			_$("cursor_pos").style.display= "block";
+			_$("end_bracket").style.display= "block";
+		}	
+	};
+	
+	// the auto scroll of the textarea has some lacks when it have to show cursor in the visible area when the textarea size change
+	// show specifiy whereas it is the "top" or "bottom" of the selection that is showned
+	EditArea.prototype.scroll_to_view= function(show){
+		var zone, lineElem;
+		if(!this.smooth_selection)
+			return;
+		zone= _$("result");
+		
+		// manage height scroll
+		var cursor_pos_top= _$("cursor_pos").cursor_top;
+		if(show=="bottom")
+		{
+			//cursor_pos_top+=  (this.last_selection["line_nb"]-1)* this.lineHeight;
+			cursor_pos_top+= this.getLinePosTop( this.last_selection['line_start'] + this.last_selection['line_nb'] - 1 );
+		}
+			
+		var max_height_visible= zone.clientHeight + zone.scrollTop;
+		var miss_top	= cursor_pos_top + this.lineHeight - max_height_visible;
+		if(miss_top>0){
+			//alert(miss_top);
+			zone.scrollTop=  zone.scrollTop + miss_top;
+		}else if( zone.scrollTop > cursor_pos_top){
+			// when erase all the content -> does'nt scroll back to the top
+			//alert("else: "+cursor_pos_top);
+			zone.scrollTop= cursor_pos_top;	 
+		}
+		
+		// manage left scroll
+		//var cursor_pos_left= parseInt(_$("cursor_pos").style.left.replace("px",""));
+		var cursor_pos_left= _$("cursor_pos").cursor_left;
+		var max_width_visible= zone.clientWidth + zone.scrollLeft;
+		var miss_left= cursor_pos_left + 10 - max_width_visible;
+		if(miss_left>0){			
+			zone.scrollLeft= zone.scrollLeft + miss_left + 50;
+		}else if( zone.scrollLeft > cursor_pos_left){
+			zone.scrollLeft= cursor_pos_left ;
+		}else if( zone.scrollLeft == 45){
+			// show the line numbers if textarea align to it's left
+			zone.scrollLeft=0;
+		}
+	};
+	
+	EditArea.prototype.check_undo= function(only_once){
+		if(!editAreas[this.id])
+			return false;
+		if(this.textareaFocused && editAreas[this.id]["displayed"]==true){
+			var text=this.textarea.value;
+			if(this.previous.length<=1)
+				this.switchClassSticky(_$("undo"), 'editAreaButtonDisabled', true);
+		
+			if(!this.previous[this.previous.length-1] || this.previous[this.previous.length-1]["text"] != text){
+				this.previous.push({"text": text, "selStart": this.textarea.selectionStart, "selEnd": this.textarea.selectionEnd});
+				if(this.previous.length > this.settings["max_undo"]+1)
+					this.previous.shift();
+				
+			}
+			if(this.previous.length >= 2)
+				this.switchClassSticky(_$("undo"), 'editAreaButtonNormal', false);		
+		}
+
+		if(!only_once)
+			setTimeout("editArea.check_undo()", 3000);
+	};
+	
+	EditArea.prototype.undo= function(){
+		//alert("undo"+this.previous.length);
+		if(this.previous.length > 0)
+		{
+			this.getIESelection();
+		//	var pos_cursor=this.textarea.selectionStart;
+			this.next.push( { "text": this.textarea.value, "selStart": this.textarea.selectionStart, "selEnd": this.textarea.selectionEnd } );
+			var prev= this.previous.pop();
+			if( prev["text"] == this.textarea.value && this.previous.length > 0 )
+				prev	=this.previous.pop();						
+			this.textarea.value	= prev["text"];
+			this.last_undo		= prev["text"];
+			this.area_select(prev["selStart"], prev["selEnd"]-prev["selStart"]);
+			this.switchClassSticky(_$("redo"), 'editAreaButtonNormal', false);
+			this.resync_highlight(true);
+			//alert("undo"+this.previous.length);
+			this.check_file_changes();
+		}
+	};
+	
+	EditArea.prototype.redo= function(){
+		if(this.next.length > 0)
+		{
+			/*this.getIESelection();*/
+			//var pos_cursor=this.textarea.selectionStart;
+			var next= this.next.pop();
+			this.previous.push(next);
+			this.textarea.value= next["text"];
+			this.last_undo= next["text"];
+			this.area_select(next["selStart"], next["selEnd"]-next["selStart"]);
+			this.switchClassSticky(_$("undo"), 'editAreaButtonNormal', false);
+			this.resync_highlight(true);
+			this.check_file_changes();
+		}
+		if(	this.next.length == 0)
+			this.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);
+	};
+	
+	EditArea.prototype.check_redo= function(){
+		if(editArea.next.length == 0 || editArea.textarea.value!=editArea.last_undo){
+			editArea.next= [];	// undo the ability to use "redo" button
+			editArea.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);
+		}
+		else
+		{
+			this.switchClassSticky(_$("redo"), 'editAreaButtonNormal', false);
+		}
+	};
+	
+	
+	// functions that manage icons roll over, disabled, etc...
+	EditArea.prototype.switchClass = function(element, class_name, lock_state) {
+		var lockChanged = false;
+	
+		if (typeof(lock_state) != "undefined" && element != null) {
+			element.classLock = lock_state;
+			lockChanged = true;
+		}
+	
+		if (element != null && (lockChanged || !element.classLock)) {
+			element.oldClassName = element.className;
+			element.className = class_name;
+		}
+	};
+	
+	EditArea.prototype.restoreAndSwitchClass = function(element, class_name) {
+		if (element != null && !element.classLock) {
+			this.restoreClass(element);
+			this.switchClass(element, class_name);
+		}
+	};
+	
+	EditArea.prototype.restoreClass = function(element) {
+		if (element != null && element.oldClassName && !element.classLock) {
+			element.className = element.oldClassName;
+			element.oldClassName = null;
+		}
+	};
+	
+	EditArea.prototype.setClassLock = function(element, lock_state) {
+		if (element != null)
+			element.classLock = lock_state;
+	};
+	
+	EditArea.prototype.switchClassSticky = function(element, class_name, lock_state) {
+		var lockChanged = false;
+		if (typeof(lock_state) != "undefined" && element != null) {
+			element.classLock = lock_state;
+			lockChanged = true;
+		}
+	
+		if (element != null && (lockChanged || !element.classLock)) {
+			element.className = class_name;
+			element.oldClassName = class_name;
+		}
+	};
+	
+	//make the "page up" and "page down" buttons works correctly
+	EditArea.prototype.scroll_page= function(params){
+		var dir= params["dir"], shift_pressed= params["shift"];
+		var lines= this.textarea.value.split("\n");		
+		var new_pos=0, length=0, char_left=0, line_nb=0, curLine=0;
+		var toScrollAmount	= _$("result").clientHeight -30;
+		var nbLineToScroll	= 0, diff= 0;
+		
+		if(dir=="up"){
+			nbLineToScroll	= Math.ceil( toScrollAmount / this.lineHeight );
+			
+			// fix number of line to scroll
+			for( i = this.last_selection["line_start"]; i - diff > this.last_selection["line_start"] - nbLineToScroll ; i-- )
+			{
+				if( elem = _$('line_'+ i) )
+				{
+					diff +=  Math.floor( ( elem.offsetHeight - 1 ) / this.lineHeight );
+				}
+			}
+			nbLineToScroll	-= diff;
+			
+			if(this.last_selection["selec_direction"]=="up"){
+				for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]-nbLineToScroll, lines.length); line_nb++){
+					new_pos+= lines[line_nb].length + 1;
+				}
+				char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]-1);
+				if(shift_pressed)
+					length=this.last_selection["selectionEnd"]-new_pos-char_left;	
+				this.area_select(new_pos+char_left, length);
+				view="top";
+			}else{			
+				view="bottom";
+				for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+this.last_selection["line_nb"]-1-nbLineToScroll, lines.length); line_nb++){
+					new_pos+= lines[line_nb].length + 1;
+				}
+				char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]-1);
+				if(shift_pressed){
+					//length=this.last_selection["selectionEnd"]-new_pos-char_left;	
+					start= Math.min(this.last_selection["selectionStart"], new_pos+char_left);
+					length= Math.max(new_pos+char_left, this.last_selection["selectionStart"] )- start ;
+					if(new_pos+char_left < this.last_selection["selectionStart"])
+						view="top";
+				}else
+					start=new_pos+char_left;
+				this.area_select(start, length);
+				
+			}
+		}
+		else
+		{
+			var nbLineToScroll= Math.floor( toScrollAmount / this.lineHeight );
+			// fix number of line to scroll
+			for( i = this.last_selection["line_start"]; i + diff < this.last_selection["line_start"] + nbLineToScroll ; i++ )
+			{
+				if( elem = _$('line_'+ i) )
+				{
+					diff +=  Math.floor( ( elem.offsetHeight - 1 ) / this.lineHeight );
+				}
+			}
+			nbLineToScroll	-= diff;
+				
+			if(this.last_selection["selec_direction"]=="down"){
+				view="bottom";
+				for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+this.last_selection["line_nb"]-2+nbLineToScroll, lines.length); line_nb++){
+					if(line_nb==this.last_selection["line_start"]-1)
+						char_left= this.last_selection["selectionStart"] -new_pos;
+					new_pos+= lines[line_nb].length + 1;
+									
+				}
+				if(shift_pressed){
+					length=Math.abs(this.last_selection["selectionStart"]-new_pos);	
+					length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]);
+					//length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, char_left);
+					this.area_select(Math.min(this.last_selection["selectionStart"], new_pos), length);
+				}else{
+					this.area_select(new_pos+char_left, 0);
+				}
+				
+			}else{
+				view="top";
+				for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+nbLineToScroll-1, lines.length, lines.length); line_nb++){
+					if(line_nb==this.last_selection["line_start"]-1)
+						char_left= this.last_selection["selectionStart"] -new_pos;
+					new_pos+= lines[line_nb].length + 1;									
+				}
+				if(shift_pressed){
+					length=Math.abs(this.last_selection["selectionEnd"]-new_pos-char_left);	
+					length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"])- char_left-1;
+					//length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, char_left);
+					this.area_select(Math.min(this.last_selection["selectionEnd"], new_pos+char_left), length);
+					if(new_pos+char_left > this.last_selection["selectionEnd"])
+						view="bottom";
+				}else{
+					this.area_select(new_pos+char_left, 0);
+				}
+				
+			}
+		}
+		//console.log( new_pos, char_left, length, nbLineToScroll, toScrollAmount, _$("result").clientHeigh );
+		this.check_line_selection();
+		this.scroll_to_view(view);
+	};
+	
+	EditArea.prototype.start_resize= function(e){
+		parent.editAreaLoader.resize["id"]		= editArea.id;		
+		parent.editAreaLoader.resize["start_x"]	= (e)? e.pageX : event.x + document.body.scrollLeft;		
+		parent.editAreaLoader.resize["start_y"]	= (e)? e.pageY : event.y + document.body.scrollTop;
+		if(editArea.isIE)
+		{
+			editArea.textarea.focus();
+			editArea.getIESelection();
+		}
+		parent.editAreaLoader.resize["selectionStart"]	= editArea.textarea.selectionStart;
+		parent.editAreaLoader.resize["selectionEnd"]	= editArea.textarea.selectionEnd;
+		parent.editAreaLoader.start_resize_area();
+	};
+	
+	EditArea.prototype.toggle_full_screen= function(to){
+		var t=this, p=parent, a=t.textarea, html, frame, selStart, selEnd, old, icon;
+		if(typeof(to)=="undefined")
+			to= !t.fullscreen['isFull'];
+		old			= t.fullscreen['isFull'];
+		t.fullscreen['isFull']= to;
+		icon		= _$("fullscreen");
+		selStart	= t.textarea.selectionStart;
+		selEnd		= t.textarea.selectionEnd;
+		html		= p.document.getElementsByTagName("html")[0];
+		frame		= p.document.getElementById("frame_"+t.id);
+		
+		if(to && to!=old)
+		{	// toogle on fullscreen		
+			
+			t.fullscreen['old_overflow']	= p.get_css_property(html, "overflow");
+			t.fullscreen['old_height']		= p.get_css_property(html, "height");
+			t.fullscreen['old_width']		= p.get_css_property(html, "width");
+			t.fullscreen['old_scrollTop']	= html.scrollTop;
+			t.fullscreen['old_scrollLeft']	= html.scrollLeft;
+			t.fullscreen['old_zIndex']		= p.get_css_property(frame, "z-index");
+			if(t.isOpera){
+				html.style.height	= "100%";
+				html.style.width	= "100%";	
+			}
+			html.style.overflow	= "hidden";
+			html.scrollTop		= 0;
+			html.scrollLeft		= 0;
+			
+			frame.style.position	= "absolute";
+			frame.style.width		= html.clientWidth+"px";
+			frame.style.height		= html.clientHeight+"px";
+			frame.style.display		= "block";
+			frame.style.zIndex		= "999999";
+			frame.style.top			= "0px";
+			frame.style.left		= "0px";
+			
+			// if the iframe was in a div with position absolute, the top and left are the one of the div, 
+			// so I fix it by seeing at witch position the iframe start and correcting it
+			frame.style.top			= "-"+p.calculeOffsetTop(frame)+"px";
+			frame.style.left		= "-"+p.calculeOffsetLeft(frame)+"px";
+			
+		//	parent.editAreaLoader.execCommand(t.id, "update_size();");
+		//	var body=parent.document.getElementsByTagName("body")[0];
+		//	body.appendChild(frame);
+			
+			t.switchClassSticky(icon, 'editAreaButtonSelected', false);
+			t.fullscreen['allow_resize']= t.resize_allowed;
+			t.allow_resize(false);
+	
+			//t.area_select(selStart, selEnd-selStart);
+			
+		
+			// opera can't manage to do a direct size update
+			if(t.isFirefox){
+				p.editAreaLoader.execCommand(t.id, "update_size();");
+				t.area_select(selStart, selEnd-selStart);
+				t.scroll_to_view();
+				t.focus();
+			}else{
+				setTimeout("parent.editAreaLoader.execCommand('"+ t.id +"', 'update_size();');editArea.focus();", 10);
+			}	
+			
+	
+		}
+		else if(to!=old)
+		{	// toogle off fullscreen
+			frame.style.position="static";
+			frame.style.zIndex= t.fullscreen['old_zIndex'];
+		
+			if(t.isOpera)
+			{
+				html.style.height	= "auto"; 
+				html.style.width	= "auto";
+				html.style.overflow	= "auto";
+			}
+			else if(t.isIE && p!=top)
+			{	// IE doesn't manage html overflow in frames like in normal page... 
+				html.style.overflow	= "auto";
+			}
+			else
+			{
+				html.style.overflow	= t.fullscreen['old_overflow'];
+			}
+			html.scrollTop	= t.fullscreen['old_scrollTop'];
+			html.scrollLeft	= t.fullscreen['old_scrollLeft'];
+		
+			p.editAreaLoader.hide(t.id);
+			p.editAreaLoader.show(t.id);
+			
+			t.switchClassSticky(icon, 'editAreaButtonNormal', false);
+			if(t.fullscreen['allow_resize'])
+				t.allow_resize(t.fullscreen['allow_resize']);
+			if(t.isFirefox){
+				t.area_select(selStart, selEnd-selStart);
+				setTimeout("editArea.scroll_to_view();", 10);
+			}			
+			
+			//p.editAreaLoader.remove_event(p.window, "resize", editArea.update_size);
+		}
+		
+	};
+	
+	EditArea.prototype.allow_resize= function(allow){
+		var resize= _$("resize_area");
+		if(allow){
+			
+			resize.style.visibility="visible";
+			parent.editAreaLoader.add_event(resize, "mouseup", editArea.start_resize);
+		}else{
+			resize.style.visibility="hidden";
+			parent.editAreaLoader.remove_event(resize, "mouseup", editArea.start_resize);
+		}
+		this.resize_allowed= allow;
+	};
+	
+	
+	EditArea.prototype.change_syntax= function(new_syntax, is_waiting){
+	//	alert("cahnge to "+new_syntax);
+		// the syntax is the same
+		if(new_syntax==this.settings['syntax'])
+			return true;
+		
+		// check that the syntax is one allowed
+		var founded= false;
+		for(var i=0; i<this.syntax_list.length; i++)
+		{
+			if(this.syntax_list[i]==new_syntax)
+				founded= true;
+		}
+		
+		if(founded==true)
+		{
+			// the reg syntax file is not loaded
+			if(!parent.editAreaLoader.load_syntax[new_syntax])
+			{
+				// load the syntax file and wait for file loading
+				if(!is_waiting)
+					parent.editAreaLoader.load_script(parent.editAreaLoader.baseURL + "reg_syntax/" + new_syntax + ".js");
+				setTimeout("editArea.change_syntax('"+ new_syntax +"', true);", 100);
+				this.show_waiting_screen();
+			}
+			else
+			{
+				if(!this.allready_used_syntax[new_syntax])
+				{	// the syntax has still not been used
+					// rebuild syntax definition for new languages
+					parent.editAreaLoader.init_syntax_regexp();
+					// add style to the new list
+					this.add_style(parent.editAreaLoader.syntax[new_syntax]["styles"]);
+					this.allready_used_syntax[new_syntax]=true;
+				}
+				// be sure that the select option is correctly updated
+				var sel= _$("syntax_selection");
+				if(sel && sel.value!=new_syntax)
+				{
+					for(var i=0; i<sel.length; i++){
+						if(sel.options[i].value && sel.options[i].value == new_syntax)
+							sel.options[i].selected=true;
+					}
+				}
+				
+			/*	if(this.settings['syntax'].length==0)
+				{
+					this.switchClassSticky(_$("highlight"), 'editAreaButtonNormal', false);
+					this.switchClassSticky(_$("reset_highlight"), 'editAreaButtonNormal', false);
+					this.change_highlight(true);
+				}
+				*/
+				this.settings['syntax']= new_syntax;
+				this.resync_highlight(true);
+				this.hide_waiting_screen();
+				return true;
+			}
+		}
+		return false;
+	};
+	
+	
+	// check if the file has changed
+	EditArea.prototype.set_editable= function(is_editable){
+		if(is_editable)
+		{
+			document.body.className= "";
+			this.textarea.readOnly= false;
+			this.is_editable= true;
+		}
+		else
+		{
+			document.body.className= "non_editable";
+			this.textarea.readOnly= true;
+			this.is_editable= false;
+		}
+		
+		if(editAreas[this.id]["displayed"]==true)
+			this.update_size();
+	};
+	
+	/***** Wrap mode *****/
+	
+	// toggling function for set_wrap_mode
+	EditArea.prototype.toggle_word_wrap= function(){
+		this.set_word_wrap( !this.settings['word_wrap'] );
+	};
+	
+	
+	// open a new tab for the given file
+	EditArea.prototype.set_word_wrap= function(to){
+		var t=this, a= t.textarea;
+		if( t.isOpera && t.isOpera < 9.8 )
+		{
+			this.settings['word_wrap']= false;
+			t.switchClassSticky( _$("word_wrap"), 'editAreaButtonDisabled', true );
+			return false;
+		}
+		
+		if( to )
+		{
+			wrap_mode = 'soft';
+			this.container.className+= ' word_wrap';
+			this.container.style.width="";
+			this.content_highlight.style.width="";
+			a.style.width="100%";
+			if( t.isIE && t.isIE < 7 )	// IE 6 count 50 px too much
+			{
+				a.style.width	= ( a.offsetWidth-5 )+"px";
+			}
+			
+			t.switchClassSticky( _$("word_wrap"), 'editAreaButtonSelected', false );
+		}
+		else
+		{
+			wrap_mode = 'off';
+			this.container.className	= this.container.className.replace(/word_wrap/g, '');
+			t.switchClassSticky( _$("word_wrap"), 'editAreaButtonNormal', true );
+		}
+		this.textarea.previous_scrollWidth = '';
+		this.textarea.previous_scrollHeight = '';
+		
+		a.wrap= wrap_mode;
+
+		if ((this.isChrome || this.isSafari) && wrap_mode === 'off')
+		{
+			a.style.whiteSpace='pre';
+			a.style.wordWrap='normal';
+		}
+
+		a.setAttribute('wrap', wrap_mode);
+		// only IE can change wrap mode on the fly without element reloading
+		if(!this.isIE)
+		{
+			var start=a.selectionStart, end= a.selectionEnd;
+			var parNod = a.parentNode, nxtSib = a.nextSibling;
+			parNod.removeChild(a);
+			parNod.insertBefore(a, nxtSib);
+			this.area_select(start, end-start);
+		}
+		// reset some optimisation
+		this.settings['word_wrap']	= to;
+		this.focus();
+		this.update_size();
+		this.check_line_selection();
+	};	
+	/***** tabbed files managing functions *****/
+	
+	// open a new tab for the given file
+	EditArea.prototype.open_file= function(settings){
+		
+		if(settings['id']!="undefined")
+		{
+			var id= settings['id'];
+			// create a new file object with defautl values
+			var new_file= {};
+			new_file['id']			= id;
+			new_file['title']		= id;
+			new_file['text']		= "";
+			new_file['last_selection']	= "";		
+			new_file['last_text_to_highlight']	= "";
+			new_file['last_hightlighted_text']	= "";
+			new_file['previous']	= [];
+			new_file['next']		= [];
+			new_file['last_undo']	= "";
+			new_file['smooth_selection']	= this.settings['smooth_selection'];
+			new_file['do_highlight']= this.settings['start_highlight'];
+			new_file['syntax']		= this.settings['syntax'];
+			new_file['scroll_top']	= 0;
+			new_file['scroll_left']	= 0;
+			new_file['selection_start']= 0;
+			new_file['selection_end']= 0;
+			new_file['edited']		= false;
+			new_file['font_size']	= this.settings["font_size"];
+			new_file['font_family']	= this.settings["font_family"];
+			new_file['word_wrap']	= this.settings["word_wrap"];
+			new_file['toolbar']		= {'links':{}, 'selects': {}};
+			new_file['compare_edited_text']= new_file['text'];
+			
+			
+			this.files[id]= new_file;
+			this.update_file(id, settings);
+			this.files[id]['compare_edited_text']= this.files[id]['text'];
+			
+			
+			var html_id= 'tab_file_'+encodeURIComponent(id);
+			this.filesIdAssoc[html_id]= id;
+			this.files[id]['html_id']= html_id;
+		
+			if(!_$(this.files[id]['html_id']) && id!="")
+			{
+				// be sure the tab browsing area is displayed
+				this.tab_browsing_area.style.display= "block";
+				var elem= document.createElement('li');
+				elem.id= this.files[id]['html_id'];
+				var close= "<img src=\""+ parent.editAreaLoader.baseURL +"images/close.gif\" title=\""+ this.get_translation('close_tab', 'word') +"\" onclick=\"editArea.execCommand('close_file', editArea.filesIdAssoc['"+ html_id +"']);return false;\" class=\"hidden\" onmouseover=\"this.className=''\" onmouseout=\"this.className='hidden'\" />";
+				elem.innerHTML= "<a onclick=\"javascript:editArea.execCommand('switch_to_file', editArea.filesIdAssoc['"+ html_id +"']);\" selec=\"none\"><b><span><strong class=\"edited\">*</strong>"+ this.files[id]['title'] + close +"</span></b></a>";
+				_$('tab_browsing_list').appendChild(elem);
+				var elem= document.createElement('text');
+				this.update_size();
+			}
+			
+			// open file callback (for plugin)
+			if(id!="")
+				this.execCommand('file_open', this.files[id]);
+			
+			this.switch_to_file(id, true);
+			return true;
+		}
+		else
+			return false;
+	};
+	
+	// close the given file
+	EditArea.prototype.close_file= function(id){
+		if(this.files[id])
+		{
+			this.save_file(id);
+			
+			// close file callback
+			if(this.execCommand('file_close', this.files[id])!==false)
+			{
+				// remove the tab in the toolbar
+				var li= _$(this.files[id]['html_id']);
+				li.parentNode.removeChild(li);
+				// select a new file
+				if(id== this.curr_file)
+				{
+					var next_file= "";
+					var is_next= false;
+					for(var i in this.files)
+					{
+						if( is_next )
+						{
+							next_file	= i;
+							break;
+						}
+						else if( i == id )
+							is_next		= true;
+						else
+							next_file	= i;
+					}
+					// display the next file
+					this.switch_to_file(next_file);
+				}
+				// clear datas
+				delete (this.files[id]);
+				this.update_size();
+			}	
+		}
+	};
+	
+	// backup current file datas
+	EditArea.prototype.save_file= function(id){
+		var t= this, save, a_links, a_selects, save_butt, img, i;
+		if(t.files[id])
+		{
+			var save= t.files[id];
+			save['last_selection']			= t.last_selection;		
+			save['last_text_to_highlight']	= t.last_text_to_highlight;
+			save['last_hightlighted_text']	= t.last_hightlighted_text;
+			save['previous']				= t.previous;
+			save['next']					= t.next;
+			save['last_undo']				= t.last_undo;
+			save['smooth_selection']		= t.smooth_selection;
+			save['do_highlight']			= t.do_highlight;
+			save['syntax']					= t.settings['syntax'];
+			save['text']					= t.textarea.value;
+			save['scroll_top']				= t.result.scrollTop;
+			save['scroll_left']				= t.result.scrollLeft;
+			save['selection_start']			= t.last_selection["selectionStart"];
+			save['selection_end']			= t.last_selection["selectionEnd"];
+			save['font_size']				= t.settings["font_size"];
+			save['font_family']				= t.settings["font_family"];
+			save['word_wrap']				= t.settings["word_wrap"];
+			save['toolbar']					= {'links':{}, 'selects': {}};
+			
+			// save toolbar buttons state for fileSpecific buttons
+			a_links= _$("toolbar_1").getElementsByTagName("a");
+			for( i=0; i<a_links.length; i++ )
+			{
+				if( a_links[i].getAttribute('fileSpecific') == 'yes' )
+				{
+					save_butt	= {};
+					img			= a_links[i].getElementsByTagName('img')[0];
+					save_butt['classLock']		= img.classLock;
+					save_butt['className']		= img.className;
+					save_butt['oldClassName']	= img.oldClassName;
+					
+					save['toolbar']['links'][a_links[i].id]= save_butt;
+				}
+			}
+			
+			// save toolbar select state for fileSpecific buttons
+			a_selects= _$("toolbar_1").getElementsByTagName("select");
+			for( i=0; i<a_selects.length; i++)
+			{
+				if(a_selects[i].getAttribute('fileSpecific')=='yes')
+				{
+					save['toolbar']['selects'][a_selects[i].id]= a_selects[i].value;
+				}
+			}
+				
+			t.files[id]= save;
+			
+			return save;
+		}
+		
+		return false;
+	};
+	
+	// update file_datas
+	EditArea.prototype.update_file= function(id, new_values){
+		for(var i in new_values)
+		{
+			this.files[id][i]= new_values[i];
+		}
+	};
+	
+	// display file datas
+	EditArea.prototype.display_file= function(id){
+		var t = this, a= t.textarea, new_file, a_lis, a_selects, a_links, a_options, i, j;
+		
+		// we're showing the empty file
+		if(id=='')
+		{
+			a.readOnly= true;
+			t.tab_browsing_area.style.display= "none";
+			_$("no_file_selected").style.display= "block";
+			t.result.className= "empty";
+			// clear current datas
+			if(!t.files[''])
+			{
+				t.open_file({id: ''});
+			}
+		}
+		// we try to show a non existent file, so we left
+		else if( typeof( t.files[id] ) == 'undefined' )
+		{
+			return false;
+		}
+		// display a normal file
+		else
+		{
+			t.result.className= "";
+			a.readOnly= !t.is_editable;
+			_$("no_file_selected").style.display= "none";
+			t.tab_browsing_area.style.display= "block";
+		}
+		
+		// ensure to have last state for undo/redo actions
+		t.check_redo(true);
+		t.check_undo(true);
+		t.curr_file= id;
+		
+		// replace selected tab file
+		a_lis= t.tab_browsing_area.getElementsByTagName('li');
+		for( i=0; i<a_lis.length; i++)
+		{
+			if(a_lis[i].id == t.files[id]['html_id'])
+				a_lis[i].className='selected';
+			else
+				a_lis[i].className='';
+		}
+		
+		// replace next files datas
+		new_file= t.files[id];
+	
+		// restore text content
+		a.value= new_file['text'];
+		
+		// restore font-size
+		t.set_font(new_file['font_family'], new_file['font_size']);
+		
+		// restore selection and scroll
+		t.area_select(new_file['selection_start'], new_file['selection_end'] - new_file['selection_start']);
+		t.manage_size(true);
+		t.result.scrollTop= new_file['scroll_top'];
+		t.result.scrollLeft= new_file['scroll_left'];
+		
+		// restore undo, redo
+		t.previous=	new_file['previous'];
+		t.next=	new_file['next'];
+		t.last_undo=	new_file['last_undo'];
+		t.check_redo(true);
+		t.check_undo(true);
+		
+		// restore highlight
+		t.execCommand("change_highlight", new_file['do_highlight']);
+		t.execCommand("change_syntax", new_file['syntax']);
+		
+		// smooth mode
+		t.execCommand("change_smooth_selection_mode", new_file['smooth_selection']);
+		
+		// word_wrap
+		t.execCommand("set_word_wrap", new_file['word_wrap']);
+			
+		// restore links state in toolbar
+		a_links= new_file['toolbar']['links'];
+		for( i in a_links)
+		{
+			if( img =  _$(i).getElementsByTagName('img')[0] )
+			{
+				img.classLock	= a_links[i]['classLock'];
+				img.className	= a_links[i]['className'];
+				img.oldClassName= a_links[i]['oldClassName'];
+			}
+		}
+		
+		// restore select state in toolbar
+		a_selects = new_file['toolbar']['selects'];
+		for( i in a_selects)
+		{
+			a_options	= _$(i).options;
+			for( j=0; j<a_options.length; j++)
+			{
+				if( a_options[j].value == a_selects[i] )
+					_$(i).options[j].selected=true;
+			}
+		}
+	
+	};
+
+	// change tab for displaying a new one
+	EditArea.prototype.switch_to_file= function(file_to_show, force_refresh){
+		if(file_to_show!=this.curr_file || force_refresh)
+		{
+			this.save_file(this.curr_file);
+			if(this.curr_file!='')
+				this.execCommand('file_switch_off', this.files[this.curr_file]);
+			this.display_file(file_to_show);
+			if(file_to_show!='')
+				this.execCommand('file_switch_on', this.files[file_to_show]);
+		}
+	};
+
+	// get all infos for the given file
+	EditArea.prototype.get_file= function(id){
+		if(id==this.curr_file)
+			this.save_file(id);
+		return this.files[id];
+	};
+	
+	// get all available files infos
+	EditArea.prototype.get_all_files= function(){
+		tmp_files= this.files;
+		this.save_file(this.curr_file);
+		if(tmp_files[''])
+			delete(this.files['']);
+		return tmp_files;
+	};
+	
+	
+	// check if the file has changed
+	EditArea.prototype.check_file_changes= function(){
+	
+		var id= this.curr_file;
+		if(this.files[id] && this.files[id]['compare_edited_text']!=undefined)
+		{
+			if(this.files[id]['compare_edited_text'].length==this.textarea.value.length && this.files[id]['compare_edited_text']==this.textarea.value)
+			{
+				if(this.files[id]['edited']!= false)
+					this.set_file_edited_mode(id, false);
+			}
+			else
+			{
+				if(this.files[id]['edited']!= true)
+					this.set_file_edited_mode(id, true);
+			}
+		}
+	};
+	
+	// set if the file is edited or not
+	EditArea.prototype.set_file_edited_mode= function(id, to){
+		// change CSS for edited tab
+		if(this.files[id] && _$(this.files[id]['html_id']))
+		{
+			var link= _$(this.files[id]['html_id']).getElementsByTagName('a')[0];
+			if(to==true)
+			{
+				link.className= 'edited';
+			}
+			else
+			{
+				link.className= '';
+				if(id==this.curr_file)
+					text= this.textarea.value;
+				else
+					text= this.files[id]['text'];
+				this.files[id]['compare_edited_text']= text;
+			}
+				
+			this.files[id]['edited']= to;
+		}
+	};
+
+	EditArea.prototype.set_show_line_colors = function(new_value){
+		this.show_line_colors = new_value;
+		
+		if( new_value )
+			this.selection_field.className	+= ' show_colors';
+		else
+			this.selection_field.className	= this.selection_field.className.replace( / show_colors/g, '' );
+	};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_loader.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_loader.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_loader.js
new file mode 100644
index 0000000..abc9281
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_loader.js
@@ -0,0 +1,1081 @@
+/******
+ *
+ *	EditArea 
+ * 	Developped by Christophe Dolivet
+ *	Released under LGPL, Apache and BSD licenses (use the one you want)
+ *
+******/
+
+function EditAreaLoader(){
+	var t=this;
+	t.version= "0.8.2";
+	date= new Date();
+	t.start_time=date.getTime();
+	t.win= "loading";	// window loading state
+	t.error= false;	// to know if load is interrrupt
+	t.baseURL="";
+	//t.suffix="";
+	t.template="";
+	t.lang= {};	// array of loaded speech language
+	t.load_syntax= {};	// array of loaded syntax language for highlight mode
+	t.syntax= {};	// array of initilized syntax language for highlight mode
+	t.loadedFiles= [];
+	t.waiting_loading= {}; 	// files that must be loaded in order to allow the script to really start
+	// scripts that must be loaded in the iframe
+	t.scripts_to_load= ["elements_functions", "resize_area", "reg_syntax"];
+	t.sub_scripts_to_load= ["edit_area", "manage_area" ,"edit_area_functions", "keyboard", "search_replace", "highlight", "regexp"];
+	t.syntax_display_name= { /*syntax_display_name_AUTO-FILL-BY-COMPRESSOR*/ };
+	
+	t.resize= []; // contain resizing datas
+	t.hidden= {};	// store datas of the hidden textareas
+	
+	t.default_settings= {
+		//id: "src"	// id of the textarea to transform
+		debug: false
+		,smooth_selection: true
+		,font_size: "10"		// not for IE
+		,font_family: "monospace"	// can be "verdana,monospace". Allow non monospace font but Firefox get smaller tabulation with non monospace fonts. IE doesn't change the tabulation width and Opera doesn't take this option into account... 
+		,start_highlight: false	// if start with highlight
+		,toolbar: "search, go_to_line, fullscreen, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, word_wrap, |, help"
+		,begin_toolbar: ""		//  "new_document, save, load, |"
+		,end_toolbar: ""		// or end_toolbar
+		,is_multi_files: false		// enable the multi file mode (the textarea content is ignored)
+		,allow_resize: "both"	// possible values: "no", "both", "x", "y"
+		,show_line_colors: false	// if the highlight is disabled for the line currently beeing edited (if enabled => heavy CPU use)
+		,min_width: 400
+		,min_height: 125
+		,replace_tab_by_spaces: false
+		,allow_toggle: true		// true or false
+		,language: "en"
+		,syntax: ""
+		,syntax_selection_allow: "basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml"
+		,display: "onload" 		// onload or later
+		,max_undo: 30
+		,browsers: "known"	// all or known
+		,plugins: "" // comma separated plugin list
+		,gecko_spellcheck: false	// enable/disable by default the gecko_spellcheck
+		,fullscreen: false
+		,is_editable: true
+		,cursor_position: "begin"
+		,word_wrap: false		// define if the text is wrapped of not in the textarea
+		,autocompletion: false	// NOT IMPLEMENTED			
+		,load_callback: ""		// click on load button (function name)
+		,save_callback: ""		// click on save button (function name)
+		,change_callback: ""	// textarea onchange trigger (function name)
+		,submit_callback: ""	// form submited (function name)
+		,EA_init_callback: ""	// EditArea initiliazed (function name)
+		,EA_delete_callback: ""	// EditArea deleted (function name)
+		,EA_load_callback: ""	// EditArea fully loaded and displayed (function name)
+		,EA_unload_callback: ""	// EditArea delete while being displayed (function name)
+		,EA_toggle_on_callback: ""	// EditArea toggled on (function name)
+		,EA_toggle_off_callback: ""	// EditArea toggled off (function name)
+		,EA_file_switch_on_callback: ""	// a new tab is selected (called for the newly selected file)
+		,EA_file_switch_off_callback: ""	// a new tab is selected (called for the previously selected file)
+		,EA_file_close_callback: ""		// close a tab
+	};
+	
+	t.advanced_buttons = [
+			// id, button img, command (it will try to find the translation of "id"), is_file_specific
+			['new_document', 'newdocument.gif', 'new_document', false],
+			['search', 'search.gif', 'show_search', false],
+			['go_to_line', 'go_to_line.gif', 'go_to_line', false],
+			['undo', 'undo.gif', 'undo', true],
+			['redo', 'redo.gif', 'redo', true],
+			['change_smooth_selection', 'smooth_selection.gif', 'change_smooth_selection_mode', true],
+			['reset_highlight', 'reset_highlight.gif', 'resync_highlight', true],
+			['highlight', 'highlight.gif','change_highlight', true],
+			['help', 'help.gif', 'show_help', false],
+			['save', 'save.gif', 'save', false],
+			['load', 'load.gif', 'load', false],
+			['fullscreen', 'fullscreen.gif', 'toggle_full_screen', false],
+			['word_wrap', 'word_wrap.gif', 'toggle_word_wrap', true],
+			['autocompletion', 'autocompletion.gif', 'toggle_autocompletion', true]
+		];
+			
+	// navigator identification
+	t.set_browser_infos(t);
+
+	if(t.isIE>=6 || t.isGecko || ( t.isWebKit && !t.isSafari<3 ) || t.isOpera>=9  || t.isCamino )
+		t.isValidBrowser=true;
+	else
+		t.isValidBrowser=false;
+
+	t.set_base_url();		
+	
+	for(var i=0; i<t.scripts_to_load.length; i++){
+		setTimeout("editAreaLoader.load_script('"+t.baseURL + t.scripts_to_load[i]+ ".js');", 1);	// let the time to Object editAreaLoader to be created before loading additionnal scripts
+		t.waiting_loading[t.scripts_to_load[i]+ ".js"]= false;
+	}
+	t.add_event(window, "load", EditAreaLoader.prototype.window_loaded);
+};
+	
+EditAreaLoader.prototype ={
+	has_error : function(){
+		this.error= true;
+		// set to empty all EditAreaLoader functions
+		for(var i in EditAreaLoader.prototype){
+			EditAreaLoader.prototype[i]=function(){};		
+		}
+	},
+	
+	// add browser informations to the object passed in parameter
+	set_browser_infos : function(o){
+		ua= navigator.userAgent;
+		
+		// general detection
+		o.isWebKit	= /WebKit/.test(ua);
+		o.isGecko	= !o.isWebKit && /Gecko/.test(ua);
+		o.isMac		= /Mac/.test(ua);
+		
+		o.isIE	= (navigator.appName == "Microsoft Internet Explorer");
+		if(o.isIE){
+			o.isIE = ua.replace(/^.*?MSIE\s+([0-9\.]+).*$/, "$1");
+			if(o.isIE<6)
+				o.has_error();
+		}
+
+		if(o.isOpera = (ua.indexOf('Opera') != -1)){	
+			o.isOpera= ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i, "$1");
+			if(o.isOpera<9)
+				o.has_error();
+			o.isIE=false;			
+		}
+
+		if(o.isFirefox =(ua.indexOf('Firefox') != -1))
+			o.isFirefox = ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i, "$1");
+		// Firefox clones 	
+		if( ua.indexOf('Iceweasel') != -1 )
+			o.isFirefox	= ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i, "$1");
+		if( ua.indexOf('GranParadiso') != -1 )
+			o.isFirefox	= ua.replace(/^.*?GranParadiso.*?([0-9\.]+).*$/i, "$1");
+		if( ua.indexOf('BonEcho') != -1 )
+			o.isFirefox	= ua.replace(/^.*?BonEcho.*?([0-9\.]+).*$/i, "$1");
+		if( ua.indexOf('SeaMonkey') != -1)
+			o.isFirefox = (ua.replace(/^.*?SeaMonkey.*?([0-9\.]+).*$/i, "$1") ) + 1;
+			
+		if(o.isCamino =(ua.indexOf('Camino') != -1))
+			o.isCamino = ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i, "$1");
+			
+		if(o.isSafari =(ua.indexOf('Safari') != -1))
+			o.isSafari= ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i, "$1");
+	
+		if(o.isChrome =(ua.indexOf('Chrome') != -1)) {
+			o.isChrome = ua.replace(/^.*?Chrome.*?([0-9\.]+).*$/i, "$1");
+			o.isSafari	= false;
+		}
+		
+	},
+	
+	window_loaded : function(){
+		editAreaLoader.win="loaded";
+		
+		// add events on forms
+		if (document.forms) {
+			for (var i=0; i<document.forms.length; i++) {
+				var form = document.forms[i];
+				form.edit_area_replaced_submit=null;
+				try {
+					
+					form.edit_area_replaced_submit = form.onsubmit;
+					form.onsubmit="";
+				} catch (e) {// Do nothing
+				}
+				editAreaLoader.add_event(form, "submit", EditAreaLoader.prototype.submit);
+				editAreaLoader.add_event(form, "reset", EditAreaLoader.prototype.reset);
+			}
+		}
+		editAreaLoader.add_event(window, "unload", function(){for(var i in editAreas){editAreaLoader.delete_instance(i);}});	// ini callback
+	},
+	
+	// init the checkup of the selection of the IE textarea
+	init_ie_textarea : function(id){
+		var a=document.getElementById(id);
+		try{
+			if(a && typeof(a.focused)=="undefined"){
+				a.focus();
+				a.focused=true;
+				a.selectionStart= a.selectionEnd= 0;			
+				get_IE_selection(a);
+				editAreaLoader.add_event(a, "focus", IE_textarea_focus);
+				editAreaLoader.add_event(a, "blur", IE_textarea_blur);
+				
+			}
+		}catch(ex){}
+	},
+		
+	init : function(settings){
+		var t=this,s=settings,i;
+		
+		if(!s["id"])
+			t.has_error();
+		if(t.error)
+			return;
+		// if an instance of the editor already exists for this textarea => delete the previous one
+		if(editAreas[s["id"]])
+			t.delete_instance(s["id"]);
+	
+		// init settings
+		for(i in t.default_settings){
+			if(typeof(s[i])=="undefined")
+				s[i]=t.default_settings[i];
+		}
+		
+		if(s["browsers"]=="known" && t.isValidBrowser==false){
+			return;
+		}
+		
+		if(s["begin_toolbar"].length>0)
+			s["toolbar"]= s["begin_toolbar"] +","+ s["toolbar"];
+		if(s["end_toolbar"].length>0)
+			s["toolbar"]= s["toolbar"] +","+ s["end_toolbar"];
+		s["tab_toolbar"]= s["toolbar"].replace(/ /g,"").split(",");
+		
+		s["plugins"]= s["plugins"].replace(/ /g,"").split(",");
+		for(i=0; i<s["plugins"].length; i++){
+			if(s["plugins"][i].length==0)
+				s["plugins"].splice(i,1);
+		}
+	//	alert(settings["plugins"].length+": "+ settings["plugins"].join(","));
+		t.get_template();
+		t.load_script(t.baseURL + "langs/"+ s["language"] + ".js");
+		
+		if(s["syntax"].length>0){
+			s["syntax"]=s["syntax"].toLowerCase();
+			t.load_script(t.baseURL + "reg_syntax/"+ s["syntax"] + ".js");
+		}
+		//alert(this.template);
+		
+		editAreas[s["id"]]= {"settings": s};
+		editAreas[s["id"]]["displayed"]=false;
+		editAreas[s["id"]]["hidden"]=false;
+		
+		//if(settings["display"]=="onload")
+		t.start(s["id"]);
+	},
+	
+	// delete an instance of an EditArea
+	delete_instance : function(id){
+		var d=document,fs=window.frames,span,iframe;
+		editAreaLoader.execCommand(id, "EA_delete");
+		if(fs["frame_"+id] && fs["frame_"+id].editArea)
+		{
+			if(editAreas[id]["displayed"])
+				editAreaLoader.toggle(id, "off");
+			fs["frame_"+id].editArea.execCommand("EA_unload");
+		}
+
+		// remove toggle infos and debug textarea
+		span= d.getElementById("EditAreaArroundInfos_"+id);
+		if(span)
+			span.parentNode.removeChild(span);
+
+		// remove the iframe
+		iframe= d.getElementById("frame_"+id);
+		if(iframe){
+			iframe.parentNode.removeChild(iframe);
+			//delete iframe;
+			try {
+				delete fs["frame_"+id];
+			} catch (e) {// Do nothing
+			}
+		}	
+
+		delete editAreas[id];
+	},
+
+	
+	start : function(id){
+		var t=this,d=document,f,span,father,next,html='',html_toolbar_content='',template,content,i;
+		
+		// check that the window is loaded
+		if(t.win!="loaded"){
+			setTimeout("editAreaLoader.start('"+id+"');", 50);
+			return;
+		}
+		
+		// check that all needed scripts are loaded
+		for( i in t.waiting_loading){
+			if(t.waiting_loading[i]!="loaded" && typeof(t.waiting_loading[i])!="function"){
+				setTimeout("editAreaLoader.start('"+id+"');", 50);
+				return;
+			}
+		}
+		
+		// wait until language and syntax files are loaded
+		if(!t.lang[editAreas[id]["settings"]["language"]] || (editAreas[id]["settings"]["syntax"].length>0 && !t.load_syntax[editAreas[id]["settings"]["syntax"]]) ){
+			setTimeout("editAreaLoader.start('"+id+"');", 50);
+			return;
+		}
+		// init the regexp for syntax highlight
+		if(editAreas[id]["settings"]["syntax"].length>0)
+			t.init_syntax_regexp();
+		
+			
+		// display toggle option and debug area
+		if(!d.getElementById("EditAreaArroundInfos_"+id) && (editAreas[id]["settings"]["debug"] || editAreas[id]["settings"]["allow_toggle"]))
+		{
+			span= d.createElement("span");
+			span.id= "EditAreaArroundInfos_"+id;
+			if(editAreas[id]["settings"]["allow_toggle"]){
+				checked=(editAreas[id]["settings"]["display"]=="onload")?"checked='checked'":"";
+				html+="<div id='edit_area_toggle_"+i+"'>";
+				html+="<input id='edit_area_toggle_checkbox_"+ id +"' class='toggle_"+ id +"' type='checkbox' onclick='editAreaLoader.toggle(\""+ id +"\");' accesskey='e' "+checked+" />";
+				html+="<label for='edit_area_toggle_checkbox_"+ id +"'>{$toggle}</label></div>";	
+			}
+			if(editAreas[id]["settings"]["debug"])
+				html+="<textarea id='edit_area_debug_"+ id +"' spellcheck='off' style='z-index: 20; width: 100%; height: 120px;overflow: auto; border: solid black 1px;'></textarea><br />";				
+			html= t.translate(html, editAreas[id]["settings"]["language"]);				
+			span.innerHTML= html;				
+			father= d.getElementById(id).parentNode;
+			next= d.getElementById(id).nextSibling;
+			if(next==null)
+				father.appendChild(span);
+			else
+				father.insertBefore(span, next);
+		}
+		
+		if(!editAreas[id]["initialized"])
+		{
+			t.execCommand(id, "EA_init");	// ini callback
+			if(editAreas[id]["settings"]["display"]=="later"){
+				editAreas[id]["initialized"]= true;
+				return;
+			}
+		}
+		
+		if(t.isIE){	// launch IE selection checkup
+			t.init_ie_textarea(id);
+		}
+				
+		// get toolbar content
+		var area=editAreas[id];
+		
+		for(i=0; i<area["settings"]["tab_toolbar"].length; i++){
+		//	alert(this.tab_toolbar[i]+"\n"+ this.get_control_html(this.tab_toolbar[i]));
+			html_toolbar_content+= t.get_control_html(area["settings"]["tab_toolbar"][i], area["settings"]["language"]);
+		}
+		// translate toolbar text here for chrome 2
+		html_toolbar_content = t.translate(html_toolbar_content, area["settings"]["language"], "template"); 
+		
+		
+		// create javascript import rules for the iframe if the javascript has not been already loaded by the compressor
+		if(!t.iframe_script){
+			t.iframe_script="";
+			for(i=0; i<t.sub_scripts_to_load.length; i++)
+				t.iframe_script+='<script language="javascript" type="text/javascript" src="'+ t.baseURL + t.sub_scripts_to_load[i] +'.js"></script>';
+		}
+		
+		// add plugins scripts if not already loaded by the compressor (but need to load language in all the case)
+		for(i=0; i<area["settings"]["plugins"].length; i++){
+			//if(typeof(area["settings"]["plugins"][i])=="function") continue;
+			if(!t.all_plugins_loaded)
+				t.iframe_script+='<script language="javascript" type="text/javascript" src="'+ t.baseURL + 'plugins/' + area["settings"]["plugins"][i] + '/' + area["settings"]["plugins"][i] +'.js"></script>';
+			t.iframe_script+='<script language="javascript" type="text/javascript" src="'+ t.baseURL + 'plugins/' + area["settings"]["plugins"][i] + '/langs/' + area["settings"]["language"] +'.js"></script>';
+		}
+	
+		
+		// create css link for the iframe if the whole css text has not been already loaded by the compressor
+		if(!t.iframe_css){
+			t.iframe_css="<link href='"+ t.baseURL +"edit_area.css' rel='stylesheet' type='text/css' />";
+		}
+		
+		
+		// create template
+		template= t.template.replace(/\[__BASEURL__\]/g, t.baseURL);
+		template= template.replace("[__TOOLBAR__]",html_toolbar_content);
+			
+		
+		// fill template with good language sentences
+		template= t.translate(template, area["settings"]["language"], "template");
+		
+		// add css_code
+		template= template.replace("[__CSSRULES__]", t.iframe_css);				
+		// add js_code
+		template= template.replace("[__JSCODE__]", t.iframe_script);
+		
+		// add version_code
+		template= template.replace("[__EA_VERSION__]", t.version);
+		//template=template.replace(/\{\$([^\}]+)\}/gm, this.traduc_template);
+		
+		//editAreas[area["settings"]["id"]]["template"]= template;
+		
+		area.textarea=d.getElementById(area["settings"]["id"]);
+		editAreas[area["settings"]["id"]]["textarea"]=area.textarea;
+	
+		// if removing previous instances from DOM before (fix from Marcin)
+		if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined') 
+			delete window.frames["frame_"+area["settings"]["id"]];
+		
+		// insert template in the document after the textarea
+		father= area.textarea.parentNode;
+	/*	var container= document.createElement("div");
+		container.id= "EditArea_frame_container_"+area["settings"]["id"];
+	*/	
+		content= d.createElement("iframe");
+		content.name= "frame_"+area["settings"]["id"];
+		content.id= "frame_"+area["settings"]["id"];
+		content.style.borderWidth= "0px";
+		setAttribute(content, "frameBorder", "0"); // IE
+		content.style.overflow="hidden";
+		content.style.display="none";
+
+		
+		next= area.textarea.nextSibling;
+		if(next==null)
+			father.appendChild(content);
+		else
+			father.insertBefore(content, next) ;		
+		f=window.frames["frame_"+area["settings"]["id"]];
+		f.document.open();
+		f.editAreas=editAreas;
+		f.area_id= area["settings"]["id"];	
+		f.document.area_id= area["settings"]["id"];	
+		f.document.write(template);
+		f.document.close();
+
+	//	frame.editAreaLoader=this;
+		//editAreas[area["settings"]["id"]]["displayed"]=true;
+		
+	},
+	
+	toggle : function(id, toggle_to){
+
+	/*	if((editAreas[id]["displayed"]==true  && toggle_to!="on") || toggle_to=="off"){
+			this.toggle_off(id);
+		}else if((editAreas[id]["displayed"]==false  && toggle_to!="off") || toggle_to=="on"){
+			this.toggle_on(id);
+		}*/
+		if(!toggle_to)
+			toggle_to= (editAreas[id]["displayed"]==true)?"off":"on";
+		if(editAreas[id]["displayed"]==true  && toggle_to=="off"){
+			this.toggle_off(id);
+		}else if(editAreas[id]["displayed"]==false  && toggle_to=="on"){
+			this.toggle_on(id);
+		}
+	
+		return false;
+	},
+	
+	// static function
+	toggle_off : function(id){
+		var fs=window.frames,f,t,parNod,nxtSib,selStart,selEnd,scrollTop,scrollLeft;
+		if(fs["frame_"+id])
+		{	
+			f	= fs["frame_"+id];
+			t	= editAreas[id]["textarea"];
+			if(f.editArea.fullscreen['isFull'])
+				f.editArea.toggle_full_screen(false);
+			editAreas[id]["displayed"]=false;
+			
+			// set wrap to off to keep same display mode (some browser get problem with this, so it need more complex operation		
+			t.wrap = "off";	// for IE
+			setAttribute(t, "wrap", "off");	// for Firefox	
+			parNod = t.parentNode;
+			nxtSib = t.nextSibling;
+			parNod.removeChild(t); 
+			parNod.insertBefore(t, nxtSib);
+			
+			// restore values
+			t.value= f.editArea.textarea.value;
+			selStart	= f.editArea.last_selection["selectionStart"];
+			selEnd		= f.editArea.last_selection["selectionEnd"];
+			scrollTop	= f.document.getElementById("result").scrollTop;
+			scrollLeft	= f.document.getElementById("result").scrollLeft;
+			
+			
+			document.getElementById("frame_"+id).style.display='none';
+		
+			t.style.display="inline";
+
+			try{	// IE will give an error when trying to focus an invisible or disabled textarea
+				t.focus();
+			} catch(e){};
+			if(this.isIE){
+				t.selectionStart= selStart;
+				t.selectionEnd	= selEnd;
+				t.focused		= true;
+				set_IE_selection(t);
+			}else{
+				if(this.isOpera && this.isOpera < 9.6 ){	// Opera bug when moving selection start and selection end
+					t.setSelectionRange(0, 0);
+				}
+				try{
+					t.setSelectionRange(selStart, selEnd);
+				} catch(e) {};
+			}
+			t.scrollTop= scrollTop;
+			t.scrollLeft= scrollLeft;
+			f.editArea.execCommand("toggle_off");
+
+		}
+	},	
+	
+	// static function
+	toggle_on : function(id){
+		var fs=window.frames,f,t,selStart=0,selEnd=0,scrollTop=0,scrollLeft=0,curPos,elem;
+			
+		if(fs["frame_"+id])
+		{
+			f	= fs["frame_"+id];
+			t	= editAreas[id]["textarea"];
+			area= f.editArea;
+			area.textarea.value= t.value;
+			
+			// store display values;
+			curPos	= editAreas[id]["settings"]["cursor_position"];
+
+			if(t.use_last==true)
+			{
+				selStart	= t.last_selectionStart;
+				selEnd		= t.last_selectionEnd;
+				scrollTop	= t.last_scrollTop;
+				scrollLeft	= t.last_scrollLeft;
+				t.use_last=false;
+			}
+			else if( curPos == "auto" )
+			{
+				try{
+					selStart	= t.selectionStart;
+					selEnd		= t.selectionEnd;
+					scrollTop	= t.scrollTop;
+					scrollLeft	= t.scrollLeft;
+					//alert(scrollTop);
+				}catch(ex){}
+			}
+			
+			// set to good size
+			this.set_editarea_size_from_textarea(id, document.getElementById("frame_"+id));
+			t.style.display="none";			
+			document.getElementById("frame_"+id).style.display="inline";
+			area.execCommand("focus"); // without this focus opera doesn't manage well the iframe body height
+			
+			
+			// restore display values
+			editAreas[id]["displayed"]=true;
+			area.execCommand("update_size");
+			
+			f.document.getElementById("result").scrollTop= scrollTop;
+			f.document.getElementById("result").scrollLeft= scrollLeft;
+			area.area_select(selStart, selEnd-selStart);
+			area.execCommand("toggle_on");
+
+			
+		}
+		else
+		{
+		/*	if(this.isIE)
+				get_IE_selection(document.getElementById(id));	*/	
+			elem= document.getElementById(id);	
+			elem.last_selectionStart= elem.selectionStart;
+			elem.last_selectionEnd= elem.selectionEnd;
+			elem.last_scrollTop= elem.scrollTop;
+			elem.last_scrollLeft= elem.scrollLeft;
+			elem.use_last=true;
+			editAreaLoader.start(id);
+		}
+	},	
+	
+	set_editarea_size_from_textarea : function(id, frame){	
+		var elem,width,height;
+		elem	= document.getElementById(id);
+		
+		width	= Math.max(editAreas[id]["settings"]["min_width"], elem.offsetWidth)+"px";
+		height	= Math.max(editAreas[id]["settings"]["min_height"], elem.offsetHeight)+"px";
+		if(elem.style.width.indexOf("%")!=-1)
+			width	= elem.style.width;
+		if(elem.style.height.indexOf("%")!=-1)
+			height	= elem.style.height;
+		//alert("h: "+height+" w: "+width);
+	
+		frame.style.width= width;
+		frame.style.height= height;
+	},
+		
+	set_base_url : function(){
+		var t=this,elems,i,docBasePath;
+
+		if( !this.baseURL ){
+			elems = document.getElementsByTagName('script');
+	
+			for( i=0; i<elems.length; i++ ){
+				if (elems[i].src && elems[i].src.match(/edit_area_[^\\\/]*$/i) ) {
+					var src = unescape( elems[i].src ); // use unescape for utf-8 encoded urls
+					src = src.substring(0, src.lastIndexOf('/'));
+					this.baseURL = src;
+					this.file_name= elems[i].src.substr(elems[i].src.lastIndexOf("/")+1);
+					break;
+				}
+			}
+		}
+		
+		docBasePath	= document.location.href;
+		if (docBasePath.indexOf('?') != -1)
+			docBasePath	= docBasePath.substring(0, docBasePath.indexOf('?'));
+		docBasePath	= docBasePath.substring(0, docBasePath.lastIndexOf('/'));
+	
+		// If not HTTP absolute
+		if (t.baseURL.indexOf('://') == -1 && t.baseURL.charAt(0) != '/') {
+			// If site absolute
+			t.baseURL = docBasePath + "/" + t.baseURL;
+		}
+		t.baseURL	+="/";	
+	},
+	
+	get_button_html : function(id, img, exec, isFileSpecific, baseURL) {
+		var cmd,html;
+		if(!baseURL)
+			baseURL= this.baseURL;
+		cmd	= 'editArea.execCommand(\'' + exec + '\')';
+		html	= '<a id="a_'+ id +'" href="javascript:' + cmd + '" onclick="' + cmd + ';return false;" onmousedown="return false;" target="_self" fileSpecific="'+ (isFileSpecific?'yes':'no') +'">';
+		html	+= '<img id="' + id + '" src="'+ baseURL +'images/' + img + '" title="{$' + id + '}" width="20" height="20" class="editAreaButtonNormal" onmouseover="editArea.switchClass(this,\'editAreaButtonOver\');" onmouseout="editArea.restoreClass(this);" onmousedown="editArea.restoreAndSwitchClass(this,\'editAreaButtonDown\');" /></a>';
+		return html;
+	},
+
+	get_control_html : function(button_name, lang) {		
+		var t=this,i,but,html,si;
+		for (i=0; i<t.advanced_buttons.length; i++)
+		{
+			but = t.advanced_buttons[i];			
+			if (but[0] == button_name)
+			{
+				return t.get_button_html(but[0], but[1], but[2], but[3]);
+			}	
+		}		
+				
+		switch (button_name){
+			case "*":
+			case "return":
+				return "<br />";
+			case "|":
+		  	case "separator":
+				return '<img src="'+ t.baseURL +'images/spacer.gif" width="1" height="15" class="editAreaSeparatorLine">';
+			case "select_font":
+				html= "<select id='area_font_size' onchange='javascript:editArea.execCommand(\"change_font_size\")' fileSpecific='yes'>";
+				html+="<option value='-1'>{$font_size}</option>";
+				si=[8,9,10,11,12,14];
+				for( i=0;i<si.length;i++){
+					html+="<option value='"+si[i]+"'>"+si[i]+" pt</option>";
+				}
+				html+="</select>";
+				return html;
+			case "syntax_selection":
+				html= "<select id='syntax_selection' onchange='javascript:editArea.execCommand(\"change_syntax\", this.value)' fileSpecific='yes'>";
+				html+="<option value='-1'>{$syntax_selection}</option>";
+				html+="</select>";
+				return html;
+		}
+		
+		return "<span id='tmp_tool_"+button_name+"'>["+button_name+"]</span>";		
+	},
+	
+	
+	get_template : function(){
+		if(this.template=="")
+		{
+			var xhr_object = null; 
+			if(window.XMLHttpRequest) // Firefox 
+				xhr_object = new XMLHttpRequest(); 
+			else if(window.ActiveXObject) // Internet Explorer 
+				xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
+			else { // XMLHttpRequest not supported
+				alert("XMLHTTPRequest not supported. EditArea not loaded"); 
+				return; 
+			} 
+			 
+			xhr_object.open("GET", this.baseURL+"template.html", false); 
+			xhr_object.send(null); 
+			if(xhr_object.readyState == 4) 
+				this.template=xhr_object.responseText;
+			else
+				this.has_error();
+		}
+	},
+	
+	// translate text
+	translate : function(text, lang, mode){
+		if(mode=="word")
+			text=editAreaLoader.get_word_translation(text, lang);
+		else if(mode="template"){
+			editAreaLoader.current_language= lang;
+			text=text.replace(/\{\$([^\}]+)\}/gm, editAreaLoader.translate_template);
+		}
+		return text;
+	},
+	
+	translate_template : function(){
+		return editAreaLoader.get_word_translation(EditAreaLoader.prototype.translate_template.arguments[1], editAreaLoader.current_language);
+	},
+	
+	get_word_translation : function(val, lang){
+		var i;
+		
+		for( i in editAreaLoader.lang[lang]){
+			if(i == val)
+				return editAreaLoader.lang[lang][i];
+		}
+		return "_"+val;
+	},
+	
+	load_script : function(url){
+		var t=this,d=document,script,head;
+		
+		if( t.loadedFiles[url] )
+			return;	
+		//alert("load: "+url);
+		try{
+			script= d.createElement("script");
+			script.type= "text/javascript";
+			script.src= url;
+			script.charset= "UTF-8";
+			d.getElementsByTagName("head")[0].appendChild(script);
+		}catch(e){
+			d.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '" charset="UTF-8"></sc'+'ript>');
+		}
+		
+		t.loadedFiles[url] = true;
+	},
+	
+	add_event : function(obj, name, handler) {
+		try{
+			if (obj.attachEvent) {
+				obj.attachEvent("on" + name, handler);
+			} else{
+				obj.addEventListener(name, handler, false);
+			}
+		}catch(e){}
+	},
+	
+	remove_event : function(obj, name, handler){
+		try{
+			if (obj.detachEvent)
+				obj.detachEvent("on" + name, handler);
+			else
+				obj.removeEventListener(name, handler, false);
+		}catch(e){}
+	},
+
+
+	// reset all the editareas in the form that have been reseted
+	reset : function(e){
+		var formObj,is_child,i,x;
+		
+		formObj = editAreaLoader.isIE ? window.event.srcElement : e.target;
+		if(formObj.tagName!='FORM')
+			formObj= formObj.form;
+		
+		for( i in editAreas ){			
+			is_child= false;
+			for( x=0;x<formObj.elements.length;x++ ) {
+				if(formObj.elements[x].id == i)
+					is_child=true;
+			}
+			
+			if(window.frames["frame_"+i] && is_child && editAreas[i]["displayed"]==true){
+			
+				var exec= 'window.frames["frame_'+ i +'"].editArea.textarea.value= document.getElementById("'+ i +'").value;';
+				exec+= 'window.frames["frame_'+ i +'"].editArea.execCommand("focus");';
+				exec+= 'window.frames["frame_'+ i +'"].editArea.check_line_selection();';
+				exec+= 'window.frames["frame_'+ i +'"].editArea.execCommand("reset");';
+				window.setTimeout(exec, 10);
+			}
+		}		
+		return;
+	},
+	
+	
+	// prepare all the textarea replaced by an editarea to be submited
+	submit : function(e){		
+		var formObj,is_child,fs=window.frames,i,x;
+		formObj = editAreaLoader.isIE ? window.event.srcElement : e.target;
+		if(formObj.tagName!='FORM')
+			formObj= formObj.form;
+		
+		for( i in editAreas){
+			is_child= false;
+			for( x=0;x<formObj.elements.length;x++ ) {
+				if(formObj.elements[x].id == i)
+					is_child=true;
+			}
+		
+			if(is_child)
+			{
+				if(fs["frame_"+i] && editAreas[i]["displayed"]==true)
+					document.getElementById(i).value= fs["frame_"+ i].editArea.textarea.value;
+				editAreaLoader.execCommand(i,"EA_submit");
+			}
+		}				
+		if( typeof(formObj.edit_area_replaced_submit) == "function" ){
+			res= formObj.edit_area_replaced_submit();
+			if(res==false){
+				if(editAreaLoader.isIE)
+					return false;
+				else
+					e.preventDefault();
+			}
+		}
+		return;
+	},
+	
+	// allow to get the value of the editarea
+	getValue : function(id){
+        if(window.frames["frame_"+id] && editAreas[id]["displayed"]==true){
+            return window.frames["frame_"+ id].editArea.textarea.value;       
+        }else if(elem=document.getElementById(id)){
+        	return elem.value;
+        }
+        return false;
+    },
+    
+    // allow to set the value of the editarea
+    setValue : function(id, new_val){
+    	var fs=window.frames;
+    	
+        if( ( f=fs["frame_"+id] ) && editAreas[id]["displayed"]==true){
+			f.editArea.textarea.value= new_val;     
+			f.editArea.execCommand("focus"); 
+			f.editArea.check_line_selection(false);  
+			f.editArea.execCommand("onchange");
+        }else if(elem=document.getElementById(id)){
+        	elem.value= new_val;
+        }
+    },
+	    
+    // allow to get infos on the selection: array(start, end)
+    getSelectionRange : function(id){
+    	var sel,eA,fs=window.frames;
+    	
+    	sel= {"start": 0, "end": 0};
+        if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
+        	eA= fs["frame_"+ id].editArea;
+
+			sel["start"]	= eA.textarea.selectionStart;
+			sel["end"]		= eA.textarea.selectionEnd;
+		
+        }else if( elem=document.getElementById(id) ){
+        	sel= getSelectionRange(elem);
+        }
+        return sel;
+    },
+    
+    // allow to set the selection with the given start and end positions
+    setSelectionRange : function(id, new_start, new_end){
+    	var fs=window.frames;
+    	
+        if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
+            fs["frame_"+ id].editArea.area_select(new_start, new_end-new_start);  
+			// make an auto-scroll to the selection
+			if(!this.isIE){
+				fs["frame_"+ id].editArea.check_line_selection(false); 
+				fs["frame_"+ id].editArea.scroll_to_view();
+			}   
+        }else if(elem=document.getElementById(id)){
+        	setSelectionRange(elem, new_start, new_end);
+        }
+    },
+    
+    getSelectedText : function(id){
+    	var sel= this.getSelectionRange(id);
+    	
+        return this.getValue(id).substring(sel["start"], sel["end"]);
+    },
+	
+	setSelectedText : function(id, new_val){
+		var fs=window.frames,d=document,sel,text,scrollTop,scrollLeft,new_sel_end;
+		
+		new_val	= new_val.replace(/\r/g, ""); 
+		sel		= this.getSelectionRange(id);
+		text	= this.getValue(id);
+		if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
+			scrollTop	= fs["frame_"+ id].document.getElementById("result").scrollTop;
+			scrollLeft	= fs["frame_"+ id].document.getElementById("result").scrollLeft;
+		}else{
+			scrollTop	= d.getElementById(id).scrollTop;
+			scrollLeft	= d.getElementById(id).scrollLeft;
+		}
+		
+		text	= text.substring(0, sel["start"])+ new_val +text.substring(sel["end"]);
+		this.setValue(id, text);
+		new_sel_end	= sel["start"]+ new_val.length;
+		this.setSelectionRange(id, sel["start"], new_sel_end);
+		
+		
+		// fix \r problem for selection length count on IE & Opera
+		if(new_val != this.getSelectedText(id).replace(/\r/g, "")){
+			this.setSelectionRange(id, sel["start"], new_sel_end+ new_val.split("\n").length -1);
+		}
+		// restore scrolling position
+		if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
+			fs["frame_"+ id].document.getElementById("result").scrollTop= scrollTop;
+			fs["frame_"+ id].document.getElementById("result").scrollLeft= scrollLeft;
+			fs["frame_"+ id].editArea.execCommand("onchange");
+		}else{
+			d.getElementById(id).scrollTop= scrollTop;
+			d.getElementById(id).scrollLeft= scrollLeft;
+		}
+    },
+    
+    insertTags : function(id, open_tag, close_tag){
+    	var old_sel,new_sel;
+    	
+    	old_sel	= this.getSelectionRange(id);
+    	text	= open_tag + this.getSelectedText(id) + close_tag;
+    	 
+		editAreaLoader.setSelectedText(id, text);
+		
+    	new_sel	= this.getSelectionRange(id);
+    	if(old_sel["end"] > old_sel["start"])	// if text was selected, cursor at the end
+    		this.setSelectionRange(id, new_sel["end"], new_sel["end"]);
+    	else // cursor in the middle
+    		this.setSelectionRange(id, old_sel["start"]+open_tag.length, old_sel["start"]+open_tag.length);
+    },
+    
+    // hide both EditArea and normal textarea
+	hide : function(id){
+		var fs= window.frames,d=document,t=this,scrollTop,scrollLeft,span;
+		if(d.getElementById(id) && !t.hidden[id])
+		{
+			t.hidden[id]= {};
+			t.hidden[id]["selectionRange"]= t.getSelectionRange(id);
+			if(d.getElementById(id).style.display!="none")
+			{
+				t.hidden[id]["scrollTop"]= d.getElementById(id).scrollTop;
+				t.hidden[id]["scrollLeft"]= d.getElementById(id).scrollLeft;
+			}
+					
+			if(fs["frame_"+id])
+			{
+				t.hidden[id]["toggle"]= editAreas[id]["displayed"];
+				
+				if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
+					scrollTop	= fs["frame_"+ id].document.getElementById("result").scrollTop;
+					scrollLeft	= fs["frame_"+ id].document.getElementById("result").scrollLeft;
+				}else{
+					scrollTop	= d.getElementById(id).scrollTop;
+					scrollLeft	= d.getElementById(id).scrollLeft;
+				}
+				t.hidden[id]["scrollTop"]= scrollTop;
+				t.hidden[id]["scrollLeft"]= scrollLeft;
+				
+				if(editAreas[id]["displayed"]==true)
+					editAreaLoader.toggle_off(id);
+			}
+			
+			// hide toggle button and debug box
+			span= d.getElementById("EditAreaArroundInfos_"+id);
+			if(span){
+				span.style.display='none';
+			}
+			
+			// hide textarea
+			d.getElementById(id).style.display= "none";
+		}
+	},
+	
+	// restore hidden EditArea and normal textarea
+	show : function(id){
+		var fs= window.frames,d=document,t=this,span;
+		if((elem=d.getElementById(id)) && t.hidden[id])
+		{
+			elem.style.display= "inline";
+			elem.scrollTop= t.hidden[id]["scrollTop"];
+			elem.scrollLeft= t.hidden[id]["scrollLeft"];
+			span= d.getElementById("EditAreaArroundInfos_"+id);
+			if(span){
+				span.style.display='inline';
+			}
+			
+			if(fs["frame_"+id])
+			{
+								
+				// restore toggle button and debug box
+			
+				
+				// restore textarea
+				elem.style.display= "inline";
+				
+				// restore EditArea
+				if(t.hidden[id]["toggle"]==true)
+					editAreaLoader.toggle_on(id);
+				
+				scrollTop	= t.hidden[id]["scrollTop"];
+				scrollLeft	= t.hidden[id]["scrollLeft"];
+				
+				if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
+					fs["frame_"+ id].document.getElementById("result").scrollTop	= scrollTop;
+					fs["frame_"+ id].document.getElementById("result").scrollLeft	= scrollLeft;
+				}else{
+					elem.scrollTop	= scrollTop;
+					elem.scrollLeft	= scrollLeft;
+				}
+			
+			}
+			// restore selection
+			sel	= t.hidden[id]["selectionRange"];
+			t.setSelectionRange(id, sel["start"], sel["end"]);
+			delete t.hidden[id];	
+		}
+	},
+	
+	// get the current file datas (for multi file editing mode)
+	getCurrentFile : function(id){
+		return this.execCommand(id, 'get_file', this.execCommand(id, 'curr_file'));
+	},
+	
+	// get the given file datas (for multi file editing mode)
+	getFile : function(id, file_id){
+		return this.execCommand(id, 'get_file', file_id);
+	},
+	
+	// get all the openned files datas (for multi file editing mode)
+	getAllFiles : function(id){
+		return this.execCommand(id, 'get_all_files()');
+	},
+	
+	// open a file (for multi file editing mode)
+	openFile : function(id, file_infos){
+		return this.execCommand(id, 'open_file', file_infos);
+	},
+	
+	// close the given file (for multi file editing mode)
+	closeFile : function(id, file_id){
+		return this.execCommand(id, 'close_file', file_id);
+	},
+	
+	// close the given file (for multi file editing mode)
+	setFileEditedMode : function(id, file_id, to){
+		var reg1,reg2;
+		reg1	= new RegExp('\\\\', 'g');
+		reg2	= new RegExp('"', 'g');
+		return this.execCommand(id, 'set_file_edited_mode("'+ file_id.replace(reg1, '\\\\').replace(reg2, '\\"') +'", '+ to +')');
+	},
+	
+	
+	// allow to access to editarea functions and datas (for advanced users only)
+	execCommand : function(id, cmd, fct_param){
+		switch(cmd){
+			case "EA_init":
+				if(editAreas[id]['settings']["EA_init_callback"].length>0)
+					eval(editAreas[id]['settings']["EA_init_callback"]+"('"+ id +"');");
+				break;
+			case "EA_delete":
+				if(editAreas[id]['settings']["EA_delete_callback"].length>0)
+					eval(editAreas[id]['settings']["EA_delete_callback"]+"('"+ id +"');");
+				break;
+			case "EA_submit":
+				if(editAreas[id]['settings']["submit_callback"].length>0)
+					eval(editAreas[id]['settings']["submit_callback"]+"('"+ id +"');");
+				break;
+		}
+        if(window.frames["frame_"+id] && window.frames["frame_"+ id].editArea){
+			if(fct_param!=undefined)
+				return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +'(fct_param);');
+			else
+				return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +';');       
+        }
+        return false;
+    }
+};
+	
+	var editAreaLoader= new EditAreaLoader();
+	var editAreas= {};
+


[21/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/jqueryui-themeroller.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/jqueryui-themeroller.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/jqueryui-themeroller.css
new file mode 100644
index 0000000..19a056b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/css/jqueryui/jqueryui-themeroller.css
@@ -0,0 +1,856 @@
+/*
+ * jQuery UI screen structure and presentation
+ * This CSS file was generated by ThemeRoller, a Filament Group Project for jQuery UI
+ * Author: Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
+ * Visit ThemeRoller.com
+*/
+
+/*
+ * Note: If your ThemeRoller settings have a font size set in ems, your components will scale according to their parent element's font size.
+ * As a rule of thumb, set your body's font size to 62.5% to make 1em = 10px.
+ * body {font-size: 62.5%;}
+*/
+
+
+
+/*UI accordion*/
+.ui-accordion {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Verdana, Arial, sans-serif;
+	font-size: 1.1em;
+	border-bottom: 1px solid #d3d3d3;
+}
+.ui-accordion-group {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	border: 1px solid #d3d3d3;
+	border-bottom: none;
+}
+.ui-accordion-header {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	cursor: pointer;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+}
+.ui-accordion-header a {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	display: block;
+	font-size: 1em;
+	font-weight: normal;
+	text-decoration: none;
+	padding: .5em .5em .5em 1.7em;
+	color: #555555;
+	background: url(images/888888_7x7_arrow_right.gif) .5em 50% no-repeat;
+}
+.ui-accordion-header a:hover {
+	background: url(images/454545_7x7_arrow_right.gif) .5em 50% no-repeat;
+	color: #212121;
+}
+.ui-accordion-header:hover {
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	color: #212121;
+}
+.selected .ui-accordion-header, .selected .ui-accordion-header:hover {
+	background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;
+}
+.selected .ui-accordion-header a, .selected .ui-accordion-header a:hover {
+	color: #222222;
+	background: url(images/222222_7x7_arrow_down.gif) .5em 50% no-repeat;
+}
+.ui-accordion-content {
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_0.png) 0 0 repeat-x;
+	color: #222222;
+	font-size: 1em;
+}
+.ui-accordion-content p {
+	padding: 1em 1.7em 0.6em;
+}
+
+
+
+
+
+
+/*UI tabs*/
+.ui-tabs-nav {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	/*font-family: Verdana, Arial, sans-serif;*/
+	/*font-size: 1.1em;*/
+	float: left;
+	position: relative;
+	z-index: 1;
+	border-right: 1px solid #d3d3d3;
+	bottom: -1px;
+}
+.ui-tabs-nav li {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	float: left;
+	border: 1px solid #d3d3d3;
+	border-right: none;
+}
+.ui-tabs-nav li a {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	float: left;
+	/*font-size: 1em;*/
+	font-weight: normal;
+	text-decoration: none;
+	padding: .5em 1.7em;
+	color: #555555;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+}
+.ui-tabs-nav li a:hover {
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	color: #212121;
+}
+.ui-tabs-nav li.ui-tabs-selected {
+	border-bottom-color: #ffffff;
+}
+.ui-tabs-nav li.ui-tabs-selected a, .ui-tabs-nav li.ui-tabs-selected a:hover {
+	background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;
+	color: #222222;
+}
+.ui-tabs-panel {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	/*font-family: Verdana, Arial, sans-serif;*/
+	clear:left;
+	border: 1px solid #d3d3d3;
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_0.png) 0 0 repeat-x;
+	color: #222222;
+	padding: 1.5em 1.7em;	
+}
+.ui-tabs-hide {
+	display: none;/* for accessible hiding: position: absolute; left: -99999999px*/;
+}
+
+
+
+
+
+/*slider*/
+.ui-slider {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Verdana, Arial, sans-serif;
+	font-size: 1.1em;
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_0.png) 0 0 repeat-x;
+	border: 1px solid #dddddd;
+	height: .8em;
+	position: relative;
+}
+.ui-slider-handle {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	position: absolute;
+	z-index: 2;
+	top: -3px;
+	width: 1.2em;
+	height: 1.2em;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	border: 1px solid #d3d3d3;
+}
+.ui-slider-handle:hover {
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	border: 1px solid #999999;
+}
+.ui-slider-handle-active, .ui-slider-handle-active:hover {
+	background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;
+	border: 1px solid #dddddd;
+}
+.ui-slider-range {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	height: .8em;
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	position: absolute;
+	border: 1px solid #d3d3d3;
+	border-left: 0;
+	border-right: 0;
+	top: -1px;
+	z-index: 1;
+	opacity:.7;
+	filter:Alpha(Opacity=70);
+}
+
+
+
+
+
+
+/*dialog*/
+.ui-dialog {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Verdana, Arial, sans-serif;
+	font-size: 10px;
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_0.png) 0 0 repeat-x;
+	color: #222222;
+	border: 4px solid #dddddd;
+	position: relative;
+}
+.ui-resizable-handle {
+	position: absolute;
+	font-size: 0.1px;
+	z-index: 99999;
+}
+.ui-resizable .ui-resizable-handle {
+	display: block; 
+}
+body .ui-resizable-disabled .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
+body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
+.ui-resizable-n { 
+	cursor: n-resize; 
+	height: 7px; 
+	width: 100%; 
+	top: -5px; 
+	left: 0px;  
+}
+.ui-resizable-s { 
+	cursor: s-resize; 
+	height: 7px; 
+	width: 100%; 
+	bottom: -5px; 
+	left: 0px; 
+}
+.ui-resizable-e { 
+	cursor: e-resize; 
+	width: 7px; 
+	right: -5px; 
+	top: 0px; 
+	height: 100%; 
+}
+.ui-resizable-w { 
+	cursor: w-resize; 
+	width: 7px; 
+	left: -5px; 
+	top: 0px; 
+	height: 100%;
+}
+.ui-resizable-se { 
+	cursor: se-resize; 
+	width: 13px; 
+	height: 13px; 
+	right: 0px; 
+	bottom: 0px; 
+	background: url(images/222222_11x11_icon_resize_se.gif) no-repeat 0 0;
+}
+.ui-resizable-sw { 
+	cursor: sw-resize; 
+	width: 9px; 
+	height: 9px; 
+	left: 0px; 
+	bottom: 0px;  
+}
+.ui-resizable-nw { 
+	cursor: nw-resize; 
+	width: 9px; 
+	height: 9px; 
+	left: 0px; 
+	top: 0px; 
+}
+.ui-resizable-ne { 
+	cursor: ne-resize; 
+	width: 9px; 
+	height: 9px; 
+	right: 0px; 
+	top: 0px; 
+}
+.ui-dialog-titlebar {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 10px; list-style: none;
+	padding: .5em 1.5em .5em 1em;
+	color: #555555;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	border-bottom: 1px solid #d3d3d3;
+	font-size: 10px;
+	font-weight: normal;
+	position: relative;
+}
+.ui-dialog-title {}
+.ui-dialog-titlebar-close {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 10px; list-style: none;
+	background: url(images/888888_11x11_icon_close.gif) 0 0 no-repeat;
+	position: absolute;
+	right: 8px;
+	top: .7em;
+	width: 11px;
+	height: 11px;
+	z-index: 100;
+}
+.ui-dialog-titlebar-close-hover, .ui-dialog-titlebar-close:hover {
+	background: url(images/454545_11x11_icon_close.gif) 0 0 no-repeat;
+}
+.ui-dialog-titlebar-close:active {
+	background: url(images/222222_11x11_icon_close.gif) 0 0 no-repeat;
+}
+.ui-dialog-titlebar-close span {
+	display: none;
+}
+.ui-dialog-content {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 11px; list-style: none;
+	color: #222222;
+	padding: 1.5em 1.7em;	
+}
+.ui-dialog-buttonpane {
+	position: absolute;
+	bottom: 0;
+	width: 100%;
+	text-align: left;
+	border-top: 1px solid #dddddd;
+	background: #ffffff;
+}
+.ui-dialog-buttonpane button {
+	margin: .5em 0 .5em 8px;
+	color: #555555;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	font-size: 10px;
+	border: 1px solid #d3d3d3;
+	cursor: pointer;
+	padding: .2em .6em .3em .6em;
+	line-height: 1.4em;
+}
+.ui-dialog-buttonpane button:hover {
+	color: #212121;
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	border: 1px solid #999999;
+}
+.ui-dialog-buttonpane button:active {
+	color: #222222;
+	background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;
+	border: 1px solid #dddddd;
+}
+/* This file skins dialog */
+.ui-dialog.ui-draggable .ui-dialog-titlebar,
+.ui-dialog.ui-draggable .ui-dialog-titlebar {
+	cursor: move;
+}
+
+
+
+
+
+
+
+/*datepicker*/
+/* Main Style Sheet for jQuery UI date picker */
+.ui-datepicker-div, .ui-datepicker-inline, #ui-datepicker-div {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Verdana, Arial, sans-serif;
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_0.png) 0 0 repeat-x;
+	font-size: 1.1em;
+	border: 4px solid #dddddd;
+	width: 15.5em;
+	padding: 2.5em .5em .5em .5em;
+	position: relative;
+}
+.ui-datepicker-div, #ui-datepicker-div {
+	z-index: 9999; /*must have*/
+	display: none;
+}
+.ui-datepicker-inline {
+	float: left;
+	display: block;
+}
+.ui-datepicker-control {
+	display: none;
+}
+.ui-datepicker-current {
+	display: none;
+}
+.ui-datepicker-next, .ui-datepicker-prev {
+	position: absolute;
+	left: .5em;
+	top: .5em;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+}
+.ui-datepicker-next {
+	left: 14.6em;
+}
+.ui-datepicker-next:hover, .ui-datepicker-prev:hover {
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+}
+.ui-datepicker-next a, .ui-datepicker-prev a {
+	text-indent: -999999px;
+	width: 1.3em;
+	height: 1.4em;
+	display: block;
+	font-size: 1em;
+	background: url(images/888888_7x7_arrow_left.gif) 50% 50% no-repeat;
+	border: 1px solid #d3d3d3;
+	cursor: pointer;
+}
+.ui-datepicker-next a {
+	background: url(images/888888_7x7_arrow_right.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-prev a:hover {
+	background: url(images/454545_7x7_arrow_left.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-next a:hover {
+	background: url(images/454545_7x7_arrow_right.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-prev a:active {
+	background: url(images/222222_7x7_arrow_left.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-next a:active {
+	background: url(images/222222_7x7_arrow_right.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-header select {
+	border: 1px solid #d3d3d3;
+	color: #555555;
+	background: #e6e6e6;
+	font-size: 1em;
+	line-height: 1.4em;
+	position: absolute;
+	top: .5em;
+	margin: 0 !important;
+}
+.ui-datepicker-header option:focus, .ui-datepicker-header option:hover {
+	background: #dadada;
+}
+.ui-datepicker-header select.ui-datepicker-new-month {
+	width: 7em;
+	left: 2.2em;
+}
+.ui-datepicker-header select.ui-datepicker-new-year {
+	width: 5em;
+	left: 9.4em;
+}
+table.ui-datepicker {
+	width: 15.5em;
+	text-align: right;
+}
+table.ui-datepicker td a {
+	padding: .1em .3em .1em 0;
+	display: block;
+	color: #555555;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	cursor: pointer;
+	border: 1px solid #ffffff;
+}
+table.ui-datepicker td a:hover {
+	border: 1px solid #999999;
+	color: #212121;
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+}
+table.ui-datepicker td a:active {
+	border: 1px solid #dddddd;
+	color: #222222;
+	background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;
+}
+table.ui-datepicker .ui-datepicker-title-row td {
+	padding: .3em 0;
+	text-align: center;
+	font-size: .9em;
+	color: #222222;
+	text-transform: uppercase;
+}
+table.ui-datepicker .ui-datepicker-title-row td a {
+	color: #222222;
+}
+.ui-datepicker-cover {
+	display: none;
+	display/**/: block;
+	position: absolute;
+	z-index: -1;
+	filter: mask();
+	top: -4px;
+	left: -4px;
+	width: 193px;
+	height: 200px;
+}
+
+
+
+
+
+
+
+
+
+
+
+/* ui-autocomplete */
+/*
+.ui-autocomplete-input {
+	border: 1px solid #dddddd;
+	color: #222222;
+	background: #ffffff;
+}
+*/
+.ui-autocomplete-results {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Verdana, Arial, sans-serif;
+	font-size: 1.1em;
+	z-index: 9999;	
+}
+.ui-autocomplete-results ul, .ui-autocomplete-results li {
+	margin: 0; 
+	padding: 0; 
+	list-style: none;
+}
+.ui-autocomplete-results ul {
+	border: 1px solid #dddddd;
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_0.png) 0 0 repeat-x;
+	border-top: 0;
+	border-bottom: 0;
+	margin-bottom: -1px;
+}
+.ui-autocomplete-results li {
+	color: #222222;
+	padding: .4em .5em;
+	font-size: 1em;
+	font-weight: normal;
+	position: relative;
+	margin: 1px 0;
+}
+.ui-autocomplete-results li.ui-hover-state, .ui-autocomplete-results li.ui-active-state {
+	margin: 0;
+}
+
+.ui-autocomplete-results li.ui-autocomplete-over {
+	border-top: 1px solid #999999;
+	border-bottom: 1px solid #999999;
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	color: #212121 !important;
+}
+.ui-autocomplete-results li.ui-autocomplete-active {
+	border-top: 1px solid #dddddd;
+	border-bottom: 1px solid #dddddd;
+	background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;
+	color: #222222 !important;
+	outline: none;
+}
+.ui-autocomplete-results li:first-child, .ui-autocomplete-results li.first  {
+	margin-top: 0;
+}
+.ui-autocomplete-results li:last-child, .ui-autocomplete-results li.last {
+	margin-bottom: 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+/*UI ProgressBar */
+.ui-progressbar {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Verdana, Arial, sans-serif;
+	font-size: 1.1em;
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_0.png) 0 0 repeat-x;
+	border: 1px solid #dddddd;
+	position: relative;
+	height: 1.8em;
+}
+.ui-progressbar-bar {
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	overflow: hidden;
+	border: 1px solid #d3d3d3;
+	margin:-1px;
+	z-index: 2;
+	position: relative;
+	height: 1.8em;
+	opacity:.7;
+	filter:Alpha(Opacity=70);
+}
+.ui-progressbar-wrap {
+	position: absolute;
+	top: 0;
+	left: 0;
+}
+.ui-progressbar-text {
+	color: #555555;
+	padding: .2em .5em;
+	font-weight: normal;
+	position: absolute;
+	top: 0;
+	left: 0;
+}
+.ui-progressbar-text-back {
+	color:  #222222;
+	z-index: 0;
+}
+.ui-progressbar-disabled {
+	opacity:.5;
+	filter:Alpha(Opacity=50);
+}
+
+
+
+
+
+
+/*UI Colorpicker */
+.ui-colorpicker {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Verdana, Arial, sans-serif;
+	font-size: 1.1em;
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_0.png) 0 0 repeat-x;
+	border: 4px solid #dddddd;
+	padding: 5px;
+	width: 360px;
+	position: relative;
+}
+.ui-colorpicker-color {
+	float: left;
+	width: 150px;
+	height: 150px;
+	margin-right: 15px;
+}
+.ui-colorpicker-color div { /* is this extra div needed? why not just .ui-colorpicker-color ? */
+	border: 1px solid #d3d3d3;
+	height: 150px;
+	background: url(images/_x_.);
+	position: relative;
+}
+.ui-colorpicker-color div div {/* shouldn't this have a class like ui-colorpicker-selector ? */
+	width: 11px;
+	height: 11px;
+	background: url(images/_x_.);
+	position: absolute;
+	border: 0;
+	margin: -5px 0 0 -5px;
+	float: none;
+}
+.ui-colorpicker-hue {
+	border: 1px solid #d3d3d3;
+	float: left;
+	width: 17px;
+	height: 150px;
+	background: url(images/_x_.);
+	position: relative;
+	margin-right: 15px;
+}
+.ui-colorpicker-hue div {
+	background:transparent url(images/222222_35x9_colorpicker_indicator.gif.gif); 
+	height:9px;
+	left:-9px;
+	margin:-4px 0 0;
+	position:absolute;
+	width:35px;
+	cursor: ns-resize;
+}
+.ui-colorpicker-new-color, .ui-colorpicker-current-color {
+	float: left;
+	width: 6.5em;
+	height: 30px;
+	border: 1px solid #d3d3d3;
+	margin-right: 5px;
+}
+.ui-colorpicker-current-color {
+	margin-right: 0;
+}
+
+.ui-colorpicker-field, .ui-colorpicker-hex {
+	position: absolute;
+	width: 6em;
+}
+.ui-colorpicker-field label, .ui-colorpicker-field input,
+.ui-colorpicker-hex label, .ui-colorpicker-hex input {
+	font-size: 1em;
+	color: #222222;
+}
+.ui-colorpicker-field label, .ui-colorpicker-hex label {
+	width: 1em;
+	margin-right: .3em;
+}
+.ui-colorpicker-field input, .ui-colorpicker-hex input {
+	border: 1px solid #dddddd;
+	color: #222222;
+	background: #ffffff;
+	width: 4.6em;
+}
+.ui-colorpicker-hex {
+	left: 205px;
+	top: 134px;
+}
+.ui-colorpicker-rgb-r {
+	top: 52px;
+	left: 205px;
+}
+.ui-colorpicker-rgb-g {
+	top: 78px;
+	left: 205px;
+}
+.ui-colorpicker-rgb-b {
+	top: 105px;
+	left: 205px;
+}
+.ui-colorpicker-hsb-h {
+	top: 52px;
+	left: 290px;
+}
+.ui-colorpicker-hsb-s {
+	top: 78px;
+	left: 290px;
+}
+.ui-colorpicker-hsb-b {
+	top: 105px;
+	left: 290px;
+}
+
+.ui-colorpicker-field label {
+	font-weight: normal;
+}
+.ui-colorpicker-field span {
+	width: 7px;
+	background: url(images/888888_11x11_icon_arrows_updown.gif) 50% 50% no-repeat;
+	right: 5px;
+	top: 0;
+	height: 20px;
+	position: absolute;
+}
+.ui-colorpicker-field span:hover {
+	background: url(images/454545_11x11_icon_arrows_updown.gif) 50% 50% no-repeat;
+}
+
+.ui-colorpicker-submit {
+	right: 14px;
+	top: 134px;
+	position: absolute;
+}
+
+
+
+
+
+
+
+
+/*
+Generic ThemeRoller Classes
+>> Make your jQuery Components ThemeRoller-Compatible!
+*/
+
+/*component global class*/
+.ui-component {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Verdana, Arial, sans-serif;
+	font-size: 1.1em;
+}
+/*component content styles*/
+.ui-component-content {
+	border: 1px solid #dddddd;
+	background: #ffffff url(images/ffffff_40x100_textures_01_flat_0.png) 0 0 repeat-x;
+	color: #222222;
+}
+.ui-component-content a {
+	color: #222222;
+	text-decoration: underline;
+}
+/*component states*/
+.ui-default-state {
+	border: 1px solid #d3d3d3;
+	background: #e6e6e6 url(images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	font-weight: normal;
+	color: #555555 !important;
+}
+.ui-default-state a {
+	color: #555555;
+}
+.ui-default-state:hover, .ui-hover-state {
+	border: 1px solid #999999;
+	background: #dadada url(images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;
+	font-weight: normal;
+	color: #212121 !important;
+}
+.ui-hover-state a {
+	color: #212121;
+}
+.ui-default-state:active, .ui-active-state {
+	border: 1px solid #dddddd;
+	background: #ffffff url(images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x;
+	font-weight: normal;
+	color: #222222 !important;
+	outline: none;
+}
+.ui-active-state a {
+	color: #222222;
+	outline: none;
+}
+/*icons*/
+.ui-arrow-right-default {background: url(images/888888_7x7_arrow_right.gif) no-repeat 50% 50%;}
+.ui-arrow-right-default:hover, .ui-arrow-right-hover {background: url(images/454545_7x7_arrow_right.gif) no-repeat 50% 50%;}
+.ui-arrow-right-default:active, .ui-arrow-right-active {background: url(images/222222_7x7_arrow_right.gif) no-repeat 50% 50%;}
+.ui-arrow-right-content {background: url(images/222222_7x7_arrow_right.gif) no-repeat 50% 50%;}
+
+.ui-arrow-left-default {background: url(images/888888_7x7_arrow_left.gif) no-repeat 50% 50%;}
+.ui-arrow-left-default:hover, .ui-arrow-left-hover {background: url(images/454545_7x7_arrow_left.gif) no-repeat 50% 50%;}
+.ui-arrow-left-default:active, .ui-arrow-left-active {background: url(images/222222_7x7_arrow_left.gif) no-repeat 50% 50%;}
+.ui-arrow-left-content {background: url(images/222222_7x7_arrow_left.gif) no-repeat 50% 50%;}
+
+.ui-arrow-down-default {background: url(images/888888_7x7_arrow_down.gif) no-repeat 50% 50%;}
+.ui-arrow-down-default:hover, .ui-arrow-down-hover {background: url(images/454545_7x7_arrow_down.gif) no-repeat 50% 50%;}
+.ui-arrow-down-default:active, .ui-arrow-down-active {background: url(images/222222_7x7_arrow_down.gif) no-repeat 50% 50%;}
+.ui-arrow-down-content {background: url(images/222222_7x7_arrow_down.gif) no-repeat 50% 50%;}
+
+.ui-arrow-up-default {background: url(images/888888_7x7_arrow_up.gif) no-repeat 50% 50%;}
+.ui-arrow-up-default:hover, .ui-arrow-up-hover {background: url(images/454545_7x7_arrow_up.gif) no-repeat 50% 50%;}
+.ui-arrow-up-default:active, .ui-arrow-up-active {background: url(images/222222_7x7_arrow_up.gif) no-repeat 50% 50%;}
+.ui-arrow-up-content {background: url(images/222222_7x7_arrow_up.gif) no-repeat 50% 50%;}
+
+.ui-close-default {background: url(images/888888_11x11_icon_close.gif) no-repeat 50% 50%;}
+.ui-close-default:hover, .ui-close-hover {background: url(images/454545_11x11_icon_close.gif) no-repeat 50% 50%;}
+.ui-close-default:active, .ui-close-active {background: url(images/222222_11x11_icon_close.gif) no-repeat 50% 50%;}
+.ui-close-content {background: url(images/222222_11x11_icon_close.gif) no-repeat 50% 50%;}
+
+.ui-folder-closed-default {background: url(images/888888_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+.ui-folder-closed-default:hover, .ui-folder-closed-hover {background: url(images/454545_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+.ui-folder-closed-default:active, .ui-folder-closed-active {background: url(images/222222_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+.ui-folder-closed-content {background: url(images/888888_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+
+.ui-folder-open-default {background: url(images/888888_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+.ui-folder-open-default:hover, .ui-folder-open-hover {background: url(images/454545_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+.ui-folder-open-default:active, .ui-folder-open-active {background: url(images/222222_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+.ui-folder-open-content {background: url(images/222222_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+
+.ui-doc-default {background: url(images/888888_11x11_icon_doc.gif) no-repeat 50% 50%;}
+.ui-doc-default:hover, .ui-doc-hover {background: url(images/454545_11x11_icon_doc.gif) no-repeat 50% 50%;}
+.ui-doc-default:active, .ui-doc-active {background: url(images/222222_11x11_icon_doc.gif) no-repeat 50% 50%;}
+.ui-doc-content {background: url(images/222222_11x11_icon_doc.gif) no-repeat 50% 50%;}
+
+.ui-arrows-leftright-default {background: url(images/888888_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+.ui-arrows-leftright-default:hover, .ui-arrows-leftright-hover {background: url(images/454545_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+.ui-arrows-leftright-default:active, .ui-arrows-leftright-active {background: url(images/222222_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+.ui-arrows-leftright-content {background: url(images/222222_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+
+.ui-arrows-updown-default {background: url(images/888888_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+.ui-arrows-updown-default:hover, .ui-arrows-updown-hover {background: url(images/454545_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+.ui-arrows-updown-default:active, .ui-arrows-updown-active {background: url(images/222222_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+.ui-arrows-updown-content {background: url(images/222222_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+
+.ui-minus-default {background: url(images/888888_11x11_icon_minus.gif) no-repeat 50% 50%;}
+.ui-minus-default:hover, .ui-minus-hover {background: url(images/454545_11x11_icon_minus.gif) no-repeat 50% 50%;}
+.ui-minus-default:active, .ui-minus-active {background: url(images/222222_11x11_icon_minus.gif) no-repeat 50% 50%;}
+.ui-minus-content {background: url(images/222222_11x11_icon_minus.gif) no-repeat 50% 50%;}
+
+.ui-plus-default {background: url(images/888888_11x11_icon_plus.gif) no-repeat 50% 50%;}
+.ui-plus-default:hover, .ui-plus-hover {background: url(images/454545_11x11_icon_plus.gif) no-repeat 50% 50%;}
+.ui-plus-default:active, .ui-plus-active {background: url(images/222222_11x11_icon_plus.gif) no-repeat 50% 50%;}
+.ui-plus-content {background: url(images/222222_11x11_icon_plus.gif) no-repeat 50% 50%;}
+
+/*hidden elements*/
+.ui-hidden {
+	display: none;/* for accessible hiding: position: absolute; left: -99999999px*/;
+}
+.ui-accessible-hidden {
+	 position: absolute; left: -99999999px;
+}
+/*reset styles*/
+.ui-reset {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+}
+/*clearfix class*/
+.ui-clearfix:after {
+    content: "."; 
+    display: block; 
+    height: 0; 
+    clear: both; 
+    visibility: hidden;
+}
+.ui-clearfix {display: inline-block;}
+/* Hides from IE-mac \*/
+* html .ui-clearfix {height: 1%;}
+.ui-clearfix {display: block;}
+/* End hide from IE-mac */
+
+/* Note: for resizable styles, use the styles listed above in the dialog section */
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/display_messages.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/display_messages.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/display_messages.jsp
new file mode 100644
index 0000000..84def3a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/display_messages.jsp
@@ -0,0 +1,90 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
+<%@ page import="org.wso2.carbon.ui.util.CharacterEncoder" %>
+
+<script type="text/javascript">
+    var msgId;
+    <%
+    if(CharacterEncoder.getSafeText(request.getParameter("msgId")) == null){
+    %>
+    msgId = '<%="MSG" + System.currentTimeMillis() + Math.random()%>';
+    <%
+    } else {
+    %>
+    msgId = '<%=CharacterEncoder.getSafeText(request.getParameter("msgId"))%>';
+    <%
+    }
+    %>
+</script>
+
+<%
+    //First checks whether there is a CarbonUIMessage in the request
+    CarbonUIMessage carbonMessage = (CarbonUIMessage) session.getAttribute(CarbonUIMessage.ID);
+
+    if(carbonMessage == null){
+        carbonMessage = (CarbonUIMessage) request.getAttribute(CarbonUIMessage.ID);
+    } else {
+        session.removeAttribute(CarbonUIMessage.ID);
+    }
+
+    if (carbonMessage != null) {
+        String message = carbonMessage.getMessage();
+        String messageType = carbonMessage.getMessageType();
+        if (message == null || message.equals("") || messageType == null) {
+        } else {
+            if (messageType.equals(CarbonUIMessage.INFO)) {
+%>
+            <script type="text/javascript">
+                jQuery(document).ready(function() {
+                    if (getCookie(msgId) == null) {
+                        CARBON.showInfoDialog("<%= carbonMessage.getMessage()%>");
+                        setCookie(msgId, 'true');
+                    }                    
+                });
+
+            </script>
+<%
+            } else if (messageType.equals(CarbonUIMessage.WARNING)) {
+%>
+            <script type="text/javascript">
+                jQuery(document).ready(function() {
+                    if (getCookie(msgId) == null) {
+                        CARBON.showWarningDialog("<%= carbonMessage.getMessage()%>");
+                        setCookie(msgId, 'true');
+                    }
+                });
+            </script>
+<%
+            } else if (messageType.equals(CarbonUIMessage.ERROR)) {
+%>
+            <script type="text/javascript">
+                jQuery(document).ready(function() {
+                    if (getCookie(msgId) == null) {
+                        CARBON.showErrorDialog("<%= carbonMessage.getMessage()%>");
+                        setCookie(msgId, 'true');
+                    }
+                });
+            </script>
+<%
+            }
+        }
+    }
+%>
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/confirm.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/confirm.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/confirm.gif
new file mode 100644
index 0000000..6c719b3
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/confirm.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/error.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/error.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/error.gif
new file mode 100644
index 0000000..b8da205
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/error.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/info.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/info.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/info.gif
new file mode 100644
index 0000000..31ecb4e
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/info.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/overlay.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/overlay.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/overlay.png
new file mode 100644
index 0000000..e33524e
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/overlay.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/warning.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/warning.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/warning.gif
new file mode 100644
index 0000000..b4ba52f
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/img/warning.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/dialog.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/dialog.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/dialog.js
new file mode 100644
index 0000000..efa834f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/dialog.js
@@ -0,0 +1,369 @@
+if (typeof CARBON == "undefined" || CARBON) {
+    /**
+     * The CARBON global namespace object. If CARBON is already defined, the
+     * existing CARBON object will not be overwirrten so that defined
+     * namespaces are preserved
+     */
+    var CARBON = {};
+}
+
+var pageLoaded = false;
+
+jQuery(document).ready(function() {
+    pageLoaded = true;
+});
+
+/**
+ * Display the Warning Message inside a jQuery UI's dialog widget.
+ * @method showWarningDialog
+ * @param {String} message to display
+ * @return {Boolean}
+ */
+CARBON.showWarningDialog = function(message, callback, closeCallback) {
+    var strDialog = "<div id='dialog' title='WSO2 Carbon'><div id='messagebox-warning'><p>" +
+                    message + "</p></div></div>";
+    //var strDialog = "<div id='dialog' title='WSO2 Carbon'><div id='messagebox'><img src='img/warning.gif'/><p>" +
+    //                message + "</p></div></div>";
+ 	var func = function() {   
+    	    jQuery("#dcontainer").html(strDialog);
+    
+	    jQuery("#dialog").dialog({
+	        close:function() {
+	            jQuery(this).dialog('destroy').remove();
+	            jQuery("#dcontainer").empty();
+	            if (closeCallback && typeof closeCallback == "function") {
+	                closeCallback();
+	            }
+	            return false;
+	        },
+	        buttons:{
+	            "OK":function() {
+	                jQuery(this).dialog("destroy").remove();
+	                jQuery("#dcontainer").empty();
+	                if(callback && typeof callback == "function")
+	                    callback();
+	                return false;
+	            }
+	        },
+	        height:160,
+	        width:450,
+	        minHeight:160,
+	        minWidth:330,
+	        modal:true
+	    });
+	};
+    if (!pageLoaded) {
+        jQuery(document).ready(func);
+    } else {
+        func();
+    }
+
+};
+
+/**
+ * Display the Error Message inside a jQuery UI's dialog widget.
+ * @method showErrorDialog
+ * @param {String} message to display
+ * @return {Boolean}
+ */
+CARBON.showErrorDialog = function(message, callback, closeCallback) {
+    var strDialog = "<div id='dialog' title='WSO2 Carbon'><div id='messagebox-error'><p>" +
+                    message + "</p></div></div>";
+    //var strDialog = "<div id='dialog' title='WSO2 Carbon'><div id='messagebox'><img src='img/error.gif'/><p>" +
+    //                message + "</p></div></div>";
+    var func = function() {   
+            jQuery("#dcontainer").html(strDialog);
+
+	    jQuery("#dialog").dialog({
+	        close:function() {
+	            jQuery(this).dialog('destroy').remove();
+	            jQuery("#dcontainer").empty();
+	            if (closeCallback && typeof closeCallback == "function") {
+	                closeCallback();
+	            }
+	            return false;
+	        },
+	        buttons:{
+	            "OK":function() {
+	                jQuery(this).dialog("destroy").remove();
+	                jQuery("#dcontainer").empty();
+	                if(callback && typeof callback == "function")
+	                    callback();
+	                return false;
+	            }
+	        },
+	        height:200,
+	        width:490,
+	        minHeight:160,
+	        minWidth:330,
+	        modal:true
+	    });
+    };
+    if (!pageLoaded) {
+        jQuery(document).ready(func);
+    } else {
+        func();
+    }
+
+};
+
+/**
+ * Display the Info Message inside a jQuery UI's dialog widget.
+ * @method showInfoDialog
+ * @param {String} message to display
+ * @return {Boolean}
+ */
+CARBON.showInfoDialog = function(message, callback, closeCallback) {
+    var strDialog = "<div id='dialog' title='WSO2 Carbon'><div id='messagebox-info'><p>" +
+                     message + "</p></div></div>";
+    //var strDialog = "<div id='dialog' title='WSO2 Carbon'><div id='messagebox'><img src='img/info.gif'/><p>" +
+    //                message + "</p></div></div>";
+    var func = function() {   
+	    jQuery("#dcontainer").html(strDialog);
+	
+	    jQuery("#dialog").dialog({
+	        close:function() {
+	            jQuery(this).dialog('destroy').remove();
+	            jQuery("#dcontainer").empty();
+	            if (closeCallback && typeof closeCallback == "function") {
+	                closeCallback();
+	            }
+	            return false;
+	        },
+	        buttons:{
+	            "OK":function() {
+	                jQuery(this).dialog("destroy").remove();
+	                jQuery("#dcontainer").empty();
+	                if(callback && typeof callback == "function")
+	                    callback();
+	                return false;
+	            }
+	        },
+	        height:160,
+	        width:450,
+	        minHeight:160,
+	        minWidth:330,
+	        modal:true
+	    });
+       };
+    if (!pageLoaded) {
+        jQuery(document).ready(func);
+    } else {
+        func();
+    }
+
+};
+
+/**
+ * Display the Confirmation dialog.
+ * @method showConfirmationDialog
+ * @param {String} message to display
+ * @param {Function} handleYes callback function to execute after user press Yes button
+ * @param {Function} handleNo callback function to execute after user press No button
+ * @return {Boolean} It's prefer to return boolean always from your callback functions to maintain consistency.
+ */
+CARBON.showConfirmationDialog = function(message, handleYes, handleNo, closeCallback){
+    /* This function always assume that your second parameter is handleYes function and third parameter is handleNo function.
+     * If you are not going to provide handleYes function and want to give handleNo callback please pass null as the second
+     * parameter.
+     */
+    var strDialog = "<div id='dialog' title='WSO2 Carbon'><div id='messagebox-confirm'><p>" +
+                    message + "</p></div></div>";
+
+    handleYes = handleYes || function(){return true};
+
+    handleNo = handleNo || function(){return false};
+    var func = function() {   
+	    jQuery("#dcontainer").html(strDialog);
+	
+	    jQuery("#dialog").dialog({
+	        close:function() {
+	            jQuery(this).dialog('destroy').remove();
+	            jQuery("#dcontainer").empty();
+	            if (closeCallback && typeof closeCallback == "function") {
+	                closeCallback();
+	            }
+	            return false;
+	        },
+	        buttons:{
+	            "Yes":function() {
+	                jQuery(this).dialog("destroy").remove();
+	                jQuery("#dcontainer").empty();
+	                handleYes();
+	            },
+	            "No":function(){
+	                jQuery(this).dialog("destroy").remove();
+	                jQuery("#dcontainer").empty();
+	                handleNo();
+	            }
+	        },
+	        height:160,
+	        width:450,
+	        minHeight:160,
+	        minWidth:330,
+	        modal:true
+	    });
+    };
+    if (!pageLoaded) {
+        jQuery(document).ready(func);
+    } else {
+        func();
+    }
+    return false;
+}
+
+/**
+ * Display the Info Message inside a jQuery UI's dialog widget.
+ * @method showPopupDialog
+ * @param {String} message to display
+ * @return {Boolean}
+ */
+CARBON.showPopupDialog = function(message, title, windowHight, okButton, callback, windowWidth) {
+    var strDialog = "<div id='dialog' title='" + title + "'><div id='popupDialog'></div>" + message + "</div>";
+    var requiredWidth = 750;
+    if (windowWidth) {
+        requiredWidth = windowWidth;
+    }
+    var func = function() { 
+    jQuery("#dcontainer").html(strDialog);
+    if (okButton) {
+        jQuery("#dialog").dialog({
+            close:function() {
+                jQuery(this).dialog('destroy').remove();
+                jQuery("#dcontainer").empty();
+                return false;
+            },
+            buttons:{
+                "OK":function() {
+                    if (callback && typeof callback == "function")
+                        callback();
+                    jQuery(this).dialog("destroy").remove();
+                    jQuery("#dcontainer").empty();
+                    return false;
+                }
+            },
+            height:windowHight,
+            width:requiredWidth,
+            minHeight:windowHight,
+            minWidth:requiredWidth,
+            modal:true
+        });
+    } else {
+        jQuery("#dialog").dialog({
+            close:function() {
+                jQuery(this).dialog('destroy').remove();
+                jQuery("#dcontainer").empty();
+                return false;
+            },
+            height:windowHight,
+            width:requiredWidth,
+            minHeight:windowHight,
+            minWidth:requiredWidth,
+            modal:true
+        });
+    }
+	
+	jQuery('.ui-dialog-titlebar-close').click(function(){
+				jQuery('#dialog').dialog("destroy").remove();
+                jQuery("#dcontainer").empty();
+				jQuery("#dcontainer").html('');
+		});
+	
+    };
+    if (!pageLoaded) {
+        jQuery(document).ready(func);
+    } else {
+        func();
+    }
+};
+
+/**
+ * Display the Input dialog.
+ * @method showInputDialog
+ * @param {String} message to display
+ * @param {Function} handleOk callback function to execute after user press OK button.
+ * @param {Function} handleCancel callback function to execute after user press Cancel button
+ * @param {Function} closeCallback callback function to execute after user close the dialog button.
+ * @return {Boolean} It's prefer to return boolean always from your callback functions to maintain consistency.
+ *
+ * handleOk function signature
+ * ---------------------------
+ * function(inputText){
+ *  //logic
+ * }
+ */
+CARBON.showInputDialog = function(message, handleOk, handleCancel, closeCallback){
+    var strInput = "<div style='margin:20px;'><p>"+message+ "</p><br/>"+
+                   "<input type='text' id='carbon-ui-dialog-input' size='40' name='carbon-dialog-inputval'></div>";
+    var strDialog = "<div id='dialog' title='WSO2 Carbon'>" + strInput + "</div>";
+    var func = function() {   
+	    jQuery("#dcontainer").html(strDialog);
+	    jQuery("#dialog").dialog({
+	        close:function() {
+	            jQuery(this).dialog('destroy').remove();
+	            jQuery("#dcontainer").empty();
+	            if (closeCallback && typeof closeCallback == "function") {
+	                closeCallback();
+	            }
+	            return false;
+	        },
+	        buttons:{
+	            "OK":function() {
+	                var inputVal = jQuery('input[name=carbon-dialog-inputval]').fieldValue();
+	                handleOk(inputVal);
+	                jQuery(this).dialog("destroy").remove();
+	                jQuery("#dcontainer").empty();
+	                return false;
+	            },
+	            "Cancel":function(){
+	                jQuery(this).dialog("destroy").remove();
+	                jQuery("#dcontainer").empty();
+	                handleCancel();
+	            }
+	        },
+	        height:160,
+	        width:450,
+	        minHeight:160,
+	        minWidth:330,
+	        modal:true
+	    });
+    };
+    if (!pageLoaded) {
+        jQuery(document).ready(func);
+    } else {
+        func();
+    }
+}
+/**
+ * Display the loading dialog.
+ * @method showLoadingDialog
+ * @param {String} message to display
+ * @param {Function} handleRemoveMessage callback function to triger the removal of the message.
+ * handleOk function signature
+ * ---------------------------
+ * function(inputText){
+ *  //logic
+ * }
+ */
+CARBON.showLoadingDialog = function(message, handleRemoveMessage){
+    //var strInput = "<div id='dcontainer' style='margin:20px;'><p><img src='../admin/images/loading.gif' />"+message+ "</p><br/></div>";
+
+
+    var func = function() {
+        var windowHeight = 20;
+        var windowWidth = 100 + message.length*7;
+        var strDialog = '<div class="ui-dialog-overlay" style="border-width: 0pt; margin: 0pt; padding: 0pt; position: absolute; top: 0pt; left: 0pt; width: ' + jQuery(document).width() + 'px; height: ' + jQuery(document).height() + 'px; z-index: 1001;">' +
+                        '<div class="loadingDialogBox" style="background-color:#fff;border-radious:5px; -moz-border-radious:5px;possition:absolute;margin-top:' + (( jQuery(window).height() - windowHeight ) / 2+jQuery(window).scrollTop()) + 'px;margin-left:' + (( jQuery(window).width() - windowWidth ) / 2+jQuery(window).scrollLeft()) + 'px;height:'+windowHeight+'px;width:'+windowWidth+'px;">' + message + '</div>' +
+                        '</div>';
+        jQuery("#dcontainer").html(strDialog);
+
+    };
+    if (!pageLoaded) {
+        jQuery(document).ready(func);
+    } else {
+        func();
+    }
+}
+CARBON.closeWindow = function(){
+jQuery("#dialog").dialog("destroy").remove();
+}


[25/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/controls.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/controls.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/controls.js
new file mode 100644
index 0000000..46f2cc1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/controls.js
@@ -0,0 +1,835 @@
+// script.aculo.us controls.js v1.7.0, Fri Jan 19 19:16:36 CET 2007
+
+// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//           (c) 2005, 2006 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
+//           (c) 2005, 2006 Jon Tirsen (http://www.tirsen.com)
+// Contributors:
+//  Richard Livsey
+//  Rahul Bhargava
+//  Rob Wills
+// 
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// Autocompleter.Base handles all the autocompletion functionality 
+// that's independent of the data source for autocompletion. This
+// includes drawing the autocompletion menu, observing keyboard
+// and mouse events, and similar.
+//
+// Specific autocompleters need to provide, at the very least, 
+// a getUpdatedChoices function that will be invoked every time
+// the text inside the monitored textbox changes. This method 
+// should get the text for which to provide autocompletion by
+// invoking this.getToken(), NOT by directly accessing
+// this.element.value. This is to allow incremental tokenized
+// autocompletion. Specific auto-completion logic (AJAX, etc)
+// belongs in getUpdatedChoices.
+//
+// Tokenized incremental autocompletion is enabled automatically
+// when an autocompleter is instantiated with the 'tokens' option
+// in the options parameter, e.g.:
+// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' });
+// will incrementally autocomplete with a comma as the token.
+// Additionally, ',' in the above example can be replaced with
+// a token array, e.g. { tokens: [',', '\n'] } which
+// enables autocompletion on multiple tokens. This is most 
+// useful when one of the tokens is \n (a newline), as it 
+// allows smart autocompletion after linebreaks.
+
+if(typeof Effect == 'undefined')
+  throw("controls.js requires including script.aculo.us' effects.js library");
+
+var Autocompleter = {}
+Autocompleter.Base = function() {};
+Autocompleter.Base.prototype = {
+  baseInitialize: function(element, update, options) {
+    this.element     = $(element); 
+    this.update      = $(update);  
+    this.hasFocus    = false; 
+    this.changed     = false; 
+    this.active      = false; 
+    this.index       = 0;     
+    this.entryCount  = 0;
+
+    if(this.setOptions)
+      this.setOptions(options);
+    else
+      this.options = options || {};
+
+    this.options.paramName    = this.options.paramName || this.element.name;
+    this.options.tokens       = this.options.tokens || [];
+    this.options.frequency    = this.options.frequency || 0.4;
+    this.options.minChars     = this.options.minChars || 1;
+    this.options.onShow       = this.options.onShow || 
+      function(element, update){ 
+        if(!update.style.position || update.style.position=='absolute') {
+          update.style.position = 'absolute';
+          Position.clone(element, update, {
+            setHeight: false, 
+            offsetTop: element.offsetHeight
+          });
+        }
+        Effect.Appear(update,{duration:0.15});
+      };
+    this.options.onHide = this.options.onHide || 
+      function(element, update){ new Effect.Fade(update,{duration:0.15}) };
+
+    if(typeof(this.options.tokens) == 'string') 
+      this.options.tokens = new Array(this.options.tokens);
+
+    this.observer = null;
+    
+    this.element.setAttribute('autocomplete','off');
+
+    Element.hide(this.update);
+
+    Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this));
+    Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this));
+  },
+
+  show: function() {
+    if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
+    if(!this.iefix && 
+      (navigator.appVersion.indexOf('MSIE')>0) &&
+      (navigator.userAgent.indexOf('Opera')<0) &&
+      (Element.getStyle(this.update, 'position')=='absolute')) {
+      new Insertion.After(this.update, 
+       '<iframe id="' + this.update.id + '_iefix" '+
+       'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' +
+       'src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
+      this.iefix = $(this.update.id+'_iefix');
+    }
+    if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);
+  },
+  
+  fixIEOverlapping: function() {
+    Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
+    this.iefix.style.zIndex = 1;
+    this.update.style.zIndex = 2;
+    Element.show(this.iefix);
+  },
+
+  hide: function() {
+    this.stopIndicator();
+    if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
+    if(this.iefix) Element.hide(this.iefix);
+  },
+
+  startIndicator: function() {
+    if(this.options.indicator) Element.show(this.options.indicator);
+  },
+
+  stopIndicator: function() {
+    if(this.options.indicator) Element.hide(this.options.indicator);
+  },
+
+  onKeyPress: function(event) {
+    if(this.active)
+      switch(event.keyCode) {
+       case Event.KEY_TAB:
+       case Event.KEY_RETURN:
+         this.selectEntry();
+         Event.stop(event);
+       case Event.KEY_ESC:
+         this.hide();
+         this.active = false;
+         Event.stop(event);
+         return;
+       case Event.KEY_LEFT:
+       case Event.KEY_RIGHT:
+         return;
+       case Event.KEY_UP:
+         this.markPrevious();
+         this.render();
+         if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event);
+         return;
+       case Event.KEY_DOWN:
+         this.markNext();
+         this.render();
+         if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event);
+         return;
+      }
+     else 
+       if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || 
+         (navigator.appVersion.indexOf('AppleWebKit') > 0 && event.keyCode == 0)) return;
+
+    this.changed = true;
+    this.hasFocus = true;
+
+    if(this.observer) clearTimeout(this.observer);
+      this.observer = 
+        setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
+  },
+
+  activate: function() {
+    this.changed = false;
+    this.hasFocus = true;
+    this.getUpdatedChoices();
+  },
+
+  onHover: function(event) {
+    var element = Event.findElement(event, 'LI');
+    if(this.index != element.autocompleteIndex) 
+    {
+        this.index = element.autocompleteIndex;
+        this.render();
+    }
+    Event.stop(event);
+  },
+  
+  onClick: function(event) {
+    var element = Event.findElement(event, 'LI');
+    this.index = element.autocompleteIndex;
+    this.selectEntry();
+    this.hide();
+  },
+  
+  onBlur: function(event) {
+    // needed to make click events working
+    setTimeout(this.hide.bind(this), 250);
+    this.hasFocus = false;
+    this.active = false;     
+  }, 
+  
+  render: function() {
+    if(this.entryCount > 0) {
+      for (var i = 0; i < this.entryCount; i++)
+        this.index==i ? 
+          Element.addClassName(this.getEntry(i),"selected") : 
+          Element.removeClassName(this.getEntry(i),"selected");
+        
+      if(this.hasFocus) { 
+        this.show();
+        this.active = true;
+      }
+    } else {
+      this.active = false;
+      this.hide();
+    }
+  },
+  
+  markPrevious: function() {
+    if(this.index > 0) this.index--
+      else this.index = this.entryCount-1;
+    this.getEntry(this.index).scrollIntoView(true);
+  },
+  
+  markNext: function() {
+    if(this.index < this.entryCount-1) this.index++
+      else this.index = 0;
+    this.getEntry(this.index).scrollIntoView(false);
+  },
+  
+  getEntry: function(index) {
+    return this.update.firstChild.childNodes[index];
+  },
+  
+  getCurrentEntry: function() {
+    return this.getEntry(this.index);
+  },
+  
+  selectEntry: function() {
+    this.active = false;
+    this.updateElement(this.getCurrentEntry());
+  },
+
+  updateElement: function(selectedElement) {
+    if (this.options.updateElement) {
+      this.options.updateElement(selectedElement);
+      return;
+    }
+    var value = '';
+    if (this.options.select) {
+      var nodes = document.getElementsByClassName(this.options.select, selectedElement) || [];
+      if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
+    } else
+      value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
+    
+    var lastTokenPos = this.findLastToken();
+    if (lastTokenPos != -1) {
+      var newValue = this.element.value.substr(0, lastTokenPos + 1);
+      var whitespace = this.element.value.substr(lastTokenPos + 1).match(/^\s+/);
+      if (whitespace)
+        newValue += whitespace[0];
+      this.element.value = newValue + value;
+    } else {
+      this.element.value = value;
+    }
+    this.element.focus();
+    
+    if (this.options.afterUpdateElement)
+      this.options.afterUpdateElement(this.element, selectedElement);
+  },
+
+  updateChoices: function(choices) {
+    if(!this.changed && this.hasFocus) {
+      this.update.innerHTML = choices;
+      Element.cleanWhitespace(this.update);
+      Element.cleanWhitespace(this.update.down());
+
+      if(this.update.firstChild && this.update.down().childNodes) {
+        this.entryCount = 
+          this.update.down().childNodes.length;
+        for (var i = 0; i < this.entryCount; i++) {
+          var entry = this.getEntry(i);
+          entry.autocompleteIndex = i;
+          this.addObservers(entry);
+        }
+      } else { 
+        this.entryCount = 0;
+      }
+
+      this.stopIndicator();
+      this.index = 0;
+      
+      if(this.entryCount==1 && this.options.autoSelect) {
+        this.selectEntry();
+        this.hide();
+      } else {
+        this.render();
+      }
+    }
+  },
+
+  addObservers: function(element) {
+    Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this));
+    Event.observe(element, "click", this.onClick.bindAsEventListener(this));
+  },
+
+  onObserverEvent: function() {
+    this.changed = false;   
+    if(this.getToken().length>=this.options.minChars) {
+      this.startIndicator();
+      this.getUpdatedChoices();
+    } else {
+      this.active = false;
+      this.hide();
+    }
+  },
+
+  getToken: function() {
+    var tokenPos = this.findLastToken();
+    if (tokenPos != -1)
+      var ret = this.element.value.substr(tokenPos + 1).replace(/^\s+/,'').replace(/\s+$/,'');
+    else
+      var ret = this.element.value;
+
+    return /\n/.test(ret) ? '' : ret;
+  },
+
+  findLastToken: function() {
+    var lastTokenPos = -1;
+
+    for (var i=0; i<this.options.tokens.length; i++) {
+      var thisTokenPos = this.element.value.lastIndexOf(this.options.tokens[i]);
+      if (thisTokenPos > lastTokenPos)
+        lastTokenPos = thisTokenPos;
+    }
+    return lastTokenPos;
+  }
+}
+
+Ajax.Autocompleter = Class.create();
+Object.extend(Object.extend(Ajax.Autocompleter.prototype, Autocompleter.Base.prototype), {
+  initialize: function(element, update, url, options) {
+    this.baseInitialize(element, update, options);
+    this.options.asynchronous  = true;
+    this.options.onComplete    = this.onComplete.bind(this);
+    this.options.defaultParams = this.options.parameters || null;
+    this.url                   = url;
+  },
+
+  getUpdatedChoices: function() {
+    entry = encodeURIComponent(this.options.paramName) + '=' + 
+      encodeURIComponent(this.getToken());
+
+    this.options.parameters = this.options.callback ?
+      this.options.callback(this.element, entry) : entry;
+
+    if(this.options.defaultParams) 
+      this.options.parameters += '&' + this.options.defaultParams;
+
+    new Ajax.Request(this.url, this.options);
+  },
+
+  onComplete: function(request) {
+    this.updateChoices(request.responseText);
+  }
+
+});
+
+// The local array autocompleter. Used when you'd prefer to
+// inject an array of autocompletion options into the page, rather
+// than sending out Ajax queries, which can be quite slow sometimes.
+//
+// The constructor takes four parameters. The first two are, as usual,
+// the id of the monitored textbox, and id of the autocompletion menu.
+// The third is the array you want to autocomplete from, and the fourth
+// is the options block.
+//
+// Extra local autocompletion options:
+// - choices - How many autocompletion choices to offer
+//
+// - partialSearch - If false, the autocompleter will match entered
+//                    text only at the beginning of strings in the 
+//                    autocomplete array. Defaults to true, which will
+//                    match text at the beginning of any *word* in the
+//                    strings in the autocomplete array. If you want to
+//                    search anywhere in the string, additionally set
+//                    the option fullSearch to true (default: off).
+//
+// - fullSsearch - Search anywhere in autocomplete array strings.
+//
+// - partialChars - How many characters to enter before triggering
+//                   a partial match (unlike minChars, which defines
+//                   how many characters are required to do any match
+//                   at all). Defaults to 2.
+//
+// - ignoreCase - Whether to ignore case when autocompleting.
+//                 Defaults to true.
+//
+// It's possible to pass in a custom function as the 'selector' 
+// option, if you prefer to write your own autocompletion logic.
+// In that case, the other options above will not apply unless
+// you support them.
+
+Autocompleter.Local = Class.create();
+Autocompleter.Local.prototype = Object.extend(new Autocompleter.Base(), {
+  initialize: function(element, update, array, options) {
+    this.baseInitialize(element, update, options);
+    this.options.array = array;
+  },
+
+  getUpdatedChoices: function() {
+    this.updateChoices(this.options.selector(this));
+  },
+
+  setOptions: function(options) {
+    this.options = Object.extend({
+      choices: 10,
+      partialSearch: true,
+      partialChars: 2,
+      ignoreCase: true,
+      fullSearch: false,
+      selector: function(instance) {
+        var ret       = []; // Beginning matches
+        var partial   = []; // Inside matches
+        var entry     = instance.getToken();
+        var count     = 0;
+
+        for (var i = 0; i < instance.options.array.length &&  
+          ret.length < instance.options.choices ; i++) { 
+
+          var elem = instance.options.array[i];
+          var foundPos = instance.options.ignoreCase ? 
+            elem.toLowerCase().indexOf(entry.toLowerCase()) : 
+            elem.indexOf(entry);
+
+          while (foundPos != -1) {
+            if (foundPos == 0 && elem.length != entry.length) { 
+              ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" + 
+                elem.substr(entry.length) + "</li>");
+              break;
+            } else if (entry.length >= instance.options.partialChars && 
+              instance.options.partialSearch && foundPos != -1) {
+              if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) {
+                partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" +
+                  elem.substr(foundPos, entry.length) + "</strong>" + elem.substr(
+                  foundPos + entry.length) + "</li>");
+                break;
+              }
+            }
+
+            foundPos = instance.options.ignoreCase ? 
+              elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : 
+              elem.indexOf(entry, foundPos + 1);
+
+          }
+        }
+        if (partial.length)
+          ret = ret.concat(partial.slice(0, instance.options.choices - ret.length))
+        return "<ul>" + ret.join('') + "</ul>";
+      }
+    }, options || {});
+  }
+});
+
+// AJAX in-place editor
+//
+// see documentation on http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor
+
+// Use this if you notice weird scrolling problems on some browsers,
+// the DOM might be a bit confused when this gets called so do this
+// waits 1 ms (with setTimeout) until it does the activation
+Field.scrollFreeActivate = function(field) {
+  setTimeout(function() {
+    Field.activate(field);
+  }, 1);
+}
+
+Ajax.InPlaceEditor = Class.create();
+Ajax.InPlaceEditor.defaultHighlightColor = "#FFFF99";
+Ajax.InPlaceEditor.prototype = {
+  initialize: function(element, url, options) {
+    this.url = url;
+    this.element = $(element);
+
+    this.options = Object.extend({
+      paramName: "value",
+      okButton: true,
+      okText: "ok",
+      cancelLink: true,
+      cancelText: "cancel",
+      savingText: "Saving...",
+      clickToEditText: "Click to edit",
+      okText: "ok",
+      rows: 1,
+      onComplete: function(transport, element) {
+        new Effect.Highlight(element, {startcolor: this.options.highlightcolor});
+      },
+      onFailure: function(transport) {
+        alert("Error communicating with the server: " + transport.responseText.stripTags());
+      },
+      callback: function(form) {
+        return Form.serialize(form);
+      },
+      handleLineBreaks: true,
+      loadingText: 'Loading...',
+      savingClassName: 'inplaceeditor-saving',
+      loadingClassName: 'inplaceeditor-loading',
+      formClassName: 'inplaceeditor-form',
+      highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor,
+      highlightendcolor: "#FFFFFF",
+      externalControl: null,
+      submitOnBlur: false,
+      ajaxOptions: {},
+      evalScripts: false
+    }, options || {});
+
+    if(!this.options.formId && this.element.id) {
+      this.options.formId = this.element.id + "-inplaceeditor";
+      if ($(this.options.formId)) {
+        // there's already a form with that name, don't specify an id
+        this.options.formId = null;
+      }
+    }
+    
+    if (this.options.externalControl) {
+      this.options.externalControl = $(this.options.externalControl);
+    }
+    
+    this.originalBackground = Element.getStyle(this.element, 'background-color');
+    if (!this.originalBackground) {
+      this.originalBackground = "transparent";
+    }
+    
+    this.element.title = this.options.clickToEditText;
+    
+    this.onclickListener = this.enterEditMode.bindAsEventListener(this);
+    this.mouseoverListener = this.enterHover.bindAsEventListener(this);
+    this.mouseoutListener = this.leaveHover.bindAsEventListener(this);
+    Event.observe(this.element, 'click', this.onclickListener);
+    Event.observe(this.element, 'mouseover', this.mouseoverListener);
+    Event.observe(this.element, 'mouseout', this.mouseoutListener);
+    if (this.options.externalControl) {
+      Event.observe(this.options.externalControl, 'click', this.onclickListener);
+      Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener);
+      Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener);
+    }
+  },
+  enterEditMode: function(evt) {
+    if (this.saving) return;
+    if (this.editing) return;
+    this.editing = true;
+    this.onEnterEditMode();
+    if (this.options.externalControl) {
+      Element.hide(this.options.externalControl);
+    }
+    Element.hide(this.element);
+    this.createForm();
+    this.element.parentNode.insertBefore(this.form, this.element);
+    if (!this.options.loadTextURL) Field.scrollFreeActivate(this.editField);
+    // stop the event to avoid a page refresh in Safari
+    if (evt) {
+      Event.stop(evt);
+    }
+    return false;
+  },
+  createForm: function() {
+    this.form = document.createElement("form");
+    this.form.id = this.options.formId;
+    Element.addClassName(this.form, this.options.formClassName)
+    this.form.onsubmit = this.onSubmit.bind(this);
+
+    this.createEditField();
+
+    if (this.options.textarea) {
+      var br = document.createElement("br");
+      this.form.appendChild(br);
+    }
+
+    if (this.options.okButton) {
+      okButton = document.createElement("input");
+      okButton.type = "submit";
+      okButton.value = this.options.okText;
+      okButton.className = 'editor_ok_button';
+      this.form.appendChild(okButton);
+    }
+
+    if (this.options.cancelLink) {
+      cancelLink = document.createElement("a");
+      cancelLink.href = "#";
+      cancelLink.appendChild(document.createTextNode(this.options.cancelText));
+      cancelLink.onclick = this.onclickCancel.bind(this);
+      cancelLink.className = 'editor_cancel';      
+      this.form.appendChild(cancelLink);
+    }
+  },
+  hasHTMLLineBreaks: function(string) {
+    if (!this.options.handleLineBreaks) return false;
+    return string.match(/<br/i) || string.match(/<p>/i);
+  },
+  convertHTMLLineBreaks: function(string) {
+    return string.replace(/<br>/gi, "\n").replace(/<br\/>/gi, "\n").replace(/<\/p>/gi, "\n").replace(/<p>/gi, "");
+  },
+  createEditField: function() {
+    var text;
+    if(this.options.loadTextURL) {
+      text = this.options.loadingText;
+    } else {
+      text = this.getText();
+    }
+
+    var obj = this;
+    
+    if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) {
+      this.options.textarea = false;
+      var textField = document.createElement("input");
+      textField.obj = this;
+      textField.type = "text";
+      textField.name = this.options.paramName;
+      textField.value = text;
+      textField.style.backgroundColor = this.options.highlightcolor;
+      textField.className = 'editor_field';
+      var size = this.options.size || this.options.cols || 0;
+      if (size != 0) textField.size = size;
+      if (this.options.submitOnBlur)
+        textField.onblur = this.onSubmit.bind(this);
+      this.editField = textField;
+    } else {
+      this.options.textarea = true;
+      var textArea = document.createElement("textarea");
+      textArea.obj = this;
+      textArea.name = this.options.paramName;
+      textArea.value = this.convertHTMLLineBreaks(text);
+      textArea.rows = this.options.rows;
+      textArea.cols = this.options.cols || 40;
+      textArea.className = 'editor_field';      
+      if (this.options.submitOnBlur)
+        textArea.onblur = this.onSubmit.bind(this);
+      this.editField = textArea;
+    }
+    
+    if(this.options.loadTextURL) {
+      this.loadExternalText();
+    }
+    this.form.appendChild(this.editField);
+  },
+  getText: function() {
+    return this.element.innerHTML;
+  },
+  loadExternalText: function() {
+    Element.addClassName(this.form, this.options.loadingClassName);
+    this.editField.disabled = true;
+    new Ajax.Request(
+      this.options.loadTextURL,
+      Object.extend({
+        asynchronous: true,
+        onComplete: this.onLoadedExternalText.bind(this)
+      }, this.options.ajaxOptions)
+    );
+  },
+  onLoadedExternalText: function(transport) {
+    Element.removeClassName(this.form, this.options.loadingClassName);
+    this.editField.disabled = false;
+    this.editField.value = transport.responseText.stripTags();
+    Field.scrollFreeActivate(this.editField);
+  },
+  onclickCancel: function() {
+    this.onComplete();
+    this.leaveEditMode();
+    return false;
+  },
+  onFailure: function(transport) {
+    this.options.onFailure(transport);
+    if (this.oldInnerHTML) {
+      this.element.innerHTML = this.oldInnerHTML;
+      this.oldInnerHTML = null;
+    }
+    return false;
+  },
+  onSubmit: function() {
+    // onLoading resets these so we need to save them away for the Ajax call
+    var form = this.form;
+    var value = this.editField.value;
+    
+    // do this first, sometimes the ajax call returns before we get a chance to switch on Saving...
+    // which means this will actually switch on Saving... *after* we've left edit mode causing Saving...
+    // to be displayed indefinitely
+    this.onLoading();
+    
+    if (this.options.evalScripts) {
+      new Ajax.Request(
+        this.url, Object.extend({
+          parameters: this.options.callback(form, value),
+          onComplete: this.onComplete.bind(this),
+          onFailure: this.onFailure.bind(this),
+          asynchronous:true, 
+          evalScripts:true
+        }, this.options.ajaxOptions));
+    } else  {
+      new Ajax.Updater(
+        { success: this.element,
+          // don't update on failure (this could be an option)
+          failure: null }, 
+        this.url, Object.extend({
+          parameters: this.options.callback(form, value),
+          onComplete: this.onComplete.bind(this),
+          onFailure: this.onFailure.bind(this)
+        }, this.options.ajaxOptions));
+    }
+    // stop the event to avoid a page refresh in Safari
+    if (arguments.length > 1) {
+      Event.stop(arguments[0]);
+    }
+    return false;
+  },
+  onLoading: function() {
+    this.saving = true;
+    this.removeForm();
+    this.leaveHover();
+    this.showSaving();
+  },
+  showSaving: function() {
+    this.oldInnerHTML = this.element.innerHTML;
+    this.element.innerHTML = this.options.savingText;
+    Element.addClassName(this.element, this.options.savingClassName);
+    this.element.style.backgroundColor = this.originalBackground;
+    Element.show(this.element);
+  },
+  removeForm: function() {
+    if(this.form) {
+      if (this.form.parentNode) Element.remove(this.form);
+      this.form = null;
+    }
+  },
+  enterHover: function() {
+    if (this.saving) return;
+    this.element.style.backgroundColor = this.options.highlightcolor;
+    if (this.effect) {
+      this.effect.cancel();
+    }
+    Element.addClassName(this.element, this.options.hoverClassName)
+  },
+  leaveHover: function() {
+    if (this.options.backgroundColor) {
+      this.element.style.backgroundColor = this.oldBackground;
+    }
+    Element.removeClassName(this.element, this.options.hoverClassName)
+    if (this.saving) return;
+    this.effect = new Effect.Highlight(this.element, {
+      startcolor: this.options.highlightcolor,
+      endcolor: this.options.highlightendcolor,
+      restorecolor: this.originalBackground
+    });
+  },
+  leaveEditMode: function() {
+    Element.removeClassName(this.element, this.options.savingClassName);
+    this.removeForm();
+    this.leaveHover();
+    this.element.style.backgroundColor = this.originalBackground;
+    Element.show(this.element);
+    if (this.options.externalControl) {
+      Element.show(this.options.externalControl);
+    }
+    this.editing = false;
+    this.saving = false;
+    this.oldInnerHTML = null;
+    this.onLeaveEditMode();
+  },
+  onComplete: function(transport) {
+    this.leaveEditMode();
+    this.options.onComplete.bind(this)(transport, this.element);
+  },
+  onEnterEditMode: function() {},
+  onLeaveEditMode: function() {},
+  dispose: function() {
+    if (this.oldInnerHTML) {
+      this.element.innerHTML = this.oldInnerHTML;
+    }
+    this.leaveEditMode();
+    Event.stopObserving(this.element, 'click', this.onclickListener);
+    Event.stopObserving(this.element, 'mouseover', this.mouseoverListener);
+    Event.stopObserving(this.element, 'mouseout', this.mouseoutListener);
+    if (this.options.externalControl) {
+      Event.stopObserving(this.options.externalControl, 'click', this.onclickListener);
+      Event.stopObserving(this.options.externalControl, 'mouseover', this.mouseoverListener);
+      Event.stopObserving(this.options.externalControl, 'mouseout', this.mouseoutListener);
+    }
+  }
+};
+
+Ajax.InPlaceCollectionEditor = Class.create();
+Object.extend(Ajax.InPlaceCollectionEditor.prototype, Ajax.InPlaceEditor.prototype);
+Object.extend(Ajax.InPlaceCollectionEditor.prototype, {
+  createEditField: function() {
+    if (!this.cached_selectTag) {
+      var selectTag = document.createElement("select");
+      var collection = this.options.collection || [];
+      var optionTag;
+      collection.each(function(e,i) {
+        optionTag = document.createElement("option");
+        optionTag.value = (e instanceof Array) ? e[0] : e;
+        if((typeof this.options.value == 'undefined') && 
+          ((e instanceof Array) ? this.element.innerHTML == e[1] : e == optionTag.value)) optionTag.selected = true;
+        if(this.options.value==optionTag.value) optionTag.selected = true;
+        optionTag.appendChild(document.createTextNode((e instanceof Array) ? e[1] : e));
+        selectTag.appendChild(optionTag);
+      }.bind(this));
+      this.cached_selectTag = selectTag;
+    }
+
+    this.editField = this.cached_selectTag;
+    if(this.options.loadTextURL) this.loadExternalText();
+    this.form.appendChild(this.editField);
+    this.options.callback = function(form, value) {
+      return "value=" + encodeURIComponent(value);
+    }
+  }
+});
+
+// Delayed observer, like Form.Element.Observer, 
+// but waits for delay after last key input
+// Ideal for live-search fields
+
+Form.Element.DelayedObserver = Class.create();
+Form.Element.DelayedObserver.prototype = {
+  initialize: function(element, delay, callback) {
+    this.delay     = delay || 0.5;
+    this.element   = $(element);
+    this.callback  = callback;
+    this.timer     = null;
+    this.lastValue = $F(this.element); 
+    Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this));
+  },
+  delayedListener: function(event) {
+    if(this.lastValue == $F(this.element)) return;
+    if(this.timer) clearTimeout(this.timer);
+    this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000);
+    this.lastValue = $F(this.element);
+  },
+  onTimerEvent: function() {
+    this.timer = null;
+    this.callback(this.element, $F(this.element));
+  }
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/dragdrop.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/dragdrop.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/dragdrop.js
new file mode 100644
index 0000000..32c91bc
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/ajax/js/scriptaculous/dragdrop.js
@@ -0,0 +1,944 @@
+// script.aculo.us dragdrop.js v1.7.0, Fri Jan 19 19:16:36 CET 2007
+
+// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//           (c) 2005, 2006 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)
+// 
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+if(typeof Effect == 'undefined')
+  throw("dragdrop.js requires including script.aculo.us' effects.js library");
+
+var Droppables = {
+  drops: [],
+
+  remove: function(element) {
+    this.drops = this.drops.reject(function(d) { return d.element==$(element) });
+  },
+
+  add: function(element) {
+    element = $(element);
+    var options = Object.extend({
+      greedy:     true,
+      hoverclass: null,
+      tree:       false
+    }, arguments[1] || {});
+
+    // cache containers
+    if(options.containment) {
+      options._containers = [];
+      var containment = options.containment;
+      if((typeof containment == 'object') && 
+        (containment.constructor == Array)) {
+        containment.each( function(c) { options._containers.push($(c)) });
+      } else {
+        options._containers.push($(containment));
+      }
+    }
+    
+    if(options.accept) options.accept = [options.accept].flatten();
+
+    Element.makePositioned(element); // fix IE
+    options.element = element;
+
+    this.drops.push(options);
+  },
+  
+  findDeepestChild: function(drops) {
+    deepest = drops[0];
+      
+    for (i = 1; i < drops.length; ++i)
+      if (Element.isParent(drops[i].element, deepest.element))
+        deepest = drops[i];
+    
+    return deepest;
+  },
+
+  isContained: function(element, drop) {
+    var containmentNode;
+    if(drop.tree) {
+      containmentNode = element.treeNode; 
+    } else {
+      containmentNode = element.parentNode;
+    }
+    return drop._containers.detect(function(c) { return containmentNode == c });
+  },
+  
+  isAffected: function(point, element, drop) {
+    return (
+      (drop.element!=element) &&
+      ((!drop._containers) ||
+        this.isContained(element, drop)) &&
+      ((!drop.accept) ||
+        (Element.classNames(element).detect( 
+          function(v) { return drop.accept.include(v) } ) )) &&
+      Position.within(drop.element, point[0], point[1]) );
+  },
+
+  deactivate: function(drop) {
+    if(drop.hoverclass)
+      Element.removeClassName(drop.element, drop.hoverclass);
+    this.last_active = null;
+  },
+
+  activate: function(drop) {
+    if(drop.hoverclass)
+      Element.addClassName(drop.element, drop.hoverclass);
+    this.last_active = drop;
+  },
+
+  show: function(point, element) {
+    if(!this.drops.length) return;
+    var affected = [];
+    
+    if(this.last_active) this.deactivate(this.last_active);
+    this.drops.each( function(drop) {
+      if(Droppables.isAffected(point, element, drop))
+        affected.push(drop);
+    });
+        
+    if(affected.length>0) {
+      drop = Droppables.findDeepestChild(affected);
+      Position.within(drop.element, point[0], point[1]);
+      if(drop.onHover)
+        drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element));
+      
+      Droppables.activate(drop);
+    }
+  },
+
+  fire: function(event, element) {
+    if(!this.last_active) return;
+    Position.prepare();
+
+    if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active))
+      if (this.last_active.onDrop) 
+        this.last_active.onDrop(element, this.last_active.element, event);
+  },
+
+  reset: function() {
+    if(this.last_active)
+      this.deactivate(this.last_active);
+  }
+}
+
+var Draggables = {
+  drags: [],
+  observers: [],
+  
+  register: function(draggable) {
+    if(this.drags.length == 0) {
+      this.eventMouseUp   = this.endDrag.bindAsEventListener(this);
+      this.eventMouseMove = this.updateDrag.bindAsEventListener(this);
+      this.eventKeypress  = this.keyPress.bindAsEventListener(this);
+      
+      Event.observe(document, "mouseup", this.eventMouseUp);
+      Event.observe(document, "mousemove", this.eventMouseMove);
+      Event.observe(document, "keypress", this.eventKeypress);
+    }
+    this.drags.push(draggable);
+  },
+  
+  unregister: function(draggable) {
+    this.drags = this.drags.reject(function(d) { return d==draggable });
+    if(this.drags.length == 0) {
+      Event.stopObserving(document, "mouseup", this.eventMouseUp);
+      Event.stopObserving(document, "mousemove", this.eventMouseMove);
+      Event.stopObserving(document, "keypress", this.eventKeypress);
+    }
+  },
+  
+  activate: function(draggable) {
+    if(draggable.options.delay) { 
+      this._timeout = setTimeout(function() { 
+        Draggables._timeout = null; 
+        window.focus(); 
+        Draggables.activeDraggable = draggable; 
+      }.bind(this), draggable.options.delay); 
+    } else {
+      window.focus(); // allows keypress events if window isn't currently focused, fails for Safari
+      this.activeDraggable = draggable;
+    }
+  },
+  
+  deactivate: function() {
+    this.activeDraggable = null;
+  },
+  
+  updateDrag: function(event) {
+    if(!this.activeDraggable) return;
+    var pointer = [Event.pointerX(event), Event.pointerY(event)];
+    // Mozilla-based browsers fire successive mousemove events with
+    // the same coordinates, prevent needless redrawing (moz bug?)
+    if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return;
+    this._lastPointer = pointer;
+    
+    this.activeDraggable.updateDrag(event, pointer);
+  },
+  
+  endDrag: function(event) {
+    if(this._timeout) { 
+      clearTimeout(this._timeout); 
+      this._timeout = null; 
+    }
+    if(!this.activeDraggable) return;
+    this._lastPointer = null;
+    this.activeDraggable.endDrag(event);
+    this.activeDraggable = null;
+  },
+  
+  keyPress: function(event) {
+    if(this.activeDraggable)
+      this.activeDraggable.keyPress(event);
+  },
+  
+  addObserver: function(observer) {
+    this.observers.push(observer);
+    this._cacheObserverCallbacks();
+  },
+  
+  removeObserver: function(element) {  // element instead of observer fixes mem leaks
+    this.observers = this.observers.reject( function(o) { return o.element==element });
+    this._cacheObserverCallbacks();
+  },
+  
+  notify: function(eventName, draggable, event) {  // 'onStart', 'onEnd', 'onDrag'
+    if(this[eventName+'Count'] > 0)
+      this.observers.each( function(o) {
+        if(o[eventName]) o[eventName](eventName, draggable, event);
+      });
+    if(draggable.options[eventName]) draggable.options[eventName](draggable, event);
+  },
+  
+  _cacheObserverCallbacks: function() {
+    ['onStart','onEnd','onDrag'].each( function(eventName) {
+      Draggables[eventName+'Count'] = Draggables.observers.select(
+        function(o) { return o[eventName]; }
+      ).length;
+    });
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var Draggable = Class.create();
+Draggable._dragging    = {};
+
+Draggable.prototype = {
+  initialize: function(element) {
+    var defaults = {
+      handle: false,
+      reverteffect: function(element, top_offset, left_offset) {
+        var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
+        new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur,
+          queue: {scope:'_draggable', position:'end'}
+        });
+      },
+      endeffect: function(element) {
+        var toOpacity = typeof element._opacity == 'number' ? element._opacity : 1.0;
+        new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity, 
+          queue: {scope:'_draggable', position:'end'},
+          afterFinish: function(){ 
+            Draggable._dragging[element] = false 
+          }
+        }); 
+      },
+      zindex: 1000,
+      revert: false,
+      scroll: false,
+      scrollSensitivity: 20,
+      scrollSpeed: 15,
+      snap: false,  // false, or xy or [x,y] or function(x,y){ return [x,y] }
+      delay: 0
+    };
+    
+    if(!arguments[1] || typeof arguments[1].endeffect == 'undefined')
+      Object.extend(defaults, {
+        starteffect: function(element) {
+          element._opacity = Element.getOpacity(element);
+          Draggable._dragging[element] = true;
+          new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7}); 
+        }
+      });
+    
+    var options = Object.extend(defaults, arguments[1] || {});
+
+    this.element = $(element);
+    
+    if(options.handle && (typeof options.handle == 'string'))
+      this.handle = this.element.down('.'+options.handle, 0);
+    
+    if(!this.handle) this.handle = $(options.handle);
+    if(!this.handle) this.handle = this.element;
+    
+    if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) {
+      options.scroll = $(options.scroll);
+      this._isScrollChild = Element.childOf(this.element, options.scroll);
+    }
+
+    Element.makePositioned(this.element); // fix IE    
+
+    this.delta    = this.currentDelta();
+    this.options  = options;
+    this.dragging = false;   
+
+    this.eventMouseDown = this.initDrag.bindAsEventListener(this);
+    Event.observe(this.handle, "mousedown", this.eventMouseDown);
+    
+    Draggables.register(this);
+  },
+  
+  destroy: function() {
+    Event.stopObserving(this.handle, "mousedown", this.eventMouseDown);
+    Draggables.unregister(this);
+  },
+  
+  currentDelta: function() {
+    return([
+      parseInt(Element.getStyle(this.element,'left') || '0'),
+      parseInt(Element.getStyle(this.element,'top') || '0')]);
+  },
+  
+  initDrag: function(event) {
+    if(typeof Draggable._dragging[this.element] != 'undefined' &&
+      Draggable._dragging[this.element]) return;
+    if(Event.isLeftClick(event)) {    
+      // abort on form elements, fixes a Firefox issue
+      var src = Event.element(event);
+      if((tag_name = src.tagName.toUpperCase()) && (
+        tag_name=='INPUT' ||
+        tag_name=='SELECT' ||
+        tag_name=='OPTION' ||
+        tag_name=='BUTTON' ||
+        tag_name=='TEXTAREA')) return;
+        
+      var pointer = [Event.pointerX(event), Event.pointerY(event)];
+      var pos     = Position.cumulativeOffset(this.element);
+      this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
+      
+      Draggables.activate(this);
+      Event.stop(event);
+    }
+  },
+  
+  startDrag: function(event) {
+    this.dragging = true;
+    
+    if(this.options.zindex) {
+      this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
+      this.element.style.zIndex = this.options.zindex;
+    }
+    
+    if(this.options.ghosting) {
+      this._clone = this.element.cloneNode(true);
+      Position.absolutize(this.element);
+      this.element.parentNode.insertBefore(this._clone, this.element);
+    }
+    
+    if(this.options.scroll) {
+      if (this.options.scroll == window) {
+        var where = this._getWindowScroll(this.options.scroll);
+        this.originalScrollLeft = where.left;
+        this.originalScrollTop = where.top;
+      } else {
+        this.originalScrollLeft = this.options.scroll.scrollLeft;
+        this.originalScrollTop = this.options.scroll.scrollTop;
+      }
+    }
+    
+    Draggables.notify('onStart', this, event);
+        
+    if(this.options.starteffect) this.options.starteffect(this.element);
+  },
+  
+  updateDrag: function(event, pointer) {
+    if(!this.dragging) this.startDrag(event);
+    Position.prepare();
+    Droppables.show(pointer, this.element);
+    Draggables.notify('onDrag', this, event);
+    
+    this.draw(pointer);
+    if(this.options.change) this.options.change(this);
+    
+    if(this.options.scroll) {
+      this.stopScrolling();
+      
+      var p;
+      if (this.options.scroll == window) {
+        with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; }
+      } else {
+        p = Position.page(this.options.scroll);
+        p[0] += this.options.scroll.scrollLeft + Position.deltaX;
+        p[1] += this.options.scroll.scrollTop + Position.deltaY;
+        p.push(p[0]+this.options.scroll.offsetWidth);
+        p.push(p[1]+this.options.scroll.offsetHeight);
+      }
+      var speed = [0,0];
+      if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity);
+      if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity);
+      if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity);
+      if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity);
+      this.startScrolling(speed);
+    }
+    
+    // fix AppleWebKit rendering
+    if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);
+    
+    Event.stop(event);
+  },
+  
+  finishDrag: function(event, success) {
+    this.dragging = false;
+
+    if(this.options.ghosting) {
+      Position.relativize(this.element);
+      Element.remove(this._clone);
+      this._clone = null;
+    }
+
+    if(success) Droppables.fire(event, this.element);
+    Draggables.notify('onEnd', this, event);
+
+    var revert = this.options.revert;
+    if(revert && typeof revert == 'function') revert = revert(this.element);
+    
+    var d = this.currentDelta();
+    if(revert && this.options.reverteffect) {
+      this.options.reverteffect(this.element, 
+        d[1]-this.delta[1], d[0]-this.delta[0]);
+    } else {
+      this.delta = d;
+    }
+
+    if(this.options.zindex)
+      this.element.style.zIndex = this.originalZ;
+
+    if(this.options.endeffect) 
+      this.options.endeffect(this.element);
+      
+    Draggables.deactivate(this);
+    Droppables.reset();
+  },
+  
+  keyPress: function(event) {
+    if(event.keyCode!=Event.KEY_ESC) return;
+    this.finishDrag(event, false);
+    Event.stop(event);
+  },
+  
+  endDrag: function(event) {
+    if(!this.dragging) return;
+    this.stopScrolling();
+    this.finishDrag(event, true);
+    Event.stop(event);
+  },
+  
+  draw: function(point) {
+    var pos = Position.cumulativeOffset(this.element);
+    if(this.options.ghosting) {
+      var r   = Position.realOffset(this.element);
+      pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
+    }
+    
+    var d = this.currentDelta();
+    pos[0] -= d[0]; pos[1] -= d[1];
+    
+    if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {
+      pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft;
+      pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop;
+    }
+    
+    var p = [0,1].map(function(i){ 
+      return (point[i]-pos[i]-this.offset[i]) 
+    }.bind(this));
+    
+    if(this.options.snap) {
+      if(typeof this.options.snap == 'function') {
+        p = this.options.snap(p[0],p[1],this);
+      } else {
+      if(this.options.snap instanceof Array) {
+        p = p.map( function(v, i) {
+          return Math.round(v/this.options.snap[i])*this.options.snap[i] }.bind(this))
+      } else {
+        p = p.map( function(v) {
+          return Math.round(v/this.options.snap)*this.options.snap }.bind(this))
+      }
+    }}
+    
+    var style = this.element.style;
+    if((!this.options.constraint) || (this.options.constraint=='horizontal'))
+      style.left = p[0] + "px";
+    if((!this.options.constraint) || (this.options.constraint=='vertical'))
+      style.top  = p[1] + "px";
+    
+    if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering
+  },
+  
+  stopScrolling: function() {
+    if(this.scrollInterval) {
+      clearInterval(this.scrollInterval);
+      this.scrollInterval = null;
+      Draggables._lastScrollPointer = null;
+    }
+  },
+  
+  startScrolling: function(speed) {
+    if(!(speed[0] || speed[1])) return;
+    this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed];
+    this.lastScrolled = new Date();
+    this.scrollInterval = setInterval(this.scroll.bind(this), 10);
+  },
+  
+  scroll: function() {
+    var current = new Date();
+    var delta = current - this.lastScrolled;
+    this.lastScrolled = current;
+    if(this.options.scroll == window) {
+      with (this._getWindowScroll(this.options.scroll)) {
+        if (this.scrollSpeed[0] || this.scrollSpeed[1]) {
+          var d = delta / 1000;
+          this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] );
+        }
+      }
+    } else {
+      this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000;
+      this.options.scroll.scrollTop  += this.scrollSpeed[1] * delta / 1000;
+    }
+    
+    Position.prepare();
+    Droppables.show(Draggables._lastPointer, this.element);
+    Draggables.notify('onDrag', this);
+    if (this._isScrollChild) {
+      Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer);
+      Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000;
+      Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000;
+      if (Draggables._lastScrollPointer[0] < 0)
+        Draggables._lastScrollPointer[0] = 0;
+      if (Draggables._lastScrollPointer[1] < 0)
+        Draggables._lastScrollPointer[1] = 0;
+      this.draw(Draggables._lastScrollPointer);
+    }
+    
+    if(this.options.change) this.options.change(this);
+  },
+  
+  _getWindowScroll: function(w) {
+    var T, L, W, H;
+    with (w.document) {
+      if (w.document.documentElement && documentElement.scrollTop) {
+        T = documentElement.scrollTop;
+        L = documentElement.scrollLeft;
+      } else if (w.document.body) {
+        T = body.scrollTop;
+        L = body.scrollLeft;
+      }
+      if (w.innerWidth) {
+        W = w.innerWidth;
+        H = w.innerHeight;
+      } else if (w.document.documentElement && documentElement.clientWidth) {
+        W = documentElement.clientWidth;
+        H = documentElement.clientHeight;
+      } else {
+        W = body.offsetWidth;
+        H = body.offsetHeight
+      }
+    }
+    return { top: T, left: L, width: W, height: H };
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var SortableObserver = Class.create();
+SortableObserver.prototype = {
+  initialize: function(element, observer) {
+    this.element   = $(element);
+    this.observer  = observer;
+    this.lastValue = Sortable.serialize(this.element);
+  },
+  
+  onStart: function() {
+    this.lastValue = Sortable.serialize(this.element);
+  },
+  
+  onEnd: function() {
+    Sortable.unmark();
+    if(this.lastValue != Sortable.serialize(this.element))
+      this.observer(this.element)
+  }
+}
+
+var Sortable = {
+  SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,
+  
+  sortables: {},
+  
+  _findRootElement: function(element) {
+    while (element.tagName.toUpperCase() != "BODY") {  
+      if(element.id && Sortable.sortables[element.id]) return element;
+      element = element.parentNode;
+    }
+  },
+
+  options: function(element) {
+    element = Sortable._findRootElement($(element));
+    if(!element) return;
+    return Sortable.sortables[element.id];
+  },
+  
+  destroy: function(element){
+    var s = Sortable.options(element);
+    
+    if(s) {
+      Draggables.removeObserver(s.element);
+      s.droppables.each(function(d){ Droppables.remove(d) });
+      s.draggables.invoke('destroy');
+      
+      delete Sortable.sortables[s.element.id];
+    }
+  },
+
+  create: function(element) {
+    element = $(element);
+    var options = Object.extend({ 
+      element:     element,
+      tag:         'li',       // assumes li children, override with tag: 'tagname'
+      dropOnEmpty: false,
+      tree:        false,
+      treeTag:     'ul',
+      overlap:     'vertical', // one of 'vertical', 'horizontal'
+      constraint:  'vertical', // one of 'vertical', 'horizontal', false
+      containment: element,    // also takes array of elements (or id's); or false
+      handle:      false,      // or a CSS class
+      only:        false,
+      delay:       0,
+      hoverclass:  null,
+      ghosting:    false,
+      scroll:      false,
+      scrollSensitivity: 20,
+      scrollSpeed: 15,
+      format:      this.SERIALIZE_RULE,
+      onChange:    Prototype.emptyFunction,
+      onUpdate:    Prototype.emptyFunction
+    }, arguments[1] || {});
+
+    // clear any old sortable with same element
+    this.destroy(element);
+
+    // build options for the draggables
+    var options_for_draggable = {
+      revert:      true,
+      scroll:      options.scroll,
+      scrollSpeed: options.scrollSpeed,
+      scrollSensitivity: options.scrollSensitivity,
+      delay:       options.delay,
+      ghosting:    options.ghosting,
+      constraint:  options.constraint,
+      handle:      options.handle };
+
+    if(options.starteffect)
+      options_for_draggable.starteffect = options.starteffect;
+
+    if(options.reverteffect)
+      options_for_draggable.reverteffect = options.reverteffect;
+    else
+      if(options.ghosting) options_for_draggable.reverteffect = function(element) {
+        element.style.top  = 0;
+        element.style.left = 0;
+      };
+
+    if(options.endeffect)
+      options_for_draggable.endeffect = options.endeffect;
+
+    if(options.zindex)
+      options_for_draggable.zindex = options.zindex;
+
+    // build options for the droppables  
+    var options_for_droppable = {
+      overlap:     options.overlap,
+      containment: options.containment,
+      tree:        options.tree,
+      hoverclass:  options.hoverclass,
+      onHover:     Sortable.onHover
+    }
+    
+    var options_for_tree = {
+      onHover:      Sortable.onEmptyHover,
+      overlap:      options.overlap,
+      containment:  options.containment,
+      hoverclass:   options.hoverclass
+    }
+
+    // fix for gecko engine
+    Element.cleanWhitespace(element); 
+
+    options.draggables = [];
+    options.droppables = [];
+
+    // drop on empty handling
+    if(options.dropOnEmpty || options.tree) {
+      Droppables.add(element, options_for_tree);
+      options.droppables.push(element);
+    }
+
+    (this.findElements(element, options) || []).each( function(e) {
+      // handles are per-draggable
+      var handle = options.handle ? 
+        $(e).down('.'+options.handle,0) : e;    
+      options.draggables.push(
+        new Draggable(e, Object.extend(options_for_draggable, { handle: handle })));
+      Droppables.add(e, options_for_droppable);
+      if(options.tree) e.treeNode = element;
+      options.droppables.push(e);      
+    });
+    
+    if(options.tree) {
+      (Sortable.findTreeElements(element, options) || []).each( function(e) {
+        Droppables.add(e, options_for_tree);
+        e.treeNode = element;
+        options.droppables.push(e);
+      });
+    }
+
+    // keep reference
+    this.sortables[element.id] = options;
+
+    // for onupdate
+    Draggables.addObserver(new SortableObserver(element, options.onUpdate));
+
+  },
+
+  // return all suitable-for-sortable elements in a guaranteed order
+  findElements: function(element, options) {
+    return Element.findChildren(
+      element, options.only, options.tree ? true : false, options.tag);
+  },
+  
+  findTreeElements: function(element, options) {
+    return Element.findChildren(
+      element, options.only, options.tree ? true : false, options.treeTag);
+  },
+
+  onHover: function(element, dropon, overlap) {
+    if(Element.isParent(dropon, element)) return;
+
+    if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) {
+      return;
+    } else if(overlap>0.5) {
+      Sortable.mark(dropon, 'before');
+      if(dropon.previousSibling != element) {
+        var oldParentNode = element.parentNode;
+        element.style.visibility = "hidden"; // fix gecko rendering
+        dropon.parentNode.insertBefore(element, dropon);
+        if(dropon.parentNode!=oldParentNode) 
+          Sortable.options(oldParentNode).onChange(element);
+        Sortable.options(dropon.parentNode).onChange(element);
+      }
+    } else {
+      Sortable.mark(dropon, 'after');
+      var nextElement = dropon.nextSibling || null;
+      if(nextElement != element) {
+        var oldParentNode = element.parentNode;
+        element.style.visibility = "hidden"; // fix gecko rendering
+        dropon.parentNode.insertBefore(element, nextElement);
+        if(dropon.parentNode!=oldParentNode) 
+          Sortable.options(oldParentNode).onChange(element);
+        Sortable.options(dropon.parentNode).onChange(element);
+      }
+    }
+  },
+  
+  onEmptyHover: function(element, dropon, overlap) {
+    var oldParentNode = element.parentNode;
+    var droponOptions = Sortable.options(dropon);
+        
+    if(!Element.isParent(dropon, element)) {
+      var index;
+      
+      var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only});
+      var child = null;
+            
+      if(children) {
+        var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap);
+        
+        for (index = 0; index < children.length; index += 1) {
+          if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) {
+            offset -= Element.offsetSize (children[index], droponOptions.overlap);
+          } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) {
+            child = index + 1 < children.length ? children[index + 1] : null;
+            break;
+          } else {
+            child = children[index];
+            break;
+          }
+        }
+      }
+      
+      dropon.insertBefore(element, child);
+      
+      Sortable.options(oldParentNode).onChange(element);
+      droponOptions.onChange(element);
+    }
+  },
+
+  unmark: function() {
+    if(Sortable._marker) Sortable._marker.hide();
+  },
+
+  mark: function(dropon, position) {
+    // mark on ghosting only
+    var sortable = Sortable.options(dropon.parentNode);
+    if(sortable && !sortable.ghosting) return; 
+
+    if(!Sortable._marker) {
+      Sortable._marker = 
+        ($('dropmarker') || Element.extend(document.createElement('DIV'))).
+          hide().addClassName('dropmarker').setStyle({position:'absolute'});
+      document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);
+    }    
+    var offsets = Position.cumulativeOffset(dropon);
+    Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});
+    
+    if(position=='after')
+      if(sortable.overlap == 'horizontal') 
+        Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'});
+      else
+        Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'});
+    
+    Sortable._marker.show();
+  },
+  
+  _tree: function(element, options, parent) {
+    var children = Sortable.findElements(element, options) || [];
+  
+    for (var i = 0; i < children.length; ++i) {
+      var match = children[i].id.match(options.format);
+
+      if (!match) continue;
+      
+      var child = {
+        id: encodeURIComponent(match ? match[1] : null),
+        element: element,
+        parent: parent,
+        children: [],
+        position: parent.children.length,
+        container: $(children[i]).down(options.treeTag)
+      }
+      
+      /* Get the element containing the children and recurse over it */
+      if (child.container)
+        this._tree(child.container, options, child)
+      
+      parent.children.push (child);
+    }
+
+    return parent; 
+  },
+
+  tree: function(element) {
+    element = $(element);
+    var sortableOptions = this.options(element);
+    var options = Object.extend({
+      tag: sortableOptions.tag,
+      treeTag: sortableOptions.treeTag,
+      only: sortableOptions.only,
+      name: element.id,
+      format: sortableOptions.format
+    }, arguments[1] || {});
+    
+    var root = {
+      id: null,
+      parent: null,
+      children: [],
+      container: element,
+      position: 0
+    }
+    
+    return Sortable._tree(element, options, root);
+  },
+
+  /* Construct a [i] index for a particular node */
+  _constructIndex: function(node) {
+    var index = '';
+    do {
+      if (node.id) index = '[' + node.position + ']' + index;
+    } while ((node = node.parent) != null);
+    return index;
+  },
+
+  sequence: function(element) {
+    element = $(element);
+    var options = Object.extend(this.options(element), arguments[1] || {});
+    
+    return $(this.findElements(element, options) || []).map( function(item) {
+      return item.id.match(options.format) ? item.id.match(options.format)[1] : '';
+    });
+  },
+
+  setSequence: function(element, new_sequence) {
+    element = $(element);
+    var options = Object.extend(this.options(element), arguments[2] || {});
+    
+    var nodeMap = {};
+    this.findElements(element, options).each( function(n) {
+        if (n.id.match(options.format))
+            nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode];
+        n.parentNode.removeChild(n);
+    });
+   
+    new_sequence.each(function(ident) {
+      var n = nodeMap[ident];
+      if (n) {
+        n[1].appendChild(n[0]);
+        delete nodeMap[ident];
+      }
+    });
+  },
+  
+  serialize: function(element) {
+    element = $(element);
+    var options = Object.extend(Sortable.options(element), arguments[1] || {});
+    var name = encodeURIComponent(
+      (arguments[1] && arguments[1].name) ? arguments[1].name : element.id);
+    
+    if (options.tree) {
+      return Sortable.tree(element, arguments[1]).children.map( function (item) {
+        return [name + Sortable._constructIndex(item) + "[id]=" + 
+                encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));
+      }).flatten().join('&');
+    } else {
+      return Sortable.sequence(element, arguments[1]).map( function(item) {
+        return name + "[]=" + encodeURIComponent(item);
+      }).join('&');
+    }
+  }
+}
+
+// Returns true if child is contained within element
+Element.isParent = function(child, element) {
+  if (!child.parentNode || child == element) return false;
+  if (child.parentNode == element) return true;
+  return Element.isParent(child.parentNode, element);
+}
+
+Element.findChildren = function(element, only, recursive, tagName) {    
+  if(!element.hasChildNodes()) return null;
+  tagName = tagName.toUpperCase();
+  if(only) only = [only].flatten();
+  var elements = [];
+  $A(element.childNodes).each( function(e) {
+    if(e.tagName && e.tagName.toUpperCase()==tagName &&
+      (!only || (Element.classNames(e).detect(function(v) { return only.include(v) }))))
+        elements.push(e);
+    if(recursive) {
+      var grandchildren = Element.findChildren(e, only, recursive, tagName);
+      if(grandchildren) elements.push(grandchildren);
+    }
+  });
+
+  return (elements.length>0 ? elements.flatten() : []);
+}
+
+Element.offsetSize = function (element, type) {
+  return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')];
+}


[02/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/autocomplete-min.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/autocomplete-min.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/autocomplete-min.js
new file mode 100644
index 0000000..18595ea
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/autocomplete-min.js
@@ -0,0 +1,12 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+YAHOO.widget.DS_JSArray=YAHOO.util.LocalDataSource;YAHOO.widget.DS_JSFunction=YAHOO.util.FunctionDataSource;YAHOO.widget.DS_XHR=function(B,A,D){var C=new YAHOO.util.XHRDataSource(B,D);C._aDeprecatedSchema=A;return C;};YAHOO.widget.DS_ScriptNode=function(B,A,D){var C=new YAHOO.util.ScriptNodeDataSource(B,D);C._aDeprecatedSchema=A;return C;};YAHOO.widget.DS_XHR.TYPE_JSON=YAHOO.util.DataSourceBase.TYPE_JSON;YAHOO.widget.DS_XHR.TYPE_XML=YAHOO.util.DataSourceBase.TYPE_XML;YAHOO.widget.DS_XHR.TYPE_FLAT=YAHOO.util.DataSourceBase.TYPE_TEXT;YAHOO.widget.AutoComplete=function(G,B,J,C){if(G&&B&&J){if(J instanceof YAHOO.util.DataSourceBase){this.dataSource=J;}else{return ;}this.key=0;var D=J.responseSchema;if(J._aDeprecatedSchema){var K=J._aDeprecatedSchema;if(YAHOO.lang.isArray(K)){if((J.responseType===YAHOO.util.DataSourceBase.TYPE_JSON)||(J.responseType===YAHOO.util.DataSourceBase.TYPE_UNKNOWN)){D.resultsList=K[0];this.key=K[1];D.fields=(K.length<3)?null:K.slice(1);}else{if(J.responseType===
 YAHOO.util.DataSourceBase.TYPE_XML){D.resultNode=K[0];this.key=K[1];D.fields=K.slice(1);}else{if(J.responseType===YAHOO.util.DataSourceBase.TYPE_TEXT){D.recordDelim=K[0];D.fieldDelim=K[1];}}}J.responseSchema=D;}}if(YAHOO.util.Dom.inDocument(G)){if(YAHOO.lang.isString(G)){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+G;this._elTextbox=document.getElementById(G);}else{this._sName=(G.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+G.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._elTextbox=G;}YAHOO.util.Dom.addClass(this._elTextbox,"yui-ac-input");}else{return ;}if(YAHOO.util.Dom.inDocument(B)){if(YAHOO.lang.isString(B)){this._elContainer=document.getElementById(B);}else{this._elContainer=B;}if(this._elContainer.style.display=="none"){}var E=this._elContainer.parentNode;var A=E.tagName.toLowerCase();if(A=="div"){YAHOO.util.Dom.addClass(E,"yui-ac");}else{}}else{return ;}if(this.dataSource.dataType===YAHOO.util.DataSourceBase.TYPE_LOCAL){this.applyLocalFilter=tr
 ue;}if(C&&(C.constructor==Object)){for(var I in C){if(I){this[I]=C[I];}}}this._initContainerEl();this._initProps();this._initListEl();this._initContainerHelperEls();var H=this;var F=this._elTextbox;YAHOO.util.Event.addListener(F,"keyup",H._onTextboxKeyUp,H);YAHOO.util.Event.addListener(F,"keydown",H._onTextboxKeyDown,H);YAHOO.util.Event.addListener(F,"focus",H._onTextboxFocus,H);YAHOO.util.Event.addListener(F,"blur",H._onTextboxBlur,H);YAHOO.util.Event.addListener(B,"mouseover",H._onContainerMouseover,H);YAHOO.util.Event.addListener(B,"mouseout",H._onContainerMouseout,H);YAHOO.util.Event.addListener(B,"click",H._onContainerClick,H);YAHOO.util.Event.addListener(B,"scroll",H._onContainerScroll,H);YAHOO.util.Event.addListener(B,"resize",H._onContainerResize,H);YAHOO.util.Event.addListener(F,"keypress",H._onTextboxKeyPress,H);YAHOO.util.Event.addListener(window,"unload",H._onWindowUnload,H);this.textboxFocusEvent=new YAHOO.util.CustomEvent("textboxFocus",this);this.textboxKeyEvent=new Y
 AHOO.util.CustomEvent("textboxKey",this);this.dataRequestEvent=new YAHOO.util.CustomEvent("dataRequest",this);this.dataReturnEvent=new YAHOO.util.CustomEvent("dataReturn",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.containerPopulateEvent=new YAHOO.util.CustomEvent("containerPopulate",this);this.containerExpandEvent=new YAHOO.util.CustomEvent("containerExpand",this);this.typeAheadEvent=new YAHOO.util.CustomEvent("typeAhead",this);this.itemMouseOverEvent=new YAHOO.util.CustomEvent("itemMouseOver",this);this.itemMouseOutEvent=new YAHOO.util.CustomEvent("itemMouseOut",this);this.itemArrowToEvent=new YAHOO.util.CustomEvent("itemArrowTo",this);this.itemArrowFromEvent=new YAHOO.util.CustomEvent("itemArrowFrom",this);this.itemSelectEvent=new YAHOO.util.CustomEvent("itemSelect",this);this.unmatchedItemSelectEvent=new YAHOO.util.CustomEvent("unmatchedItemSelect",this);this.selectionEnforceEvent=new YAHOO.util.CustomEvent("selectionEnforce",this);this.containerC
 ollapseEvent=new YAHOO.util.CustomEvent("containerCollapse",this);this.textboxBlurEvent=new YAHOO.util.CustomEvent("textboxBlur",this);this.textboxChangeEvent=new YAHOO.util.CustomEvent("textboxChange",this);F.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++;}else{}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.applyLocalFilter=null;YAHOO.widget.AutoComplete.prototype.queryMatchCase=false;YAHOO.widget.AutoComplete.prototype.queryMatchContains=false;YAHOO.widget.AutoComplete.prototype.queryMatchSubset=false;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.2;YAHOO.widget.AutoComplete.prototype.typeAheadDelay=0.5;YAHOO.widget.AutoComplete.prototype.queryInterval=500;YAHOO.widget.AutoComplete.prototype.highlightClassName="yui-ac-highlight";YAHOO.widget.AutoComplete.prototype.prehighlightClassName=null;YAHOO.widge
 t.AutoComplete.prototype.delimChar=null;YAHOO.widget.AutoComplete.prototype.autoHighlight=true;YAHOO.widget.AutoComplete.prototype.typeAhead=false;YAHOO.widget.AutoComplete.prototype.animHoriz=false;YAHOO.widget.AutoComplete.prototype.animVert=true;YAHOO.widget.AutoComplete.prototype.animSpeed=0.3;YAHOO.widget.AutoComplete.prototype.forceSelection=false;YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete=true;YAHOO.widget.AutoComplete.prototype.alwaysShowContainer=false;YAHOO.widget.AutoComplete.prototype.useIFrame=false;YAHOO.widget.AutoComplete.prototype.useShadow=false;YAHOO.widget.AutoComplete.prototype.suppressInputUpdate=false;YAHOO.widget.AutoComplete.prototype.resultTypeList=true;YAHOO.widget.AutoComplete.prototype.queryQuestionMark=true;YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName;};YAHOO.widget.AutoComplete.prototype.getInputEl=function(){return this._elTextbox;};YAHOO.widget.AutoComplete.prototype.getContainerEl=functi
 on(){return this._elContainer;
+};YAHOO.widget.AutoComplete.prototype.isFocused=function(){return(this._bFocused===null)?false:this._bFocused;};YAHOO.widget.AutoComplete.prototype.isContainerOpen=function(){return this._bContainerOpen;};YAHOO.widget.AutoComplete.prototype.getListEl=function(){return this._elList;};YAHOO.widget.AutoComplete.prototype.getListItemMatch=function(A){if(A._sResultMatch){return A._sResultMatch;}else{return null;}};YAHOO.widget.AutoComplete.prototype.getListItemData=function(A){if(A._oResultData){return A._oResultData;}else{return null;}};YAHOO.widget.AutoComplete.prototype.getListItemIndex=function(A){if(YAHOO.lang.isNumber(A._nItemIndex)){return A._nItemIndex;}else{return null;}};YAHOO.widget.AutoComplete.prototype.setHeader=function(B){if(this._elHeader){var A=this._elHeader;if(B){A.innerHTML=B;A.style.display="block";}else{A.innerHTML="";A.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setFooter=function(B){if(this._elFooter){var A=this._elFooter;if(B){A.innerHTML=B;A.st
 yle.display="block";}else{A.innerHTML="";A.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setBody=function(A){if(this._elBody){var B=this._elBody;YAHOO.util.Event.purgeElement(B,true);if(A){B.innerHTML=A;B.style.display="block";}else{B.innerHTML="";B.style.display="none";}this._elList=null;}};YAHOO.widget.AutoComplete.prototype.generateRequest=function(B){var A=this.dataSource.dataType;if(A===YAHOO.util.DataSourceBase.TYPE_XHR){if(!this.dataSource.connMethodPost){B=(this.queryQuestionMark?"?":"")+(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}else{B=(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}}else{if(A===YAHOO.util.DataSourceBase.TYPE_SCRIPTNODE){B="&"+(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}}return B;};YAHOO.widg
 et.AutoComplete.prototype.sendQuery=function(B){var A=(this.delimChar)?this._elTextbox.value+B:B;this._sendQuery(A);};YAHOO.widget.AutoComplete.prototype.collapseContainer=function(){this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype.getSubsetMatches=function(E){var D,C,A;for(var B=E.length;B>=this.minQueryLength;B--){A=this.generateRequest(E.substr(0,B));this.dataRequestEvent.fire(this,D,A);C=this.dataSource.getCachedResponse(A);if(C){return this.filterResults.apply(this.dataSource,[E,C,C,{scope:this}]);}}return null;};YAHOO.widget.AutoComplete.prototype.preparseRawResponse=function(C,B,A){var D=((this.responseStripAfter!=="")&&(B.indexOf))?B.indexOf(this.responseStripAfter):-1;if(D!=-1){B=B.substring(0,D);}return B;};YAHOO.widget.AutoComplete.prototype.filterResults=function(J,L,P,K){if(J&&J!==""){P=YAHOO.widget.AutoComplete._cloneObject(P);var H=K.scope,O=this,B=P.results,M=[],D=false,I=(O.queryMatchCase||H.queryMatchCase),A=(O.queryMatchContains||H.queryMatchCont
 ains);for(var C=B.length-1;C>=0;C--){var F=B[C];var E=null;if(YAHOO.lang.isString(F)){E=F;}else{if(YAHOO.lang.isArray(F)){E=F[0];}else{if(this.responseSchema.fields){var N=this.responseSchema.fields[0].key||this.responseSchema.fields[0];E=F[N];}else{if(this.key){E=F[this.key];}}}}if(YAHOO.lang.isString(E)){var G=(I)?E.indexOf(decodeURIComponent(J)):E.toLowerCase().indexOf(decodeURIComponent(J).toLowerCase());if((!A&&(G===0))||(A&&(G>-1))){M.unshift(F);}}}P.results=M;}else{}return P;};YAHOO.widget.AutoComplete.prototype.handleResponse=function(C,A,B){if((this instanceof YAHOO.widget.AutoComplete)&&this._sName){this._populateList(C,A,B);}};YAHOO.widget.AutoComplete.prototype.doBeforeLoadData=function(C,A,B){return true;};YAHOO.widget.AutoComplete.prototype.formatResult=function(B,D,A){var C=(A)?A:"";return C;};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(D,A,C,B){return true;};YAHOO.widget.AutoComplete.prototype.destroy=function(){var B=this.toString();var A=th
 is._elTextbox;var D=this._elContainer;this.textboxFocusEvent.unsubscribeAll();this.textboxKeyEvent.unsubscribeAll();this.dataRequestEvent.unsubscribeAll();this.dataReturnEvent.unsubscribeAll();this.dataErrorEvent.unsubscribeAll();this.containerPopulateEvent.unsubscribeAll();this.containerExpandEvent.unsubscribeAll();this.typeAheadEvent.unsubscribeAll();this.itemMouseOverEvent.unsubscribeAll();this.itemMouseOutEvent.unsubscribeAll();this.itemArrowToEvent.unsubscribeAll();this.itemArrowFromEvent.unsubscribeAll();this.itemSelectEvent.unsubscribeAll();this.unmatchedItemSelectEvent.unsubscribeAll();this.selectionEnforceEvent.unsubscribeAll();this.containerCollapseEvent.unsubscribeAll();this.textboxBlurEvent.unsubscribeAll();this.textboxChangeEvent.unsubscribeAll();YAHOO.util.Event.purgeElement(A,true);YAHOO.util.Event.purgeElement(D,true);D.innerHTML="";for(var C in this){if(YAHOO.lang.hasOwnProperty(this,C)){this[C]=null;}}};YAHOO.widget.AutoComplete.prototype.textboxFocusEvent=null;YAH
 OO.widget.AutoComplete.prototype.textboxKeyEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestEvent=null;YAHOO.widget.AutoComplete.prototype.dataReturnEvent=null;YAHOO.widget.AutoComplete.prototype.dataErrorEvent=null;YAHOO.widget.AutoComplete.prototype.containerPopulateEvent=null;YAHOO.widget.AutoComplete.prototype.containerExpandEvent=null;YAHOO.widget.AutoComplete.prototype.typeAheadEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowToEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent=null;YAHOO.widget.AutoComplete.prototype.itemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent=null;YAHOO.widget.AutoComplete.prototype.containerCollapseEvent=null;YAHOO.widget.AutoComplete.prototype.textboxBlurEvent=null;YAHOO.widget.AutoComplete.prototype.textboxCh
 angeEvent=null;YAHOO.widget.AutoComplete._nIndex=0;
+YAHOO.widget.AutoComplete.prototype._sName=null;YAHOO.widget.AutoComplete.prototype._elTextbox=null;YAHOO.widget.AutoComplete.prototype._elContainer=null;YAHOO.widget.AutoComplete.prototype._elContent=null;YAHOO.widget.AutoComplete.prototype._elHeader=null;YAHOO.widget.AutoComplete.prototype._elBody=null;YAHOO.widget.AutoComplete.prototype._elFooter=null;YAHOO.widget.AutoComplete.prototype._elShadow=null;YAHOO.widget.AutoComplete.prototype._elIFrame=null;YAHOO.widget.AutoComplete.prototype._bFocused=null;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._elList=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sPastSelections="";YAHOO.widget.AutoComplete.prototype._sInitInputValue=null;YAHOO.widget.AutoComplete.prototype._elCurListItem=nu
 ll;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._nTypeAheadDelayID=-1;YAHOO.widget.AutoComplete.prototype._iFrameSrc="javascript:false;";YAHOO.widget.AutoComplete.prototype._queryInterval=null;YAHOO.widget.AutoComplete.prototype._sLastTextboxValue=null;YAHOO.widget.AutoComplete.prototype._initProps=function(){var B=this.minQueryLength;if(!YAHOO.lang.isNumber(B)){this.minQueryLength=1;}var E=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(E)||(E<1)){this.maxResultsDisplayed=10;}var F=this.queryDelay;if(!YAHOO.lang.isNumber(F)||(F<0)){this.queryDelay=0.2;}var C=this.typeAheadDelay;if(!YAHOO.lang.isNumber(C)||(C<0)){this.typeAheadDelay=0.2;}var A=this.delimChar;if(YAHOO.lang.isString(A)&&(A.length>0)){this.delimChar=[A];}else{if(!YAHOO.lang.isArray(A)){this.delimChar=null;}}var D=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.uti
 l.Anim){if(!YAHOO.lang.isNumber(D)||(D<0)){this.animSpeed=0.3;}if(!this._oAnim){this._oAnim=new YAHOO.util.Anim(this._elContent,{},this.animSpeed);}else{this._oAnim.duration=this.animSpeed;}}if(this.forceSelection&&A){}};YAHOO.widget.AutoComplete.prototype._initContainerHelperEls=function(){if(this.useShadow&&!this._elShadow){var A=document.createElement("div");A.className="yui-ac-shadow";A.style.width=0;A.style.height=0;this._elShadow=this._elContainer.appendChild(A);}if(this.useIFrame&&!this._elIFrame){var B=document.createElement("iframe");B.src=this._iFrameSrc;B.frameBorder=0;B.scrolling="no";B.style.position="absolute";B.style.width=0;B.style.height=0;B.tabIndex=-1;B.style.padding=0;this._elIFrame=this._elContainer.appendChild(B);}};YAHOO.widget.AutoComplete.prototype._initContainerEl=function(){YAHOO.util.Dom.addClass(this._elContainer,"yui-ac-container");if(!this._elContent){var C=document.createElement("div");C.className="yui-ac-content";C.style.display="none";this._elConten
 t=this._elContainer.appendChild(C);var B=document.createElement("div");B.className="yui-ac-hd";B.style.display="none";this._elHeader=this._elContent.appendChild(B);var D=document.createElement("div");D.className="yui-ac-bd";this._elBody=this._elContent.appendChild(D);var A=document.createElement("div");A.className="yui-ac-ft";A.style.display="none";this._elFooter=this._elContent.appendChild(A);}else{}};YAHOO.widget.AutoComplete.prototype._initListEl=function(){var C=this.maxResultsDisplayed;var A=this._elList||document.createElement("ul");var B;while(A.childNodes.length<C){B=document.createElement("li");B.style.display="none";B._nItemIndex=A.childNodes.length;A.appendChild(B);}if(!this._elList){var D=this._elBody;YAHOO.util.Event.purgeElement(D,true);D.innerHTML="";this._elList=D.appendChild(A);}};YAHOO.widget.AutoComplete.prototype._enableIntervalDetection=function(){var A=this;if(!A._queryInterval&&A.queryInterval){A._queryInterval=setInterval(function(){A._onInterval();},A.queryI
 nterval);}};YAHOO.widget.AutoComplete.prototype._onInterval=function(){var A=this._elTextbox.value;var B=this._sLastTextboxValue;if(A!=B){this._sLastTextboxValue=A;this._sendQuery(A);}};YAHOO.widget.AutoComplete.prototype._clearInterval=function(){if(this._queryInterval){clearInterval(this._queryInterval);this._queryInterval=null;}};YAHOO.widget.AutoComplete.prototype._isIgnoreKey=function(A){if((A==9)||(A==13)||(A==16)||(A==17)||(A>=18&&A<=20)||(A==27)||(A>=33&&A<=35)||(A>=36&&A<=40)||(A>=44&&A<=45)||(A==229)){return true;}return false;};YAHOO.widget.AutoComplete.prototype._sendQuery=function(G){if(this.minQueryLength<0){this._toggleContainer(false);return ;}var I=(this.delimChar)?this.delimChar:null;if(I){var B=-1;for(var F=I.length-1;F>=0;F--){var D=G.lastIndexOf(I[F]);if(D>B){B=D;}}if(I[F]==" "){for(var E=I.length-1;E>=0;E--){if(G[B-1]==I[E]){B--;break;}}}if(B>-1){var H=B+1;while(G.charAt(H)==" "){H+=1;}this._sPastSelections=G.substring(0,H);G=G.substr(H);}else{this._sPastSelect
 ions="";}}if((G&&(G.length<this.minQueryLength))||(!G&&this.minQueryLength>0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID);}this._toggleContainer(false);return ;}G=encodeURIComponent(G);this._nDelayID=-1;if(this.dataSource.queryMatchSubset||this.queryMatchSubset){var A=this.getSubsetMatches(G);if(A){this.handleResponse(G,A,{query:G});return ;}}if(this.responseStripAfter){this.dataSource.doBeforeParseData=this.preparseRawResponse;}if(this.applyLocalFilter){this.dataSource.doBeforeCallback=this.filterResults;}var C=this.generateRequest(G);this.dataRequestEvent.fire(this,G,C);this.dataSource.sendRequest(C,{success:this.handleResponse,failure:this.handleResponse,scope:this,argument:{query:G}});};YAHOO.widget.AutoComplete.prototype._populateList=function(K,F,C){if(this._nTypeAheadDelayID!=-1){clearTimeout(this._nTypeAheadDelayID);}K=(C&&C.query)?C.query:K;var H=this.doBeforeLoadData(K,F,C);if(H&&!F.error){this.dataReturnEvent.fire(this,K,F.results);if(this._bFocused||(this._bFocu
 sed===null)){var M=decodeURIComponent(K);
+this._sCurQuery=M;this._bItemSelected=false;var R=F.results,A=Math.min(R.length,this.maxResultsDisplayed),J=(this.dataSource.responseSchema.fields)?(this.dataSource.responseSchema.fields[0].key||this.dataSource.responseSchema.fields[0]):0;if(A>0){if(!this._elList||(this._elList.childNodes.length<A)){this._initListEl();}this._initContainerHelperEls();var I=this._elList.childNodes;for(var Q=A-1;Q>=0;Q--){var P=I[Q],E=R[Q];if(this.resultTypeList){var B=[];B[0]=(YAHOO.lang.isString(E))?E:E[J]||E[this.key];var L=this.dataSource.responseSchema.fields;if(YAHOO.lang.isArray(L)&&(L.length>1)){for(var N=1,S=L.length;N<S;N++){B[B.length]=E[L[N].key||L[N]];}}else{if(YAHOO.lang.isArray(E)){B=E;}else{if(YAHOO.lang.isString(E)){B=[E];}else{B[1]=E;}}}E=B;}P._sResultMatch=(YAHOO.lang.isString(E))?E:(YAHOO.lang.isArray(E))?E[0]:(E[J]||"");P._oResultData=E;P.innerHTML=this.formatResult(E,M,P._sResultMatch);P.style.display="";}if(A<I.length){var G;for(var O=I.length-1;O>=A;O--){G=I[O];G.style.display="
 none";}}this._nDisplayedItems=A;this.containerPopulateEvent.fire(this,K,R);if(this.autoHighlight){var D=this._elList.firstChild;this._toggleHighlight(D,"to");this.itemArrowToEvent.fire(this,D);this._typeAhead(D,K);}else{this._toggleHighlight(this._elCurListItem,"from");}H=this.doBeforeExpandContainer(this._elTextbox,this._elContainer,K,R);this._toggleContainer(H);}else{this._toggleContainer(false);}return ;}}else{this.dataErrorEvent.fire(this,K);}};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var C=this._elTextbox.value;var B=(this.delimChar)?this.delimChar[0]:null;var A=(B)?C.lastIndexOf(B,C.length-2):-1;if(A>-1){this._elTextbox.value=C.substring(0,A);}else{this._elTextbox.value="";}this._sPastSelections=this._elTextbox.value;this.selectionEnforceEvent.fire(this);};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var A=null;for(var B=this._nDisplayedItems-1;B>=0;B--){var C=this._elList.childNodes[B];var D=(""+C._sResultMatch).toLowerCase();if(D==t
 his._sCurQuery.toLowerCase()){A=C;break;}}return(A);};YAHOO.widget.AutoComplete.prototype._typeAhead=function(B,D){if(!this.typeAhead||(this._nKeyCode==8)){return ;}var A=this,C=this._elTextbox;if(C.setSelectionRange||C.createTextRange){this._nTypeAheadDelayID=setTimeout(function(){var F=C.value.length;A._updateValue(B);var G=C.value.length;A._selectText(C,F,G);var E=C.value.substr(F,G);A.typeAheadEvent.fire(A,D,E);},(this.typeAheadDelay*1000));}};YAHOO.widget.AutoComplete.prototype._selectText=function(D,A,B){if(D.setSelectionRange){D.setSelectionRange(A,B);}else{if(D.createTextRange){var C=D.createTextRange();C.moveStart("character",A);C.moveEnd("character",B-D.value.length);C.select();}else{D.select();}}};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(D){var E=this._elContent.offsetWidth+"px";var B=this._elContent.offsetHeight+"px";if(this.useIFrame&&this._elIFrame){var C=this._elIFrame;if(D){C.style.width=E;C.style.height=B;C.style.padding="";}else{C.style.
 width=0;C.style.height=0;C.style.padding=0;}}if(this.useShadow&&this._elShadow){var A=this._elShadow;if(D){A.style.width=E;A.style.height=B;}else{A.style.width=0;A.style.height=0;}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(I){var D=this._elContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return ;}if(!I){this._toggleHighlight(this._elCurListItem,"from");this._nDisplayedItems=0;this._sCurQuery=null;if(!this._bContainerOpen){this._elContent.style.display="none";return ;}}var A=this._oAnim;if(A&&A.getEl()&&(this.animHoriz||this.animVert)){if(A.isAnimated()){A.stop(true);}var G=this._elContent.cloneNode(true);D.appendChild(G);G.style.top="-9000px";G.style.width="";G.style.height="";G.style.display="";var F=G.offsetWidth;var C=G.offsetHeight;var B=(this.animHoriz)?0:F;var E=(this.animVert)?0:C;A.attributes=(I)?{width:{to:F},height:{to:C}}:{width:{to:B},height:{to:E}};if(I&&!this._bContainerOpen){this._elContent.style.width=B+"px";this._elContent.style.hei
 ght=E+"px";}else{this._elContent.style.width=F+"px";this._elContent.style.height=C+"px";}D.removeChild(G);G=null;var H=this;var J=function(){A.onComplete.unsubscribeAll();if(I){H._toggleContainerHelpers(true);H._bContainerOpen=I;H.containerExpandEvent.fire(H);}else{H._elContent.style.display="none";H._bContainerOpen=I;H.containerCollapseEvent.fire(H);}};this._toggleContainerHelpers(false);this._elContent.style.display="";A.onComplete.subscribe(J);A.animate();}else{if(I){this._elContent.style.display="";this._toggleContainerHelpers(true);this._bContainerOpen=I;this.containerExpandEvent.fire(this);}else{this._toggleContainerHelpers(false);this._elContent.style.display="none";this._bContainerOpen=I;this.containerCollapseEvent.fire(this);}}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(A,C){if(A){var B=this.highlightClassName;if(this._elCurListItem){YAHOO.util.Dom.removeClass(this._elCurListItem,B);this._elCurListItem=null;}if((C=="to")&&B){YAHOO.util.Dom.addClass(A,B);
 this._elCurListItem=A;}}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(B,C){if(B==this._elCurListItem){return ;}var A=this.prehighlightClassName;if((C=="mouseover")&&A){YAHOO.util.Dom.addClass(B,A);}else{YAHOO.util.Dom.removeClass(B,A);}};YAHOO.widget.AutoComplete.prototype._updateValue=function(C){if(!this.suppressInputUpdate){var F=this._elTextbox;var E=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var B=C._sResultMatch;var D="";if(E){D=this._sPastSelections;D+=B+E;if(E!=" "){D+=" ";}}else{D=B;}F.value=D;if(F.type=="textarea"){F.scrollTop=F.scrollHeight;}var A=F.value.length;this._selectText(F,A,A);this._elCurListItem=C;}};YAHOO.widget.AutoComplete.prototype._selectItem=function(A){this._bItemSelected=true;this._updateValue(A);this._sPastSelections=this._elTextbox.value;this._clearInterval();this.itemSelectEvent.fire(this,A,A._oResultData);this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._elCurList
 Item){this._selectItem(this._elCurListItem);
+}else{this._toggleContainer(false);}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(G){if(this._bContainerOpen){var F=this._elCurListItem;var E=-1;if(F){E=F._nItemIndex;}var C=(G==40)?(E+1):(E-1);if(C<-2||C>=this._nDisplayedItems){return ;}if(F){this._toggleHighlight(F,"from");this.itemArrowFromEvent.fire(this,F);}if(C==-1){if(this.delimChar){this._elTextbox.value=this._sPastSelections+this._sCurQuery;}else{this._elTextbox.value=this._sCurQuery;}return ;}if(C==-2){this._toggleContainer(false);return ;}var D=this._elList.childNodes[C];var A=this._elContent;var B=((YAHOO.util.Dom.getStyle(A,"overflow")=="auto")||(YAHOO.util.Dom.getStyle(A,"overflowY")=="auto"));if(B&&(C>-1)&&(C<this._nDisplayedItems)){if(G==40){if((D.offsetTop+D.offsetHeight)>(A.scrollTop+A.offsetHeight)){A.scrollTop=(D.offsetTop+D.offsetHeight)-A.offsetHeight;}else{if((D.offsetTop+D.offsetHeight)<A.scrollTop){A.scrollTop=D.offsetTop;}}}else{if(D.offsetTop<A.scrollTop){this._elContent.scrollTop=D.offsetT
 op;}else{if(D.offsetTop>(A.scrollTop+A.offsetHeight)){this._elContent.scrollTop=(D.offsetTop+D.offsetHeight)-A.offsetHeight;}}}}this._toggleHighlight(D,"to");this.itemArrowToEvent.fire(this,D);if(this.typeAhead){this._updateValue(D);}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return ;case"li":if(C.prehighlightClassName){C._togglePrehighlight(D,"mouseover");}else{C._toggleHighlight(D,"to");}C.itemMouseOverEvent.fire(C,D);break;case"div":if(YAHOO.util.Dom.hasClass(D,"yui-ac-container")){C._bOverContainer=true;return ;}break;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return ;case"li":if(C.prehighlightClassName){C._togglePrehighlight(D,"mouseou
 t");}else{C._toggleHighlight(D,"from");}C.itemMouseOutEvent.fire(C,D);break;case"ul":C._toggleHighlight(C._elCurListItem,"to");break;case"div":if(YAHOO.util.Dom.hasClass(D,"yui-ac-container")){C._bOverContainer=false;return ;}break;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerClick=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return ;case"li":C._toggleHighlight(D,"to");C._selectItem(D);return ;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(A,B){B._elTextbox.focus();};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(A,B){B._toggleContainerHelpers(B._bContainerOpen);};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(A,B){var C=A.keyCode;if(B._nTypeAheadDelayID!=-1){clearTimeout(B._nTypeAheadDelayID);}switch(C){case 9:if(!YAHOO
 .env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(B._elCurListItem){if(B.delimChar&&(B._nKeyCode!=C)){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 13:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(B._elCurListItem){if(B._nKeyCode!=C){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 27:B._toggleContainer(false);return ;case 39:B._jumpSelection();break;case 38:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);B._moveSelection(C);}break;case 40:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);B._moveSelection(C);}break;default:B._bItemSelected=false;B._toggleHighlight(B._elCurListItem,"from");B.textboxKeyEvent.fire(B,C);break;}if(C===18){B._enableIntervalDetection();}B._nKeyCode=C;};YAHOO.widget.AutoComp
 lete.prototype._onTextboxKeyPress=function(A,B){var C=A.keyCode;if(YAHOO.env.ua.opera||(navigator.userAgent.toLowerCase().indexOf("mac")!=-1)&&(YAHOO.env.ua.webkit<420)){switch(C){case 9:if(B._bContainerOpen){if(B.delimChar){YAHOO.util.Event.stopEvent(A);}if(B._elCurListItem){B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 13:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);if(B._elCurListItem){B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;default:break;}}else{if(C==229){B._enableIntervalDetection();}}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(A,C){var B=this.value;C._initProps();var D=A.keyCode;if(C._isIgnoreKey(D)){return ;}if(C._nDelayID!=-1){clearTimeout(C._nDelayID);}C._nDelayID=setTimeout(function(){C._sendQuery(B);},(C.queryDelay*1000));};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(A,B){if(!B._bFocused){B._elTextbox.setAttribute("autocomplete","off");B._bFocused=true;B._sInitInputVa
 lue=B._elTextbox.value;B.textboxFocusEvent.fire(B);}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(A,C){if(!C._bOverContainer||(C._nKeyCode==9)){if(!C._bItemSelected){var B=C._textMatchesOption();if(!C._bContainerOpen||(C._bContainerOpen&&(B===null))){if(C.forceSelection){C._clearSelection();}else{C.unmatchedItemSelectEvent.fire(C,C._sCurQuery);}}else{if(C.forceSelection){C._selectItem(B);}}}if(C._bContainerOpen){C._toggleContainer(false);}C._clearInterval();C._bFocused=false;if(C._sInitInputValue!==C._elTextbox.value){C.textboxChangeEvent.fire(C);}C.textboxBlurEvent.fire(C);}};YAHOO.widget.AutoComplete.prototype._onWindowUnload=function(A,B){if(B&&B._elTextbox&&B.allowBrowserAutocomplete){B._elTextbox.setAttribute("autocomplete","on");}};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(A){return this.generateRequest(A);};YAHOO.widget.AutoComplete.prototype.getListItems=function(){var C=[],B=this._elList.childNodes;for(var A=B.length-1;A>=0;A--){C[A]=B[A
 ];}return C;};YAHOO.widget.AutoComplete._cloneObject=function(D){if(!YAHOO.lang.isValue(D)){return D;
+}var F={};if(YAHOO.lang.isFunction(D)){F=D;}else{if(YAHOO.lang.isArray(D)){var E=[];for(var C=0,B=D.length;C<B;C++){E[C]=YAHOO.widget.AutoComplete._cloneObject(D[C]);}F=E;}else{if(YAHOO.lang.isObject(D)){for(var A in D){if(YAHOO.lang.hasOwnProperty(D,A)){if(YAHOO.lang.isValue(D[A])&&YAHOO.lang.isObject(D[A])||YAHOO.lang.isArray(D[A])){F[A]=YAHOO.widget.AutoComplete._cloneObject(D[A]);}else{F[A]=D[A];}}}}else{F=D;}}}return F;};YAHOO.register("autocomplete",YAHOO.widget.AutoComplete,{version:"2.6.0",build:"1321"});
\ No newline at end of file


[33/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.js
new file mode 100644
index 0000000..6e2742c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.js
@@ -0,0 +1,3549 @@
+(function(){
+/*
+ * jQuery 1.2.6 - New Wave Javascript
+ *
+ * Copyright (c) 2008 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
+ * $Rev: 5685 $
+ */
+
+// Map over jQuery in case of overwrite
+var _jQuery = window.jQuery,
+// Map over the $ in case of overwrite
+	_$ = window.$;
+
+var jQuery = window.jQuery = window.$ = function( selector, context ) {
+	// The jQuery object is actually just the init constructor 'enhanced'
+	return new jQuery.fn.init( selector, context );
+};
+
+// A simple way to check for HTML strings or ID strings
+// (both of which we optimize for)
+var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,
+
+// Is it a simple selector
+	isSimple = /^.[^:#\[\.]*$/,
+
+// Will speed up references to undefined, and allows munging its name.
+	undefined;
+
+jQuery.fn = jQuery.prototype = {
+	init: function( selector, context ) {
+		// Make sure that a selection was provided
+		selector = selector || document;
+
+		// Handle $(DOMElement)
+		if ( selector.nodeType ) {
+			this[0] = selector;
+			this.length = 1;
+			return this;
+		}
+		// Handle HTML strings
+		if ( typeof selector == "string" ) {
+			// Are we dealing with HTML string or an ID?
+			var match = quickExpr.exec( selector );
+
+			// Verify a match, and that no context was specified for #id
+			if ( match && (match[1] || !context) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[1] )
+					selector = jQuery.clean( [ match[1] ], context );
+
+				// HANDLE: $("#id")
+				else {
+					var elem = document.getElementById( match[3] );
+
+					// Make sure an element was located
+					if ( elem ){
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id != match[3] )
+							return jQuery().find( selector );
+
+						// Otherwise, we inject the element directly into the jQuery object
+						return jQuery( elem );
+					}
+					selector = [];
+				}
+
+			// HANDLE: $(expr, [context])
+			// (which is just equivalent to: $(content).find(expr)
+			} else
+				return jQuery( context ).find( selector );
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) )
+			return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector );
+
+		return this.setArray(jQuery.makeArray(selector));
+	},
+
+	// The current version of jQuery being used
+	jquery: "1.2.6",
+
+	// The number of elements contained in the matched element set
+	size: function() {
+		return this.length;
+	},
+
+	// The number of elements contained in the matched element set
+	length: 0,
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num == undefined ?
+
+			// Return a 'clean' array
+			jQuery.makeArray( this ) :
+
+			// Return just the object
+			this[ num ];
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems ) {
+		// Build a new jQuery matched element set
+		var ret = jQuery( elems );
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Force the current matched set of elements to become
+	// the specified array of elements (destroying the stack in the process)
+	// You should use pushStack() in order to do this, but maintain the stack
+	setArray: function( elems ) {
+		// Resetting the length to 0, then using the native Array push
+		// is a super-fast way to populate an object with array-like properties
+		this.length = 0;
+		Array.prototype.push.apply( this, elems );
+
+		return this;
+	},
+
+	// Execute a callback for every element in the matched set.
+	// (You can seed the arguments with an array of args, but this is
+	// only used internally.)
+	each: function( callback, args ) {
+		return jQuery.each( this, callback, args );
+	},
+
+	// Determine the position of an element within
+	// the matched set of elements
+	index: function( elem ) {
+		var ret = -1;
+
+		// Locate the position of the desired element
+		return jQuery.inArray(
+			// If it receives a jQuery object, the first element is used
+			elem && elem.jquery ? elem[0] : elem
+		, this );
+	},
+
+	attr: function( name, value, type ) {
+		var options = name;
+
+		// Look for the case where we're accessing a style value
+		if ( name.constructor == String )
+			if ( value === undefined )
+				return this[0] && jQuery[ type || "attr" ]( this[0], name );
+
+			else {
+				options = {};
+				options[ name ] = value;
+			}
+
+		// Check to see if we're setting style values
+		return this.each(function(i){
+			// Set all the styles
+			for ( name in options )
+				jQuery.attr(
+					type ?
+						this.style :
+						this,
+					name, jQuery.prop( this, options[ name ], type, i, name )
+				);
+		});
+	},
+
+	css: function( key, value ) {
+		// ignore negative width and height values
+		if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
+			value = undefined;
+		return this.attr( key, value, "curCSS" );
+	},
+
+	text: function( text ) {
+		if ( typeof text != "object" && text != null )
+			return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
+
+		var ret = "";
+
+		jQuery.each( text || this, function(){
+			jQuery.each( this.childNodes, function(){
+				if ( this.nodeType != 8 )
+					ret += this.nodeType != 1 ?
+						this.nodeValue :
+						jQuery.fn.text( [ this ] );
+			});
+		});
+
+		return ret;
+	},
+
+	wrapAll: function( html ) {
+		if ( this[0] )
+			// The elements to wrap the target around
+			jQuery( html, this[0].ownerDocument )
+				.clone()
+				.insertBefore( this[0] )
+				.map(function(){
+					var elem = this;
+
+					while ( elem.firstChild )
+						elem = elem.firstChild;
+
+					return elem;
+				})
+				.append(this);
+
+		return this;
+	},
+
+	wrapInner: function( html ) {
+		return this.each(function(){
+			jQuery( this ).contents().wrapAll( html );
+		});
+	},
+
+	wrap: function( html ) {
+		return this.each(function(){
+			jQuery( this ).wrapAll( html );
+		});
+	},
+
+	append: function() {
+		return this.domManip(arguments, true, false, function(elem){
+			if (this.nodeType == 1)
+				this.appendChild( elem );
+		});
+	},
+
+	prepend: function() {
+		return this.domManip(arguments, true, true, function(elem){
+			if (this.nodeType == 1)
+				this.insertBefore( elem, this.firstChild );
+		});
+	},
+
+	before: function() {
+		return this.domManip(arguments, false, false, function(elem){
+			this.parentNode.insertBefore( elem, this );
+		});
+	},
+
+	after: function() {
+		return this.domManip(arguments, false, true, function(elem){
+			this.parentNode.insertBefore( elem, this.nextSibling );
+		});
+	},
+
+	end: function() {
+		return this.prevObject || jQuery( [] );
+	},
+
+	find: function( selector ) {
+		var elems = jQuery.map(this, function(elem){
+			return jQuery.find( selector, elem );
+		});
+
+		return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ?
+			jQuery.unique( elems ) :
+			elems );
+	},
+
+	clone: function( events ) {
+		// Do the clone
+		var ret = this.map(function(){
+			if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) {
+				// IE copies events bound via attachEvent when
+				// using cloneNode. Calling detachEvent on the
+				// clone will also remove the events from the orignal
+				// In order to get around this, we use innerHTML.
+				// Unfortunately, this means some modifications to
+				// attributes in IE that are actually only stored
+				// as properties will not be copied (such as the
+				// the name attribute on an input).
+				var clone = this.cloneNode(true),
+					container = document.createElement("div");
+				container.appendChild(clone);
+				return jQuery.clean([container.innerHTML])[0];
+			} else
+				return this.cloneNode(true);
+		});
+
+		// Need to set the expando to null on the cloned set if it exists
+		// removeData doesn't work here, IE removes it from the original as well
+		// this is primarily for IE but the data expando shouldn't be copied over in any browser
+		var clone = ret.find("*").andSelf().each(function(){
+			if ( this[ expando ] != undefined )
+				this[ expando ] = null;
+		});
+
+		// Copy the events from the original to the clone
+		if ( events === true )
+			this.find("*").andSelf().each(function(i){
+				if (this.nodeType == 3)
+					return;
+				var events = jQuery.data( this, "events" );
+
+				for ( var type in events )
+					for ( var handler in events[ type ] )
+						jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data );
+			});
+
+		// Return the cloned set
+		return ret;
+	},
+
+	filter: function( selector ) {
+		return this.pushStack(
+			jQuery.isFunction( selector ) &&
+			jQuery.grep(this, function(elem, i){
+				return selector.call( elem, i );
+			}) ||
+
+			jQuery.multiFilter( selector, this ) );
+	},
+
+	not: function( selector ) {
+		if ( selector.constructor == String )
+			// test special case where just one selector is passed in
+			if ( isSimple.test( selector ) )
+				return this.pushStack( jQuery.multiFilter( selector, this, true ) );
+			else
+				selector = jQuery.multiFilter( selector, this );
+
+		var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;
+		return this.filter(function() {
+            return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;
+		});
+	},
+
+	add: function( selector ) {
+		return this.pushStack( jQuery.unique( jQuery.merge(
+			this.get(),
+			typeof selector == 'string' ?
+				jQuery( selector ) :
+				jQuery.makeArray( selector )
+		)));
+	},
+
+	is: function( selector ) {
+		return !!selector && jQuery.multiFilter( selector, this ).length > 0;
+	},
+
+	hasClass: function( selector ) {
+		return this.is( "." + selector );
+	},
+
+	val: function( value ) {
+		if ( value == undefined ) {
+
+			if ( this.length ) {
+				var elem = this[0];
+
+				// We need to handle select boxes special
+				if ( jQuery.nodeName( elem, "select" ) ) {
+					var index = elem.selectedIndex,
+						values = [],
+						options = elem.options,
+						one = elem.type == "select-one";
+
+					// Nothing was selected
+					if ( index < 0 )
+						return null;
+
+					// Loop through all the selected options
+					for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
+						var option = options[ i ];
+
+						if ( option.selected ) {
+							// Get the specifc value for the option
+							value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value;
+
+							// We don't need an array for one selects
+							if ( one )
+								return value;
+
+							// Multi-Selects return an array
+							values.push( value );
+						}
+					}
+
+					return values;
+
+				// Everything else, we just grab the value
+				} else
+					return (this[0].value || "").replace(/\r/g, "");
+
+			}
+
+			return undefined;
+		}
+
+		if( value.constructor == Number )
+			value += '';
+
+		return this.each(function(){
+			if ( this.nodeType != 1 )
+				return;
+
+			if ( value.constructor == Array && /radio|checkbox/.test( this.type ) )
+				this.checked = (jQuery.inArray(this.value, value) >= 0 ||
+					jQuery.inArray(this.name, value) >= 0);
+
+			else if ( jQuery.nodeName( this, "select" ) ) {
+				var values = jQuery.makeArray(value);
+
+				jQuery( "option", this ).each(function(){
+					this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
+						jQuery.inArray( this.text, values ) >= 0);
+				});
+
+				if ( !values.length )
+					this.selectedIndex = -1;
+
+			} else
+				this.value = value;
+		});
+	},
+
+	html: function( value ) {
+		return value == undefined ?
+			(this[0] ?
+				this[0].innerHTML :
+				null) :
+			this.empty().append( value );
+	},
+
+	replaceWith: function( value ) {
+		return this.after( value ).remove();
+	},
+
+	eq: function( i ) {
+		return this.slice( i, i + 1 );
+	},
+
+	slice: function() {
+		return this.pushStack( Array.prototype.slice.apply( this, arguments ) );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map(this, function(elem, i){
+			return callback.call( elem, i, elem );
+		}));
+	},
+
+	andSelf: function() {
+		return this.add( this.prevObject );
+	},
+
+	data: function( key, value ){
+		var parts = key.split(".");
+		parts[1] = parts[1] ? "." + parts[1] : "";
+
+		if ( value === undefined ) {
+			var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+
+			if ( data === undefined && this.length )
+				data = jQuery.data( this[0], key );
+
+			return data === undefined && parts[1] ?
+				this.data( parts[0] ) :
+				data;
+		} else
+			return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
+				jQuery.data( this, key, value );
+			});
+	},
+
+	removeData: function( key ){
+		return this.each(function(){
+			jQuery.removeData( this, key );
+		});
+	},
+
+	domManip: function( args, table, reverse, callback ) {
+		var clone = this.length > 1, elems;
+
+		return this.each(function(){
+			if ( !elems ) {
+				elems = jQuery.clean( args, this.ownerDocument );
+
+				if ( reverse )
+					elems.reverse();
+			}
+
+			var obj = this;
+
+			if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) )
+				obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") );
+
+			var scripts = jQuery( [] );
+
+			jQuery.each(elems, function(){
+				var elem = clone ?
+					jQuery( this ).clone( true )[0] :
+					this;
+
+				// execute all scripts after the elements have been injected
+				if ( jQuery.nodeName( elem, "script" ) )
+					scripts = scripts.add( elem );
+				else {
+					// Remove any inner scripts for later evaluation
+					if ( elem.nodeType == 1 )
+						scripts = scripts.add( jQuery( "script", elem ).remove() );
+
+					// Inject the elements into the document
+					callback.call( obj, elem );
+				}
+			});
+
+			scripts.each( evalScript );
+		});
+	}
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+function evalScript( i, elem ) {
+	if ( elem.src )
+		jQuery.ajax({
+			url: elem.src,
+			async: false,
+			dataType: "script"
+		});
+
+	else
+		jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
+
+	if ( elem.parentNode )
+		elem.parentNode.removeChild( elem );
+}
+
+function now(){
+	return +new Date;
+}
+
+jQuery.extend = jQuery.fn.extend = function() {
+	// copy reference to target object
+	var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;
+
+	// Handle a deep copy situation
+	if ( target.constructor == Boolean ) {
+		deep = target;
+		target = arguments[1] || {};
+		// skip the boolean and the target
+		i = 2;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target != "object" && typeof target != "function" )
+		target = {};
+
+	// extend jQuery itself if only one argument is passed
+	if ( length == i ) {
+		target = this;
+		--i;
+	}
+
+	for ( ; i < length; i++ )
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null )
+			// Extend the base object
+			for ( var name in options ) {
+				var src = target[ name ], copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy )
+					continue;
+
+				// Recurse if we're merging object values
+				if ( deep && copy && typeof copy == "object" && !copy.nodeType )
+					target[ name ] = jQuery.extend( deep,
+						// Never move original objects, clone them
+						src || ( copy.length != null ? [ ] : { } )
+					, copy );
+
+				// Don't bring in undefined values
+				else if ( copy !== undefined )
+					target[ name ] = copy;
+
+			}
+
+	// Return the modified object
+	return target;
+};
+
+var expando = "jQuery" + now(), uuid = 0, windowData = {},
+	// exclude the following css properties to add px
+	exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
+	// cache defaultView
+	defaultView = document.defaultView || {};
+
+jQuery.extend({
+	noConflict: function( deep ) {
+		window.$ = _$;
+
+		if ( deep )
+			window.jQuery = _jQuery;
+
+		return jQuery;
+	},
+
+	// See test/unit/core.js for details concerning this function.
+	isFunction: function( fn ) {
+		return !!fn && typeof fn != "string" && !fn.nodeName &&
+			fn.constructor != Array && /^[\s[]?function/.test( fn + "" );
+	},
+
+	// check if an element is in a (or is an) XML document
+	isXMLDoc: function( elem ) {
+		return elem.documentElement && !elem.body ||
+			elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
+	},
+
+	// Evalulates a script in a global context
+	globalEval: function( data ) {
+		data = jQuery.trim( data );
+
+		if ( data ) {
+			// Inspired by code by Andrea Giammarchi
+			// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
+			var head = document.getElementsByTagName("head")[0] || document.documentElement,
+				script = document.createElement("script");
+
+			script.type = "text/javascript";
+			if ( jQuery.browser.msie )
+				script.text = data;
+			else
+				script.appendChild( document.createTextNode( data ) );
+
+			// Use insertBefore instead of appendChild  to circumvent an IE6 bug.
+			// This arises when a base node is used (#2709).
+			head.insertBefore( script, head.firstChild );
+			head.removeChild( script );
+		}
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
+	},
+
+	cache: {},
+
+	data: function( elem, name, data ) {
+		elem = elem == window ?
+			windowData :
+			elem;
+
+		var id = elem[ expando ];
+
+		// Compute a unique ID for the element
+		if ( !id )
+			id = elem[ expando ] = ++uuid;
+
+		// Only generate the data cache if we're
+		// trying to access or manipulate it
+		if ( name && !jQuery.cache[ id ] )
+			jQuery.cache[ id ] = {};
+
+		// Prevent overriding the named cache with undefined values
+		if ( data !== undefined )
+			jQuery.cache[ id ][ name ] = data;
+
+		// Return the named cache data, or the ID for the element
+		return name ?
+			jQuery.cache[ id ][ name ] :
+			id;
+	},
+
+	removeData: function( elem, name ) {
+		elem = elem == window ?
+			windowData :
+			elem;
+
+		var id = elem[ expando ];
+
+		// If we want to remove a specific section of the element's data
+		if ( name ) {
+			if ( jQuery.cache[ id ] ) {
+				// Remove the section of cache data
+				delete jQuery.cache[ id ][ name ];
+
+				// If we've removed all the data, remove the element's cache
+				name = "";
+
+				for ( name in jQuery.cache[ id ] )
+					break;
+
+				if ( !name )
+					jQuery.removeData( elem );
+			}
+
+		// Otherwise, we want to remove all of the element's data
+		} else {
+			// Clean up the element expando
+			try {
+				delete elem[ expando ];
+			} catch(e){
+				// IE has trouble directly removing the expando
+				// but it's ok with using removeAttribute
+				if ( elem.removeAttribute )
+					elem.removeAttribute( expando );
+			}
+
+			// Completely remove the data cache
+			delete jQuery.cache[ id ];
+		}
+	},
+
+	// args is for internal usage only
+	each: function( object, callback, args ) {
+		var name, i = 0, length = object.length;
+
+		if ( args ) {
+			if ( length == undefined ) {
+				for ( name in object )
+					if ( callback.apply( object[ name ], args ) === false )
+						break;
+			} else
+				for ( ; i < length; )
+					if ( callback.apply( object[ i++ ], args ) === false )
+						break;
+
+		// A special, fast, case for the most common use of each
+		} else {
+			if ( length == undefined ) {
+				for ( name in object )
+					if ( callback.call( object[ name ], name, object[ name ] ) === false )
+						break;
+			} else
+				for ( var value = object[0];
+					i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
+		}
+
+		return object;
+	},
+
+	prop: function( elem, value, type, i, name ) {
+		// Handle executable functions
+		if ( jQuery.isFunction( value ) )
+			value = value.call( elem, i );
+
+		// Handle passing in a number to a CSS property
+		return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ?
+			value + "px" :
+			value;
+	},
+
+	className: {
+		// internal only, use addClass("class")
+		add: function( elem, classNames ) {
+			jQuery.each((classNames || "").split(/\s+/), function(i, className){
+				if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )
+					elem.className += (elem.className ? " " : "") + className;
+			});
+		},
+
+		// internal only, use removeClass("class")
+		remove: function( elem, classNames ) {
+			if (elem.nodeType == 1)
+				elem.className = classNames != undefined ?
+					jQuery.grep(elem.className.split(/\s+/), function(className){
+						return !jQuery.className.has( classNames, className );
+					}).join(" ") :
+					"";
+		},
+
+		// internal only, use hasClass("class")
+		has: function( elem, className ) {
+			return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
+		}
+	},
+
+	// A method for quickly swapping in/out CSS properties to get correct calculations
+	swap: function( elem, options, callback ) {
+		var old = {};
+		// Remember the old values, and insert the new ones
+		for ( var name in options ) {
+			old[ name ] = elem.style[ name ];
+			elem.style[ name ] = options[ name ];
+		}
+
+		callback.call( elem );
+
+		// Revert the old values
+		for ( var name in options )
+			elem.style[ name ] = old[ name ];
+	},
+
+	css: function( elem, name, force ) {
+		if ( name == "width" || name == "height" ) {
+			var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
+
+			function getWH() {
+				val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
+				var padding = 0, border = 0;
+				jQuery.each( which, function() {
+					padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
+					border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
+				});
+				val -= Math.round(padding + border);
+			}
+
+			if ( jQuery(elem).is(":visible") )
+				getWH();
+			else
+				jQuery.swap( elem, props, getWH );
+
+			return Math.max(0, val);
+		}
+
+		return jQuery.curCSS( elem, name, force );
+	},
+
+	curCSS: function( elem, name, force ) {
+		var ret, style = elem.style;
+
+		// A helper method for determining if an element's values are broken
+		function color( elem ) {
+			if ( !jQuery.browser.safari )
+				return false;
+
+			// defaultView is cached
+			var ret = defaultView.getComputedStyle( elem, null );
+			return !ret || ret.getPropertyValue("color") == "";
+		}
+
+		// We need to handle opacity special in IE
+		if ( name == "opacity" && jQuery.browser.msie ) {
+			ret = jQuery.attr( style, "opacity" );
+
+			return ret == "" ?
+				"1" :
+				ret;
+		}
+		// Opera sometimes will give the wrong display answer, this fixes it, see #2037
+		if ( jQuery.browser.opera && name == "display" ) {
+			var save = style.outline;
+			style.outline = "0 solid black";
+			style.outline = save;
+		}
+
+		// Make sure we're using the right name for getting the float value
+		if ( name.match( /float/i ) )
+			name = styleFloat;
+
+		if ( !force && style && style[ name ] )
+			ret = style[ name ];
+
+		else if ( defaultView.getComputedStyle ) {
+
+			// Only "float" is needed here
+			if ( name.match( /float/i ) )
+				name = "float";
+
+			name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();
+
+			var computedStyle = defaultView.getComputedStyle( elem, null );
+
+			if ( computedStyle && !color( elem ) )
+				ret = computedStyle.getPropertyValue( name );
+
+			// If the element isn't reporting its values properly in Safari
+			// then some display: none elements are involved
+			else {
+				var swap = [], stack = [], a = elem, i = 0;
+
+				// Locate all of the parent display: none elements
+				for ( ; a && color(a); a = a.parentNode )
+					stack.unshift(a);
+
+				// Go through and make them visible, but in reverse
+				// (It would be better if we knew the exact display type that they had)
+				for ( ; i < stack.length; i++ )
+					if ( color( stack[ i ] ) ) {
+						swap[ i ] = stack[ i ].style.display;
+						stack[ i ].style.display = "block";
+					}
+
+				// Since we flip the display style, we have to handle that
+				// one special, otherwise get the value
+				ret = name == "display" && swap[ stack.length - 1 ] != null ?
+					"none" :
+					( computedStyle && computedStyle.getPropertyValue( name ) ) || "";
+
+				// Finally, revert the display styles back
+				for ( i = 0; i < swap.length; i++ )
+					if ( swap[ i ] != null )
+						stack[ i ].style.display = swap[ i ];
+			}
+
+			// We should always get a number back from opacity
+			if ( name == "opacity" && ret == "" )
+				ret = "1";
+
+		} else if ( elem.currentStyle ) {
+			var camelCase = name.replace(/\-(\w)/g, function(all, letter){
+				return letter.toUpperCase();
+			});
+
+			ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
+
+			// From the awesome hack by Dean Edwards
+			// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+			// If we're not dealing with a regular pixel number
+			// but a number that has a weird ending, we need to convert it to pixels
+			if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
+				// Remember the original values
+				var left = style.left, rsLeft = elem.runtimeStyle.left;
+
+				// Put in the new values to get a computed value out
+				elem.runtimeStyle.left = elem.currentStyle.left;
+				style.left = ret || 0;
+				ret = style.pixelLeft + "px";
+
+				// Revert the changed values
+				style.left = left;
+				elem.runtimeStyle.left = rsLeft;
+			}
+		}
+
+		return ret;
+	},
+
+	clean: function( elems, context ) {
+		var ret = [];
+		context = context || document;
+		// !context.createElement fails in IE with an error but returns typeof 'object'
+		if (typeof context.createElement == 'undefined')
+			context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+
+		jQuery.each(elems, function(i, elem){
+			if ( !elem )
+				return;
+
+			if ( elem.constructor == Number )
+				elem += '';
+
+			// Convert html string into DOM nodes
+			if ( typeof elem == "string" ) {
+				// Fix "XHTML"-style tags in all browsers
+				elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
+					return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
+						all :
+						front + "></" + tag + ">";
+				});
+
+				// Trim whitespace, otherwise indexOf won't work as expected
+				var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div");
+
+				var wrap =
+					// option or optgroup
+					!tags.indexOf("<opt") &&
+					[ 1, "<select multiple='multiple'>", "</select>" ] ||
+
+					!tags.indexOf("<leg") &&
+					[ 1, "<fieldset>", "</fieldset>" ] ||
+
+					tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
+					[ 1, "<table>", "</table>" ] ||
+
+					!tags.indexOf("<tr") &&
+					[ 2, "<table><tbody>", "</tbody></table>" ] ||
+
+				 	// <thead> matched above
+					(!tags.indexOf("<td") || !tags.indexOf("<th")) &&
+					[ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] ||
+
+					!tags.indexOf("<col") &&
+					[ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] ||
+
+					// IE can't serialize <link> and <script> tags normally
+					jQuery.browser.msie &&
+					[ 1, "div<div>", "</div>" ] ||
+
+					[ 0, "", "" ];
+
+				// Go to html and back, then peel off extra wrappers
+				div.innerHTML = wrap[1] + elem + wrap[2];
+
+				// Move to the right depth
+				while ( wrap[0]-- )
+					div = div.lastChild;
+
+				// Remove IE's autoinserted <tbody> from table fragments
+				if ( jQuery.browser.msie ) {
+
+					// String was a <table>, *may* have spurious <tbody>
+					var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ?
+						div.firstChild && div.firstChild.childNodes :
+
+						// String was a bare <thead> or <tfoot>
+						wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ?
+							div.childNodes :
+							[];
+
+					for ( var j = tbody.length - 1; j >= 0 ; --j )
+						if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length )
+							tbody[ j ].parentNode.removeChild( tbody[ j ] );
+
+					// IE completely kills leading whitespace when innerHTML is used
+					if ( /^\s/.test( elem ) )
+						div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
+
+				}
+
+				elem = jQuery.makeArray( div.childNodes );
+			}
+
+			if ( elem.length === 0 && (!jQuery.nodeName( elem, "form" ) && !jQuery.nodeName( elem, "select" )) )
+				return;
+
+			if ( elem[0] == undefined || jQuery.nodeName( elem, "form" ) || elem.options )
+				ret.push( elem );
+
+			else
+				ret = jQuery.merge( ret, elem );
+
+		});
+
+		return ret;
+	},
+
+	attr: function( elem, name, value ) {
+		// don't set attributes on text and comment nodes
+		if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
+			return undefined;
+
+		var notxml = !jQuery.isXMLDoc( elem ),
+			// Whether we are setting (or getting)
+			set = value !== undefined,
+			msie = jQuery.browser.msie;
+
+		// Try to normalize/fix the name
+		name = notxml && jQuery.props[ name ] || name;
+
+		// Only do all the following if this is a node (faster for style)
+		// IE elem.getAttribute passes even for style
+		if ( elem.tagName ) {
+
+			// These attributes require special treatment
+			var special = /href|src|style/.test( name );
+
+			// Safari mis-reports the default selected property of a hidden option
+			// Accessing the parent's selectedIndex property fixes it
+			if ( name == "selected" && jQuery.browser.safari )
+				elem.parentNode.selectedIndex;
+
+			// If applicable, access the attribute via the DOM 0 way
+			if ( name in elem && notxml && !special ) {
+				if ( set ){
+					// We can't allow the type property to be changed (since it causes problems in IE)
+					if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode )
+						throw "type property can't be changed";
+
+					elem[ name ] = value;
+				}
+
+				// browsers index elements by id/name on forms, give priority to attributes.
+				if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) )
+					return elem.getAttributeNode( name ).nodeValue;
+
+				return elem[ name ];
+			}
+
+			if ( msie && notxml &&  name == "style" )
+				return jQuery.attr( elem.style, "cssText", value );
+
+			if ( set )
+				// convert the value to a string (all browsers do this but IE) see #1070
+				elem.setAttribute( name, "" + value );
+
+			var attr = msie && notxml && special
+					// Some attributes require a special call on IE
+					? elem.getAttribute( name, 2 )
+					: elem.getAttribute( name );
+
+			// Non-existent attributes return null, we normalize to undefined
+			return attr === null ? undefined : attr;
+		}
+
+		// elem is actually elem.style ... set the style
+
+		// IE uses filters for opacity
+		if ( msie && name == "opacity" ) {
+			if ( set ) {
+				// IE has trouble with opacity if it does not have layout
+				// Force it by setting the zoom level
+				elem.zoom = 1;
+
+				// Set the alpha filter to set the opacity
+				elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
+					(parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
+			}
+
+			return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
+				(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
+				"";
+		}
+
+		name = name.replace(/-([a-z])/ig, function(all, letter){
+			return letter.toUpperCase();
+		});
+
+		if ( set )
+			elem[ name ] = value;
+
+		return elem[ name ];
+	},
+
+	trim: function( text ) {
+		return (text || "").replace( /^\s+|\s+$/g, "" );
+	},
+
+	makeArray: function( array ) {
+		var ret = [];
+
+		if( array != null ){
+			var i = array.length;
+			//the window, strings and functions also have 'length'
+			if( i == null || array.split || array.setInterval || array.call )
+				ret[0] = array;
+			else
+				while( i )
+					ret[--i] = array[i];
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, array ) {
+		for ( var i = 0, length = array.length; i < length; i++ )
+		// Use === because on IE, window == document
+			if ( array[ i ] === elem )
+				return i;
+
+		return -1;
+	},
+
+	merge: function( first, second ) {
+		// We have to loop this way because IE & Opera overwrite the length
+		// expando of getElementsByTagName
+		var i = 0, elem, pos = first.length;
+		// Also, we need to make sure that the correct elements are being returned
+		// (IE returns comment nodes in a '*' query)
+		if ( jQuery.browser.msie ) {
+			while ( elem = second[ i++ ] )
+				if ( elem.nodeType != 8 )
+					first[ pos++ ] = elem;
+
+		} else
+			while ( elem = second[ i++ ] )
+				first[ pos++ ] = elem;
+
+		return first;
+	},
+
+	unique: function( array ) {
+		var ret = [], done = {};
+
+		try {
+
+			for ( var i = 0, length = array.length; i < length; i++ ) {
+				var id = jQuery.data( array[ i ] );
+
+				if ( !done[ id ] ) {
+					done[ id ] = true;
+					ret.push( array[ i ] );
+				}
+			}
+
+		} catch( e ) {
+			ret = array;
+		}
+
+		return ret;
+	},
+
+	grep: function( elems, callback, inv ) {
+		var ret = [];
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( var i = 0, length = elems.length; i < length; i++ )
+			if ( !inv != !callback( elems[ i ], i ) )
+				ret.push( elems[ i ] );
+
+		return ret;
+	},
+
+	map: function( elems, callback ) {
+		var ret = [];
+
+		// Go through the array, translating each of the items to their
+		// new value (or values).
+		for ( var i = 0, length = elems.length; i < length; i++ ) {
+			var value = callback( elems[ i ], i );
+
+			if ( value != null )
+				ret[ ret.length ] = value;
+		}
+
+		return ret.concat.apply( [], ret );
+	}
+});
+
+var userAgent = navigator.userAgent.toLowerCase();
+
+// Figure out what browser is being used
+jQuery.browser = {
+	version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1],
+	safari: /webkit/.test( userAgent ),
+	opera: /opera/.test( userAgent ),
+	msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
+	mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
+};
+
+var styleFloat = jQuery.browser.msie ?
+	"styleFloat" :
+	"cssFloat";
+
+jQuery.extend({
+	// Check to see if the W3C box model is being used
+	boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
+
+	props: {
+		"for": "htmlFor",
+		"class": "className",
+		"float": styleFloat,
+		cssFloat: styleFloat,
+		styleFloat: styleFloat,
+		readonly: "readOnly",
+		maxlength: "maxLength",
+		cellspacing: "cellSpacing"
+	}
+});
+
+jQuery.each({
+	parent: function(elem){return elem.parentNode;},
+	parents: function(elem){return jQuery.dir(elem,"parentNode");},
+	next: function(elem){return jQuery.nth(elem,2,"nextSibling");},
+	prev: function(elem){return jQuery.nth(elem,2,"previousSibling");},
+	nextAll: function(elem){return jQuery.dir(elem,"nextSibling");},
+	prevAll: function(elem){return jQuery.dir(elem,"previousSibling");},
+	siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},
+	children: function(elem){return jQuery.sibling(elem.firstChild);},
+	contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}
+}, function(name, fn){
+	jQuery.fn[ name ] = function( selector ) {
+		var ret = jQuery.map( this, fn );
+
+		if ( selector && typeof selector == "string" )
+			ret = jQuery.multiFilter( selector, ret );
+
+		return this.pushStack( jQuery.unique( ret ) );
+	};
+});
+
+jQuery.each({
+	appendTo: "append",
+	prependTo: "prepend",
+	insertBefore: "before",
+	insertAfter: "after",
+	replaceAll: "replaceWith"
+}, function(name, original){
+	jQuery.fn[ name ] = function() {
+		var args = arguments;
+
+		return this.each(function(){
+			for ( var i = 0, length = args.length; i < length; i++ )
+				jQuery( args[ i ] )[ original ]( this );
+		});
+	};
+});
+
+jQuery.each({
+	removeAttr: function( name ) {
+		jQuery.attr( this, name, "" );
+		if (this.nodeType == 1)
+			this.removeAttribute( name );
+	},
+
+	addClass: function( classNames ) {
+		jQuery.className.add( this, classNames );
+	},
+
+	removeClass: function( classNames ) {
+		jQuery.className.remove( this, classNames );
+	},
+
+	toggleClass: function( classNames ) {
+		jQuery.className[ jQuery.className.has( this, classNames ) ? "remove" : "add" ]( this, classNames );
+	},
+
+	remove: function( selector ) {
+		if ( !selector || jQuery.filter( selector, [ this ] ).r.length ) {
+			// Prevent memory leaks
+			jQuery( "*", this ).add(this).each(function(){
+				jQuery.event.remove(this);
+				jQuery.removeData(this);
+			});
+			if (this.parentNode)
+				this.parentNode.removeChild( this );
+		}
+	},
+
+	empty: function() {
+		// Remove element nodes and prevent memory leaks
+		jQuery( ">*", this ).remove();
+
+		// Remove any remaining nodes
+		while ( this.firstChild )
+			this.removeChild( this.firstChild );
+	}
+}, function(name, fn){
+	jQuery.fn[ name ] = function(){
+		return this.each( fn, arguments );
+	};
+});
+
+jQuery.each([ "Height", "Width" ], function(i, name){
+	var type = name.toLowerCase();
+
+	jQuery.fn[ type ] = function( size ) {
+		// Get window width or height
+		return this[0] == window ?
+			// Opera reports document.body.client[Width/Height] properly in both quirks and standards
+			jQuery.browser.opera && document.body[ "client" + name ] ||
+
+			// Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths)
+			jQuery.browser.safari && window[ "inner" + name ] ||
+
+			// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
+			document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] :
+
+			// Get document width or height
+			this[0] == document ?
+				// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+				Math.max(
+					Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]),
+					Math.max(document.body["offset" + name], document.documentElement["offset" + name])
+				) :
+
+				// Get or set width or height on the element
+				size == undefined ?
+					// Get width or height on the element
+					(this.length ? jQuery.css( this[0], type ) : null) :
+
+					// Set the width or height on the element (default to pixels if value is unitless)
+					this.css( type, size.constructor == String ? size : size + "px" );
+	};
+});
+
+// Helper function used by the dimensions and offset modules
+function num(elem, prop) {
+	return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
+}var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
+		"(?:[\\w*_-]|\\\\.)" :
+		"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
+	quickChild = new RegExp("^>\\s*(" + chars + "+)"),
+	quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
+	quickClass = new RegExp("^([#.]?)(" + chars + "*)");
+
+jQuery.extend({
+	expr: {
+		"": function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},
+		"#": function(a,i,m){return a.getAttribute("id")==m[2];},
+		":": {
+			// Position Checks
+			lt: function(a,i,m){return i<m[3]-0;},
+			gt: function(a,i,m){return i>m[3]-0;},
+			nth: function(a,i,m){return m[3]-0==i;},
+			eq: function(a,i,m){return m[3]-0==i;},
+			first: function(a,i){return i==0;},
+			last: function(a,i,m,r){return i==r.length-1;},
+			even: function(a,i){return i%2==0;},
+			odd: function(a,i){return i%2;},
+
+			// Child Checks
+			"first-child": function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},
+			"last-child": function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},
+			"only-child": function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},
+
+			// Parent Checks
+			parent: function(a){return a.firstChild;},
+			empty: function(a){return !a.firstChild;},
+
+			// Text Check
+			contains: function(a,i,m){return (a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},
+
+			// Visibility
+			visible: function(a){return "hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},
+			hidden: function(a){return "hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},
+
+			// Form attributes
+			enabled: function(a){return !a.disabled;},
+			disabled: function(a){return a.disabled;},
+			checked: function(a){return a.checked;},
+			selected: function(a){return a.selected||jQuery.attr(a,"selected");},
+
+			// Form elements
+			text: function(a){return "text"==a.type;},
+			radio: function(a){return "radio"==a.type;},
+			checkbox: function(a){return "checkbox"==a.type;},
+			file: function(a){return "file"==a.type;},
+			password: function(a){return "password"==a.type;},
+			submit: function(a){return "submit"==a.type;},
+			image: function(a){return "image"==a.type;},
+			reset: function(a){return "reset"==a.type;},
+			button: function(a){return "button"==a.type||jQuery.nodeName(a,"button");},
+			input: function(a){return /input|select|textarea|button/i.test(a.nodeName);},
+
+			// :has()
+			has: function(a,i,m){return jQuery.find(m[3],a).length;},
+
+			// :header
+			header: function(a){return /h\d/i.test(a.nodeName);},
+
+			// :animated
+			animated: function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}
+		}
+	},
+
+	// The regular expressions that power the parsing engine
+	parse: [
+		// Match: [@value='test'], [@foo]
+		/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
+
+		// Match: :contains('foo')
+		/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,
+
+		// Match: :even, :last-child, #id, .class
+		new RegExp("^([:.#]*)(" + chars + "+)")
+	],
+
+	multiFilter: function( expr, elems, not ) {
+		var old, cur = [];
+
+		while ( expr && expr != old ) {
+			old = expr;
+			var f = jQuery.filter( expr, elems, not );
+			expr = f.t.replace(/^\s*,\s*/, "" );
+			cur = not ? elems = f.r : jQuery.merge( cur, f.r );
+		}
+
+		return cur;
+	},
+
+	find: function( t, context ) {
+		// Quickly handle non-string expressions
+		if ( typeof t != "string" )
+			return [ t ];
+
+		// check to make sure context is a DOM element or a document
+		if ( context && context.nodeType != 1 && context.nodeType != 9)
+			return [ ];
+
+		// Set the correct context (if none is provided)
+		context = context || document;
+
+		// Initialize the search
+		var ret = [context], done = [], last, nodeName;
+
+		// Continue while a selector expression exists, and while
+		// we're no longer looping upon ourselves
+		while ( t && last != t ) {
+			var r = [];
+			last = t;
+
+			t = jQuery.trim(t);
+
+			var foundToken = false,
+
+			// An attempt at speeding up child selectors that
+			// point to a specific element tag
+				re = quickChild,
+
+				m = re.exec(t);
+
+			if ( m ) {
+				nodeName = m[1].toUpperCase();
+
+				// Perform our own iteration and filter
+				for ( var i = 0; ret[i]; i++ )
+					for ( var c = ret[i].firstChild; c; c = c.nextSibling )
+						if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName) )
+							r.push( c );
+
+				ret = r;
+				t = t.replace( re, "" );
+				if ( t.indexOf(" ") == 0 ) continue;
+				foundToken = true;
+			} else {
+				re = /^([>+~])\s*(\w*)/i;
+
+				if ( (m = re.exec(t)) != null ) {
+					r = [];
+
+					var merge = {};
+					nodeName = m[2].toUpperCase();
+					m = m[1];
+
+					for ( var j = 0, rl = ret.length; j < rl; j++ ) {
+						var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild;
+						for ( ; n; n = n.nextSibling )
+							if ( n.nodeType == 1 ) {
+								var id = jQuery.data(n);
+
+								if ( m == "~" && merge[id] ) break;
+
+								if (!nodeName || n.nodeName.toUpperCase() == nodeName ) {
+									if ( m == "~" ) merge[id] = true;
+									r.push( n );
+								}
+
+								if ( m == "+" ) break;
+							}
+					}
+
+					ret = r;
+
+					// And remove the token
+					t = jQuery.trim( t.replace( re, "" ) );
+					foundToken = true;
+				}
+			}
+
+			// See if there's still an expression, and that we haven't already
+			// matched a token
+			if ( t && !foundToken ) {
+				// Handle multiple expressions
+				if ( !t.indexOf(",") ) {
+					// Clean the result set
+					if ( context == ret[0] ) ret.shift();
+
+					// Merge the result sets
+					done = jQuery.merge( done, ret );
+
+					// Reset the context
+					r = ret = [context];
+
+					// Touch up the selector string
+					t = " " + t.substr(1,t.length);
+
+				} else {
+					// Optimize for the case nodeName#idName
+					var re2 = quickID;
+					var m = re2.exec(t);
+
+					// Re-organize the results, so that they're consistent
+					if ( m ) {
+						m = [ 0, m[2], m[3], m[1] ];
+
+					} else {
+						// Otherwise, do a traditional filter check for
+						// ID, class, and element selectors
+						re2 = quickClass;
+						m = re2.exec(t);
+					}
+
+					m[2] = m[2].replace(/\\/g, "");
+
+					var elem = ret[ret.length-1];
+
+					// Try to do a global search by ID, where we can
+					if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
+						// Optimization for HTML document case
+						var oid = elem.getElementById(m[2]);
+
+						// Do a quick check for the existence of the actual ID attribute
+						// to avoid selecting by the name attribute in IE
+						// also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
+						if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )
+							oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
+
+						// Do a quick check for node name (where applicable) so
+						// that div#foo searches will be really fast
+						ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];
+					} else {
+						// We need to find all descendant elements
+						for ( var i = 0; ret[i]; i++ ) {
+							// Grab the tag name being searched for
+							var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2];
+
+							// Handle IE7 being really dumb about <object>s
+							if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" )
+								tag = "param";
+
+							r = jQuery.merge( r, ret[i].getElementsByTagName( tag ));
+						}
+
+						// It's faster to filter by class and be done with it
+						if ( m[1] == "." )
+							r = jQuery.classFilter( r, m[2] );
+
+						// Same with ID filtering
+						if ( m[1] == "#" ) {
+							var tmp = [];
+
+							// Try to find the element with the ID
+							for ( var i = 0; r[i]; i++ )
+								if ( r[i].getAttribute("id") == m[2] ) {
+									tmp = [ r[i] ];
+									break;
+								}
+
+							r = tmp;
+						}
+
+						ret = r;
+					}
+
+					t = t.replace( re2, "" );
+				}
+
+			}
+
+			// If a selector string still exists
+			if ( t ) {
+				// Attempt to filter it
+				var val = jQuery.filter(t,r);
+				ret = r = val.r;
+				t = jQuery.trim(val.t);
+			}
+		}
+
+		// An error occurred with the selector;
+		// just return an empty set instead
+		if ( t )
+			ret = [];
+
+		// Remove the root context
+		if ( ret && context == ret[0] )
+			ret.shift();
+
+		// And combine the results
+		done = jQuery.merge( done, ret );
+
+		return done;
+	},
+
+	classFilter: function(r,m,not){
+		m = " " + m + " ";
+		var tmp = [];
+		for ( var i = 0; r[i]; i++ ) {
+			var pass = (" " + r[i].className + " ").indexOf( m ) >= 0;
+			if ( !not && pass || not && !pass )
+				tmp.push( r[i] );
+		}
+		return tmp;
+	},
+
+	filter: function(t,r,not) {
+		var last;
+
+		// Look for common filter expressions
+		while ( t && t != last ) {
+			last = t;
+
+			var p = jQuery.parse, m;
+
+			for ( var i = 0; p[i]; i++ ) {
+				m = p[i].exec( t );
+
+				if ( m ) {
+					// Remove what we just matched
+					t = t.substring( m[0].length );
+
+					m[2] = m[2].replace(/\\/g, "");
+					break;
+				}
+			}
+
+			if ( !m )
+				break;
+
+			// :not() is a special case that can be optimized by
+			// keeping it out of the expression list
+			if ( m[1] == ":" && m[2] == "not" )
+				// optimize if only one selector found (most common case)
+				r = isSimple.test( m[3] ) ?
+					jQuery.filter(m[3], r, true).r :
+					jQuery( r ).not( m[3] );
+
+			// We can get a big speed boost by filtering by class here
+			else if ( m[1] == "." )
+				r = jQuery.classFilter(r, m[2], not);
+
+			else if ( m[1] == "[" ) {
+				var tmp = [], type = m[3];
+
+				for ( var i = 0, rl = r.length; i < rl; i++ ) {
+					var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
+
+					if ( z == null || /href|src|selected/.test(m[2]) )
+						z = jQuery.attr(a,m[2]) || '';
+
+					if ( (type == "" && !!z ||
+						 type == "=" && z == m[5] ||
+						 type == "!=" && z != m[5] ||
+						 type == "^=" && z && !z.indexOf(m[5]) ||
+						 type == "$=" && z.substr(z.length - m[5].length) == m[5] ||
+						 (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )
+							tmp.push( a );
+				}
+
+				r = tmp;
+
+			// We can get a speed boost by handling nth-child here
+			} else if ( m[1] == ":" && m[2] == "nth-child" ) {
+				var merge = {}, tmp = [],
+					// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+					test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
+						m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" ||
+						!/\D/.test(m[3]) && "0n+" + m[3] || m[3]),
+					// calculate the numbers (first)n+(last) including if they are negative
+					first = (test[1] + (test[2] || 1)) - 0, last = test[3] - 0;
+
+				// loop through all the elements left in the jQuery object
+				for ( var i = 0, rl = r.length; i < rl; i++ ) {
+					var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode);
+
+					if ( !merge[id] ) {
+						var c = 1;
+
+						for ( var n = parentNode.firstChild; n; n = n.nextSibling )
+							if ( n.nodeType == 1 )
+								n.nodeIndex = c++;
+
+						merge[id] = true;
+					}
+
+					var add = false;
+
+					if ( first == 0 ) {
+						if ( node.nodeIndex == last )
+							add = true;
+					} else if ( (node.nodeIndex - last) % first == 0 && (node.nodeIndex - last) / first >= 0 )
+						add = true;
+
+					if ( add ^ not )
+						tmp.push( node );
+				}
+
+				r = tmp;
+
+			// Otherwise, find the expression to execute
+			} else {
+				var fn = jQuery.expr[ m[1] ];
+				if ( typeof fn == "object" )
+					fn = fn[ m[2] ];
+
+				if ( typeof fn == "string" )
+					fn = eval("false||function(a,i){return " + fn + ";}");
+
+				// Execute it against the current filter
+				r = jQuery.grep( r, function(elem, i){
+					return fn(elem, i, m, r);
+				}, not );
+			}
+		}
+
+		// Return an array of filtered elements (r)
+		// and the modified expression string (t)
+		return { r: r, t: t };
+	},
+
+	dir: function( elem, dir ){
+		var matched = [],
+			cur = elem[dir];
+		while ( cur && cur != document ) {
+			if ( cur.nodeType == 1 )
+				matched.push( cur );
+			cur = cur[dir];
+		}
+		return matched;
+	},
+
+	nth: function(cur,result,dir,elem){
+		result = result || 1;
+		var num = 0;
+
+		for ( ; cur; cur = cur[dir] )
+			if ( cur.nodeType == 1 && ++num == result )
+				break;
+
+		return cur;
+	},
+
+	sibling: function( n, elem ) {
+		var r = [];
+
+		for ( ; n; n = n.nextSibling ) {
+			if ( n.nodeType == 1 && n != elem )
+				r.push( n );
+		}
+
+		return r;
+	}
+});
+/*
+ * A number of helper functions used for managing events.
+ * Many of the ideas behind this code orignated from
+ * Dean Edwards' addEvent library.
+ */
+jQuery.event = {
+
+	// Bind an event to an element
+	// Original by Dean Edwards
+	add: function(elem, types, handler, data) {
+		if ( elem.nodeType == 3 || elem.nodeType == 8 )
+			return;
+
+		// For whatever reason, IE has trouble passing the window object
+		// around, causing it to be cloned in the process
+		if ( jQuery.browser.msie && elem.setInterval )
+			elem = window;
+
+		// Make sure that the function being executed has a unique ID
+		if ( !handler.guid )
+			handler.guid = this.guid++;
+
+		// if data is passed, bind to handler
+		if( data != undefined ) {
+			// Create temporary function pointer to original handler
+			var fn = handler;
+
+			// Create unique handler function, wrapped around original handler
+			handler = this.proxy( fn, function() {
+				// Pass arguments and context to original handler
+				return fn.apply(this, arguments);
+			});
+
+			// Store data in unique handler
+			handler.data = data;
+		}
+
+		// Init the element's event structure
+		var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
+			handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
+				// Handle the second event of a trigger and when
+				// an event is called after a page has unloaded
+				if ( typeof jQuery != "undefined" && !jQuery.event.triggered )
+					return jQuery.event.handle.apply(arguments.callee.elem, arguments);
+			});
+		// Add elem as a property of the handle function
+		// This is to prevent a memory leak with non-native
+		// event in IE.
+		handle.elem = elem;
+
+		// Handle multiple events separated by a space
+		// jQuery(...).bind("mouseover mouseout", fn);
+		jQuery.each(types.split(/\s+/), function(index, type) {
+			// Namespaced event handlers
+			var parts = type.split(".");
+			type = parts[0];
+			handler.type = parts[1];
+
+			// Get the current list of functions bound to this event
+			var handlers = events[type];
+
+			// Init the event handler queue
+			if (!handlers) {
+				handlers = events[type] = {};
+
+				// Check for a special event handler
+				// Only use addEventListener/attachEvent if the special
+				// events handler returns false
+				if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem) === false ) {
+					// Bind the global event handler to the element
+					if (elem.addEventListener)
+						elem.addEventListener(type, handle, false);
+					else if (elem.attachEvent)
+						elem.attachEvent("on" + type, handle);
+				}
+			}
+
+			// Add the function to the element's handler list
+			handlers[handler.guid] = handler;
+
+			// Keep track of which events have been used, for global triggering
+			jQuery.event.global[type] = true;
+		});
+
+		// Nullify elem to prevent memory leaks in IE
+		elem = null;
+	},
+
+	guid: 1,
+	global: {},
+
+	// Detach an event or set of events from an element
+	remove: function(elem, types, handler) {
+		// don't do events on text and comment nodes
+		if ( elem.nodeType == 3 || elem.nodeType == 8 )
+			return;
+
+		var events = jQuery.data(elem, "events"), ret, index;
+
+		if ( events ) {
+			// Unbind all events for the element
+			if ( types == undefined || (typeof types == "string" && types.charAt(0) == ".") )
+				for ( var type in events )
+					this.remove( elem, type + (types || "") );
+			else {
+				// types is actually an event object here
+				if ( types.type ) {
+					handler = types.handler;
+					types = types.type;
+				}
+
+				// Handle multiple events seperated by a space
+				// jQuery(...).unbind("mouseover mouseout", fn);
+				jQuery.each(types.split(/\s+/), function(index, type){
+					// Namespaced event handlers
+					var parts = type.split(".");
+					type = parts[0];
+
+					if ( events[type] ) {
+						// remove the given handler for the given type
+						if ( handler )
+							delete events[type][handler.guid];
+
+						// remove all handlers for the given type
+						else
+							for ( handler in events[type] )
+								// Handle the removal of namespaced events
+								if ( !parts[1] || events[type][handler].type == parts[1] )
+									delete events[type][handler];
+
+						// remove generic event handler if no more handlers exist
+						for ( ret in events[type] ) break;
+						if ( !ret ) {
+							if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem) === false ) {
+								if (elem.removeEventListener)
+									elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
+								else if (elem.detachEvent)
+									elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
+							}
+							ret = null;
+							delete events[type];
+						}
+					}
+				});
+			}
+
+			// Remove the expando if it's no longer used
+			for ( ret in events ) break;
+			if ( !ret ) {
+				var handle = jQuery.data( elem, "handle" );
+				if ( handle ) handle.elem = null;
+				jQuery.removeData( elem, "events" );
+				jQuery.removeData( elem, "handle" );
+			}
+		}
+	},
+
+	trigger: function(type, data, elem, donative, extra) {
+		// Clone the incoming data, if any
+		data = jQuery.makeArray(data);
+
+		if ( type.indexOf("!") >= 0 ) {
+			type = type.slice(0, -1);
+			var exclusive = true;
+		}
+
+		// Handle a global trigger
+		if ( !elem ) {
+			// Only trigger if we've ever bound an event for it
+			if ( this.global[type] )
+				jQuery("*").add([window, document]).trigger(type, data);
+
+		// Handle triggering a single element
+		} else {
+			// don't do events on text and comment nodes
+			if ( elem.nodeType == 3 || elem.nodeType == 8 )
+				return undefined;
+
+			var val, ret, fn = jQuery.isFunction( elem[ type ] || null ),
+				// Check to see if we need to provide a fake event, or not
+				event = !data[0] || !data[0].preventDefault;
+
+			// Pass along a fake event
+			if ( event ) {
+				data.unshift({
+					type: type,
+					target: elem,
+					preventDefault: function(){},
+					stopPropagation: function(){},
+					timeStamp: now()
+				});
+				data[0][expando] = true; // no need to fix fake event
+			}
+
+			// Enforce the right trigger type
+			data[0].type = type;
+			if ( exclusive )
+				data[0].exclusive = true;
+
+			// Trigger the event, it is assumed that "handle" is a function
+			var handle = jQuery.data(elem, "handle");
+			if ( handle )
+				val = handle.apply( elem, data );
+
+			// Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)
+			if ( (!fn || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
+				val = false;
+
+			// Extra functions don't get the custom event object
+			if ( event )
+				data.shift();
+
+			// Handle triggering of extra function
+			if ( extra && jQuery.isFunction( extra ) ) {
+				// call the extra function and tack the current return value on the end for possible inspection
+				ret = extra.apply( elem, val == null ? data : data.concat( val ) );
+				// if anything is returned, give it precedence and have it overwrite the previous value
+				if (ret !== undefined)
+					val = ret;
+			}
+
+			// Trigger the native events (except for clicks on links)
+			if ( fn && donative !== false && val !== false && !(jQuery.nodeName(elem, 'a') && type == "click") ) {
+				this.triggered = true;
+				try {
+					elem[ type ]();
+				// prevent IE from throwing an error for some hidden elements
+				} catch (e) {}
+			}
+
+			this.triggered = false;
+		}
+
+		return val;
+	},
+
+	handle: function(event) {
+		// returned undefined or false
+		var val, ret, namespace, all, handlers;
+
+		event = arguments[0] = jQuery.event.fix( event || window.event );
+
+		// Namespaced event handlers
+		namespace = event.type.split(".");
+		event.type = namespace[0];
+		namespace = namespace[1];
+		// Cache this now, all = true means, any handler
+		all = !namespace && !event.exclusive;
+
+		handlers = ( jQuery.data(this, "events") || {} )[event.type];
+
+		for ( var j in handlers ) {
+			var handler = handlers[j];
+
+			// Filter the functions by class
+			if ( all || handler.type == namespace ) {
+				// Pass in a reference to the handler function itself
+				// So that we can later remove it
+				event.handler = handler;
+				event.data = handler.data;
+
+				ret = handler.apply( this, arguments );
+
+				if ( val !== false )
+					val = ret;
+
+				if ( ret === false ) {
+					event.preventDefault();
+					event.stopPropagation();
+				}
+			}
+		}
+
+		return val;
+	},
+
+	fix: function(event) {
+		if ( event[expando] == true )
+			return event;
+
+		// store a copy of the original event object
+		// and "clone" to set read-only properties
+		var originalEvent = event;
+		event = { originalEvent: originalEvent };
+		var props = "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");
+		for ( var i=props.length; i; i-- )
+			event[ props[i] ] = originalEvent[ props[i] ];
+
+		// Mark it as fixed
+		event[expando] = true;
+
+		// add preventDefault and stopPropagation since
+		// they will not work on the clone
+		event.preventDefault = function() {
+			// if preventDefault exists run it on the original event
+			if (originalEvent.preventDefault)
+				originalEvent.preventDefault();
+			// otherwise set the returnValue property of the original event to false (IE)
+			originalEvent.returnValue = false;
+		};
+		event.stopPropagation = function() {
+			// if stopPropagation exists run it on the original event
+			if (originalEvent.stopPropagation)
+				originalEvent.stopPropagation();
+			// otherwise set the cancelBubble property of the original event to true (IE)
+			originalEvent.cancelBubble = true;
+		};
+
+		// Fix timeStamp
+		event.timeStamp = event.timeStamp || now();
+
+		// Fix target property, if necessary
+		if ( !event.target )
+			event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
+
+		// check if target is a textnode (safari)
+		if ( event.target.nodeType == 3 )
+			event.target = event.target.parentNode;
+
+		// Add relatedTarget, if necessary
+		if ( !event.relatedTarget && event.fromElement )
+			event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
+
+		// Calculate pageX/Y if missing and clientX/Y available
+		if ( event.pageX == null && event.clientX != null ) {
+			var doc = document.documentElement, body = document.body;
+			event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
+			event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);
+		}
+
+		// Add which for key events
+		if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) )
+			event.which = event.charCode || event.keyCode;
+
+		// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
+		if ( !event.metaKey && event.ctrlKey )
+			event.metaKey = event.ctrlKey;
+
+		// Add which for click: 1 == left; 2 == middle; 3 == right
+		// Note: button is not normalized, so don't use it
+		if ( !event.which && event.button )
+			event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
+
+		return event;
+	},
+
+	proxy: function( fn, proxy ){
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++;
+		// So proxy can be declared as an argument
+		return proxy;
+	},
+
+	special: {
+		ready: {
+			setup: function() {
+				// Make sure the ready event is setup
+				bindReady();
+				return;
+			},
+
+			teardown: function() { return; }
+		},
+
+		mouseenter: {
+			setup: function() {
+				if ( jQuery.browser.msie ) return false;
+				jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler);
+				return true;
+			},
+
+			teardown: function() {
+				if ( jQuery.browser.msie ) return false;
+				jQuery(this).unbind("mouseover", jQuery.event.special.mouseenter.handler);
+				return true;
+			},
+
+			handler: function(event) {
+				// If we actually just moused on to a sub-element, ignore it
+				if ( withinElement(event, this) ) return true;
+				// Execute the right handlers by setting the event type to mouseenter
+				event.type = "mouseenter";
+				return jQuery.event.handle.apply(this, arguments);
+			}
+		},
+
+		mouseleave: {
+			setup: function() {
+				if ( jQuery.browser.msie ) return false;
+				jQuery(this).bind("mouseout", jQuery.event.special.mouseleave.handler);
+				return true;
+			},
+
+			teardown: function() {
+				if ( jQuery.browser.msie ) return false;
+				jQuery(this).unbind("mouseout", jQuery.event.special.mouseleave.handler);
+				return true;
+			},
+
+			handler: function(event) {
+				// If we actually just moused on to a sub-element, ignore it
+				if ( withinElement(event, this) ) return true;
+				// Execute the right handlers by setting the event type to mouseleave
+				event.type = "mouseleave";
+				return jQuery.event.handle.apply(this, arguments);
+			}
+		}
+	}
+};
+
+jQuery.fn.extend({
+	bind: function( type, data, fn ) {
+		return type == "unload" ? this.one(type, data, fn) : this.each(function(){
+			jQuery.event.add( this, type, fn || data, fn && data );
+		});
+	},
+
+	one: function( type, data, fn ) {
+		var one = jQuery.event.proxy( fn || data, function(event) {
+			jQuery(this).unbind(event, one);
+			return (fn || data).apply( this, arguments );
+		});
+		return this.each(function(){
+			jQuery.event.add( this, type, one, fn && data);
+		});
+	},
+
+	unbind: function( type, fn ) {
+		return this.each(function(){
+			jQuery.event.remove( this, type, fn );
+		});
+	},
+
+	trigger: function( type, data, fn ) {
+		return this.each(function(){
+			jQuery.event.trigger( type, data, this, true, fn );
+		});
+	},
+
+	triggerHandler: function( type, data, fn ) {
+		return this[0] && jQuery.event.trigger( type, data, this[0], false, fn );
+	},
+
+	toggle: function( fn ) {
+		// Save reference to arguments for access in closure
+		var args = arguments, i = 1;
+
+		// link all the functions, so any of them can unbind this click handler
+		while( i < args.length )
+			jQuery.event.proxy( fn, args[i++] );
+
+		return this.click( jQuery.event.proxy( fn, function(event) {
+			// Figure out which function to execute
+			this.lastToggle = ( this.lastToggle || 0 ) % i;
+
+			// Make sure that clicks stop
+			event.preventDefault();
+
+			// and execute the function
+			return args[ this.lastToggle++ ].apply( this, arguments ) || false;
+		}));
+	},
+
+	hover: function(fnOver, fnOut) {
+		return this.bind('mouseenter', fnOver).bind('mouseleave', fnOut);
+	},
+
+	ready: function(fn) {
+		// Attach the listeners
+		bindReady();
+
+		// If the DOM is already ready
+		if ( jQuery.isReady )
+			// Execute the function immediately
+			fn.call( document, jQuery );
+
+		// Otherwise, remember the function for later
+		else
+			// Add the function to the wait list
+			jQuery.readyList.push( function() { return fn.call(this, jQuery); } );
+
+		return this;
+	}
+});
+
+jQuery.extend({
+	isReady: false,
+	readyList: [],
+	// Handle when the DOM is ready
+	ready: function() {
+		// Make sure that the DOM is not already loaded
+		if ( !jQuery.isReady ) {
+			// Remember that the DOM is ready
+			jQuery.isReady = true;
+
+			// If there are functions bound, to execute
+			if ( jQuery.readyList ) {
+				// Execute all of them
+				jQuery.each( jQuery.readyList, function(){
+					this.call( document );
+				});
+
+				// Reset the list of functions
+				jQuery.readyList = null;
+			}
+
+			// Trigger any bound ready events
+			jQuery(document).triggerHandler("ready");
+		}
+	}
+});
+
+var readyBound = false;
+
+function bindReady(){
+	if ( readyBound ) return;
+	readyBound = true;
+
+	// Mozilla, Opera (see further below for it) and webkit nightlies currently support this event
+	if ( document.addEventListener && !jQuery.browser.opera)
+		// Use the handy event callback
+		document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
+
+	// If IE is used and is not in a frame
+	// Continually check to see if the document is ready
+	if ( jQuery.browser.msie && window == top ) (function(){
+		if (jQuery.isReady) return;
+		try {
+			// If IE is used, use the trick by Diego Perini
+			// http://javascript.nwbox.com/IEContentLoaded/
+			document.documentElement.doScroll("left");
+		} catch( error ) {
+			setTimeout( arguments.callee, 0 );
+			return;
+		}
+		// and execute any waiting functions
+		jQuery.ready();
+	})();
+
+	if ( jQuery.browser.opera )
+		document.addEventListener( "DOMContentLoaded", function () {
+			if (jQuery.isReady) return;
+			for (var i = 0; i < document.styleSheets.length; i++)
+				if (document.styleSheets[i].disabled) {
+					setTimeout( arguments.callee, 0 );
+					return;
+				}
+			// and execute any waiting functions
+			jQuery.ready();
+		}, false);
+
+	if ( jQuery.browser.safari ) {
+		var numStyles;
+		(function(){
+			if (jQuery.isReady) return;
+			if ( document.readyState != "loaded" && document.readyState != "complete" ) {
+				setTimeout( arguments.callee, 0 );
+				return;
+			}
+			if ( numStyles === undefined )
+				numStyles = jQuery("style, link[rel=stylesheet]").length;
+			if ( document.styleSheets.length != numStyles ) {
+				setTimeout( arguments.callee, 0 );
+				return;
+			}
+			// and execute any waiting functions
+			jQuery.ready();
+		})();
+	}
+
+	// A fallback to window.onload, that will always work
+	jQuery.event.add( window, "load", jQuery.ready );
+}
+
+jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
+	"mousedown,mouseup,mousemove,mouseover,mouseout,change,select," +
+	"submit,keydown,keypress,keyup,error").split(","), function(i, name){
+
+	// Handle event binding
+	jQuery.fn[name] = function(fn){
+		return fn ? this.bind(name, fn) : this.trigger(name);
+	};
+});
+
+// Checks if an event happened on an element within another element
+// Used in jQuery.event.special.mouseenter and mouseleave handlers
+var withinElement = function(event, elem) {
+	// Check if mouse(over|out) are still within the same parent element
+	var parent = event.relatedTarget;
+	// Traverse up the tree
+	while ( parent && parent != elem ) try { parent = parent.parentNode; } catch(error) { parent = elem; }
+	// Return true if we actually just moused on to a sub-element
+	return parent == elem;
+};
+
+// Prevent memory leaks in IE
+// And prevent errors on refresh with events like mouseover in other browsers
+// Window isn't included so as not to unbind existing unload events
+jQuery(window).bind("unload", function() {
+	jQuery("*").add(document).unbind();
+});
+jQuery.fn.extend({
+	// Keep a copy of the old load
+	_load: jQuery.fn.load,
+
+	load: function( url, params, callback ) {
+		if ( typeof url != 'string' )
+			return this._load( url );
+
+		var off = url.indexOf(" ");
+		if ( off >= 0 ) {
+			var selector = url.slice(off, url.length);
+			url = url.slice(0, off);
+		}
+
+		callback = callback || function(){};
+
+		// Default to a GET request
+		var type = "GET";
+
+		// If the second parameter was provided
+		if ( params )
+			// If it's a function
+			if ( jQuery.isFunction( params ) ) {
+				// We assume that it's the callback
+				callback = params;
+				params = null;
+
+			// Otherwise, build a param string
+			} else {
+				params = jQuery.param( params );
+				type = "POST";
+			}
+
+		var self = this;
+
+		// Request the remote document
+		jQuery.ajax({
+			url: url,
+			type: type,
+			dataType: "html",
+			data: params,
+			complete: function(res, status){
+				// If successful, inject the HTML into all the matched elements
+				if ( status == "success" || status == "notmodified" )
+					// See if a selector was specified
+					self.html( selector ?
+						// Create a dummy div to hold the results
+						jQuery("<div/>")
+							// inject the contents of the document in, removing the scripts
+							// to avoid any 'Permission Denied' errors in IE
+							.append(res.responseText)
+
+							// Locate the specified elements
+							.find(selector) :
+
+						// If not, just inject the full result
+						res.responseText );
+
+				self.each( callback, [res.responseText, status, res] );
+			}
+		});
+		return this;
+	},
+
+	serialize: function() {
+		return jQuery.param(this.serializeArray());
+	},
+	serializeArray: function() {
+		return this.map(function(){
+			return jQuery.nodeName(this, "form") ?
+				jQuery.makeArray(this.elements) : this;
+		})
+		.filter(function(){
+			return this.name && !this.disabled &&
+				(this.checked || /select|textarea/i.test(this.nodeName) ||
+					/text|hidden|password/i.test(this.type));
+		})
+		.map(function(i, elem){
+			var val = jQuery(this).val();
+			return val == null ? null :
+				val.constructor == Array ?
+					jQuery.map( val, function(val, i){
+						return {name: elem.name, value: val};
+					}) :
+					{name: elem.name, value: val};
+		}).get();
+	}
+});
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
+	jQuery.fn[o] = function(f){
+		return this.bind(o, f);
+	};
+});
+
+var jsc = now();
+
+jQuery.extend({
+	get: function( url, data, callback, type ) {
+		// shift arguments if data argument was ommited
+		if ( jQuery.isFunction( data ) ) {
+			callback = data;
+			data = null;
+		}
+
+		return jQuery.ajax({
+			type: "GET",
+			url: url,
+			data: data,
+			success: callback,
+			dataType: type
+		});
+	},
+
+	getScript: function( url, callback ) {
+		return jQuery.get(url, null, callback, "script");
+	},
+
+	getJSON: function( url, data, callback ) {
+		return jQuery.get(url, data, callback, "json");
+	},
+
+	post: function( url, data, callback, type ) {
+		if ( jQuery.isFunction( data ) ) {
+			callback = data;
+			data = {};
+		}
+
+		return jQuery.ajax({
+			type: "POST",
+			url: url,
+			data: data,
+			success: callback,
+			dataType: type
+		});
+	},
+
+	ajaxSetup: function( settings ) {
+		jQuery.extend( jQuery.ajaxSettings, settings );
+	},
+
+	ajaxSettings: {
+		url: location.href,
+		global: true,
+		type: "GET",
+		timeout: 0,
+		contentType: "application/x-www-form-urlencoded",
+		processData: true,
+		async: true,
+		data: null,
+		username: null,
+		password: null,
+		accepts: {
+			xml: "application/xml, text/xml",
+			html: "text/html",
+			script: "text/javascript, application/javascript",
+			json: "application/json, text/javascript",
+			text: "text/plain",
+			_default: "*/*"
+		}
+	},
+
+	// Last-Modified header cache for next request
+	lastModified: {},
+
+	ajax: function( s ) {
+		// Extend the settings, but re-extend 's' so that it can be
+		// checked again later (in the test suite, specifically)
+		s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
+
+		var jsonp, jsre = /=\?(&|$)/g, status, data,
+			type = s.type.toUpperCase();
+
+		// convert data if not already a string
+		if ( s.data && s.processData && typeof s.data != "string" )
+			s.data = jQuery.param(s.data);
+
+		// Handle JSONP Parameter Callbacks
+		if ( s.dataType == "jsonp" ) {
+			if ( type == "GET" ) {
+				if ( !s.url.match(jsre) )
+					s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
+			} else if ( !s.data || !s.data.match(jsre) )
+				s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
+			s.dataType = "json";
+		}
+
+		// Build temporary JSONP function
+		if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
+			jsonp = "jsonp" + jsc++;
+
+			// Replace the =? sequence both in the query string and the data
+			if ( s.data )
+				s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
+			s.url = s.url.replace(jsre, "=" + jsonp + "$1");
+
+			// We need to make sure
+			// that a JSONP style response is executed properly
+			s.dataType = "script";
+
+			// Handle JSONP-style loading
+			window[ jsonp ] = function(tmp){
+				data = tmp;
+				success();
+				complete();
+				// Garbage collect
+				window[ jsonp ] = undefined;
+				try{ delete window[ jsonp ]; } catch(e){}
+				if ( head )
+					head.removeChild( script );
+			};
+		}
+
+		if ( s.dataType == "script" && s.cache == null )
+			s.cache = false;
+
+		if ( s.cache === false && type == "GET" ) {
+			var ts = now();
+			// try replacing _= if it is there
+			var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2");
+			// if nothing was replaced, add timestamp to the end
+			s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
+		}
+
+		// If data is available, append data to url for get requests
+		if ( s.data && type == "GET" ) {
+			s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
+
+			// IE likes to send both get and post data, prevent this
+			s.data = null;
+		}
+
+		// Watch for a new set of requests
+		if ( s.global && ! jQuery.active++ )
+			jQuery.event.trigger( "ajaxStart" );
+
+		// Matches an absolute URL, and saves the domain
+		var remote = /^(?:\w+:)?\/\/([^\/?#]+)/;
+
+		// If we're requesting a remote document
+		// and trying to load JSON or Script with a GET
+		if ( s.dataType == "script" && type == "GET"
+				&& remote.test(s.url) && remote.exec(s.url)[1] != location.host ){
+			var head = document.getElementsByTagName("head")[0];
+			var script = document.createElement("script");
+			script.src = s.url;
+			if (s.scriptCharset)
+				script.charset = s.scriptCharset;
+
+			// Handle Script loading
+			if ( !jsonp ) {
+				var done = false;
+
+				// Attach handlers for all browsers
+				script.onload = script.onreadystatechange = function(){
+					if ( !done && (!this.readyState ||
+							this.readyState == "loaded" || this.readyState == "complete") ) {
+						done = true;
+						success();
+						complete();
+						head.removeChild( script );
+					}
+				};
+			}
+
+			head.appendChild(script);
+
+			// We handle everything using the script element injection
+			return undefined;
+		}
+
+		var requestDone = false;
+
+		// Create the request object; Microsoft failed to properly
+		// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
+		var xhr = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
+
+		// Open the socket
+		// Passing null username, generates a login popup on Opera (#2865)
+		if( s.username )
+			xhr.open(type, s.url, s.async, s.username, s.password);
+		else
+			xhr.open(type, s.url, s.async);
+
+		// Need an extra try/catch for cross domain requests in Firefox 3
+		try {
+			// Set the correct header, if data is being sent
+			if ( s.data )
+				xhr.setRequestHeader("Content-Type", s.contentType);
+
+			// Set the If-Modified-Since header, if ifModified mode.
+			if ( s.ifModified )
+				xhr.setRequestHeader("If-Modified-Since",
+					jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
+
+			// Set header so the called script knows that it's an XMLHttpRequest
+			xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+
+			// Set the Accepts header for the server, depending on the dataType
+			xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
+				s.accepts[ s.dataType ] + ", */*" :
+				s.accepts._default );
+		} catch(e){}
+
+		// Allow custom headers/mimetypes
+		if ( s.beforeSend && s.beforeSend(xhr, s) === false ) {
+			// cleanup active request counter
+			s.global && jQuery.active--;
+			// close opended socket
+			xhr.abort();
+			return false;
+		}
+
+		if ( s.global )
+			jQuery.event.trigger("ajaxSend", [xhr, s]);
+
+		// Wait for a response to come back
+		var onreadystatechange = function(isTimeout){
+			// The transfer is complete and the data is available, or the request timed out
+			if ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout") ) {
+				requestDone = true;
+
+				// clear poll interval
+				if (ival) {
+					clearInterval(ival);
+					ival = null;
+				}
+
+				status = isTimeout == "timeout" && "timeout" ||
+					!jQuery.httpSuccess( xhr ) && "error" ||
+					s.ifModified && jQuery.httpNotModified( xhr, s.url ) && "notmodified" ||
+					"success";
+
+				if ( status == "success" ) {
+					// Watch for, and catch, XML document parse errors
+					try {
+						// process the data (runs the xml through httpData regardless of callback)
+						data = jQuery.httpData( xhr, s.dataType, s.dataFilter );
+					} catch(e) {
+						status = "parsererror";
+					}
+				}
+
+				// Make sure that the request was successful or notmodified
+				if ( status == "success" ) {
+					// Cache Last-Modified header, if ifModified mode.
+					var modRes;
+					try {
+						modRes = xhr.getResponseHeader("Last-Modified");
+					} catch(e) {} // swallow exception thrown by FF if header is not available
+
+					if ( s.ifModified && modRes )
+						jQuery.lastModified[s.url] = modRes;
+
+					// JSONP handles its own success callback
+					if ( !jsonp )
+						success();
+				} else
+					jQuery.handleError(s, xhr, status);
+
+				// Fire the complete handlers
+				complete();
+
+				// Stop memory leaks
+				if ( s.async )
+					xhr = null;
+			}
+		};
+
+		if ( s.async ) {
+			// don't attach the handler to the request, just poll it instead
+			var ival = setInterval(onreadystatechange, 13);
+
+			// Timeout checker
+			if ( s.timeout > 0 )
+				setTimeout(function(){
+					// Check to see if the request is still happening
+					if ( xhr ) {
+						// Cancel the request
+						xhr.abort();
+
+						if( !requestDone )
+							onreadystatechange( "timeout" );
+					}
+				}, s.timeout);
+		}
+
+		// Send the data
+		try {
+			xhr.send(s.data);
+		} catch(e) {
+			jQuery.handleError(s, xhr, null, e);
+		}
+
+		// firefox 1.5 doesn't fire statechange for sync requests
+		if ( !s.async )
+			onreadystatechange();
+
+		function success(){
+			// If a local callback was specified, fire it and pass it the data
+			if ( s.success )
+				s.success( data, status );
+
+			// Fire the global callback
+			if ( s.global )
+				jQuery.event.trigger( "ajaxSuccess", [xhr, s] );
+		}
+
+		function complete(){
+			// Process result
+			if ( s.complete )
+				s.complete(xhr, status);
+
+			// The request was completed
+			if ( s.global )
+				jQuery.event.trigger( "ajaxComplete", [xhr, s] );
+
+			// Handle the global AJAX counter
+			if ( s.global && ! --jQuery.active )
+				jQuery.event.trigger( "ajaxStop" );
+		}
+
+		// return XMLHttpRequest to allow aborting the request etc.
+		return xhr;
+	},
+
+	handleError: function( s, xhr, status, e ) {
+		// If a local callback was specified, fire it
+		if ( s.error ) s.error( xhr, status, e );
+
+		// Fire the global callback
+		if ( s.global )
+			jQuery.event.trigger( "ajaxError", [xhr, s, e] );
+	},
+
+	// Counter for holding the number of active queries
+	active: 0,
+
+	// Determines if an XMLHttpRequest was successful or not
+	httpSuccess: function( xhr ) {
+		try {
+			// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
+			return !xhr.status && location.protocol == "file:" ||
+				( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223 ||
+				jQuery.browser.safari && xhr.status == undefined;
+		} catch(e){}
+		return false;
+	},
+
+	// Determines if an XMLHttpRequest returns NotModified
+	httpNotModified: function( xhr, url ) {
+		try {
+			var xhrRes = xhr.getResponseHeader("Last-Modified");
+
+			// Firefox always returns 200. check Last-Modified date
+			return xhr.status == 304 || xhrRes == jQuery.lastModified[url] ||
+				jQuery.browser.safari && xhr.status == undefined;
+		} catch(e){}
+		return false;
+	},
+
+	httpData: function( xhr, type, filter ) {
+		var ct = xhr.getResponseHeader("content-type"),
+			xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
+			data = xml ? xhr.responseXML : xhr.responseText;
+
+		if ( xml && data.documentElement.tagName == "parsererror" )
+			throw "parsererror";
+
+		// Allow a pre-filtering function to sanitize the response
+		if( filter )
+			data = filter( data, type );
+
+		// If the type is "script", eval it in global context
+		if ( type == "script" )
+			jQuery.globalEval( data );
+
+		// Get the JavaScript object, if JSON is used.
+		if ( type == "json" )
+			data = eval("(" + data + ")");
+
+		return data;
+	},
+
+	// Serialize an array of form elements or a set of
+	// key/values into a query string
+	param: function( a ) {
+		var s = [];
+
+		// If an array was passed in, assume that it is an array
+		// of form elements
+		if ( a.constructor == Array || a.jquery )
+			// Serialize the form elements
+			jQuery.each( a, function(){
+				s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
+			});
+
+		// Otherwise, assume that it's an object of key/value pairs
+		else
+			// Serialize the key/values
+			for ( var j in a )
+				// If the value is an array then the key names need to be repeated
+				if ( a[j] && a[j].constructor == Array )
+					jQuery.each( a[j], function(){
+						s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
+					});
+				else
+					s.push( encodeURIComponent(j) + "=" + encodeURIComponent( jQuery.isFunction(a[j]) ? a[j]() : a[j] ) );
+
+		// Return the resulting serialization
+		return s.join("&").replace(/%20/g, "+");
+	}
+
+});
+jQuery.fn.extend({
+	show: function(speed,callback){
+		return speed ?
+			this.animate({
+				height: "show", width: "show", opacity: "show"
+			}, speed, callback) :
+
+			this.filter(":hidden").each(function(){
+				this.style.display = this.oldblock || "";
+				if ( jQuery.css(this,"display") == "none" ) {
+					var elem = jQuery("<" + this.tagName + " />").appendTo("body");
+					this.style.display = elem.css("display");
+					// handle an edge condition where css is - div { display:none; } or similar
+					if (this.style.display == "none")
+						this.style.display = "block";
+					elem.remove();
+				}
+			}).end();
+	},
+
+	hide: function(speed,callback){
+		return speed ?
+			this.animate({
+				height: "hide", width: "hide", opacity: "hide"
+			}, speed, callback) :
+
+			this.filter(":visible").each(function(){
+				this.oldblock = this.oldblock || jQuery.css(this,"display");
+				this.style.display = "none";
+			}).end();
+	},
+
+	// Save the old toggle function
+	_toggle: jQuery.fn.toggle,
+
+	toggle: function( fn, fn2 ){
+		return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
+			this._toggle.apply( this, arguments ) :
+			fn ?
+				this.animate({
+					height: "toggle", width: "toggle", opacity: "toggle"
+				}, fn, fn2) :
+				this.each(function(){
+					jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
+				});
+	},
+
+	slideDown: function(speed,callback){
+		return this.animate({height: "show"}, speed, callback);
+	},
+
+	slideUp: function(speed,callback){
+		return this.animate({height: "hide"}, speed, callback);
+	},
+
+	slideToggle: function(speed, callback){
+		return this.animate({height: "toggle"}, speed, callback);
+	},
+
+	fadeIn: function(speed, callback){
+		return this.animate({opacity: "show"}, speed, callback);
+	},
+
+	fadeOut: function(speed, callback){
+		return this.animate({opacity: "hide"}, speed, callback);
+	},
+
+	fadeTo: function(speed,to,callback){
+		return this.animate({opacity: to}, speed, callback);
+	},
+
+	animate: function( prop, speed, easing, callback ) {
+		var optall = jQuery.speed(speed, easing, callback);
+
+		return this[ optall.queue === false ? "each" : "queue" ](function(){
+			if ( this.nodeType != 1)
+				return false;
+
+			var opt = jQuery.extend({}, optall), p,
+				hidden = jQuery(this).is(":hidden"), self = this;
+
+			for ( p in prop ) {
+				if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
+					return opt.complete.call(this);
+
+				if ( p == "height" || p == "width" ) {
+					// Store display property
+					opt.display = jQuery.css(this, "display");
+
+					// Make sure that nothing sneaks out
+					opt.overflow = this.style.overflow;
+				}
+			}
+
+			if ( opt.overflow != null )
+				this.style.overflow = "hidden";
+
+			opt.curAnim = jQuery.extend({}, prop);
+
+			jQuery.each( prop, function(name, val){
+	

<TRUNCATED>

[09/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/python.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/python.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/python.js
new file mode 100644
index 0000000..1a5e7fb
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/python.js
@@ -0,0 +1,145 @@
+/**
+ * Python syntax v 1.1 
+ * 
+ * v1.1 by Andre Roberge (2006/12/27)
+ *   
+**/
+editAreaLoader.load_syntax["python"] = {
+	'DISPLAY_NAME' : 'Python'
+	,'COMMENT_SINGLE' : {1 : '#'}
+	,'COMMENT_MULTI' : {}
+	,'QUOTEMARKS' : {1: "'", 2: '"'}
+	,'KEYWORD_CASE_SENSITIVE' : true
+	,'KEYWORDS' : {
+		/*
+		** Set 1: reserved words
+		** http://python.org/doc/current/ref/keywords.html
+		** Note: 'as' and 'with' have been added starting with Python 2.5
+		*/
+		'reserved' : [
+			'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif',
+			'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 
+			'import', 'is', 'in', 'lambda', 'not', 'or', 'pass', 'print', 'raise',
+			'return', 'try', 'while', 'with', 'yield'
+			//the following are *almost* reserved; we'll treat them as such
+			, 'False', 'True', 'None'
+		]
+		/*
+		** Set 2: builtins
+		** http://python.org/doc/current/lib/built-in-funcs.html
+		*/	
+		,'builtins' : [
+			'__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp', 
+			'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', 
+			'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help',
+			'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals',
+			'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range',
+			'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice',
+			'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', 
+			'vars', 'xrange', 'zip',
+			// Built-in constants: http://www.python.org/doc/2.4.1/lib/node35.html
+			//'False', 'True', 'None' have been included in 'reserved'
+			'NotImplemented', 'Ellipsis',
+			// Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html
+			'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError',
+			'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError',
+			'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError',
+			'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError',
+			'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError',
+			'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError',
+			'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning',
+			'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning',
+			'RuntimeWarning', 'FutureWarning',		
+			// we will include the string methods as well
+			// http://python.org/doc/current/lib/string-methods.html
+			'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs',
+			'find', 'index', 'isalnum', 'isaplpha', 'isdigit', 'islower', 'isspace', 'istitle',
+			'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust',
+			'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title',
+			'translate', 'upper', 'zfill'
+		]
+		/*
+		** Set 3: standard library
+		** http://python.org/doc/current/lib/modindex.html
+		*/
+		,'stdlib' : [
+			'__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm',
+			'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer',
+			'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi',
+			'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop',
+			'collections', 'colorsys', 'commands', 'compileall', 'compiler', 'compiler',
+			'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt',
+			'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE',
+			'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm',
+			'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl',
+			'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl',
+			'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob',
+			'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib',
+			'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect',
+			'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap',
+			'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify',
+			'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator',
+			'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes',
+			'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile',
+			'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random',
+			're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter',
+			'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve',
+			'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd',
+			'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string',
+			'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev',
+			'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios',
+			'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token',
+			'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2',
+			'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings',
+			'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml',
+			'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib'
+
+		]
+		/*
+		** Set 4: special methods
+		** http://python.org/doc/current/ref/specialnames.html
+		*/
+		,'special' : [
+			// Basic customization: http://python.org/doc/current/ref/customization.html
+			'__new__', '__init__', '__del__', '__repr__', '__str__', 
+			'__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__',
+			'__hash__', '__nonzero__', '__unicode__', '__dict__',
+			// Attribute access: http://python.org/doc/current/ref/attribute-access.html
+			'__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__',
+			'__delete__', '__slots__',
+			// Class creation, callable objects
+			'__metaclass__', '__call__', 
+			// Container types: http://python.org/doc/current/ref/sequence-types.html
+			'__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__',
+			'__getslice__', '__setslice__', '__delslice__',
+			// Numeric types: http://python.org/doc/current/ref/numeric-types.html
+			'__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__',
+			'__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__',
+			'__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__',
+			'__long__','__lshift__',
+			'__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__',
+			'__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__',
+			'__rshift__','__rsub__','__rmul__','__repr__','__rand__','__rxor__','__ror__',
+			'__sub__','__xor__'
+		]
+	}
+	,'OPERATORS' :[
+		'+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ','
+	]
+	,'DELIMITERS' :[
+		'(', ')', '[', ']', '{', '}'
+	]
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #660066;'
+		,'KEYWORDS' : {
+			'reserved' : 'color: #0000FF;'
+			,'builtins' : 'color: #009900;'
+			,'stdlib' : 'color: #009900;'
+			,'special': 'color: #006666;'
+			}
+		,'OPERATORS' : 'color: #993300;'
+		,'DELIMITERS' : 'color: #993300;'
+				
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/robotstxt.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/robotstxt.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/robotstxt.js
new file mode 100644
index 0000000..9b141f0
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/robotstxt.js
@@ -0,0 +1,25 @@
+editAreaLoader.load_syntax["robotstxt"] = {
+	'DISPLAY_NAME' : 'Robots txt',
+	'COMMENT_SINGLE' : {1 : '#'},
+	'COMMENT_MULTI' : {},
+	'QUOTEMARKS' : [],
+	'KEYWORD_CASE_SENSITIVE' : false,
+	'KEYWORDS' : {
+		'attributes' : ['User-agent', 'Disallow', 'Allow', 'Crawl-delay'],
+		'values' : ['*'],
+		'specials' : ['*']
+	},
+	'OPERATORS' :[':'],
+	'DELIMITERS' :[],
+	'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;',
+		'QUOTESMARKS': 'color: #6381F8;',
+		'KEYWORDS' : {
+			'attributes' : 'color: #48BDDF;',
+			'values' : 'color: #2B60FF;',
+			'specials' : 'color: #FF0000;'
+			},
+	'OPERATORS' : 'color: #FF00FF;',
+	'DELIMITERS' : 'color: #60CA00;'			
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/ruby.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/ruby.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/ruby.js
new file mode 100644
index 0000000..bca0140
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/ruby.js
@@ -0,0 +1,68 @@
+/**
+ * Ruby syntax v 1.0 
+ * 
+ * v1.0 by Patrice De Saint Steban (2007/01/03)
+ *   
+**/
+editAreaLoader.load_syntax["ruby"] = {
+	'DISPLAY_NAME' : 'Ruby'
+	,'COMMENT_SINGLE' : {1 : '#'}
+	,'COMMENT_MULTI' : {}
+	,'QUOTEMARKS' : {1: "'", 2: '"'}
+	,'KEYWORD_CASE_SENSITIVE' : true
+	,'KEYWORDS' : {
+		'reserved' : [
+			'alias', 'and', 'BEGIN', 'begin', 'break', 'case', 'class', 'def', 'defined', 'do', 'else',
+			'elsif', 'END', 'end', 'ensure', 'false', 'for', 'if', 
+			'in', 'module', 'next', 'not', 'or', 'redo', 'rescue', 'retry',
+			'return', 'self', 'super', 'then', 'true', 'undef', 'unless', 'until', 'when', 'while', 'yield'
+		]
+	}
+	,'OPERATORS' :[
+		'+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ','
+	]
+	,'DELIMITERS' :[
+		'(', ')', '[', ']', '{', '}'
+	]
+	,'REGEXPS' : {
+		'constants' : {
+			'search' : '()([A-Z]\\w*)()'
+			,'class' : 'constants'
+			,'modifiers' : 'g'
+			,'execute' : 'before' 
+		}
+		,'variables' : {
+			'search' : '()([\$\@\%]+\\w+)()'
+			,'class' : 'variables'
+			,'modifiers' : 'g'
+			,'execute' : 'before' 
+		}
+		,'numbers' : {
+			'search' : '()(-?[0-9]+)()'
+			,'class' : 'numbers'
+			,'modifiers' : 'g'
+			,'execute' : 'before' 
+		}
+		,'symbols' : {
+			'search' : '()(:\\w+)()'
+			,'class' : 'symbols'
+			,'modifiers' : 'g'
+			,'execute' : 'before'
+		}
+	}
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #660066;'
+		,'KEYWORDS' : {
+			'reserved' : 'font-weight: bold; color: #0000FF;'
+			}
+		,'OPERATORS' : 'color: #993300;'
+		,'DELIMITERS' : 'color: #993300;'
+		,'REGEXPS' : {
+			'variables' : 'color: #E0BD54;'
+			,'numbers' : 'color: green;'
+			,'constants' : 'color: #00AA00;'
+			,'symbols' : 'color: #879EFA;'
+		}	
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/sql.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/sql.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/sql.js
new file mode 100644
index 0000000..118ad5b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/sql.js
@@ -0,0 +1,56 @@
+editAreaLoader.load_syntax["sql"] = {
+	'DISPLAY_NAME' : 'SQL'
+	,'COMMENT_SINGLE' : {1 : '--'}
+	,'COMMENT_MULTI' : {'/*' : '*/'}
+	,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'}
+	,'KEYWORD_CASE_SENSITIVE' : false
+	,'KEYWORDS' : {
+		'statements' : [
+			'select', 'SELECT', 'where', 'order', 'by',
+			'insert', 'from', 'update', 'grant', 'left join', 'right join', 
+            'union', 'group', 'having', 'limit', 'alter', 'LIKE','IN','CASE'
+		]
+		,'reserved' : [
+			'null', 'enum', 'int', 'boolean', 'add', 'varchar'
+			
+		]
+		,'functions' : [
+   'ABS','ACOS','ADDDATE','ADDTIME','AES_DECRYPT','AES_ENCRYPT','ASCII','ASIN','ATAN2 ATAN','ATAN','AVG','BENCHMARK','DISTINCT','BIN','BIT_AND','BIT_COUNT','BIT_LENGTH','BIT_OR','BIT_XOR','CAST','CEILING CEIL','CHAR_LENGTH','CHAR',
+'CHARACTER_LENGTH','CHARSET','COALESCE','COERCIBILITY','COLLATION','COMPRESS','CONCAT_WS','CONCAT','CONNECTION_ID','CONV','CONVERT_TZ','COS','COT','COUNT','CRC32','CURDATE','CURRENT_DATE','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER','CURTIME','DATABASE','DATE_ADD','DATE_FORMAT','DATE_SUB','DATE','DATEDIFF','DAY','DAYNAME','DAYOFMONTH',
+'DAYOFWEEK','DAYOFYEAR','DECODE','DEFAULT','DEGREES','DES_DECRYPT','DES_ENCRYPT','ELT','ENCODE','ENCRYPT','EXP','EXPORT_SET','EXTRACT','FIELD','FIND_IN_SET','FLOOR','FORMAT','FOUND_ROWS','FROM_DAYS','FROM_UNIXTIME','GET_FORMAT','GET_LOCK','GREATEST','GROUP_CONCAT','HEX','HOUR','IF','IFNULL','INET_ATON','INET_NTOA',
+'INSERT','INSTR','INTERVAL','IS_FREE_LOCK','IS_USED_LOCK','ISNULL','LAST_DAY','LAST_INSERT_ID','LCASE','LEAST','LEFT','LENGTH','LN','LOAD_FILE','LOCALTIME','LOCALTIMESTAMP','LOCATE','LOG10','LOG2','LOG','LOWER','LPAD','LTRIM','MAKE_SET','MAKEDATE','MAKETIME','MASTER_POS_WAIT','MAX','MD5','MICROSECOND',
+'MID','MIN','MINUTE','MOD','MONTH','MONTHNAME','NOW','NULLIF','OCT','OCTET_LENGTH','OLD_PASSWORD','ORD','PASSWORD','PERIOD_ADD','PERIOD_DIFF','PI','POSITION','POW','POWER','PROCEDURE ANALYSE','QUARTER','QUOTE','RADIANS','RAND','RELEASE_LOCK','REPEAT','REPLACE','REVERSE','RIGHT','ROUND',
+'RPAD','RTRIM','SEC_TO_TIME','SECOND','SESSION_USER','SHA1','SHA','SIGN','SIN','SOUNDEX','SOUNDS LIKE','SPACE','SQRT','STD','STDDEV','STR_TO_DATE','STRCMP','SUBDATE','SUBSTRING_INDEX','SUBSTRING','SUBSTR','SUBTIME','SUM','SYSDATE','SYSTEM_USER','TAN','TIME_FORMAT','TIME_TO_SEC','TIME','TIMEDIFF',
+'TIMESTAMP','TO_DAYS','TRIM','TRUNCATE','UCASE','UNCOMPRESS','UNCOMPRESSED_LENGTH','UNHEX','UNIX_TIMESTAMP','UPPER','USER','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','UUID','VALUES','VARIANCE','WEEK','WEEKDAY','WEEKOFYEAR','YEAR','YEARWEEK'
+		]
+	}
+	,'OPERATORS' :[
+     'AND','&&','BETWEEN','BINARY','&','|','^','/','DIV','<=>','=','>=','>','<<','>>','IS','NULL','<=','<','-','%','!=','<>','!','||','OR','+','REGEXP','RLIKE','XOR','~','*'
+	]
+	,'DELIMITERS' :[
+		'(', ')', '[', ']', '{', '}'
+	]
+	,'REGEXPS' : {
+		// highlight all variables (@...)
+		'variables' : {
+			'search' : '()(\\@\\w+)()'
+			,'class' : 'variables'
+			,'modifiers' : 'g'
+			,'execute' : 'before' // before or after
+		}
+	}
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #879EFA;'
+		,'KEYWORDS' : {
+			'reserved' : 'color: #48BDDF;'
+			,'functions' : 'color: #0040FD;'
+			,'statements' : 'color: #60CA00;'
+			}
+		,'OPERATORS' : 'color: #FF00FF;'
+		,'DELIMITERS' : 'color: #2B60FF;'
+		,'REGEXPS' : {
+			'variables' : 'color: #E0BD54;'
+		}		
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/tsql.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/tsql.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/tsql.js
new file mode 100644
index 0000000..868567d
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/tsql.js
@@ -0,0 +1,88 @@
+editAreaLoader.load_syntax["tsql"] = {
+	'DISPLAY_NAME' : 'T-SQL'
+	,'COMMENT_SINGLE' : {1 : '--'}
+	,'COMMENT_MULTI' : {'/*' : '*/'}
+	,'QUOTEMARKS' : {1: "'" }
+	,'KEYWORD_CASE_SENSITIVE' : false
+	,'KEYWORDS' : {
+		'statements': [
+		    'ADD', 'EXCEPT', 'PERCENT', 'EXEC', 'PLAN', 'ALTER', 'EXECUTE', 'PRECISION',
+		    'PRIMARY', 'EXIT', 'PRINT', 'AS', 'FETCH', 'PROC', 'ASC',
+		    'FILE', 'PROCEDURE', 'AUTHORIZATION', 'FILLFACTOR', 'PUBLIC', 'BACKUP', 'FOR', 'RAISERROR',
+		    'BEGIN', 'FOREIGN', 'READ', 'FREETEXT', 'READTEXT', 'BREAK', 'FREETEXTTABLE',
+		    'RECONFIGURE', 'BROWSE', 'FROM', 'REFERENCES', 'BULK', 'FULL', 'REPLICATION', 'BY',
+		    'FUNCTION', 'RESTORE', 'CASCADE', 'GOTO', 'RESTRICT', 'CASE', 'GRANT', 'RETURN',
+		    'CHECK', 'GROUP', 'REVOKE', 'CHECKPOINT', 'HAVING', 'RIGHT', 'CLOSE', 'HOLDLOCK', 'ROLLBACK',
+		    'CLUSTERED', 'IDENTITY', 'ROWCOUNT', 'IDENTITY_INSERT', 'ROWGUIDCOL', 'COLLATE', 
+		    'IDENTITYCOL', 'RULE', 'COLUMN', 'IF', 'SAVE', 'COMMIT', 'SCHEMA', 'COMPUTE', 'INDEX',
+		    'SELECT', 'CONSTRAINT', 'CONTAINS', 'INSERT', 'SET',
+		    'CONTAINSTABLE', 'INTERSECT', 'SETUSER', 'CONTINUE', 'INTO', 'SHUTDOWN', 'SOME',
+		    'CREATE', 'STATISTICS', 'KEY', 'CURRENT', 'KILL', 'TABLE',
+		    'CURRENT_DATE', 'TEXTSIZE', 'CURRENT_TIME', 'THEN', 'LINENO',
+		    'TO', 'LOAD', 'TOP', 'CURSOR', 'NATIONAL', 'TRAN', 'DATABASE', 'NOCHECK', 
+		    'TRANSACTION', 'DBCC', 'NONCLUSTERED', 'TRIGGER', 'DEALLOCATE', 'TRUNCATE',
+		    'DECLARE', 'TSEQUAL', 'DEFAULT', 'UNION', 'DELETE', 'OF', 'UNIQUE',
+		    'DENY', 'OFF', 'UPDATE', 'DESC', 'OFFSETS', 'UPDATETEXT', 'DISK', 'ON', 'USE', 'DISTINCT', 'OPEN',
+		    'DISTRIBUTED', 'OPENDATASOURCE', 'VALUES', 'DOUBLE', 'OPENQUERY', 'VARYING', 'DROP', 
+		    'OPENROWSET', 'VIEW', 'DUMMY', 'OPENXML', 'WAITFOR', 'DUMP', 'OPTION', 'WHEN', 'ELSE', 'WHERE',
+		    'END', 'ORDER', 'WHILE', 'ERRLVL', 'WITH', 'ESCAPE', 'OVER', 'WRITETEXT'
+		],
+		'functions': [
+		    'COALESCE', 'SESSION_USER', 'CONVERT', 'SYSTEM_USER', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'NULLIF', 'USER',
+			'AVG', 'MIN', 'CHECKSUM', 'SUM', 'CHECKSUM_AGG', 'STDEV', 'COUNT', 'STDEVP', 'COUNT_BIG', 'VAR', 'GROUPING', 'VARP', 'MAX',
+			'@@DATEFIRST', '@@OPTIONS', '@@DBTS', '@@REMSERVER', '@@LANGID', '@@SERVERNAME', '@@LANGUAGE', '@@SERVICENAME', '@@LOCK_TIMEOUT',
+			'@@SPID', '@@MAX_CONNECTIONS', '@@TEXTSIZE', '@@MAX_PRECISION', '@@VERSION', '@@NESTLEVEL',
+			'@@CURSOR_ROWS', 'CURSOR_STATUS', '@@FETCH_STATUS',
+			'DATEADD', 'DATEDIFF', 'DATENAME', 'DATEPART', 'DAY', 'GETDATE', 'GETUTCDATE', 'MONTH', 'YEAR',
+			'ABS', 'DEGREES', 'RAND', 'ACOS', 'EXP', 'ROUND', 'ASIN', 'FLOOR', 'SIGN', 'ATAN', 'LOG', 'SIN', 'ATN2', 'LOG10', 'SQRT',
+			'CEILING', 'PI ', 'SQUARE', 'COS', 'POWER', 'TAN', 'COT', 'RADIANS',
+			'@@PROCID', 'COL_LENGTH', 'FULLTEXTCATALOGPROPERTY', 'COL_NAME', 'FULLTEXTSERVICEPROPERTY', 'COLUMNPROPERTY', 'INDEX_COL',
+			'DATABASEPROPERTY', 'INDEXKEY_PROPERTY', 'DATABASEPROPERTYEX', 'INDEXPROPERTY', 'DB_ID', 'OBJECT_ID', 'DB_NAME', 'OBJECT_NAME',
+			'FILE_ID', 'OBJECTPROPERTY', 'OBJECTPROPERTYEX', 'FILE_NAME', 'SQL_VARIANT_PROPERTY', 'FILEGROUP_ID', 'FILEGROUP_NAME',
+			'FILEGROUPPROPERTY', 'TYPEPROPERTY', 'FILEPROPERTY',
+			'CURRENT_USER', 'SUSER_ID', 'SUSER_SID', 'IS_MEMBER', 'SUSER_SNAME', 'IS_SRVROLEMEMBER', 'PERMISSIONS', 'SYSTEM_USER',
+			'SUSER_NAME', 'USER_ID', 'SESSION_USER', 'USER_NAME', 'ASCII', 'SOUNDEX', 'PATINDEX', 'SPACE', 'CHARINDEX', 'QUOTENAME',
+			'STR', 'DIFFERENCE', 'REPLACE', 'STUFF', 'REPLICATE', 'SUBSTRING', 'LEN', 'REVERSE', 'UNICODE', 'LOWER',
+			'UPPER', 'LTRIM', 'RTRIM', 'APP_NAME', 'CAST', 'CONVERT', 'COALESCE', 'COLLATIONPROPERTY', 'COLUMNS_UPDATED', 'CURRENT_TIMESTAMP',
+			'CURRENT_USER', 'DATALENGTH', '@@ERROR', 'FORMATMESSAGE', 'GETANSINULL', 'HOST_ID', 'HOST_NAME', 'IDENT_CURRENT', 'IDENT_INCR',
+			'IDENT_SEED', '@@IDENTITY', 'ISDATE', 'ISNULL', 'ISNUMERIC', 'NEWID', 'NULLIF', 'PARSENAME', '@@ROWCOUNT',
+			'SCOPE_IDENTITY', 'SERVERPROPERTY', 'SESSIONPROPERTY', 'SESSION_USER', 'STATS_DATE', 'SYSTEM_USER', '@@TRANCOUNT', 'USER_NAME',
+			'@@CONNECTIONS', '@@PACK_RECEIVED', '@@CPU_BUSY', '@@PACK_SENT', '@@TIMETICKS', '@@IDLE', '@@TOTAL_ERRORS', '@@IO_BUSY', '@@TOTAL_READ',
+			'@@PACKET_ERRORS', '@@TOTAL_WRITE', 'PATINDEX', 'TEXTVALID', 'TEXTPTR'
+		],
+		'reserved': [
+			'RIGHT', 'INNER', 'IS', 'JOIN', 'CROSS', 'LEFT', 'NULL', 'OUTER'
+		]
+	}
+	,'OPERATORS' :[
+		'+', '-', '*', '/', '%', '=', '&' ,'|', '^', '>', '<', '>=', '<=', '<>', '!=', '!<', '!>', 'ALL', 'AND', 'ANY', 'BETWEEN', 'EXISTS', 'IN', 'LIKE', 'NOT', 'OR', '~'
+	]
+	,'DELIMITERS' :[
+		'(', ')', '[', ']', '{', '}'
+	]
+	,'REGEXPS' : {
+		// highlight all variables (@...)
+		'variables' : {
+			'search' : '()(\\@\\w+)()'
+			,'class' : 'variables'
+			,'modifiers' : 'g'
+			,'execute' : 'before' // before or after
+		}
+	}
+	,'STYLES' : {
+		'COMMENTS': 'color: #008000;'
+		,'QUOTESMARKS': 'color: #FF0000;'
+		,'KEYWORDS' : {
+			'reserved' : 'color: #808080;'
+			,'functions' : 'color: #FF00FF;'
+			,'statements' : 'color: #0000FF;'
+			}
+		,'OPERATORS' : 'color: #808080;'
+		,'DELIMITERS' : 'color: #FF8000;'
+		,'REGEXPS' : {
+			'variables' : 'color: #E0BD54;'
+		}		
+	}
+};
+
+ 	  	 

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/vb.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/vb.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/vb.js
new file mode 100644
index 0000000..c831300
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/vb.js
@@ -0,0 +1,53 @@
+editAreaLoader.load_syntax["vb"] = {
+	'DISPLAY_NAME' : 'Visual Basic'
+	,'COMMENT_SINGLE' : {1 : "'"}
+	,'COMMENT_MULTI' : { }
+	,'QUOTEMARKS' : {1: '"'}
+	,'KEYWORD_CASE_SENSITIVE' : false
+	,'KEYWORDS' : {
+		'statements' : [
+	        'if','then','for','each','while','do','loop',
+            'else','elseif','select','case','end select',
+            'until','next','step','to','in','end if'
+		]
+		,'keywords' : [
+            'empty','isempty','nothing','null','isnull','true','false',
+            'set','call',
+            'sub','end sub','function','end function','exit','exit function',
+            'dim','Mod','In','private','public','shared','const'
+        ]
+
+		,'functions' : [
+			'CDate','Date','DateAdd','DateDiff','DatePart','DateSerial','DateValue','Day','FormatDateTime',
+            'Hour','IsDate','Minute','Month',
+            'MonthName','Now','Second','Time','Timer','TimeSerial','TimeValue','Weekday','WeekdayName ','Year',
+            'Asc','CBool','CByte','CCur','CDate','CDbl','Chr','CInt','CLng','CSng','CStr','Hex','Oct','FormatCurrency',
+            'FormatDateTime','FormatNumber','FormatPercent','Abs','Atn','Cos','Exp','Hex','Int','Fix','Log','Oct',
+            'Rnd','Sgn','Sin','Sqr','Tan',
+            'Array','Filter','IsArray','Join','LBound','Split','UBound',
+            'InStr','InStrRev','LCase','Left','Len','LTrim','RTrim','Trim','Mid','Replace','Right','Space','StrComp',
+            'String','StrReverse','UCase',
+            'CreateObject','Eval','GetLocale','GetObject','GetRef','InputBox','IsEmpty','IsNull','IsNumeric',
+            'IsObject','LoadPicture','MsgBox','RGB','Round','ScriptEngine','ScriptEngineBuildVersion','ScriptEngineMajorVersion',
+            'ScriptEngineMinorVersion','SetLocale','TypeName','VarType'
+		]
+	}
+	,'OPERATORS' :[
+		'+', '-', '/', '*', '=', '<', '>', '!', '&'
+	]
+	,'DELIMITERS' :[
+		'(', ')', '[', ']', '{', '}'
+	]
+	,'STYLES' : {
+		'COMMENTS': 'color: #99CC00;'
+		,'QUOTESMARKS': 'color: #333399;'
+		,'KEYWORDS' : {
+			'keywords' : 'color: #3366FF;'
+			,'functions' : 'color: #0000FF;'
+			,'statements' : 'color: #3366FF;'
+			}
+		,'OPERATORS' : 'color: #FF0000;'
+		,'DELIMITERS' : 'color: #0000FF;'
+
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/xml.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/xml.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/xml.js
new file mode 100644
index 0000000..45e056b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/reg_syntax/xml.js
@@ -0,0 +1,57 @@
+/*
+* last update: 2006-08-24
+*/
+
+editAreaLoader.load_syntax["xml"] = {
+	'DISPLAY_NAME' : 'XML'
+	,'COMMENT_SINGLE' : {}
+	,'COMMENT_MULTI' : {'<!--' : '-->'}
+	,'QUOTEMARKS' : {1: "'", 2: '"'}
+	,'KEYWORD_CASE_SENSITIVE' : false
+	,'KEYWORDS' : {
+	}
+	,'OPERATORS' :[
+	]
+	,'DELIMITERS' :[
+	]
+	,'REGEXPS' : {
+		'xml' : {
+			'search' : '()(<\\?[^>]*?\\?>)()'
+			,'class' : 'xml'
+			,'modifiers' : 'g'
+			,'execute' : 'before' // before or after
+		}
+		,'cdatas' : {
+			'search' : '()(<!\\[CDATA\\[.*?\\]\\]>)()'
+			,'class' : 'cdata'
+			,'modifiers' : 'g'
+			,'execute' : 'before' // before or after
+		}
+		,'tags' : {
+			'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
+			,'class' : 'tags'
+			,'modifiers' : 'gi'
+			,'execute' : 'before' // before or after
+		}
+		,'attributes' : {
+			'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
+			,'class' : 'attributes'
+			,'modifiers' : 'g'
+			,'execute' : 'before' // before or after
+		}
+	}
+	,'STYLES' : {
+		'COMMENTS': 'color: #AAAAAA;'
+		,'QUOTESMARKS': 'color: #00c700;'
+		,'KEYWORDS' : {
+			}
+		,'OPERATORS' : 'color: #E775F0;'
+		,'DELIMITERS' : ''
+		,'REGEXPS' : {
+			'attributes': 'color: #fb271a;'
+			,'tags': 'color: #2d20f8;'
+			,'xml': 'color: #BBBADF;'
+			,'cdata': 'color: #BBBA2B;'
+		}
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/regexp.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/regexp.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/regexp.js
new file mode 100644
index 0000000..907063a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/regexp.js
@@ -0,0 +1,139 @@
+	/*EditArea.prototype.comment_or_quotes= function(v0, v1, v2, v3, v4,v5,v6,v7,v8,v9, v10){
+		new_class="quotes";
+		if(v6 && v6 != undefined && v6!="")
+			new_class="comments";
+		return "µ__"+ new_class +"__µ"+v0+"µ_END_µ";
+
+	};*/
+	
+/*	EditArea.prototype.htmlTag= function(v0, v1, v2, v3, v4,v5,v6,v7,v8,v9, v10){
+		res="<span class=htmlTag>"+v2;
+		alert("v2: "+v2+" v3: "+v3);
+		tab=v3.split("=");
+		attributes="";
+		if(tab.length>1){
+			attributes="<span class=attribute>"+tab[0]+"</span>=";
+			for(i=1; i<tab.length-1; i++){
+				cut=tab[i].lastIndexOf("&nbsp;");				
+				attributes+="<span class=attributeVal>"+tab[i].substr(0,cut)+"</span>";
+				attributes+="<span class=attribute>"+tab[i].substr(cut)+"</span>=";
+			}
+			attributes+="<span class=attributeVal>"+tab[tab.length-1]+"</span>";
+		}		
+		res+=attributes+v5+"</span>";
+		return res;		
+	};*/
+	
+	// determine if the selected text if a comment or a quoted text
+	EditArea.prototype.comment_or_quote= function(){
+		var new_class="", close_tag="", sy, arg, i;
+		sy 		= parent.editAreaLoader.syntax[editArea.current_code_lang];
+		arg		= EditArea.prototype.comment_or_quote.arguments[0];
+		
+		for( i in sy["quotes"] ){
+			if(arg.indexOf(i)==0){
+				new_class="quotesmarks";
+				close_tag=sy["quotes"][i];
+			}
+		}
+		if(new_class.length==0)
+		{
+			for(var i in sy["comments"]){
+				if( arg.indexOf(i)==0 ){
+					new_class="comments";
+					close_tag=sy["comments"][i];
+				}
+			}
+		}
+		// for single line comment the \n must not be included in the span tags
+		if(close_tag=="\n"){
+			return "µ__"+ new_class +"__µ"+ arg.replace(/(\r?\n)?$/m, "µ_END_µ$1");
+		}else{
+			// the closing tag must be set only if the comment or quotes is closed 
+			reg= new RegExp(parent.editAreaLoader.get_escaped_regexp(close_tag)+"$", "m");
+			if( arg.search(reg)!=-1 )
+				return "µ__"+ new_class +"__µ"+ arg +"µ_END_µ";
+			else
+				return "µ__"+ new_class +"__µ"+ arg;
+		}
+	};
+	
+/*
+	// apply special tags arround text to highlight
+	EditArea.prototype.custom_highlight= function(){
+		res= EditArea.prototype.custom_highlight.arguments[1]+"µ__"+ editArea.reg_exp_span_tag +"__µ" + EditArea.prototype.custom_highlight.arguments[2]+"µ_END_µ";
+		if(EditArea.prototype.custom_highlight.arguments.length>5)
+			res+= EditArea.prototype.custom_highlight.arguments[ EditArea.prototype.custom_highlight.arguments.length-3 ];
+		return res;
+	};
+	*/
+	
+	// return identication that allow to know if revalidating only the text line won't make the syntax go mad
+	EditArea.prototype.get_syntax_trace= function(text){
+		if(this.settings["syntax"].length>0 && parent.editAreaLoader.syntax[this.settings["syntax"]]["syntax_trace_regexp"])
+			return text.replace(parent.editAreaLoader.syntax[this.settings["syntax"]]["syntax_trace_regexp"], "$3");
+	};
+	
+		
+	EditArea.prototype.colorize_text= function(text){
+		//text="<div id='result' class='area' style='position: relative; z-index: 4; height: 500px; overflow: scroll;border: solid black 1px;'> ";
+	  /*		
+		if(this.isOpera){	
+			// opera can't use pre element tabulation cause a tab=6 chars in the textarea and 8 chars in the pre 
+			text= this.replace_tab(text);
+		}*/
+		
+		text= " "+text; // for easier regExp
+		
+		/*if(this.do_html_tags)
+			text= text.replace(/(<[a-z]+ [^>]*>)/gi, '[__htmlTag__]$1[_END_]');*/
+		if(this.settings["syntax"].length>0)
+			text= this.apply_syntax(text, this.settings["syntax"]);
+
+		// remove the first space added
+		return text.substr(1).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/µ_END_µ/g,"</span>").replace(/µ__([a-zA-Z0-9]+)__µ/g,"<span class='$1'>");
+	};
+	
+	EditArea.prototype.apply_syntax= function(text, lang){
+		var sy;
+		this.current_code_lang=lang;
+	
+		if(!parent.editAreaLoader.syntax[lang])
+			return text;
+			
+		sy = parent.editAreaLoader.syntax[lang];
+		if(sy["custom_regexp"]['before']){
+			for( var i in sy["custom_regexp"]['before']){
+				var convert="$1µ__"+ sy["custom_regexp"]['before'][i]['class'] +"__µ$2µ_END_µ$3";
+				text= text.replace(sy["custom_regexp"]['before'][i]['regexp'], convert);
+			}
+		}
+		
+		if(sy["comment_or_quote_reg_exp"]){
+			//setTimeout("_$('debug_area').value=editArea.comment_or_quote_reg_exp;", 500);
+			text= text.replace(sy["comment_or_quote_reg_exp"], this.comment_or_quote);
+		}
+		
+		if(sy["keywords_reg_exp"]){
+			for(var i in sy["keywords_reg_exp"]){	
+				text= text.replace(sy["keywords_reg_exp"][i], 'µ__'+i+'__µ$2µ_END_µ');
+			}			
+		}
+		
+		if(sy["delimiters_reg_exp"]){
+			text= text.replace(sy["delimiters_reg_exp"], 'µ__delimiters__µ$1µ_END_µ');
+		}		
+		
+		if(sy["operators_reg_exp"]){
+			text= text.replace(sy["operators_reg_exp"], 'µ__operators__µ$1µ_END_µ');
+		}
+		
+		if(sy["custom_regexp"]['after']){
+			for( var i in sy["custom_regexp"]['after']){
+				var convert="$1µ__"+ sy["custom_regexp"]['after'][i]['class'] +"__µ$2µ_END_µ$3";
+				text= text.replace(sy["custom_regexp"]['after'][i]['regexp'], convert);			
+			}
+		}
+			
+		return text;
+	};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/resize_area.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/resize_area.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/resize_area.js
new file mode 100644
index 0000000..191e8ce
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/resize_area.js
@@ -0,0 +1,73 @@
+	
+	EditAreaLoader.prototype.start_resize_area= function(){
+		var d=document,a,div,width,height,father;
+		
+		d.onmouseup= editAreaLoader.end_resize_area;
+		d.onmousemove= editAreaLoader.resize_area;
+		editAreaLoader.toggle(editAreaLoader.resize["id"]);		
+		
+		a	= editAreas[editAreaLoader.resize["id"]]["textarea"];
+		div	= d.getElementById("edit_area_resize");
+		if(!div){
+			div= d.createElement("div");
+			div.id="edit_area_resize";
+			div.style.border="dashed #888888 1px";
+		}
+		width	= a.offsetWidth -2;
+		height	= a.offsetHeight -2;
+		
+		div.style.display	= "block";
+		div.style.width		= width+"px";
+		div.style.height	= height+"px";
+		father= a.parentNode;
+		father.insertBefore(div, a);
+		
+		a.style.display="none";
+				
+		editAreaLoader.resize["start_top"]= calculeOffsetTop(div);
+		editAreaLoader.resize["start_left"]= calculeOffsetLeft(div);		
+	};
+	
+	EditAreaLoader.prototype.end_resize_area= function(e){
+		var d=document,div,a,width,height;
+		
+		d.onmouseup="";
+		d.onmousemove="";		
+		
+		div		= d.getElementById("edit_area_resize");		
+		a= editAreas[editAreaLoader.resize["id"]]["textarea"];
+		width	= Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_width"], div.offsetWidth-4);
+		height	= Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_height"], div.offsetHeight-4);
+		if(editAreaLoader.isIE==6){
+			width-=2;
+			height-=2;	
+		}
+		a.style.width		= width+"px";
+		a.style.height		= height+"px";
+		div.style.display	= "none";
+		a.style.display		= "inline";
+		a.selectionStart	= editAreaLoader.resize["selectionStart"];
+		a.selectionEnd		= editAreaLoader.resize["selectionEnd"];
+		editAreaLoader.toggle(editAreaLoader.resize["id"]);
+		
+		return false;
+	};
+	
+	EditAreaLoader.prototype.resize_area= function(e){		
+		var allow,newHeight,newWidth;
+		allow	= editAreas[editAreaLoader.resize["id"]]["settings"]["allow_resize"];
+		if(allow=="both" || allow=="y")
+		{
+			newHeight	= Math.max(20, getMouseY(e)- editAreaLoader.resize["start_top"]);
+			document.getElementById("edit_area_resize").style.height= newHeight+"px";
+		}
+		if(allow=="both" || allow=="x")
+		{
+			newWidth= Math.max(20, getMouseX(e)- editAreaLoader.resize["start_left"]);
+			document.getElementById("edit_area_resize").style.width= newWidth+"px";
+		}
+		
+		return false;
+	};
+	
+	editAreaLoader.waiting_loading["resize_area.js"]= "loaded";

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/search_replace.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/search_replace.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/search_replace.js
new file mode 100644
index 0000000..bd266b3
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/search_replace.js
@@ -0,0 +1,174 @@
+	EditArea.prototype.show_search = function(){
+		if(_$("area_search_replace").style.visibility=="visible"){
+			this.hidden_search();
+		}else{
+			this.open_inline_popup("area_search_replace");
+			var text= this.area_get_selection();
+			var search= text.split("\n")[0];
+			_$("area_search").value= search;
+			_$("area_search").focus();
+		}
+	};
+	
+	EditArea.prototype.hidden_search= function(){
+		/*_$("area_search_replace").style.visibility="hidden";
+		this.textarea.focus();
+		var icon= _$("search");
+		setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );*/
+		this.close_inline_popup("area_search_replace");
+	};
+	
+	EditArea.prototype.area_search= function(mode){
+		
+		if(!mode)
+			mode="search";
+		_$("area_search_msg").innerHTML="";		
+		var search=_$("area_search").value;		
+		
+		this.textarea.focus();		
+		this.textarea.textareaFocused=true;
+		
+		var infos= this.get_selection_infos();	
+		var start= infos["selectionStart"];
+		var pos=-1;
+		var pos_begin=-1;
+		var length=search.length;
+		
+		if(_$("area_search_replace").style.visibility!="visible"){
+			this.show_search();
+			return;
+		}
+		if(search.length==0){
+			_$("area_search_msg").innerHTML=this.get_translation("search_field_empty");
+			return;
+		}
+		// advance to the next occurence if no text selected
+		if(mode!="replace" ){
+			if(_$("area_search_reg_exp").checked)
+				start++;
+			else
+				start+= search.length;
+		}
+		
+		//search
+		if(_$("area_search_reg_exp").checked){
+			// regexp search
+			var opt="m";
+			if(!_$("area_search_match_case").checked)
+				opt+="i";
+			var reg= new RegExp(search, opt);
+			pos= infos["full_text"].substr(start).search(reg);
+			pos_begin= infos["full_text"].search(reg);
+			if(pos!=-1){
+				pos+=start;
+				length=infos["full_text"].substr(start).match(reg)[0].length;
+			}else if(pos_begin!=-1){
+				length=infos["full_text"].match(reg)[0].length;
+			}
+		}else{
+			if(_$("area_search_match_case").checked){
+				pos= infos["full_text"].indexOf(search, start); 
+				pos_begin= infos["full_text"].indexOf(search); 
+			}else{
+				pos= infos["full_text"].toLowerCase().indexOf(search.toLowerCase(), start); 
+				pos_begin= infos["full_text"].toLowerCase().indexOf(search.toLowerCase()); 
+			}		
+		}
+		
+		// interpret result
+		if(pos==-1 && pos_begin==-1){
+			_$("area_search_msg").innerHTML="<strong>"+search+"</strong> "+this.get_translation("not_found");
+			return;
+		}else if(pos==-1 && pos_begin != -1){
+			begin= pos_begin;
+			_$("area_search_msg").innerHTML=this.get_translation("restart_search_at_begin");
+		}else
+			begin= pos;
+		
+		//_$("area_search_msg").innerHTML+="<strong>"+search+"</strong> found at "+begin+" strat at "+start+" pos "+pos+" curs"+ infos["indexOfCursor"]+".";
+		if(mode=="replace" && pos==infos["indexOfCursor"]){
+			var replace= _$("area_replace").value;
+			var new_text="";			
+			if(_$("area_search_reg_exp").checked){
+				var opt="m";
+				if(!_$("area_search_match_case").checked)
+					opt+="i";
+				var reg= new RegExp(search, opt);
+				new_text= infos["full_text"].substr(0, begin) + infos["full_text"].substr(start).replace(reg, replace);
+			}else{
+				new_text= infos["full_text"].substr(0, begin) + replace + infos["full_text"].substr(begin + length);
+			}
+			this.textarea.value=new_text;
+			this.area_select(begin, length);
+			this.area_search();
+		}else
+			this.area_select(begin, length);
+	};
+	
+	
+	
+	
+	EditArea.prototype.area_replace= function(){		
+		this.area_search("replace");
+	};
+	
+	EditArea.prototype.area_replace_all= function(){
+	/*	this.area_select(0, 0);
+		_$("area_search_msg").innerHTML="";
+		while(_$("area_search_msg").innerHTML==""){
+			this.area_replace();
+		}*/
+	
+		var base_text= this.textarea.value;
+		var search= _$("area_search").value;		
+		var replace= _$("area_replace").value;
+		if(search.length==0){
+			_$("area_search_msg").innerHTML=this.get_translation("search_field_empty");
+			return ;
+		}
+		
+		var new_text="";
+		var nb_change=0;
+		if(_$("area_search_reg_exp").checked){
+			// regExp
+			var opt="mg";
+			if(!_$("area_search_match_case").checked)
+				opt+="i";
+			var reg= new RegExp(search, opt);
+			nb_change= infos["full_text"].match(reg).length;
+			new_text= infos["full_text"].replace(reg, replace);
+			
+		}else{
+			
+			if(_$("area_search_match_case").checked){
+				var tmp_tab=base_text.split(search);
+				nb_change= tmp_tab.length -1 ;
+				new_text= tmp_tab.join(replace);
+			}else{
+				// case insensitive
+				var lower_value=base_text.toLowerCase();
+				var lower_search=search.toLowerCase();
+				
+				var start=0;
+				var pos= lower_value.indexOf(lower_search);				
+				while(pos!=-1){
+					nb_change++;
+					new_text+= this.textarea.value.substring(start , pos)+replace;
+					start=pos+ search.length;
+					pos= lower_value.indexOf(lower_search, pos+1);
+				}
+				new_text+= this.textarea.value.substring(start);				
+			}
+		}			
+		if(new_text==base_text){
+			_$("area_search_msg").innerHTML="<strong>"+search+"</strong> "+this.get_translation("not_found");
+		}else{
+			this.textarea.value= new_text;
+			_$("area_search_msg").innerHTML="<strong>"+nb_change+"</strong> "+this.get_translation("occurrence_replaced");
+			// firefox and opera doesn't manage with the focus if it's done directly
+			//editArea.textarea.focus();editArea.textarea.textareaFocused=true;
+			setTimeout("editArea.textarea.focus();editArea.textarea.textareaFocused=true;", 100);
+		}
+		
+		
+	};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/template.html
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/template.html b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/template.html
new file mode 100644
index 0000000..573dfaa
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/template.html
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+<head>
+	<title>EditArea</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
+	[__CSSRULES__]
+	[__JSCODE__]
+</head>
+<body>
+	<div id='editor'>
+		<div class='area_toolbar' id='toolbar_1'>[__TOOLBAR__]</div>
+		<div class='area_toolbar' id='tab_browsing_area'><ul id='tab_browsing_list' class='menu'> <li> </li> </ul></div>
+		<div id='result'>
+			<div id='no_file_selected'></div>
+			<div id='container'>
+				<div id='cursor_pos' class='edit_area_cursor'>&nbsp;</div>
+				<div id='end_bracket' class='edit_area_cursor'>&nbsp;</div>
+				<div id='selection_field'></div>
+				<div id='line_number' selec='none'></div>
+				<div id='content_highlight'></div>
+				<div id='test_font_size'></div>
+				<div id='selection_field_text'></div>
+				<textarea id='textarea' wrap='off' onchange='editArea.execCommand("onchange");' onfocus='javascript:editArea.textareaFocused=true;' onblur='javascript:editArea.textareaFocused=false;'>
+				</textarea>
+				
+			</div>
+		</div>
+		<div class='area_toolbar' id='toolbar_2'>
+			<table class='statusbar' cellspacing='0' cellpadding='0'>
+				<tr>
+					<td class='total' selec='none'>{$position}:</td>
+					<td class='infos' selec='none'>
+						{$line_abbr} <span  id='linePos'>0</span>, {$char_abbr} <span id='currPos'>0</span>
+					</td>
+					<td class='total' selec='none'>{$total}:</td>
+					<td class='infos' selec='none'>
+						{$line_abbr} <span id='nbLine'>0</span>, {$char_abbr} <span id='nbChar'>0</span>
+					</td>
+					<td class='resize'>
+						<span id='resize_area'><img src='[__BASEURL__]images/statusbar_resize.gif' alt='resize' selec='none'></span>
+					</td>
+				</tr>
+			</table>
+		</div>
+	</div>
+	<div id='processing'>
+		<div id='processing_text'>
+			{$processing}
+		</div>
+	</div>
+
+	<div id='area_search_replace' class='editarea_popup'>
+		<table cellspacing='2' cellpadding='0' style='width: 100%'>
+			<tr>
+				<td selec='none'>{$search}</td>
+				<td><input type='text' id='area_search' /></td>
+				<td id='close_area_search_replace'>
+					<a onclick='Javascript:editArea.execCommand("hidden_search")'><img selec='none' src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a><br />
+			</tr><tr>
+				<td selec='none'>{$replace}</td>
+				<td><input type='text' id='area_replace' /></td>
+				<td><img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,"area_search_replace", parent.frames["frame_"+editArea.id]);'  src='[__BASEURL__]images/move.gif' alt='{$move_popup}' title='{$move_popup}' /></td>
+			</tr>
+		</table>
+		<div class='button'>
+			<input type='checkbox' id='area_search_match_case' /><label for='area_search_match_case' selec='none'>{$match_case}</label>
+			<input type='checkbox' id='area_search_reg_exp' /><label for='area_search_reg_exp' selec='none'>{$reg_exp}</label>
+			<br />
+			<a onclick='Javascript:editArea.execCommand("area_search")' selec='none'>{$find_next}</a>
+			<a onclick='Javascript:editArea.execCommand("area_replace")' selec='none'>{$replace}</a>
+			<a onclick='Javascript:editArea.execCommand("area_replace_all")' selec='none'>{$replace_all}</a><br />
+		</div>
+		<div id='area_search_msg' selec='none'></div>
+	</div>
+	<div id='edit_area_help' class='editarea_popup'>
+		<div class='close_popup'>
+			<a onclick='Javascript:editArea.execCommand("close_all_inline_popup")'><img src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a>
+		</div>
+		<div><h2>Editarea [__EA_VERSION__]</h2><br />
+			<h3>{$shortcuts}:</h3>
+				{$tab}: {$add_tab}<br />
+				{$shift}+{$tab}: {$remove_tab}<br />
+				{$ctrl}+f: {$search_command}<br />
+				{$ctrl}+r: {$replace_command}<br />
+				{$ctrl}+h: {$highlight}<br />
+				{$ctrl}+g: {$go_to_line}<br />
+				{$ctrl}+z: {$undo}<br />
+				{$ctrl}+y: {$redo}<br />
+				{$ctrl}+e: {$help}<br />
+				{$ctrl}+q, {$esc}: {$close_popup}<br />
+				{$accesskey} E: {$toggle}<br />
+			<br />
+			<em>{$about_notice}</em>
+			<br /><div class='copyright'>&copy; Christophe Dolivet 2007-2010</div>
+		</div>
+	</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/css/SyntaxHighlighter.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/css/SyntaxHighlighter.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/css/SyntaxHighlighter.css
new file mode 100644
index 0000000..2b8c9c9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/css/SyntaxHighlighter.css
@@ -0,0 +1,185 @@
+.dp-highlighter
+{
+	font-family: "Consolas", "Courier New", Courier, mono, serif;
+	font-size: 12px;
+	background-color: #E7E5DC;
+	width: 99%;
+	overflow: hidden !important;
+	margin: 18px 0 18px 0 !important;
+	padding-top: 1px; /* adds a little border on top when controls are hidden */
+}
+
+/* clear styles */
+.dp-highlighter ol,
+.dp-highlighter ol li,
+.dp-highlighter ol li span 
+{
+	margin: 0;
+	padding: 0;
+	border: none;
+}
+
+.dp-highlighter a,
+.dp-highlighter a:hover
+{
+	background: none;
+	border: none;
+	padding: 0;
+	margin: 0;
+}
+
+.dp-highlighter .bar
+{
+	padding-left: 45px;
+}
+
+.dp-highlighter.collapsed .bar,
+.dp-highlighter.nogutter .bar
+{
+	padding-left: 0px;
+}
+
+.dp-highlighter ol
+{
+	list-style: decimal; /* for ie */
+	background-color: #fff;
+	margin: 0px 0px 1px 45px !important; /* 1px bottom margin seems to fix occasional Firefox scrolling */
+	padding: 0px;
+	color: #5C5C5C;
+}
+
+.dp-highlighter.nogutter ol,
+.dp-highlighter.nogutter ol li
+{
+	list-style: none !important;
+	margin-left: 0px !important;
+}
+
+.dp-highlighter ol li,
+.dp-highlighter .columns div
+{
+	list-style: decimal-leading-zero; /* better look for others, override cascade from OL */
+	list-style-position: outside !important;
+	border-left: 3px solid #6CE26C;
+	background-color: #F8F8F8;
+	color: #5C5C5C;
+	padding: 0 3px 0 10px !important;
+	margin: 0 !important;
+	line-height: 14px;
+}
+
+.dp-highlighter.nogutter ol li,
+.dp-highlighter.nogutter .columns div
+{
+	border: 0;
+}
+
+.dp-highlighter .columns
+{
+	background-color: #F8F8F8;
+	color: gray;
+	overflow: hidden;
+	width: 100%;
+}
+
+.dp-highlighter .columns div
+{
+	padding-bottom: 5px;
+}
+
+.dp-highlighter ol li.alt
+{
+	background-color: #FFF;
+	color: inherit;
+}
+
+.dp-highlighter ol li span
+{
+	color: black;
+	background-color: inherit;
+}
+
+/* Adjust some properties when collapsed */
+
+.dp-highlighter.collapsed ol
+{
+	margin: 0px;
+}
+
+.dp-highlighter.collapsed ol li
+{
+	display: none;
+}
+
+/* Additional modifications when in print-view */
+
+.dp-highlighter.printing
+{
+	border: none;
+}
+
+.dp-highlighter.printing .tools
+{
+	display: none !important;
+}
+
+.dp-highlighter.printing li
+{
+	display: list-item !important;
+}
+
+/* Styles for the tools */
+
+.dp-highlighter .tools
+{
+	padding: 3px 8px 3px 10px;
+	font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif;
+	color: silver;
+	background-color: #f8f8f8;
+	padding-bottom: 10px;
+	border-left: 3px solid #6CE26C;
+}
+
+.dp-highlighter.nogutter .tools
+{
+	border-left: 0;
+}
+
+.dp-highlighter.collapsed .tools
+{
+	border-bottom: 0;
+}
+
+.dp-highlighter .tools a
+{
+	font-size: 9px;
+	color: #a0a0a0;
+	background-color: inherit;
+	text-decoration: none;
+	margin-right: 10px;
+}
+
+.dp-highlighter .tools a:hover
+{
+	color: red;
+	background-color: inherit;
+	text-decoration: underline;
+}
+
+/* About dialog styles */
+
+.dp-about { background-color: #fff; color: #333; margin: 0px; padding: 0px; }
+.dp-about table { width: 100%; height: 100%; font-size: 11px; font-family: Tahoma, Verdana, Arial, sans-serif !important; }
+.dp-about td { padding: 10px; vertical-align: top; }
+.dp-about .copy { border-bottom: 1px solid #ACA899; height: 95%; }
+.dp-about .title { color: red; background-color: inherit; font-weight: bold; }
+.dp-about .para { margin: 0 0 4px 0; }
+.dp-about .footer { background-color: #ECEADB; color: #333; border-top: 1px solid #fff; text-align: right; }
+.dp-about .close { font-size: 11px; font-family: Tahoma, Verdana, Arial, sans-serif !important; background-color: #ECEADB; color: #333; width: 60px; height: 22px; }
+
+/* Language specific styles */
+
+.dp-highlighter .comment, .dp-highlighter .comments { color: #008200; background-color: inherit; }
+.dp-highlighter .string { color: blue; background-color: inherit; }
+.dp-highlighter .keyword { color: #069; font-weight: bold; background-color: inherit; }
+.dp-highlighter .preprocessor { color: gray; background-color: inherit; }

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/header.jsp
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/header.jsp b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/header.jsp
new file mode 100644
index 0000000..e61fc3d
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/header.jsp
@@ -0,0 +1,22 @@
+<%--
+ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
+<script type="text/javascript" src="/carbon/highlighter/js/shCore.js"></script>
+<script type="text/javascript" src="/carbon/highlighter/js/shBrushXml.js"></script>
+
+<link rel="stylesheet" type="text/css" href="/carbon/highlighter/css/SyntaxHighlighter.css"/>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/clipboard.swf
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/clipboard.swf b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/clipboard.swf
new file mode 100644
index 0000000..2cfe371
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/clipboard.swf differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushCSharp.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushCSharp.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushCSharp.js
new file mode 100644
index 0000000..e8b2b03
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushCSharp.js
@@ -0,0 +1,10 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+dp.sh.Brushes.CSharp=function()
+{var keywords='abstract as base bool break byte case catch char checked class const '+'continue decimal default delegate do double else enum event explicit '+'extern false finally fixed float for foreach get goto if implicit in int '+'interface internal is lock long namespace new null object operator out '+'override params private protected public readonly ref return sbyte sealed set '+'short sizeof stackalloc static string struct switch this throw true try '+'typeof uint ulong unchecked unsafe ushort using virtual void while';this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:'comment'},{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('^\\s*#.*','gm'),css:'preprocessor'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-c';this.Style='.dp-c .vars { color: #d00; }';}
+dp.sh.Brushes.CSharp.prototype=new dp.sh.Highlighter();dp.sh.Brushes.CSharp.Aliases=['c#','c-sharp','csharp'];

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushCpp.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushCpp.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushCpp.js
new file mode 100644
index 0000000..a88a7a4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushCpp.js
@@ -0,0 +1,10 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+dp.sh.Brushes.Cpp=function()
+{var datatypes='ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR '+'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH '+'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP '+'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY '+'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT '+'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE '+'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF '+'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR '+'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR '+'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT '+'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 '+'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR '+'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 '+'PUSHORT
  PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT '+'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG '+'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM '+'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t '+'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS '+'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t '+'__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t '+'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler '+'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function '+'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf '+'va_list wchar_t wctrans_t wctype_t wint_t signed';var keywords='break case catch class const __finally __exception __try '+'const_cast continue private public protected __declspec '+'default delete deprecated dllexport dllimport do dynamic_c
 ast '+'else enum explicit extern if for friend goto inline '+'mutable naked namespace new noinline noreturn nothrow '+'register reinterpret_cast return selectany '+'sizeof static static_cast struct switch template this '+'thread throw true false try typedef typeid typename union '+'using uuid virtual void volatile whcar_t while';this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:'comment'},{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('^ *#.*','gm'),css:'preprocessor'},{regex:new RegExp(this.GetKeywords(datatypes),'gm'),css:'datatypes'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-cpp';this.Style='.dp-cpp .datatypes { color: #2E8B57; font-weight: bold; }';}
+dp.sh.Brushes.Cpp.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Cpp.Aliases=['cpp','c','c++'];

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushCss.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushCss.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushCss.js
new file mode 100644
index 0000000..11d67fd
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushCss.js
@@ -0,0 +1,14 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+dp.sh.Brushes.CSS=function()
+{var keywords='ascent azimuth background-attachment background-color background-image background-position '+'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top '+'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color '+'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width '+'border-bottom-width border-left-width border-width border cap-height caption-side centerline clear clip color '+'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display '+'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font '+'height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top '+'margin-right margin-bottom margin-left margin marker-offset marks mathline max-h
 eight max-width min-height min-width orphans '+'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page '+'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position '+'quotes richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress '+'table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em '+'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';var values='above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+'continuous counter counters crop cross crosshair cursive dashed decimal de
 cimal-leading-zero default digits disc dotted double '+'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+'small small-caps small-caption smaller soft solid speech spell-out squa
 re s-resize static status-bar sub super sw-resize '+'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';var fonts='[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif';this.regexList=[{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('\\#[a-zA-Z0-9]{3,6}','g'),css:'value'},{regex:new RegExp('(-?\\d+)(\.\\d+)?(px|em|pt|\:|\%|)','g'),css:'value'},{regex:new RegExp('!important','g'),css:'important'},{regex:new RegExp(this.GetKeywordsCSS(keywords),'gm'),css:'keyword'},{regex:new RegExp(this.
 GetValuesCSS(values),'g'),css:'value'},{regex:new RegExp(this.GetValuesCSS(fonts),'g'),css:'value'}];this.CssClass='dp-css';this.Style='.dp-css .value { color: black; }'+'.dp-css .important { color: red; }';}
+dp.sh.Highlighter.prototype.GetKeywordsCSS=function(str)
+{return'\\b([a-z_]|)'+str.replace(/ /g,'(?=:)\\b|\\b([a-z_\\*]|\\*|)')+'(?=:)\\b';}
+dp.sh.Highlighter.prototype.GetValuesCSS=function(str)
+{return'\\b'+str.replace(/ /g,'(?!-)(?!:)\\b|\\b()')+'\:\\b';}
+dp.sh.Brushes.CSS.prototype=new dp.sh.Highlighter();dp.sh.Brushes.CSS.Aliases=['css'];

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushDelphi.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushDelphi.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushDelphi.js
new file mode 100644
index 0000000..38e6505
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushDelphi.js
@@ -0,0 +1,10 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+dp.sh.Brushes.Delphi=function()
+{var keywords='abs addr and ansichar ansistring array as asm begin boolean byte cardinal '+'case char class comp const constructor currency destructor div do double '+'downto else end except exports extended false file finalization finally '+'for function goto if implementation in inherited int64 initialization '+'integer interface is label library longint longword mod nil not object '+'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended '+'pint64 pointer private procedure program property pshortstring pstring '+'pvariant pwidechar pwidestring protected public published raise real real48 '+'record repeat set shl shortint shortstring shr single smallint string then '+'threadvar to true try type unit until uses val var varirnt while widechar '+'widestring with word write writeln xor';this.regexList=[{regex:new RegExp('\\(\\*[\\s\\S]*?\\*\\)','gm'),css:'comment'},{regex:new RegExp('{(?!\\$)[\\s\\S]*?}','gm'),css:'comment'},{regex:dp.sh.RegexLib.SingleLineCComments
 ,css:'comment'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('\\{\\$[a-zA-Z]+ .+\\}','g'),css:'directive'},{regex:new RegExp('\\b[\\d\\.]+\\b','g'),css:'number'},{regex:new RegExp('\\$[a-zA-Z0-9]+\\b','g'),css:'number'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-delphi';this.Style='.dp-delphi .number { color: blue; }'+'.dp-delphi .directive { color: #008284; }'+'.dp-delphi .vars { color: #000; }';}
+dp.sh.Brushes.Delphi.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Delphi.Aliases=['delphi','pascal'];

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushJScript.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushJScript.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushJScript.js
new file mode 100644
index 0000000..1979de0
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushJScript.js
@@ -0,0 +1,10 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+dp.sh.Brushes.JScript=function()
+{var keywords='abstract boolean break byte case catch char class const continue debugger '+'default delete do double else enum export extends false final finally float '+'for function goto if implements import in instanceof int interface long native '+'new null package private protected public return short static super switch '+'synchronized this throw throws transient true try typeof var void volatile while with';this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:'comment'},{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('^\\s*#.*','gm'),css:'preprocessor'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-c';}
+dp.sh.Brushes.JScript.prototype=new dp.sh.Highlighter();dp.sh.Brushes.JScript.Aliases=['js','jscript','javascript'];

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushJava.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushJava.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushJava.js
new file mode 100644
index 0000000..8a2559f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushJava.js
@@ -0,0 +1,10 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+dp.sh.Brushes.Java=function()
+{var keywords='abstract assert boolean break byte case catch char class const '+'continue default do double else enum extends '+'false final finally float for goto if implements import '+'instanceof int interface long native new null '+'package private protected public return '+'short static strictfp super switch synchronized this throw throws true '+'transient try void volatile while';this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:'comment'},{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b','gi'),css:'number'},{regex:new RegExp('(?!\\@interface\\b)\\@[\\$\\w]+\\b','g'),css:'annotation'},{regex:new RegExp('\\@interface\\b','g'),css:'keyword'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-j';this.Style='.dp-j .annotation { color: #646464; }'+'.dp-j .number { 
 color: #C00000; }';}
+dp.sh.Brushes.Java.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Java.Aliases=['java'];

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushPhp.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushPhp.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushPhp.js
new file mode 100644
index 0000000..9656daf
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushPhp.js
@@ -0,0 +1,10 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+dp.sh.Brushes.Php=function()
+{var funcs='abs acos acosh addcslashes addslashes '+'array_change_key_case array_chunk array_combine array_count_values array_diff '+'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+'array_push array_rand array_reduce array_reverse array_search array_shift '+'array_slice array_splice array_sum array_udiff array_udiff_assoc '+'array_udiff_uassoc array_uintersect array_uintersect_assoc '+'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil ch
 dir '+'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_res
 tore ini_set '+'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+'parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir '+'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+'strtoupper strtr strval substr substr_compare';var keywords='and or xor __FILE__ __LINE__ array as break case '+'cfunction class const continue declare default di
 e do else '+'elseif empty enddeclare endfor endforeach endif endswitch endwhile '+'extends for foreach function include include_once global if '+'new old_function return static switch use require require_once '+'var while __FUNCTION__ __CLASS__ '+'__METHOD__ abstract interface public implements extends private protected throw';this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:'comment'},{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('\\$\\w+','g'),css:'vars'},{regex:new RegExp(this.GetKeywords(funcs),'gmi'),css:'func'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-c';}
+dp.sh.Brushes.Php.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Php.Aliases=['php'];

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushPython.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushPython.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushPython.js
new file mode 100644
index 0000000..66c9d45
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushPython.js
@@ -0,0 +1,11 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+dp.sh.Brushes.Python=function()
+{var keywords='and assert break class continue def del elif else '+'except exec finally for from global if import in is '+'lambda not or pass print raise return try yield while';var special='None True False self cls class_'
+this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:'comment'},{regex:new RegExp("^\\s*@\\w+",'gm'),css:'decorator'},{regex:new RegExp("(['\"]{3})([^\\1])*?\\1",'gm'),css:'comment'},{regex:new RegExp('"(?!")(?:\\.|\\\\\\"|[^\\""\\n\\r])*"','gm'),css:'string'},{regex:new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'",'gm'),css:'string'},{regex:new RegExp("\\b\\d+\\.?\\w*",'g'),css:'number'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'},{regex:new RegExp(this.GetKeywords(special),'gm'),css:'special'}];this.CssClass='dp-py';this.Style='.dp-py .builtins { color: #ff1493; }'+'.dp-py .magicmethods { color: #808080; }'+'.dp-py .exceptions { color: brown; }'+'.dp-py .types { color: brown; font-style: italic; }'+'.dp-py .commonlibs { color: #8A2BE2; font-style: italic; }';}
+dp.sh.Brushes.Python.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Python.Aliases=['py','python'];

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushRuby.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushRuby.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushRuby.js
new file mode 100644
index 0000000..c19df82
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushRuby.js
@@ -0,0 +1,11 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+dp.sh.Brushes.Ruby=function()
+{var keywords='alias and BEGIN begin break case class def define_method defined do each else elsif '+'END end ensure false for if in module new next nil not or raise redo rescue retry return '+'self super then throw true undef unless until when while yield';var builtins='Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload '+'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol '+'ThreadGroup Thread Time TrueClass'
+this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp(':[a-z][A-Za-z0-9_]*','g'),css:'symbol'},{regex:new RegExp('(\\$|@@|@)\\w+','g'),css:'variable'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'},{regex:new RegExp(this.GetKeywords(builtins),'gm'),css:'builtin'}];this.CssClass='dp-rb';this.Style='.dp-rb .symbol { color: #a70; }'+'.dp-rb .variable { color: #a70; font-weight: bold; }';}
+dp.sh.Brushes.Ruby.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Ruby.Aliases=['ruby','rails','ror'];

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushSql.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushSql.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushSql.js
new file mode 100644
index 0000000..94151e9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushSql.js
@@ -0,0 +1,10 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+dp.sh.Brushes.Sql=function()
+{var funcs='abs avg case cast coalesce convert count current_timestamp '+'current_user day isnull left lower month nullif replace right '+'session_user space substring sum system_user upper user year';var keywords='absolute action add after alter as asc at authorization begin bigint '+'binary bit by cascade char character check checkpoint close collate '+'column commit committed connect connection constraint contains continue '+'create cube current current_date current_time cursor database date '+'deallocate dec decimal declare default delete desc distinct double drop '+'dynamic else end end-exec escape except exec execute false fetch first '+'float for force foreign forward free from full function global goto grant '+'group grouping having hour ignore index inner insensitive insert instead '+'int integer intersect into is isolation key last level load local max min '+'minute modify move name national nchar next no numeric of off on only '+'open option order out output partial passw
 ord precision prepare primary '+'prior privileges procedure public read real references relative repeatable '+'restrict return returns revoke rollback rollup rows rule schema scroll '+'second section select sequence serializable set size smallint static '+'statistics table temp temporary then time timestamp to top transaction '+'translation trigger true truncate uncommitted union unique update values '+'varchar varying view when where with work';var operators='all and any between cross in join like not null or outer some';this.regexList=[{regex:new RegExp('--(.*)$','gm'),css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp(this.GetKeywords(funcs),'gmi'),css:'func'},{regex:new RegExp(this.GetKeywords(operators),'gmi'),css:'op'},{regex:new RegExp(this.GetKeywords(keywords),'gmi'),css:'keyword'}];this.CssClass='dp-sql';this.Style='.dp-sql .func { color: #ff1493; }'+'.dp-sql .op { color: #808080; }
 ';}
+dp.sh.Brushes.Sql.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Sql.Aliases=['sql'];

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushVb.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushVb.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushVb.js
new file mode 100644
index 0000000..59b37e8
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushVb.js
@@ -0,0 +1,10 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+dp.sh.Brushes.Vb=function()
+{var keywords='AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto '+'Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate '+'CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType '+'Date Decimal Declare Default Delegate Dim DirectCast Do Double Each '+'Else ElseIf End Enum Erase Error Event Exit False Finally For Friend '+'Function Get GetType GoSub GoTo Handles If Implements Imports In '+'Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module '+'MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing '+'NotInheritable NotOverridable Object On Option Optional Or OrElse '+'Overloads Overridable Overrides ParamArray Preserve Private Property '+'Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume '+'Return Select Set Shadows Shared Short Single Static Step Stop String '+'Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until '+'Variant When While With WithEvents WriteOnly Xor';this.regexList=[{regex
 :new RegExp('\'.*$','gm'),css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:new RegExp('^\\s*#.*','gm'),css:'preprocessor'},{regex:new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}];this.CssClass='dp-vb';}
+dp.sh.Brushes.Vb.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Vb.Aliases=['vb','vb.net'];

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushXml.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushXml.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushXml.js
new file mode 100644
index 0000000..c39fc81
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shBrushXml.js
@@ -0,0 +1,19 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+dp.sh.Brushes.Xml=function()
+{this.CssClass='dp-xml';this.Style='.dp-xml .cdata { color: #ff1493; }'+'.dp-xml .tag, .dp-xml .tag-name { color: #069; font-weight: bold; }'+'.dp-xml .attribute { color: red; }'+'.dp-xml .attribute-value { color: blue; }';}
+dp.sh.Brushes.Xml.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Xml.Aliases=['xml','xhtml','xslt','html','xhtml'];dp.sh.Brushes.Xml.prototype.ProcessRegexList=function()
+{function push(array,value)
+{array[array.length]=value;}
+var index=0;var match=null;var regex=null;this.GetMatches(new RegExp('(\&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\&gt;|>)','gm'),'cdata');this.GetMatches(new RegExp('(\&lt;|<)!--\\s*.*?\\s*--(\&gt;|>)','gm'),'comments');regex=new RegExp('([:\\w-\.]+)\\s*=\\s*(".*?"|\'.*?\'|\\w+)*|(\\w+)','gm');while((match=regex.exec(this.code))!=null)
+{if(match[1]==null)
+{continue;}
+push(this.matches,new dp.sh.Match(match[1],match.index,'attribute'));if(match[2]!=undefined)
+{push(this.matches,new dp.sh.Match(match[2],match.index+match[0].indexOf(match[2]),'attribute-value'));}}
+this.GetMatches(new RegExp('(\&lt;|<)/*\\?*(?!\\!)|/*\\?*(\&gt;|>)','gm'),'tag');regex=new RegExp('(?:\&lt;|<)/*\\?*\\s*([:\\w-\.]+)','gm');while((match=regex.exec(this.code))!=null)
+{push(this.matches,new dp.sh.Match(match[1],match.index+match[0].indexOf(match[1]),'tag-name'));}}


[42/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/carbontags.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/carbontags.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/carbontags.tld
new file mode 100644
index 0000000..43e997e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/carbontags.tld
@@ -0,0 +1,366 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?><!DOCTYPE taglib PUBLIC
+        "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
+        "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
+
+<taglib>
+    <tlibversion>1.0</tlibversion>
+    <jspversion>1.1</jspversion>
+    <shortname>mt</shortname>
+    <uri>http://wso2.org/projects/carbon/taglibs/carbontags.jar</uri>
+    <info>Carbon Tag library</info>
+
+    <tag>
+        <name>paginator</name>
+        <tagclass>org.wso2.carbon.ui.taglibs.Paginator</tagclass>
+        <bodycontent>empty</bodycontent>
+        <info>A tag for displaying pages such as "Prev 1 2 3 Next"</info>
+
+        <attribute>
+            <name>pageNumber</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>action</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>numberOfPages</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+	    <attribute>
+            <name>noOfPageLinksToDisplay</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>page</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>pageNumberParameterName</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>resourceBundle</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>nextKey</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>prevKey</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>parameters</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>showPageNumbers</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>resourcePaginator</name>
+        <tagclass>org.wso2.carbon.ui.taglibs.ResourcePaginator</tagclass>
+        <bodycontent>empty</bodycontent>
+        <info>A tag for displaying pages for Registry Resources</info>
+
+        <attribute>
+            <name>pageNumber</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>numberOfPages</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>tdColSpan</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>page</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>pageNumberParameterName</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>resourceBundle</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>nextKey</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>prevKey</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>parameters</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>paginationFunction</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>simpleItemGroupSelector</name>
+        <tagclass>org.wso2.carbon.ui.taglibs.SimpleItemGroupSelector</tagclass>
+        <bodycontent>empty</bodycontent>
+        <info>
+            A simple tag for selecting and deselecting a group of related items
+        </info>
+
+        <attribute>
+            <name>selectAllFunction</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>selectNoneFunction</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>resourceBundle</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>selectAllKey</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>selectNoneKey</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>itemGroupSelector</name>
+        <tagclass>org.wso2.carbon.ui.taglibs.ItemGroupSelector</tagclass>
+        <bodycontent>empty</bodycontent>
+        <info>
+            A tag for selecting a group of related items, and performing a number of action on those
+            items.
+        </info>
+
+        <attribute>
+            <name>selectAllInPageFunction</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>selectAllFunction</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>selectNoneFunction</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>addRemoveFunction</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>addRemoveButtonId</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>addRemoveKey</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>resourceBundle</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>selectAllInPageKey</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>selectAllKey</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>selectNoneKey</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>numberOfPages</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>extraHtml</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+    
+    <tag>
+        <name>breadcrumb</name>
+        <tagclass>org.wso2.carbon.ui.taglibs.Breadcrumb</tagclass>
+        <bodycontent>empty</bodycontent>
+        <info>Tag for generating breadcrumb based on current page</info>
+        <attribute>
+            <name>label</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>resourceBundle</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>topPage</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>request</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>hidden</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <name>jsi18n</name>
+        <tagclass>org.wso2.carbon.ui.taglibs.JSi18n</tagclass>
+        <bodycontent>empty</bodycontent>
+        <info>Tag to fascilitate i18n for Javascript</info>
+        <attribute>
+            <name>resourceBundle</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>request</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>i18nObjectName</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>namespace</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <name>report</name>
+        <tagclass>org.wso2.carbon.ui.taglibs.Report</tagclass>
+        <bodycontent>JSP</bodycontent>
+        <info>A tag for displaying reporting ui</info>
+
+        <attribute>
+            <name>component</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>template</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>pdfReport</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>htmlReport</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>excelReport</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>reportDataSession</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>     
+    </tag>
+
+
+    <tag>
+        <name>tooltips</name>
+        <tagclass>org.wso2.carbon.ui.taglibs.TooltipsGenerator</tagclass>
+        <bodycontent>JSP</bodycontent>
+        <info>A tag for displaying tool tip</info>
+        <attribute>
+            <name>image</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>description</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>resourceBundle</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>key</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>noOfWordsPerLine</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fmt-1_0-rt.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fmt-1_0-rt.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fmt-1_0-rt.tld
new file mode 100644
index 0000000..45d1545
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fmt-1_0-rt.tld
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+  <tlib-version>1.0</tlib-version>
+  <jsp-version>1.2</jsp-version>
+  <short-name>fmt_rt</short-name>
+  <uri>http://java.sun.com/jstl/fmt_rt</uri>
+  <display-name>JSTL fmt RT</display-name>
+  <description>JSTL 1.0 i18n-capable formatting library</description>
+
+  <validator>
+    <validator-class>
+        org.apache.taglibs.standard.tlv.JstlFmtTLV
+    </validator-class>
+    <description>
+        Provides core validation features for JSTL tags.
+    </description>
+  </validator>
+
+  <tag>
+    <name>requestEncoding</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Sets the request character encoding
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>setLocale</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Stores the given locale in the locale configuration variable
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>variant</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>timeZone</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Specifies the time zone for any time formatting or parsing actions
+        nested in its body
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>setTimeZone</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Stores the given time zone in the time zone configuration variable
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>bundle</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.BundleTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Loads a resource bundle to be used by its tag body
+    </description>
+    <attribute>
+        <name>basename</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>prefix</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>setBundle</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Loads a resource bundle and stores it in the named scoped variable or
+        the bundle configuration variable
+    </description>
+    <attribute>
+        <name>basename</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>message</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.MessageTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Maps key to localized message and performs parametric replacement
+    </description>
+    <attribute>
+        <name>key</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>bundle</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>param</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.ParamTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Supplies an argument for parametric replacement to a containing
+        &lt;message&gt; tag
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>formatNumber</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Formats a numeric value as a number, currency, or percentage
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>pattern</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>currencyCode</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>currencySymbol</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>groupingUsed</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>maxIntegerDigits</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>minIntegerDigits</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>maxFractionDigits</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>minFractionDigits</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>parseNumber</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Parses the string representation of a number, currency, or percentage
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>pattern</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>parseLocale</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>integerOnly</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>formatDate</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Formats a date and/or time using the supplied styles and pattern
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>dateStyle</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>timeStyle</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>pattern</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>timeZone</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>parseDate</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Parses the string representation of a date and/or time
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>dateStyle</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>timeStyle</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>pattern</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>timeZone</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>parseLocale</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fmt-1_0.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fmt-1_0.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fmt-1_0.tld
new file mode 100644
index 0000000..20523ee
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fmt-1_0.tld
@@ -0,0 +1,442 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+  <tlib-version>1.0</tlib-version>
+  <jsp-version>1.2</jsp-version>
+  <short-name>fmt</short-name>
+  <uri>http://java.sun.com/jstl/fmt</uri>
+  <display-name>JSTL fmt</display-name>
+  <description>JSTL 1.0 i18n-capable formatting library</description>
+
+  <validator>
+    <validator-class>
+	org.apache.taglibs.standard.tlv.JstlFmtTLV
+    </validator-class>
+    <init-param>
+	<param-name>expressionAttributes</param-name>
+	<param-value>
+            requestEncoding:value 
+	    setLocale:value
+	    setLocale:variant
+	    timeZone:value
+	    setTimeZone:value
+	    bundle:basename
+	    bundle:prefix
+            setBundle:basename
+	    message:key
+	    message:bundle
+	    param:value
+	    formatNumber:value
+	    formatNumber:pattern
+            formatNumber:currencyCode
+            formatNumber:currencySymbol
+            formatNumber:groupingUsed
+            formatNumber:maxIntegerDigits
+            formatNumber:minIntegerDigits
+            formatNumber:maxFractionDigits
+            formatNumber:minFractionDigits
+	    parseNumber:value
+	    parseNumber:pattern
+	    parseNumber:parseLocale
+            parseNumber:integerOnly
+	    formatDate:value
+	    formatDate:pattern
+	    formatDate:timeZone
+	    parseDate:value
+	    parseDate:pattern
+	    parseDate:timeZone
+	    parseDate:parseLocale
+	</param-value>
+	<description>
+	    Whitespace-separated list of colon-separated token pairs
+	    describing tag:attribute combinations that accept expressions.
+	    The validator uses this information to determine which
+	    attributes need their syntax validated.
+	</description>
+     </init-param>
+  </validator>
+
+  <tag>
+    <name>requestEncoding</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.fmt.RequestEncodingTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Sets the request character encoding
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>setLocale</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Stores the given locale in the locale configuration variable
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>variant</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>timeZone</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.fmt.TimeZoneTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Specifies the time zone for any time formatting or parsing actions
+        nested in its body
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>setTimeZone</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Stores the given time zone in the time zone configuration variable
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>bundle</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.fmt.BundleTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Loads a resource bundle to be used by its tag body
+    </description>
+    <attribute>
+        <name>basename</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>prefix</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>setBundle</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.fmt.SetBundleTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Loads a resource bundle and stores it in the named scoped variable or
+        the bundle configuration variable
+    </description>
+    <attribute>
+        <name>basename</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>message</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.fmt.MessageTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Maps key to localized message and performs parametric replacement
+    </description>
+    <attribute>
+        <name>key</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>bundle</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>param</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.fmt.ParamTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Supplies an argument for parametric replacement to a containing
+        &lt;message&gt; tag
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>formatNumber</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.fmt.FormatNumberTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Formats a numeric value as a number, currency, or percentage
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>pattern</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>currencyCode</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>currencySymbol</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>groupingUsed</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>maxIntegerDigits</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>minIntegerDigits</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>maxFractionDigits</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>minFractionDigits</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>parseNumber</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.fmt.ParseNumberTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Parses the string representation of a number, currency, or percentage
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>pattern</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>parseLocale</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>integerOnly</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>formatDate</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.fmt.FormatDateTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Formats a date and/or time using the supplied styles and pattern
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>dateStyle</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>timeStyle</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>pattern</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>timeZone</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>parseDate</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.fmt.ParseDateTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Parses the string representation of a date and/or time
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>dateStyle</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>timeStyle</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>pattern</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>timeZone</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>parseLocale</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fmt.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fmt.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fmt.tld
new file mode 100644
index 0000000..3b9a54a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fmt.tld
@@ -0,0 +1,671 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+    version="2.0">
+    
+  <description>JSTL 1.1 i18n-capable formatting library</description>
+  <display-name>JSTL fmt</display-name>
+  <tlib-version>1.1</tlib-version>
+  <short-name>fmt</short-name>
+  <uri>http://java.sun.com/jsp/jstl/fmt</uri>
+
+  <validator>
+    <description>
+        Provides core validation features for JSTL tags.
+    </description>
+    <validator-class>
+        org.apache.taglibs.standard.tlv.JstlFmtTLV
+    </validator-class>
+  </validator>
+
+  <tag>
+    <description>
+        Sets the request character encoding
+    </description>
+    <name>requestEncoding</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag</tag-class>
+    <body-content>empty</body-content>
+    <attribute>
+        <description>
+Name of character encoding to be applied when
+decoding request parameters.
+        </description>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Stores the given locale in the locale configuration variable
+    </description>
+    <name>setLocale</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag</tag-class>
+    <body-content>empty</body-content>
+    <attribute>
+        <description>
+A String value is interpreted as the
+printable representation of a locale, which
+must contain a two-letter (lower-case)
+language code (as defined by ISO-639),
+and may contain a two-letter (upper-case)
+country code (as defined by ISO-3166).
+Language and country codes must be
+separated by hyphen (-) or underscore
+(_).        
+	</description>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Vendor- or browser-specific variant.
+See the java.util.Locale javadocs for
+more information on variants.
+        </description>
+        <name>variant</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope of the locale configuration variable.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Specifies the time zone for any time formatting or parsing actions
+        nested in its body
+    </description>
+    <name>timeZone</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+The time zone. A String value is interpreted as
+a time zone ID. This may be one of the time zone
+IDs supported by the Java platform (such as
+"America/Los_Angeles") or a custom time zone
+ID (such as "GMT-8"). See
+java.util.TimeZone for more information on
+supported time zone formats.
+        </description>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Stores the given time zone in the time zone configuration variable
+    </description>
+    <name>setTimeZone</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag</tag-class>
+    <body-content>empty</body-content>
+    <attribute>
+        <description>
+The time zone. A String value is interpreted as
+a time zone ID. This may be one of the time zone
+IDs supported by the Java platform (such as
+"America/Los_Angeles") or a custom time zone
+ID (such as "GMT-8"). See java.util.TimeZone for
+more information on supported time zone
+formats.
+        </description>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable which
+stores the time zone of type
+java.util.TimeZone.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope of var or the time zone configuration
+variable.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Loads a resource bundle to be used by its tag body
+    </description>
+    <name>bundle</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.BundleTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Resource bundle base name. This is the bundle's
+fully-qualified resource name, which has the same
+form as a fully-qualified class name, that is, it uses
+"." as the package component separator and does not
+have any file type (such as ".class" or ".properties")
+suffix.
+        </description>
+        <name>basename</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Prefix to be prepended to the value of the message
+key of any nested &lt;fmt:message&gt; action.
+        </description>
+        <name>prefix</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Loads a resource bundle and stores it in the named scoped variable or
+        the bundle configuration variable
+    </description>
+    <name>setBundle</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag</tag-class>
+    <body-content>empty</body-content>
+    <attribute>
+        <description>
+Resource bundle base name. This is the bundle's
+fully-qualified resource name, which has the same
+form as a fully-qualified class name, that is, it uses
+"." as the package component separator and does not
+have any file type (such as ".class" or ".properties")
+suffix.
+        </description>
+        <name>basename</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable which stores
+the i18n localization context of type
+javax.servlet.jsp.jstl.fmt.LocalizationC
+ontext.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope of var or the localization context
+configuration variable.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Maps key to localized message and performs parametric replacement
+    </description>
+    <name>message</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.MessageTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Message key to be looked up.
+        </description>
+        <name>key</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Localization context in whose resource
+bundle the message key is looked up.
+        </description>
+        <name>bundle</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable
+which stores the localized message.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope of var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Supplies an argument for parametric replacement to a containing
+        &lt;message&gt; tag
+    </description>
+    <name>param</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.ParamTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Argument used for parametric replacement.
+        </description>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Formats a numeric value as a number, currency, or percentage
+    </description>
+    <name>formatNumber</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Numeric value to be formatted.
+        </description>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Specifies whether the value is to be
+formatted as number, currency, or
+percentage.
+        </description>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Custom formatting pattern.
+        </description>
+        <name>pattern</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+ISO 4217 currency code. Applied only
+when formatting currencies (i.e. if type is
+equal to "currency"); ignored otherwise.
+        </description>
+        <name>currencyCode</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Currency symbol. Applied only when
+formatting currencies (i.e. if type is equal
+to "currency"); ignored otherwise.
+        </description>
+        <name>currencySymbol</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Specifies whether the formatted output
+will contain any grouping separators.
+        </description>
+        <name>groupingUsed</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Maximum number of digits in the integer
+portion of the formatted output.
+        </description>
+        <name>maxIntegerDigits</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Minimum number of digits in the integer
+portion of the formatted output.
+        </description>
+        <name>minIntegerDigits</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Maximum number of digits in the
+fractional portion of the formatted output.
+        </description>
+        <name>maxFractionDigits</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Minimum number of digits in the
+fractional portion of the formatted output.
+        </description>
+        <name>minFractionDigits</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable
+which stores the formatted result as a
+String.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope of var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Parses the string representation of a number, currency, or percentage
+    </description>
+    <name>parseNumber</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+String to be parsed.
+        </description>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Specifies whether the string in the value
+attribute should be parsed as a number,
+currency, or percentage.
+        </description>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Custom formatting pattern that determines
+how the string in the value attribute is to be
+parsed.
+        </description>
+        <name>pattern</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Locale whose default formatting pattern (for
+numbers, currencies, or percentages,
+respectively) is to be used during the parse
+operation, or to which the pattern specified
+via the pattern attribute (if present) is
+applied.
+        </description>
+        <name>parseLocale</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Specifies whether just the integer portion of
+the given value should be parsed.
+        </description>
+        <name>integerOnly</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable which
+stores the parsed result (of type
+java.lang.Number).
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope of var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Formats a date and/or time using the supplied styles and pattern
+    </description>
+    <name>formatDate</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag</tag-class>
+    <body-content>empty</body-content>
+    <attribute>
+        <description>
+Date and/or time to be formatted.
+        </description>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Specifies whether the time, the date, or both
+the time and date components of the given
+date are to be formatted. 
+        </description>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Predefined formatting style for dates. Follows
+the semantics defined in class
+java.text.DateFormat. Applied only
+when formatting a date or both a date and
+time (i.e. if type is missing or is equal to
+"date" or "both"); ignored otherwise.
+        </description>
+        <name>dateStyle</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Predefined formatting style for times. Follows
+the semantics defined in class
+java.text.DateFormat. Applied only
+when formatting a time or both a date and
+time (i.e. if type is equal to "time" or "both");
+ignored otherwise.
+        </description>
+        <name>timeStyle</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Custom formatting style for dates and times.
+        </description>
+        <name>pattern</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Time zone in which to represent the formatted
+time.
+        </description>
+        <name>timeZone</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable which
+stores the formatted result as a String.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope of var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Parses the string representation of a date and/or time
+    </description>
+    <name>parseDate</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Date string to be parsed.
+        </description>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Specifies whether the date string in the
+value attribute is supposed to contain a
+time, a date, or both.
+        </description>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Predefined formatting style for days
+which determines how the date
+component of the date string is to be
+parsed. Applied only when formatting a
+date or both a date and time (i.e. if type
+is missing or is equal to "date" or "both");
+ignored otherwise.
+        </description>
+        <name>dateStyle</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Predefined formatting styles for times
+which determines how the time
+component in the date string is to be
+parsed. Applied only when formatting a
+time or both a date and time (i.e. if type
+is equal to "time" or "both"); ignored
+otherwise.
+        </description>
+        <name>timeStyle</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Custom formatting pattern which
+determines how the date string is to be
+parsed.
+        </description>
+        <name>pattern</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Time zone in which to interpret any time
+information in the date string.
+        </description>
+        <name>timeZone</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Locale whose predefined formatting styles
+for dates and times are to be used during
+the parse operation, or to which the
+pattern specified via the pattern
+attribute (if present) is applied.
+        </description>
+        <name>parseLocale</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable in
+which the parsing result (of type
+java.util.Date) is stored.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope of var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fn.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fn.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fn.tld
new file mode 100644
index 0000000..12d4ca8
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/fn.tld
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+  version="2.0">
+    
+  <description>JSTL 1.1 functions library</description>
+  <display-name>JSTL functions</display-name>
+  <tlib-version>1.1</tlib-version>
+  <short-name>fn</short-name>
+  <uri>http://java.sun.com/jsp/jstl/functions</uri>
+
+  <function>
+    <description>
+      Tests if an input string contains the specified substring.
+    </description>
+    <name>contains</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>boolean contains(java.lang.String, java.lang.String)</function-signature>
+    <example>
+      &lt;c:if test="${fn:contains(name, searchString)}">
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Tests if an input string contains the specified substring in a case insensitive way.
+    </description>
+    <name>containsIgnoreCase</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>boolean containsIgnoreCase(java.lang.String, java.lang.String)</function-signature>
+    <example>
+      &lt;c:if test="${fn:containsIgnoreCase(name, searchString)}">
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Tests if an input string ends with the specified suffix.
+    </description>
+    <name>endsWith</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>boolean endsWith(java.lang.String, java.lang.String)</function-signature>
+    <example>
+      &lt;c:if test="${fn:endsWith(filename, ".txt")}">
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Escapes characters that could be interpreted as XML markup.
+    </description>
+    <name>escapeXml</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>java.lang.String escapeXml(java.lang.String)</function-signature>
+    <example>
+      ${fn:escapeXml(param:info)}
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Returns the index withing a string of the first occurrence of a specified substring.
+    </description>
+    <name>indexOf</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>int indexOf(java.lang.String, java.lang.String)</function-signature>
+    <example>
+      ${fn:indexOf(name, "-")}
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Joins all elements of an array into a string.
+    </description>
+    <name>join</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>java.lang.String join(java.lang.String[], java.lang.String)</function-signature>
+    <example>
+      ${fn:join(array, ";")}
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Returns the number of items in a collection, or the number of characters in a string.
+    </description>
+    <name>length</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>int length(java.lang.Object)</function-signature>
+    <example>
+      You have ${fn:length(shoppingCart.products)} in your shopping cart.
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Returns a string resulting from replacing in an input string all occurrences
+      of a "before" string into an "after" substring.
+    </description>
+    <name>replace</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>java.lang.String replace(java.lang.String, java.lang.String, java.lang.String)</function-signature>
+    <example>
+      ${fn:replace(text, "-", "&#149;")}
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Splits a string into an array of substrings.
+    </description>
+    <name>split</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>java.lang.String[] split(java.lang.String, java.lang.String)</function-signature>
+    <example>
+      ${fn:split(customerNames, ";")}
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Tests if an input string starts with the specified prefix.
+    </description>
+    <name>startsWith</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>boolean startsWith(java.lang.String, java.lang.String)</function-signature>
+    <example>
+      &lt;c:if test="${fn:startsWith(product.id, "100-")}">
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Returns a subset of a string.
+    </description>
+    <name>substring</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>java.lang.String substring(java.lang.String, int, int)</function-signature>
+    <example>
+      P.O. Box: ${fn:substring(zip, 6, -1)}
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Returns a subset of a string following a specific substring.
+    </description>
+    <name>substringAfter</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>java.lang.String substringAfter(java.lang.String, java.lang.String)</function-signature>
+    <example>
+      P.O. Box: ${fn:substringAfter(zip, "-")}
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Returns a subset of a string before a specific substring.
+    </description>
+    <name>substringBefore</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>java.lang.String substringBefore(java.lang.String, java.lang.String)</function-signature>
+    <example>
+      Zip (without P.O. Box): ${fn:substringBefore(zip, "-")}
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Converts all of the characters of a string to lower case.
+    </description>
+    <name>toLowerCase</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>java.lang.String toLowerCase(java.lang.String)</function-signature>
+    <example>
+      Product name: ${fn.toLowerCase(product.name)}
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Converts all of the characters of a string to upper case.
+    </description>
+    <name>toUpperCase</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>java.lang.String toUpperCase(java.lang.String)</function-signature>
+    <example>
+      Product name: ${fn.UpperCase(product.name)}
+    </example>
+  </function>
+
+  <function>
+    <description>
+      Removes white spaces from both ends of a string.
+    </description>
+    <name>trim</name>
+    <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
+    <function-signature>java.lang.String trim(java.lang.String)</function-signature>
+    <example>
+      Name: ${fn.trim(name)}
+    </example>  
+  </function>
+
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/json.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/json.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/json.tld
new file mode 100644
index 0000000..2026daf
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/json.tld
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<taglib version="2.0" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd">
+  <description>JSON (JavaScript Object Notation) rendering taglib</description>
+  <tlib-version>1.0</tlib-version>
+  <short-name>json</short-name>
+  <uri>http://www.atg.com/taglibs/json</uri>
+
+  <tag>
+    <description>
+      Creates a JSON Object. JSON Objects should in turn contain nested json:object, json:property
+      and json:array tags to define the values contained therein.
+      Objects can be nested as many times as you want. 
+    </description>
+    <name>object</name>
+    <tag-class>atg.taglib.json.JsonObjectTag</tag-class>
+    <body-content>scriptless</body-content>
+    <attribute>
+      <description>The name of the object (required if nested within another json:object tag)</description>
+      <name>name</name>
+      <required>false</required> 
+      <rtexprvalue>true</rtexprvalue>   
+    </attribute>
+    <attribute>
+      <description>Should the rendered JSON be nicely formatted and indented? (default:false)</description>
+      <name>prettyPrint</name>
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>
+      <type>boolean</type>
+    </attribute>
+    <attribute>
+      <description>Should special XML characters be escaped? (default:true)</description>
+      <name>escapeXml</name>
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>
+      <type>boolean</type>
+    </attribute>
+  </tag>
+  
+  <tag>
+    <description>
+      Represents a single property of a JSON object. This tag should be
+      contained within a json:object or json:array tag.
+      It will render a single name/value pair for the name and value specified.
+      
+      The value may be specified using either the value attribute, or it
+      may be contained within the body of the tag.
+      If using the body of the tag, then the content is assumed to be a String. If
+      using the value attribute, the type can be any of String, Boolean, Integer,
+      Long, Double or Object. 
+      Boolean types will be converted to a Javascript boolean value.
+      Integer/Long/Double types will be converted to a Javascript numeric value.
+      Strings and Objects will be converted to Javascript string values (using toString)
+      
+      All String data will have all whitespace trimmed from the beginning and end
+      of the string before being set on the JSON Object. This behavior may be
+      overridden by setting trim=false.     
+    </description>
+    <name>property</name>
+    <tag-class>atg.taglib.json.JsonPropertyTag</tag-class>
+    <body-content>scriptless</body-content>
+    <attribute>
+      <description>The name of the property</description>
+      <name>name</name>
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+      <description>The value of the property. If set this will override anything set in the body of the tag.</description>
+      <name>value</name>
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>
+      <type>java.lang.Object</type>
+    </attribute>
+    <attribute>
+      <description>Should whitespace be trimmed from the beginning and end of String values? (default:true)</description>
+      <name>trim</name>
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>
+      <type>boolean</type>
+    </attribute>
+    <attribute>
+      <description>Should special XML characters be escaped? (default:true)</description>
+      <name>escapeXml</name>
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>
+      <type>boolean</type>
+    </attribute>
+  </tag>
+  
+  <tag>   
+    <description>
+      Creates a JSON array which consist of Strings, numeric values,
+      booleans, JSON objects, or further JSON arrays. You can pass a List of values using 
+      the 'items' attribute. This list will be iterated over, and each value in the list will 
+      be added to the JSON Array.
+      
+      If you specify a body for the tag, then the value of each element in the 'items' list
+      will be set to the variabled as named by the 'var' attribute. The body will be rendered
+      for every item in the list.
+      
+      You may also omit the 'items' collection, and add elements directly to the JSON array within
+      the body of the tag. Each json:property, json:object and json:array encountered within the body
+      of the tag will be added to the JSON array sequentially.
+    </description>
+    <name>array</name>
+    <tag-class>atg.taglib.json.JsonArrayTag</tag-class>
+    <body-content>scriptless</body-content>
+    <attribute>
+      <description>The name of the array (required if nested within json:object tag)</description>
+      <name>name</name>
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+      <description>The name of a page variable that will be set to the item in the list as it is iterated over</description>
+      <name>var</name>
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+      <description>A collection, array, or map of items that should be iterated over</description>
+      <name>items</name>
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>      
+      <type>java.lang.Object</type>
+    </attribute>
+    <attribute>
+      <description>Should whitespace be trimmed from the beginning and end of String values? (default:true)</description>
+      <name>trim</name>     
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>
+      <type>boolean</type>     
+    </attribute>
+    <attribute>
+      <description>Should the rendered JSON be nicely formatted and indented? (default:false)</description>
+      <name>prettyPrint</name>
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>
+      <type>boolean</type>
+    </attribute>
+    <attribute>
+      <description>Should special XML characters be escaped? (default:true)</description>
+      <name>escapeXml</name>
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>
+      <type>boolean</type>
+    </attribute>
+  </tag>
+
+</taglib>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/permittedTaglibs.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/permittedTaglibs.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/permittedTaglibs.tld
new file mode 100644
index 0000000..8c0c404
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/permittedTaglibs.tld
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+    version="2.0">
+  <description>
+    Restricts JSP pages to the JSTL tag libraries
+  </description>    
+  <display-name>permittedTaglibs</display-name>
+  <tlib-version>1.1</tlib-version>
+  <short-name>permittedTaglibs</short-name>
+  <uri>http://jakarta.apache.org/taglibs/standard/permittedTaglibs</uri>
+
+  <validator>
+    <validator-class>
+	javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV
+    </validator-class>        
+    <init-param>
+      <description>
+        Whitespace-separated list of taglib URIs to permit.  This example
+	TLD for the Standard Taglib allows only JSTL 'el' taglibs to be
+	imported.
+      </description>        
+      <param-name>permittedTaglibs</param-name>
+      <param-value>
+	http://java.sun.com/jsp/jstl/core
+	http://java.sun.com/jsp/jstl/fmt
+	http://java.sun.com/jsp/jstl/sql
+	http://java.sun.com/jsp/jstl/xml
+      </param-value>
+    </init-param>
+  </validator>
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/scriptfree.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/scriptfree.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/scriptfree.tld
new file mode 100644
index 0000000..62ceb43
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/scriptfree.tld
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+    version="2.0">
+  <description>
+    Validates JSP pages to prohibit use of scripting elements.
+  </description>
+  <tlib-version>1.1</tlib-version>
+  <short-name>scriptfree</short-name>
+  <uri>http://jakarta.apache.org/taglibs/standard/scriptfree</uri>
+
+  <validator>
+    <description>
+      Validates prohibitions against scripting elements.
+    </description>
+    <validator-class>
+    javax.servlet.jsp.jstl.tlv.ScriptFreeTLV
+    </validator-class>
+    <init-param>
+      <description>
+        Controls whether or not declarations are considered valid.
+      </description>
+      <param-name>allowDeclarations</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <description>
+        Controls whether or not scriptlets are considered valid.
+      </description>
+      <param-name>allowScriptlets</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <description>
+        Controls whether or not top-level expressions are considered valid.
+      </description>
+      <param-name>allowExpressions</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <description>
+        Controls whether or not expressions used to supply request-time
+        attribute values are considered valid.
+      </description>
+      <param-name>allowRTExpressions</param-name>
+      <param-value>false</param-value>
+    </init-param>
+  </validator>
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/sql-1_0-rt.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/sql-1_0-rt.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/sql-1_0-rt.tld
new file mode 100644
index 0000000..c2fe525
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/sql-1_0-rt.tld
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+  <tlib-version>1.0</tlib-version>
+  <jsp-version>1.2</jsp-version>
+  <short-name>sql_rt</short-name>
+  <uri>http://java.sun.com/jstl/sql_rt</uri>
+  <display-name>JSTL sql RT</display-name>
+  <description>JSTL 1.0 sql library</description>
+
+  <validator>
+    <validator-class>
+        org.apache.taglibs.standard.tlv.JstlSqlTLV
+    </validator-class>
+    <description>
+        Provides core validation features for JSTL tags.
+    </description>
+  </validator>
+
+  <tag>
+    <name>transaction</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.sql.TransactionTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Provides nested database action elements with a shared Connection,
+        set up to execute all statements as one transaction.
+    </description>
+    <attribute>
+        <name>dataSource</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>isolation</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>query</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.sql.QueryTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Executes the SQL query defined in its body or through the
+        sql attribute.
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>sql</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>dataSource</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>startRow</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>maxRows</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>update</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.sql.UpdateTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Executes the SQL update defined in its body or through the
+        sql attribute.
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>sql</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>dataSource</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>param</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.sql.ParamTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Sets a parameter in an SQL statement to the specified value.
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>dateParam</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.sql.DateParamTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Sets a parameter in an SQL statement to the specified java.util.Date value.
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>setDataSource</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.sql.SetDataSourceTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Creates a simple DataSource suitable only for prototyping.
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>dataSource</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>driver</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>url</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>user</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>password</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+</taglib>


[50/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BasicAuthUIAuthenticator.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BasicAuthUIAuthenticator.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BasicAuthUIAuthenticator.java
new file mode 100644
index 0000000..53a2842
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BasicAuthUIAuthenticator.java
@@ -0,0 +1,164 @@
+package org.wso2.carbon.ui;
+
+import java.util.Map;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.ServiceClient;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.core.common.AuthenticationException;
+import org.wso2.carbon.ui.util.CarbonUIAuthenticationUtil;
+import org.wso2.carbon.utils.CarbonUtils;
+import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
+
+public class BasicAuthUIAuthenticator extends AbstractCarbonUIAuthenticator {
+
+    private static final String AUTHENTICATOR_NAME = "BasicAuthUIAuthenticator";
+
+    @Override
+    public boolean canHandle(HttpServletRequest request) {
+
+        String userName = request.getParameter(AbstractCarbonUIAuthenticator.USERNAME);
+        String password = request.getParameter(AbstractCarbonUIAuthenticator.PASSWORD);
+
+        if (CarbonUtils.isRunningOnLocalTransportMode()) {
+            return false;
+        }
+
+        if (userName != null && password != null) {
+            return true;
+        }
+
+        // This is to login with Remember Me.
+        Cookie[] cookies = request.getCookies();
+        if (cookies != null) {
+            for (Cookie cookie : cookies) {
+                if (cookie.getName().equals(CarbonConstants.REMEMBER_ME_COOKE_NAME)) {
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
+    @Override
+    public void authenticate(HttpServletRequest request) throws AuthenticationException {
+
+        String userName = request.getParameter(AbstractCarbonUIAuthenticator.USERNAME);
+        String password = request.getParameter(AbstractCarbonUIAuthenticator.PASSWORD);
+        String value = request.getParameter(AbstractCarbonUIAuthenticator.REMEMBER_ME);
+
+        boolean isRememberMe = false;
+
+        if (userName == null || password == null) {
+            throw new AuthenticationException("Invalid username or password provided.");
+        }
+
+        if (value != null && value.equals(AbstractCarbonUIAuthenticator.REMEMBER_ME)) {
+            isRememberMe = true;
+        }
+
+        String userNameWithDomain = userName;
+        String domainName = (String) request.getAttribute(MultitenantConstants.TENANT_DOMAIN);
+        if (domainName != null) {
+            userNameWithDomain += "@" + domainName;
+        }
+        if (userNameWithDomain != null) {
+            // User-name can be null in remember me scenario.
+            userNameWithDomain = userNameWithDomain.trim();
+        }
+        DefaultAuthenticatorCredentials credentials;
+        credentials = new DefaultAuthenticatorCredentials(userNameWithDomain, password);
+
+        // No exception means authentication successful
+        handleSecurity(credentials, isRememberMe, request);
+    }
+
+    @Override
+    public void authenticateWithCookie(HttpServletRequest request) throws AuthenticationException {
+
+        Cookie[] cookies = request.getCookies();
+
+        for (Cookie cookie : cookies) {
+            if (cookie.getName().equals(CarbonConstants.REMEMBER_ME_COOKE_NAME)) {
+                DefaultAuthenticatorCredentials credentials;
+                credentials = new DefaultAuthenticatorCredentials(null, null);
+                // No exception means authentication successful
+                handleSecurity(credentials, true, request);
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String doAuthentication(Object credentials, boolean isRememberMe, ServiceClient client,
+            HttpServletRequest request) throws AuthenticationException {
+
+        DefaultAuthenticatorCredentials defaultCredentials = (DefaultAuthenticatorCredentials) credentials;
+
+        if (isRememberMe && defaultCredentials.getUserName() == null
+                && defaultCredentials.getPassword() == null) {
+            // This is to login with Remember Me.
+            Cookie[] cookies = request.getCookies();
+            if (cookies != null) {
+                for (Cookie cookie : cookies) {
+                    if (cookie.getName().equals(CarbonConstants.REMEMBER_ME_COOKE_NAME)) {
+                        CarbonUIAuthenticationUtil.setCookieHeaders(cookie, client);
+                        String cookieValue = cookie.getValue();
+                        return getUserNameFromCookie(cookieValue);
+                    }
+                }
+            }
+        } else {
+            CarbonUtils.setBasicAccessSecurityHeaders(defaultCredentials.getUserName(),
+                    defaultCredentials.getPassword(), isRememberMe, client);
+            return defaultCredentials.getUserName();
+        }
+
+        throw new AuthenticationException("Invalid user credentials.");
+    }
+
+    /**
+     * 
+     * @param serviceClient
+     * @param httpServletRequest
+     * @throws AxisFault
+     */
+    @SuppressWarnings("rawtypes")
+    public void handleRememberMe(Map transportHeaders, HttpServletRequest httpServletRequest)
+            throws AuthenticationException {
+
+        if (transportHeaders != null) {
+            String cookieValue = (String) transportHeaders.get("RememberMeCookieValue");
+            String cookieAge = (String) transportHeaders.get("RememberMeCookieAge");
+
+            if (cookieValue == null || cookieAge == null) {
+                throw new AuthenticationException("Unable to load remember me date from response. "
+                        + "Cookie value or cookie age or both are null");
+            }
+
+            if (log.isDebugEnabled()) {
+                log.debug("Cookie value returned " + cookieValue + " cookie age " + cookieAge);
+            }
+
+            httpServletRequest.setAttribute(CarbonConstants.REMEMBER_ME_COOKIE_VALUE, cookieValue);
+            httpServletRequest.setAttribute(CarbonConstants.REMEMBER_ME_COOKIE_AGE, cookieAge);
+        }
+    }
+
+    @Override
+    public void unauthenticate(Object object) throws Exception {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public String getAuthenticatorName() {
+        return AUTHENTICATOR_NAME;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BreadCrumbGenerator.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BreadCrumbGenerator.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BreadCrumbGenerator.java
new file mode 100644
index 0000000..792941b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BreadCrumbGenerator.java
@@ -0,0 +1,343 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.ui.deployment.beans.BreadCrumbItem;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.StringTokenizer;
+import java.util.Locale;
+
+public class BreadCrumbGenerator {
+	private static Log log = LogFactory.getLog(BreadCrumbGenerator.class);
+
+	/**
+	 * Generates breadcrumb html content.
+	 * Please do not add line breaks to places where HTML content is written.
+	 * It makes debugging difficult.
+	 * @param request
+	 * @param currentPageHeader
+	 * @return String
+	 */
+	public HashMap<String,String> getBreadCrumbContent(HttpServletRequest request
+			,BreadCrumbItem currentBreadcrumbItem
+			,String jspFilePath
+			,boolean topPage
+			,boolean removeLastItem){
+		String breadcrumbCookieString = "";
+		//int lastIndexofSlash = jspFilePath.lastIndexOf(System.getProperty("file.separator"));
+		//int lastIndexofSlash = jspFilePath.lastIndexOf('/');
+
+		StringBuffer content = new StringBuffer();
+		StringBuffer cookieContent = new StringBuffer();
+		HashMap<String,String> breadcrumbContents = new HashMap<String,String>();
+		HashMap<String, BreadCrumbItem> breadcrumbs =
+			(HashMap<String, BreadCrumbItem>) request.getSession().getAttribute("breadcrumbs");
+
+		String menuId = request.getParameter("item");
+		String region = request.getParameter("region");
+		String ordinalStr = request.getParameter("ordinal");
+
+		if(topPage){
+			//some wizards redirect to index page of the component after doing some operations.
+			//Hence a map of region & menuId for component/index page is maintained & retrieved
+			//by passing index page (eg: ../service-mgt/index.jsp)
+			//This logic should run only for pages marked as toppage=true
+			if(menuId == null && region == null){
+				HashMap<String, String> indexPageBreadcrumbParamMap =
+					(HashMap<String, String>) request.getSession().getAttribute("index-page-breadcrumb-param-map");
+				//eg: indexPageBreadcrumbParamMap contains ../service-mgt/index.jsp : region1,services_list_menu pattern
+
+				if(indexPageBreadcrumbParamMap != null && !(indexPageBreadcrumbParamMap.isEmpty())){
+					String params = indexPageBreadcrumbParamMap.get(jspFilePath);
+					if(params != null){
+						region = params.substring(0, params.indexOf(','));
+						menuId = params.substring(params.indexOf(',')+1);
+					}
+				}
+			}
+		}
+
+		if (menuId != null && region != null) {
+			String key = region.trim() + "-" + menuId.trim();
+			HashMap<String, String> breadcrumbMap =
+				(HashMap<String, String>) request.getSession().getAttribute(region + "menu-id-breadcrumb-map");
+
+			String breadCrumb = "";
+			if (breadcrumbMap != null && !(breadcrumbMap.isEmpty())) {
+				breadCrumb = breadcrumbMap.get(key);
+			}
+			if (breadCrumb != null) {
+				content.append("<table cellspacing=\"0\"><tr>");
+                Locale locale = CarbonUIUtil.getLocaleFromSession(request);
+                String homeText = CarbonUIUtil.geti18nString("component.home", "org.wso2.carbon.i18n.Resources", locale);
+                content.append("<td class=\"breadcrumb-link\"><a href=\"" + CarbonUIUtil.getHomePage() + "\">"+homeText+"</a></td>");
+				cookieContent.append(breadCrumb);
+				cookieContent.append("#");
+				generateBreadcrumbForMenuPath(content, breadcrumbs, breadCrumb,true);
+			}
+		}else{
+			HashMap<String,List<BreadCrumbItem>> links = (HashMap<String,List<BreadCrumbItem>>) request
+			.getSession().getAttribute("page-breadcrumbs");
+
+			//call came within a page. Retrieve the breadcrumb cookie
+			Cookie[] cookies = request.getCookies();
+			for (int a = 0; a < cookies.length; a++) {
+				Cookie cookie = cookies[a];
+				if("current-breadcrumb".equals(cookie.getName())){
+					breadcrumbCookieString = cookie.getValue();
+					//bringing back the ,
+					breadcrumbCookieString = breadcrumbCookieString.replace("%2C", ",");
+					//bringing back the #
+					breadcrumbCookieString = breadcrumbCookieString.replace("%23", "#");
+					if(log.isDebugEnabled()){
+						log.debug("cookie :"+cookie.getName()+" : "+breadcrumbCookieString);
+					}
+				}
+			}
+
+
+			if(links != null){
+				if(log.isDebugEnabled()){
+					log.debug("size of page-breadcrumbs is : "+links.size());
+				}
+
+				content.append("<table cellspacing=\"0\"><tr>");
+                Locale locale = CarbonUIUtil.getLocaleFromSession(request);
+                String homeText = CarbonUIUtil.geti18nString("component.home", "org.wso2.carbon.i18n.Resources", locale);
+				content.append("<td class=\"breadcrumb-link\"><a href=\"" + CarbonUIUtil.getHomePage() + "\">"+homeText+"</a></td>");
+
+				String menuBreadcrumbs = "";
+				if(breadcrumbCookieString.indexOf('#') > -1){
+					menuBreadcrumbs = breadcrumbCookieString.substring(0, breadcrumbCookieString.indexOf('#'));
+				}
+				cookieContent.append(menuBreadcrumbs);
+				cookieContent.append("#");
+
+				generateBreadcrumbForMenuPath(content, breadcrumbs,
+						menuBreadcrumbs,false);
+
+				int clickedBreadcrumbLocation = 0;
+				if (ordinalStr != null) {
+					//only clicking on already made page breadcrumb link will send this via request parameter
+					try {
+						clickedBreadcrumbLocation = Integer.parseInt(ordinalStr);
+					} catch (NumberFormatException e) {
+						// Do nothing
+						log.warn("Found String for breadcrumb ordinal");
+					}
+				}
+
+				String pageBreadcrumbs = "";
+				if(breadcrumbCookieString.indexOf('#') > -1){
+					pageBreadcrumbs = breadcrumbCookieString.substring(breadcrumbCookieString.indexOf('#')+1);
+				}
+				StringTokenizer st2 = new StringTokenizer(pageBreadcrumbs,"*");
+				String[] tokens = new String[st2.countTokens()];
+				int count = 0;
+				String previousToken = "";
+				while(st2.hasMoreTokens()){
+					String currentToken = st2.nextToken();
+					//To avoid page refresh create breadcrumbs
+					if(! currentToken.equals(previousToken)){
+						previousToken = currentToken;
+						tokens[count] = currentToken;
+						count++;
+					}
+				}
+
+
+				//jspSubContext should be the same across all the breadcrumbs
+				//(cookie is updated everytime a page is loaded)
+				List<BreadCrumbItem> breadcrumbItems = null;
+//				if(tokens != null && tokens.length > 0){
+					//String token = tokens[0];
+					//String jspSubContext = token.substring(0, token.indexOf('+'));
+					//breadcrumbItems = links.get("../"+jspSubContext);
+//				}
+
+				LinkedList<String> tokenJSPFileOrder = new LinkedList<String>();
+				LinkedList<String> jspFileSubContextOrder = new LinkedList<String>();
+				HashMap<String,String> jspFileSubContextMap = new HashMap<String,String>();
+				for(int a = 0;a < tokens.length;a++){
+					String token = tokens[a];
+					if(token != null){
+						String jspFileName = token.substring(token.indexOf('+')+1);
+						String jspSubContext = token.substring(0, token.indexOf('+'));
+						jspFileSubContextMap.put(jspFileName, jspSubContext);
+						tokenJSPFileOrder.add(jspFileName);
+						jspFileSubContextOrder.add(jspSubContext+"^"+jspFileName);
+					}
+				}
+
+				if(clickedBreadcrumbLocation > 0){
+					int tokenCount = tokenJSPFileOrder.size();
+					while (tokenCount > clickedBreadcrumbLocation) {
+						String lastItem = tokenJSPFileOrder.getLast();
+						if(log.isDebugEnabled()){
+							log.debug("Removing breacrumbItem : "+ lastItem);
+						}
+						tokenJSPFileOrder.removeLast();
+						jspFileSubContextOrder.removeLast();
+						tokenCount = tokenJSPFileOrder.size();
+					}
+				}
+
+				boolean lastBreadcrumbItemAvailable = false;
+				if(clickedBreadcrumbLocation == 0){
+					String tmp = getSubContextFromUri(currentBreadcrumbItem.getLink())+"+"+currentBreadcrumbItem.getId();
+					if(! previousToken.equals(tmp)){ //To prevent page refresh
+						lastBreadcrumbItemAvailable = true;
+					}
+				}
+
+
+				if(tokenJSPFileOrder != null){
+					//found breadcrumb items for given sub context
+					for(int i = 0;i < jspFileSubContextOrder.size(); i++){
+						String token = tokenJSPFileOrder.get(i);
+						//String jspFileName = token.substring(token.indexOf('+')+1);
+						//String jspSubContext = jspFileSubContextMap.get(jspFileName);
+
+						String fileContextToken = jspFileSubContextOrder.get(i);
+						String jspFileName = fileContextToken.substring(fileContextToken.indexOf('^')+1);
+						String jspSubContext = fileContextToken.substring(0,fileContextToken.indexOf('^'));
+
+						if(jspSubContext != null){
+							breadcrumbItems = links.get("../"+jspSubContext);
+						}
+						if(breadcrumbItems != null){
+							int bcSize = breadcrumbItems.size();
+							for (int a = 0; a < bcSize ; a++) {
+								BreadCrumbItem tmp = breadcrumbItems.get(a);
+								if(tmp.getId().equals(jspFileName)){
+									if(tmp.getLink().startsWith("#")){
+										content.append("<td class=\"breadcrumb-link\">&nbsp;>&nbsp;"+tmp.getConvertedText()+"</td>");
+									}else{
+										//if((a+1) == bcSize){
+										//if((a+1) == bcSize && clickedBreadcrumbLocation > 0){
+										if((((a+1) == bcSize) && !(lastBreadcrumbItemAvailable))
+												|| removeLastItem){
+											content.append("<td class=\"breadcrumb-link\">&nbsp;>&nbsp;"+tmp.getConvertedText()+"</td>");
+										}else{
+											content.append("<td class=\"breadcrumb-link\">&nbsp;>&nbsp;<a href=\""+appendOrdinal(tmp.getLink(),i+1)+"\">"+tmp.getConvertedText()+"</a></td>");
+										}
+									}
+									cookieContent.append(getSubContextFromUri(tmp.getLink())+"+"+token+"*");
+								}
+							}
+						}
+					}
+				}
+
+				//add last breadcrumb item
+				if(lastBreadcrumbItemAvailable && !(removeLastItem)){
+					String tmp = getSubContextFromUri(currentBreadcrumbItem.getLink())+"+"+currentBreadcrumbItem.getId();
+					cookieContent.append(tmp);
+					cookieContent.append("*");
+					content.append("<td class=\"breadcrumb-link\">&nbsp;>&nbsp;"+currentBreadcrumbItem.getConvertedText()+"</td>");
+				}
+				content.append("</tr></table>");
+			}
+		}
+		breadcrumbContents.put("html-content", content.toString());
+
+		String finalCookieContent = cookieContent.toString();
+		if(removeLastItem && breadcrumbCookieString != null && 
+		    breadcrumbCookieString.trim().length() > 0){
+				finalCookieContent = breadcrumbCookieString;
+		}
+		breadcrumbContents.put("cookie-content", finalCookieContent);
+		return breadcrumbContents;
+	}
+
+	/**
+	 *
+	 * @param uri
+	 * @return
+	 */
+	private static String getSubContextFromUri(String uri){
+		//eg: uri = ../service-mgt/service_info.jsp?serviceName=HelloService&ordinal=1
+		if(uri != null){
+			int jspExtensionLocation = uri.indexOf(".jsp");
+			String tmp = uri.substring(0, jspExtensionLocation);
+			tmp = tmp.replace("../", "");
+			int firstSlashLocation = tmp.indexOf('/');
+			return tmp.substring(0, firstSlashLocation);
+		}else{
+			return "";
+		}
+	}
+
+	/**
+	 *
+	 * @param url
+	 * @param ordinal
+	 * @return
+	 */
+	private static String appendOrdinal(String url, int ordinal) {
+		if(url != null){
+			if (url.indexOf('?') > -1) {
+				return url + "&ordinal=" + ordinal;
+			} else {
+				return url + "?ordinal=" + ordinal;
+			}
+		}else{
+			return "#";
+		}
+	}
+
+	/**
+	 * Generates breadcrumb for menu navigation path
+	 * @param content
+	 * @param breadcrumbs
+	 * @param breadCrumb
+	 */
+	private void generateBreadcrumbForMenuPath(StringBuffer content,
+			HashMap<String, BreadCrumbItem> breadcrumbs, String breadCrumb,boolean clickFromMenu) {
+		StringTokenizer st = new StringTokenizer(breadCrumb, ",");
+		int tokenCount = st.countTokens();
+		int count = 0;
+		while (st.hasMoreTokens()) {
+			count++;
+			String token = st.nextToken();
+			BreadCrumbItem breadcrumbItem = (BreadCrumbItem) breadcrumbs.get(token);
+			if (breadcrumbItem != null) {
+				//if (count == tokenCount) {
+				//	content.append("<td class=\"breadcrumb-current-page\"><a href=\""+breadcrumbItem.getLink()+"\">"+breadcrumbItem.getConvertedText()+"</a></td>");
+				//} else {
+					if (breadcrumbItem.getLink().startsWith("#")) {
+						content.append("<td class=\"breadcrumb-link\">"+"&nbsp;>&nbsp;"+breadcrumbItem.getConvertedText()+"</td>");
+					} else {
+						if(count == tokenCount && (clickFromMenu)){//if last breadcrumb item, do not put the link
+							content.append("<td class=\"breadcrumb-link\">&nbsp;>&nbsp;"+breadcrumbItem.getConvertedText()+"</td>");
+						}else{
+							content.append("<td class=\"breadcrumb-link\">&nbsp;>&nbsp;<a href=\""+breadcrumbItem.getLink()+"\">"+breadcrumbItem.getConvertedText()+"</a></td>");
+						}
+					}
+				//}
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleBasedUIResourceProvider.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleBasedUIResourceProvider.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleBasedUIResourceProvider.java
new file mode 100644
index 0000000..0e37da5
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleBasedUIResourceProvider.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2009-2010 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.Bundle;
+import org.wso2.carbon.ui.util.UIResourceProvider;
+
+import java.net.URL;
+import java.util.*;
+
+public class BundleBasedUIResourceProvider implements UIResourceProvider {
+
+    protected static final Log log = LogFactory.getLog(BundleBasedUIResourceProvider.class); 
+    private Map<String, Bundle> bundleResourceMap; // resourcePath -> Bundle
+    private Map<Bundle, List<String>> inverseBundleResourceMap; //  Bundle ->  resoucePath1, reosourcePath2, ...
+    private String bundleResourcePath;
+
+    public BundleBasedUIResourceProvider(String bundleResourcePath) {
+        this.bundleResourcePath = bundleResourcePath;
+        this.bundleResourceMap = new HashMap<String, Bundle>();
+        this.inverseBundleResourceMap = new HashMap<Bundle, List<String>>();
+
+    }
+
+    public URL getUIResource(String name) {
+        String resourceName = bundleResourcePath + name;
+        int lastSlash = resourceName.lastIndexOf('/');
+        if (lastSlash == -1) {
+            return null;
+        }
+
+        String path = resourceName.substring(0, lastSlash);
+        if (path.length() == 0) {
+            path = "/";
+        }
+        String file = resourceName.substring(lastSlash + 1);
+
+        //Searching the resourceBundle for the given bundle resource paths.
+        String resourcePath = CarbonUIUtil.getBundleResourcePath(name);
+        Bundle resourceBundle = bundleResourceMap.get(resourcePath);
+        if (resourceBundle != null) {
+            Enumeration entryPaths = resourceBundle.findEntries(path, file, false);
+            /* Enumeration entryPaths = null;
+ 	try { 
+ 	     entryPaths = resourceBundle.getResources(path + File.separator + file); 
+ 	} catch (IOException ignored) { 
+ 	     log.error(ignored.getMessage(), ignored); 
+ 	}*/
+            if (entryPaths != null && entryPaths.hasMoreElements()) {
+                return (URL) entryPaths.nextElement();
+            }
+        }
+        return null;
+    }
+
+    public Set<String> getUIResourcePaths(String name) {
+        Set<String> result = new HashSet<String>();
+        //Searching the resourceBundle for the given bundle resource paths.
+        String resourcePath = CarbonUIUtil.getBundleResourcePath(name);
+        Bundle resourceBundle = bundleResourceMap.get(resourcePath);
+
+        if (resourceBundle != null) {
+            Enumeration e = resourceBundle.findEntries(bundleResourcePath + name, null, false);
+            if (e != null) {
+                while (e.hasMoreElements()) {
+                    URL entryURL = (URL) e.nextElement();
+                    result.add(entryURL.getFile().substring(bundleResourcePath.length()));
+                }
+            }
+        }
+        return result;
+    }
+
+    public void addBundleResourcePaths(Bundle bundle) {
+        List<String> resourcePathList = new LinkedList<String>();
+        Enumeration entries = bundle.findEntries("web", "*", false);
+        while (entries != null && entries.hasMoreElements()) {
+            URL url = (URL) entries.nextElement();
+            String path = url.getPath();
+            if (path.endsWith("/")) {
+                String bundleResourcePath = path.substring("/web/".length(), path.length() - 1);
+                bundleResourceMap.put(bundleResourcePath, bundle);
+                resourcePathList.add(bundleResourcePath);
+            }
+        }
+
+        inverseBundleResourceMap.put(bundle,resourcePathList);
+    }
+
+
+    /*
+    removing the resource paths mapped to a bundle. For this we make use of the bunde - > resourcePath
+    multiple entry hashmap
+     */
+    public void removeBundleResourcePaths(Bundle bundle){
+        List<String> resourcePathList = inverseBundleResourceMap.get(bundle);
+        for(String str : resourcePathList){
+            if(bundleResourceMap.containsKey(str)){
+                System.out.println("Removing the resource Path : "+ str);
+                bundleResourceMap.remove(str);
+            }
+        }
+
+    }
+
+    public Bundle getBundle(String resourcePath) {
+        return bundleResourceMap.get(resourcePath);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleProxyClassLoader.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleProxyClassLoader.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleProxyClassLoader.java
new file mode 100644
index 0000000..3f161fc
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleProxyClassLoader.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.osgi.framework.Bundle;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Enumeration;
+
+/**
+ * A BundleProxyClassLoader wraps a bundle and uses the various Bundle methods to produce a ClassLoader.
+ */
+public class BundleProxyClassLoader extends ClassLoader {
+	private Bundle bundle;
+	private ClassLoader parent;
+
+	public BundleProxyClassLoader(Bundle bundle) {
+		this.bundle = bundle;
+	}
+
+	public BundleProxyClassLoader(Bundle bundle, ClassLoader parent) {
+		super(parent);
+		this.parent = parent;
+		this.bundle = bundle;
+	}
+
+	public Enumeration findResources(String name) throws IOException {
+		return bundle.getResources(name);
+	}
+
+	public URL findResource(String name) {
+		return bundle.getResource(name);
+	}
+
+	public Class findClass(String name) throws ClassNotFoundException {
+		return bundle.loadClass(name);
+	}
+
+	public URL getResource(String name) {
+		return (parent == null) ? findResource(name) : super.getResource(name);
+	}
+
+	protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException {
+		Class clazz = (parent == null) ? findClass(name) : super.loadClass(name, false);
+		if (resolve) {
+			super.resolveClass(clazz);
+		}
+		
+		return clazz;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleResourcePathRegistry.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleResourcePathRegistry.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleResourcePathRegistry.java
new file mode 100644
index 0000000..bb1524f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleResourcePathRegistry.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.osgi.framework.Bundle;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class BundleResourcePathRegistry {
+
+    private Map<String, Bundle> bundleResourceMap;
+    //This map needs to be synchronized
+    public BundleResourcePathRegistry(){
+        bundleResourceMap = new HashMap<String, Bundle>();
+    }
+
+    public Bundle getBundle(String bundleResourcePath){
+        return bundleResourceMap.get(bundleResourcePath);
+    }
+
+    public void addBundleResourcePath(String bundleResourcePath, Bundle bundle){
+        bundleResourceMap.put(bundleResourcePath, bundle);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonConnection.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonConnection.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonConnection.java
new file mode 100644
index 0000000..ecd4c42
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonConnection.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.TransportInDescription;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleContext;
+import org.wso2.carbon.ui.internal.CarbonUIServiceComponent;
+import org.wso2.carbon.utils.CarbonUtils;
+import org.wso2.carbon.utils.ServerConstants;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+
+/**
+ *
+ */
+public class CarbonConnection extends URLConnection {
+
+    private static final Log log = LogFactory.getLog(CarbonConnection.class);
+
+    private byte[] buf = null;
+
+    /**
+     * Constructs a URL connection to the specified URL. A connection to
+     * the object referenced by the URL is not created.
+     *
+     * @param url     the specified URL.
+     * @param context BundleContext
+     */
+    protected CarbonConnection(URL url, BundleContext context) throws Exception {
+        super(url);
+        ConfigurationContext configContext;
+        configContext = CarbonUIServiceComponent
+                .getConfigurationContextService().getServerConfigContext();
+
+        TransportInDescription httpsInDescription = configContext.getAxisConfiguration().
+                getTransportIn(ServerConstants.HTTPS_TRANSPORT);
+        Parameter proxyParameter = httpsInDescription.getParameter("proxyPort");
+        String httpsProxyPort = null;
+        if (proxyParameter != null && !"-1".equals(proxyParameter.getValue())) {
+            httpsProxyPort = (String) proxyParameter.getValue();
+        }
+
+        TransportInDescription httpInDescription = configContext.getAxisConfiguration().
+                getTransportIn(ServerConstants.HTTP_TRANSPORT);
+        if (httpInDescription != null) {
+            proxyParameter = httpInDescription.getParameter("proxyPort");
+        }
+        String httpProxyPort = null;
+        if (proxyParameter != null && !"-1".equals(proxyParameter.getValue())) {
+            httpProxyPort = (String) proxyParameter.getValue();
+        }
+        try {
+            String servicePath = configContext.getServicePath();
+            String contextRoot = configContext.getContextRoot();
+            contextRoot = contextRoot.equals("/") ? "" : contextRoot;
+            String httpsPort;
+            if (httpsProxyPort != null) {
+                httpsPort = httpsProxyPort;
+            } else {
+                httpsPort =
+                        CarbonUtils.
+                                getTransportPort(CarbonUIServiceComponent.getConfigurationContextService(),
+                                                 "https") + "";
+            }
+            String httpPort;
+            if (httpProxyPort != null) {
+                httpPort = httpProxyPort;
+            } else {
+                if (httpInDescription != null) {
+                    httpPort =
+                            CarbonUtils.
+                                    getTransportPort(CarbonUIServiceComponent.getConfigurationContextService(),
+                                                     "http") + "";
+                } else {
+                    httpPort = "-1";
+                }
+            }
+            buf = ("var SERVICE_PATH=\"" + servicePath + "\";\n" +
+                   "var ROOT_CONTEXT=\"" + contextRoot + "\";\n" +
+                   "var HTTP_PORT=" + httpPort + ";\n" +
+                   "var HTTPS_PORT=" + httpsPort + ";\n").getBytes();
+        } catch (Exception e) {
+            String msg = "Error occurred while getting connection properties";
+            log.error(msg, e);
+        }
+    }
+
+    public void connect() throws IOException {
+        //Ignore; no need to have this
+    }
+
+    public InputStream getInputStream() throws IOException {
+//        String s = getURL().getPath();
+        return new ByteArrayInputStream(buf);
+    }
+
+    public String getContentType() {
+        return "text/javascript";
+    }
+
+    public int getContentLength() {
+        return buf.length;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonProtocol.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonProtocol.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonProtocol.java
new file mode 100644
index 0000000..1f6cec6
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonProtocol.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.url.AbstractURLStreamHandlerService;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+
+/**
+ *
+ */
+public class CarbonProtocol extends AbstractURLStreamHandlerService {
+
+    private BundleContext context;
+
+    private static final Log log = LogFactory.getLog(CarbonConnection.class);
+
+    public CarbonProtocol(BundleContext context) {
+        this.context = context;
+    }
+
+    public URLConnection openConnection(URL url) throws IOException {
+        try {
+            return new CarbonConnection(url, context);
+        } catch (Exception e) {
+            String msg = "Can't create CarbonConnection. Required Services are not available.";
+            log.error(msg, e);
+        }
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSSOSessionManager.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSSOSessionManager.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSSOSessionManager.java
new file mode 100644
index 0000000..3ab2212
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSSOSessionManager.java
@@ -0,0 +1,213 @@
+/*
+ *  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * This class is used to maintain a mapping between the session indexes of the SSO Identity Provider
+ * end and the relying party end. When a user is authenticated and logged-in using SSO, an entry is
+ * added to the validSessionMap where Idp-session-index --> RP-Session-id.
+ * 
+ * When he logs out from either of SSO relying party, a SAML2 LogoutRequest is sent to all the
+ * relying party service providers who have established sessions with the Identity Provider at that
+ * moment. When a relying party receives a logout request, it should validate the request and
+ * extract the IdP session index from the request. Then it should identify the sessionId of the
+ * corresponding user which represents the session established at the relying party end. Then it
+ * removes that session from the validSessionMap and includes it to the invalidSessionsMap. So when
+ * a user tries to do some activity thereafter he should be logged-out from the system.
+ * 
+ * This class maintains two maps to maintain valid sessions and invalid sessions. This class is
+ * implemented as a singleton because there should be only one SSOSessionManager per instance.
+ */
+public class CarbonSSOSessionManager {
+
+    private static Log log = LogFactory.getLog(CarbonSSOSessionManager.class);
+
+    /**
+     * CarbonSSOSessionManager instance which is used as the singleton instance
+     */
+    private static CarbonSSOSessionManager instance = new CarbonSSOSessionManager();
+
+    /**
+     * This hash map is used to maintain a map of valid sessions. IdpSessionIndex is used as the key
+     * while the RPSessionId is used as the value.
+     */
+    private ConcurrentHashMap<String, String> validSessionMap = new ConcurrentHashMap<String, String>();
+
+    /**
+     * This hash map is used to maintain the invalid sessions. RPSessionIndex is used as the key
+     * while IdpSessionIndex is used as the value.
+     */
+    private ConcurrentHashMap<String, String> invalidSessionsMap = new ConcurrentHashMap<String, String>();
+
+    /**
+     * Private Constructor since we are implementing a Singleton here
+     */
+    private CarbonSSOSessionManager() {
+
+    }
+
+    /**
+     * Get the CarbonSSOSessionManager instance.
+     * 
+     * @return CarbonSSOSessionManager instance
+     */
+    public static CarbonSSOSessionManager getInstance() {
+        return instance;
+    }
+
+    /**
+     * Add a new session mapping : IdpSessionIndex --> localSessionId
+     * 
+     * @param idPSessionIndex session index sent along in the SAML Response
+     * @param localSessionId id of the current session established locally.
+     */
+    public void addSessionMapping(String idPSessionIndex, String localSessionId) {
+        validSessionMap.put(idPSessionIndex, localSessionId);
+    }
+
+    /**
+     * make a session invalid after receiving the single logout request from the identity provider
+     * 
+     * @param idPSessionIndex session index established at the identity provider's end
+     */
+    public void makeSessionInvalid(String idPSessionIndex) {
+        if (validSessionMap.containsKey(idPSessionIndex)) {
+            // add the invalid session to the invalidSessionMap
+            invalidSessionsMap.put(validSessionMap.get(idPSessionIndex), idPSessionIndex);
+            // remove the invalid session from the valid session map
+            validSessionMap.remove(idPSessionIndex);
+        }
+    }
+
+    /**
+     * Check whether a particular session is valid.
+     * 
+     * @param localSessionId session id established locally
+     * @return true, if the session is valid, false otherwise
+     */
+    public boolean isSessionValid(String localSessionId) {
+        boolean isSessionValid = true;
+        if (invalidSessionsMap.containsKey(localSessionId)) {
+            isSessionValid = false;
+        }
+        return isSessionValid;
+    }
+
+    /**
+     * Remove invalid session from the invalid session map. This needs to be done before completing
+     * the sign out.
+     * 
+     * @param localSessionId SessionId established locally
+     */
+    public void removeInvalidSession(String localSessionId) {
+        if (invalidSessionsMap.containsKey(localSessionId)) {
+            invalidSessionsMap.remove(localSessionId);
+        }
+    }
+
+    /**
+     * This method checks whether the request is for a SSO authentication related page or servlet.
+     * If it is so, the session invalidation should be skipped.
+     * 
+     * @param request Request, HTTPServletRequest
+     * @return true, if session invalidation should be skipped.
+     */
+    public boolean skipSSOSessionInvalidation(HttpServletRequest request,
+            CarbonUIAuthenticator uiAuthenticator) {
+
+        String requestedURI = request.getRequestURI();
+
+        if (uiAuthenticator != null) {
+            List<String> skippingUrls = uiAuthenticator.getSessionValidationSkippingUrls();
+            return skip(requestedURI, skippingUrls);
+        } else {
+            return false;
+
+        }
+    }
+
+    /**
+     * Skips authentication for given URI's.
+     * 
+     * @param request The request to access a page.
+     * @return <code>true</code> if request doesnt need to authenticate, else <code>false</code>.
+     */
+    public boolean skipAuthentication(HttpServletRequest request) {
+
+        String requestedURI = request.getRequestURI();
+        CarbonUIAuthenticator uiAuthenticator = CarbonUILoginUtil.getAuthenticator(request);
+
+        if (uiAuthenticator != null) {
+            List<String> skippingUrls = uiAuthenticator.getAuthenticationSkippingUrls();
+            return skip(requestedURI, skippingUrls);
+        } else {
+            return false;
+
+        }
+    }
+
+    /**
+     * 
+     * @param request
+     * @return
+     */
+    public String getRequestedUrl(HttpServletRequest request, CarbonUIAuthenticator uiAuthenticator) {
+        String requestedURI = request.getRequestURI();
+        boolean skipSessionValidation = skipSSOSessionInvalidation(request, uiAuthenticator);
+        boolean isSessionValid = isSessionValid(request.getSession().getId());
+
+        if (!skipSessionValidation && !isSessionValid) {
+            requestedURI = "/carbon/admin/logout_action.jsp";
+            if(log.isDebugEnabled()) {
+            	log.debug("Request URI changed to " + requestedURI);
+            }
+        }
+
+        if (skipSessionValidation && !isSessionValid) {
+            removeInvalidSession(request.getSession().getId());
+        }
+
+        return requestedURI;
+    }
+
+    /**
+     * 
+     * @param requestedURI
+     * @param skippingUrls
+     * @return
+     */
+    private boolean skip(String requestedURI, List<String> skippingUrls) {
+
+        for (String skippingUrl : skippingUrls) {
+            if (requestedURI.contains(skippingUrl)) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSecuredHttpContext.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSecuredHttpContext.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSecuredHttpContext.java
new file mode 100644
index 0000000..1b9e366
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSecuredHttpContext.java
@@ -0,0 +1,497 @@
+/*
+ *  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.ServiceReference;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.core.common.AuthenticationException;
+import org.wso2.carbon.registry.core.Registry;
+import org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions;
+import org.wso2.carbon.ui.deployment.beans.Context;
+import org.wso2.carbon.ui.internal.CarbonUIServiceComponent;
+import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.regex.Matcher;
+
+public class CarbonSecuredHttpContext extends SecuredComponentEntryHttpContext {
+
+    public static final String LOGGED_USER = CarbonConstants.LOGGED_USER;
+    public static final String CARBON_AUTHNETICATOR = "CarbonAuthenticator";
+
+    private static final Log log = LogFactory.getLog(CarbonSecuredHttpContext.class);
+    private Bundle bundle = null;
+
+    private HashMap<String, String> httpUrlsToBeByPassed = new HashMap<String, String>();
+    private HashMap<String, String> urlsToBeByPassed = new HashMap<String, String>();
+    private String defaultHomePage;
+    private Context defaultContext;
+
+    /**
+     * 
+     * @param bundle
+     * @param s
+     * @param uiResourceRegistry
+     * @param registry
+     */
+    public CarbonSecuredHttpContext(Bundle bundle, String s, UIResourceRegistry uiResourceRegistry,
+            Registry registry) {
+        super(bundle, s, uiResourceRegistry);
+        this.registry = registry;
+        this.bundle = bundle;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response)
+            throws IOException {
+        String requestedURI = request.getRequestURI();
+        
+        // Get the matching CarbonUIAuthenticator. If no match found for the given request, this
+        // will return null.
+        CarbonUIAuthenticator authenticator = CarbonUILoginUtil.getAuthenticator(request);
+
+        // This check is required for Single Logout implementation. If the request is not for SSO
+        // based authentication page or SSO Servlet, then if the session is invalid redirect the
+        // requests to logout_action.jsp.
+        CarbonSSOSessionManager ssoSessionManager = CarbonSSOSessionManager.getInstance();
+        requestedURI = ssoSessionManager.getRequestedUrl(request,authenticator);
+
+        HttpSession session;
+        String sessionId;
+        boolean authenticated = false;
+
+        try {
+            // Get the user's current authenticated session - if any exists.
+            session = request.getSession();
+            sessionId = session.getId();
+            Boolean authenticatedObj = (Boolean) session.getAttribute("authenticated");
+            if (authenticatedObj != null) {
+                authenticated = authenticatedObj.booleanValue();
+                if(log.isDebugEnabled()){
+                	log.debug("Is authenticated " + authenticated);
+                }
+            }
+        } catch (Exception e) {
+            log.debug("No session exits");
+            return false;
+        }
+
+        String context = request.getContextPath();
+        if ("/".equals(context)) {
+            context = "";
+        }
+
+        // We eliminate the /tenant/{tenant-domain} from authentications
+        Matcher matcher = CarbonUILoginUtil.getTenantEnabledUriPattern().matcher(requestedURI);
+        if (matcher.matches()) {
+        	log.debug("Tenant webapp request " + requestedURI);
+            return CarbonUILoginUtil.escapeTenantWebAppRequests(authenticated, response,
+                    requestedURI, context);
+        }
+
+        // TODO: When filtered from a Servlet filter the request uri always contains 2 //, this is a
+        // temporary fix
+        if (requestedURI.indexOf("//") == 0) {
+            requestedURI = requestedURI.substring(1);
+        }
+
+
+        if (httpUrlsToBeByPassed.isEmpty()) {
+            // Populates http urls to be by passed.
+            populatehttpUrlsToBeByPassed();
+        }
+
+        if (requestedURI.equals(context) || requestedURI.equals(context + "/")) {
+            return handleRequestOnContext(request, response);
+        }
+
+        // Storing intermediate value of requestedURI.
+        // This is needed for OpenID authentication later.
+        String tempUrl = requestedURI;
+
+        // When war is deployed on top of an existing app server we cannot use root context
+        // for deployment. Hence a new context is added.Now url changes from eg:
+        // carbon/admin/index.jsp to wso2/carbon/admin/index.jsp In this case before doing anything,
+        // we need to remove web app context (eg: wso2) .
+        CarbonUILoginUtil.addNewContext(requestedURI);
+
+        // Disabling http access to admin console user guide documents should be allowed to access
+        // via http protocol
+        int val = -1;
+        if ((val = allowNonSecuredContent(requestedURI, request, response, authenticated,
+                authenticator)) != CarbonUILoginUtil.CONTINUE) {
+            if (val == CarbonUILoginUtil.RETURN_TRUE) {
+            	log.debug("Skipping security check for non secured content. " + requestedURI);
+                return true;
+            } else {
+            	log.debug("Security check failed for the resource " + requestedURI);
+                return false;
+            }
+        }
+        // We are allowing requests for  .jar/.class resources. Otherwise applets won't get loaded
+        // due to session checks. (applet loading happens over https://)
+        if(requestedURI.endsWith(".jar") || requestedURI.endsWith(".class")) {
+           log.debug("Skipping authentication for .jar files and .class file." + requestedURI);
+           return true;
+        }
+
+
+        String resourceURI = requestedURI.replaceFirst("/carbon/", "../");
+
+        if (log.isDebugEnabled()) {
+            log.debug("CarbonSecuredHttpContext -> handleSecurity() requestURI:" + requestedURI
+                    + " id:" + sessionId + " resourceURI:" + resourceURI);
+        }
+
+        if (urlsToBeByPassed.isEmpty()) {
+            // retrieve urls that should be by-passed from security check
+            populateUrlsToBeBypassed();
+        }
+
+        // if the current uri is marked to be by-passed, let it pass through
+        if (isCurrentUrlToBePassed(request, session, resourceURI)) {
+            return true;
+        }
+
+        String indexPageURL = CarbonUIUtil.getIndexPageURL(session.getServletContext(),
+                request.getSession());
+
+        // Reading the requestedURL from the cookie to obtain the request made while not
+        // authanticated; and setting it as the indexPageURL
+        indexPageURL = CarbonUILoginUtil.getIndexPageUrlFromCookie(requestedURI, indexPageURL,
+                request);
+
+        // If a custom index page is used send the login request with the indexpage specified
+        indexPageURL = CarbonUILoginUtil.getCustomIndexPage(request, indexPageURL);
+
+        // Reading home page set on product.xml
+        // If the params in the servletcontext is null get them from the UTIL
+        indexPageURL = updateIndexPageWithHomePage(indexPageURL);
+
+        if ((val = CarbonUILoginUtil.handleLoginPageRequest(requestedURI, request, response,
+                authenticated, context, indexPageURL)) != CarbonUILoginUtil.CONTINUE) {
+            if (val == CarbonUILoginUtil.RETURN_TRUE) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+
+        // If authenticator defines to skip URL, return true
+        if (ssoSessionManager.skipAuthentication(request)) {
+        	if(log.isDebugEnabled()){
+        		log.debug("Skipping security checks for authenticator defined URL " + requestedURI);
+        	}
+            return true;
+        }
+
+        // If someone signed in from a tenant, try to access a different tenant domain, he should be
+        // forced to sign out without any prompt Cloud requirement
+        requestedURI = CarbonUILoginUtil.getForcedSignOutRequestedURI(requestedURI, request);
+
+        String contextPath = (request.getContextPath().equals("") || request.getContextPath()
+                .equals("/")) ? "" : request.getContextPath();
+
+        String tenantDomain = (String) session.getAttribute(MultitenantConstants.TENANT_DOMAIN);
+        if (tenantDomain != null && !tenantDomain.equals(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME)) {
+            contextPath += "/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX + "/" + tenantDomain;
+        }
+
+        String httpLogin = request.getParameter("gsHttpRequest");
+
+        boolean skipLoginPage = false;
+
+        // Login page is not required for all the Authenticators.
+        if (authenticator != null
+                && authenticator.skipLoginPage()
+                && requestedURI.indexOf("login_action.jsp") < 0
+                && (requestedURI.endsWith("/carbon/") || (requestedURI.indexOf("/registry/atom") == -1 && requestedURI
+                        .endsWith("/carbon")))) {
+            // Add this to session for future use.
+            request.getSession().setAttribute("skipLoginPage", "true");
+        }
+
+        if (request.getSession().getAttribute("skipLoginPage") != null) {
+            if ("true".equals(((String) request.getSession().getAttribute("skipLoginPage")))) {
+                skipLoginPage = true;
+            }
+        }
+
+        if (requestedURI.indexOf("login_action.jsp") > -1 && authenticator != null) {
+            return CarbonUILoginUtil.handleLogin(authenticator, request, response, session,
+                    authenticated, contextPath, indexPageURL, httpLogin);
+        } else if (requestedURI.indexOf("logout_action.jsp") > 1) {
+            return CarbonUILoginUtil.handleLogout(authenticator, request, response, session,
+                    authenticated, contextPath, indexPageURL, httpLogin);
+        }
+
+        if (requestedURI.endsWith("/carbon/")) {
+            if (skipLoginPage) {
+                response.sendRedirect(contextPath + indexPageURL + "?skipLoginPage=true");
+            } else {
+                response.sendRedirect(contextPath + indexPageURL);
+            }
+            return false;
+        } else if (requestedURI.indexOf("/registry/atom") == -1 && requestedURI.endsWith("/carbon")) {
+            if (skipLoginPage) {
+                response.sendRedirect(contextPath + indexPageURL + "?skipLoginPage=true");
+            } else {
+                response.sendRedirect(contextPath + indexPageURL);
+            }
+            return false;
+        } else if (CarbonUILoginUtil.letRequestedUrlIn(requestedURI, tempUrl)) {
+            return true;
+        } else if (requestedURI.endsWith(".jsp") && authenticated) {
+            return true;
+        }
+
+        if (!authenticated) {
+            if (requestedURI.endsWith("ajaxprocessor.jsp")) {
+                // Prevent login page appearing
+                return true;
+            } else {
+                return CarbonUILoginUtil.saveOriginalUrl(authenticator, request, response, session,
+                        skipLoginPage, contextPath, indexPageURL, requestedURI);
+            }
+        }
+        if (request.getSession().isNew()) {
+            if (skipLoginPage) {
+                response.sendRedirect(contextPath + "/carbon/admin/login_action.jsp");
+            } else {
+                response.sendRedirect(contextPath + "/carbon/admin/login.jsp");
+
+            }
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * 
+     * @param indexPageURL
+     * @return
+     */
+    private String updateIndexPageWithHomePage(String indexPageURL) {
+        // If the params in the servletcontext is null get them from the UTIL
+        if (defaultHomePage == null) {
+            defaultHomePage = (String) CarbonUIUtil
+                    .getProductParam(CarbonConstants.PRODUCT_XML_WSO2CARBON
+                            + CarbonConstants.DEFAULT_HOME_PAGE);
+        }
+
+        if (defaultHomePage != null && defaultHomePage.trim().length() > 0
+                && indexPageURL.contains("/carbon/admin/index.jsp")) {
+            indexPageURL = defaultHomePage;
+            if (!indexPageURL.startsWith("/")) {
+                indexPageURL = "/" + indexPageURL;
+            }
+        }
+
+        return indexPageURL;
+    }
+
+    /**
+     * 
+     * @param request
+     * @param session
+     * @param resourceURI
+     * @return
+     */
+    private boolean isCurrentUrlToBePassed(HttpServletRequest request, HttpSession session,
+            String resourceURI) {
+
+        if (!urlsToBeByPassed.isEmpty() && urlsToBeByPassed.containsKey(resourceURI)) {
+            if (log.isDebugEnabled()) {
+                log.debug("By passing authentication check for URI : " + resourceURI);
+            }
+            // Before bypassing, set the backendURL properly so that it doesn't fail
+            String contextPath = request.getContextPath();
+            String backendServerURL = request.getParameter("backendURL");
+            if (backendServerURL == null) {
+                backendServerURL = CarbonUIUtil.getServerURL(session.getServletContext(),
+                        request.getSession());
+            }
+            if ("/".equals(contextPath)) {
+                contextPath = "";
+            }
+            backendServerURL = backendServerURL.replace("${carbon.context}", contextPath);
+            session.setAttribute(CarbonConstants.SERVER_URL, backendServerURL);
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * 
+     */
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    private void populateUrlsToBeBypassed() {
+        if (bundle != null && urlsToBeByPassed.isEmpty()) {
+            ServiceReference reference = bundle.getBundleContext().getServiceReference(
+                    CarbonUIDefinitions.class.getName());
+            CarbonUIDefinitions carbonUIDefinitions;
+            if (reference != null) {
+                carbonUIDefinitions = (CarbonUIDefinitions) bundle.getBundleContext().getService(
+                        reference);
+                if (carbonUIDefinitions != null) {
+                    urlsToBeByPassed = carbonUIDefinitions.getUnauthenticatedUrls();
+                }
+            }
+        }
+    }
+
+    /**
+     * 
+     * @param requestedURI
+     * @param request
+     * @param response
+     * @param authenticated
+     * @param authenticator
+     * @return
+     * @throws IOException
+     */
+    @SuppressWarnings("deprecation")
+    private int allowNonSecuredContent(String requestedURI, HttpServletRequest request,
+            HttpServletResponse response, boolean authenticated, CarbonUIAuthenticator authenticator)
+            throws IOException {
+        if (!request.isSecure() && !(requestedURI.endsWith(".html"))) {
+
+            // By passing items required for try-it & IDE plugins
+            if (requestedURI.endsWith(".css") || requestedURI.endsWith(".gif")
+                    || requestedURI.endsWith(".GIF") || requestedURI.endsWith(".jpg")
+                    || requestedURI.endsWith(".JPG") || requestedURI.endsWith(".png")
+                    || requestedURI.endsWith(".PNG") || requestedURI.endsWith(".xsl")
+                    || requestedURI.endsWith(".xslt") || requestedURI.endsWith(".js")
+                    || requestedURI.endsWith(".ico") || requestedURI.endsWith("/filedownload")
+                    || requestedURI.endsWith("/fileupload")
+                    || requestedURI.contains("/fileupload/")
+                    || requestedURI.contains("admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp")
+                    || requestedURI.contains("registry/atom")
+                    || requestedURI.contains("registry/tags") || requestedURI.contains("gadgets/")
+                    || requestedURI.contains("registry/resource")) {
+                return CarbonUILoginUtil.RETURN_TRUE;
+            }
+
+            String resourceURI = requestedURI.replaceFirst("/carbon/", "../");
+
+            // By passing the pages which are specified as bypass https
+            if (httpUrlsToBeByPassed.containsKey(resourceURI)) {
+                if (!authenticated) {
+                    try {
+                        Cookie[] cookies = request.getCookies();
+                        if (cookies != null) {
+                            for (Cookie cookie : cookies) {
+                                if (cookie.getName().equals(CarbonConstants.REMEMBER_ME_COOKE_NAME)
+                                        && authenticator != null) {
+                                    try {
+                                        authenticator.authenticateWithCookie(request);
+                                    } catch (AuthenticationException ignored) {
+                                        // We can ignore here and proceed with normal login.
+                                        if (log.isDebugEnabled()) {
+                                            log.debug(ignored);
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    } catch (Exception e) {
+                        log.error(e.getMessage(), e);
+                        throw new IOException(e.getMessage(), e);
+                    }
+                }
+                return CarbonUILoginUtil.RETURN_TRUE;
+            }
+            
+            String enableHTTPAdminConsole = CarbonUIServiceComponent.getServerConfiguration()
+                  .getFirstProperty(CarbonConstants.ENABLE_HTTP_ADMIN_CONSOLE);
+            
+            if (enableHTTPAdminConsole == null || "false".equalsIgnoreCase(enableHTTPAdminConsole.trim())) {
+                String adminConsoleURL = CarbonUIUtil.getAdminConsoleURL(request);
+                if (adminConsoleURL != null) {
+                    if (log.isTraceEnabled()) {
+                        log.trace("Request came to admin console via http.Forwarding to : "
+                                + adminConsoleURL);
+                    }
+                    response.sendRedirect(adminConsoleURL);
+                    return CarbonUILoginUtil.RETURN_FALSE;
+                }
+            }
+        }
+
+        return CarbonUILoginUtil.CONTINUE;
+    }
+
+    /**
+     * 
+     * @param request
+     * @param response
+     * @return
+     * @throws IOException
+     */
+    private boolean handleRequestOnContext(HttpServletRequest request, HttpServletResponse response)
+            throws IOException {
+    	log.debug("Handling request on context");
+        if (defaultContext != null && !"".equals(defaultContext.getContextName())
+                && !"null".equals(defaultContext.getContextName())) {
+            String adminConsoleURL = CarbonUIUtil.getAdminConsoleURL(request);
+            int index = adminConsoleURL.lastIndexOf("carbon");
+            String defaultContextUrl = adminConsoleURL.substring(0, index)
+                    + defaultContext.getContextName() + "/";
+            response.sendRedirect(defaultContextUrl);
+        } else {
+            response.sendRedirect("carbon");
+        }
+        return false;
+    }
+
+    /**
+     * 
+     */
+    @SuppressWarnings("unchecked")
+    private void populatehttpUrlsToBeByPassed() {
+        if (bundle != null && httpUrlsToBeByPassed.isEmpty() && defaultContext == null) {
+            @SuppressWarnings("rawtypes")
+            ServiceReference reference = bundle.getBundleContext().getServiceReference(
+                    CarbonUIDefinitions.class.getName());
+            CarbonUIDefinitions carbonUIDefinitions;
+            if (reference != null) {
+                carbonUIDefinitions = (CarbonUIDefinitions) bundle.getBundleContext().getService(
+                        reference);
+                if (carbonUIDefinitions != null) {
+                    httpUrlsToBeByPassed = carbonUIDefinitions.getHttpUrls();
+                    if (carbonUIDefinitions.getContexts().containsKey("default-context")) {
+                        defaultContext = carbonUIDefinitions.getContexts().get("default-context");
+                    }
+
+                }
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIAuthenticator.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIAuthenticator.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIAuthenticator.java
new file mode 100644
index 0000000..7a46e2e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIAuthenticator.java
@@ -0,0 +1,123 @@
+/*
+ *  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.wso2.carbon.core.common.AuthenticationException;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * This is the interface of the Authenticator to Carbon UI framework. Implement this interface in a
+ * bundle and drop-in to the framework and it will be automatically called. The authenticator has
+ * the freedom to decide how it does the authentication.
+ * 
+ * When an authentication request is received by the framework each authenticator will be checked to
+ * see who handles the request, i.e. isHandle() method of each authenticator will be called in the
+ * priority order given by the getPriority() method. Highest priority authenticator that returns
+ * true for the isHandle() method will be given the responsibility of authentication.
+ * 
+ * Priority is defined as higher the number higher the priority.
+ */
+public interface CarbonUIAuthenticator {
+
+    /**
+     * This method will check whether given request can be handled by the authenticator. If
+     * authenticator is capable of handling given request this method will return <code>true</code>.
+     * Else this will return <code>false</code>.
+     * 
+     * @param object The request to authenticate.
+     * @return <code>true</code> if this authenticator can handle the request, else
+     *         <code>false</code>.
+     */
+    boolean canHandle(HttpServletRequest request);
+
+    /**
+     * Authenticates the given request.
+     * 
+     * @param object The request to be authenticate.
+     * @return <code>true</code> if authentication is successful, else <code>false</code>.
+     * @throws AuthenticationException If an error occurred during authentication process.
+     */
+    void authenticate(HttpServletRequest request) throws AuthenticationException;
+
+    /**
+     * Handles authentication during a session expiration. Usually the request is a cookie.
+     * 
+     * @param object The request to be re-authenticated.
+     * @return <code>true</code> if re-authentication is successful, else <code>false</code>.
+     * @throws AuthenticationException If an error occurred during authentication process.
+     */
+    void authenticateWithCookie(HttpServletRequest request) throws AuthenticationException;
+
+    /**
+     * Invalidates the authentication session. TODO why we need this ? An authenticator should not
+     * maintain a session
+     * 
+     * @param object The request to invalidate TODO (?)
+     * @throws Exception If an error occurred during authentication process.
+     */
+    void unauthenticate(Object object) throws Exception;
+
+    /**
+     * Gets the authenticator priority.
+     * 
+     * @return The integer representing the priority. Higher the value, higher the priority.
+     */
+    int getPriority();
+
+    /**
+     * Returns the name of the authenticator.
+     * 
+     * @return The name of the authenticator.
+     */
+    String getAuthenticatorName();
+
+    /**
+     * By default all the authenticators found in the system are enabled. Can use this property to
+     * control default behavior.
+     * 
+     * @return <code>true</code> if this authenticator is disabled, else <code>false</code>.
+     */
+    boolean isDisabled();
+
+    /**
+     * Gets a list of urls to skip authentication. Also see
+     * CarbonSecuredHttpContext.skipSSOSessionInvalidation for more information.
+     * 
+     * @return A list of urls to skip authentication.
+     */
+    List<String> getAuthenticationSkippingUrls();
+
+    /**
+     * Gets a list of urls to skip session validation. Also see
+     * CarbonSecuredHttpContext.skipSSOSessionInvalidation for more information.
+     * 
+     * @return A list of urls to skip session validation.
+     */
+    List<String> getSessionValidationSkippingUrls();
+
+    /**
+     * If Authenticator does not need to have login page - set this to true.
+     * 
+     * @return
+     */
+    boolean skipLoginPage();
+
+}


[34/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.cookie.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.cookie.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.cookie.js
new file mode 100644
index 0000000..d52f1e5
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.cookie.js
@@ -0,0 +1,96 @@
+/**
+ * Cookie plugin
+ *
+ * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+
+/**
+ * Create a cookie with the given name and value and other optional parameters.
+ *
+ * @example jQuery.cookie('the_cookie', 'the_value');
+ * @desc Set the value of a cookie.
+ * @example jQuery.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
+ * @desc Create a cookie with all available options.
+ * @example jQuery.cookie('the_cookie', 'the_value');
+ * @desc Create a session cookie.
+ * @example jQuery.cookie('the_cookie', null);
+ * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
+ *       used when the cookie was set.
+ *
+ * @param String name The name of the cookie.
+ * @param String value The value of the cookie.
+ * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
+ * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
+ *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
+ *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
+ *                             when the the browser exits.
+ * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
+ * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
+ * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
+ *                        require a secure protocol (like HTTPS).
+ * @type undefined
+ *
+ * @name jQuery.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+
+/**
+ * Get the value of a cookie with the given name.
+ *
+ * @example jQuery.cookie('the_cookie');
+ * @desc Get the value of a cookie.
+ *
+ * @param String name The name of the cookie.
+ * @return The value of the cookie.
+ * @type String
+ *
+ * @name jQuery.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+jQuery.cookie = function(name, value, options) {
+    if (typeof value != 'undefined') { // name and value given, set cookie
+        options = options || {};
+        if (value === null) {
+            value = '';
+            options.expires = -1;
+        }
+        var expires = '';
+        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
+            var date;
+            if (typeof options.expires == 'number') {
+                date = new Date();
+                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+            } else {
+                date = options.expires;
+            }
+            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+        }
+        // CAUTION: Needed to parenthesize options.path and options.domain
+        // in the following expressions, otherwise they evaluate to undefined
+        // in the packed version for some reason...
+        var path = options.path ? '; path=' + (options.path) : '';
+        var domain = options.domain ? '; domain=' + (options.domain) : '';
+        var secure = options.secure ? '; secure' : '';
+        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
+    } else { // only name given, get cookie
+        var cookieValue = null;
+        if (document.cookie && document.cookie != '') {
+            var cookies = document.cookie.split(';');
+            for (var i = 0; i < cookies.length; i++) {
+                var cookie = jQuery.trim(cookies[i]);
+                // Does this cookie string begin with the name we want?
+                if (cookie.substring(0, name.length + 1) == (name + '=')) {
+                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+                    break;
+                }
+            }
+        }
+        return cookieValue;
+    }
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.flot.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.flot.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.flot.js
new file mode 100644
index 0000000..4467fc5
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.flot.js
@@ -0,0 +1,6 @@
+/* Javascript plotting library for jQuery, v. 0.7.
+ *
+ * Released under the MIT license by IOLA, December 2007.
+ *
+ */
+(function(b){b.color={};b.color.make=function(d,e,g,f){var c={};c.r=d||0;c.g=e||0;c.b=g||0;c.a=f!=null?f:1;c.add=function(h,j){for(var k=0;k<h.length;++k){c[h.charAt(k)]+=j}return c.normalize()};c.scale=function(h,j){for(var k=0;k<h.length;++k){c[h.charAt(k)]*=j}return c.normalize()};c.toString=function(){if(c.a>=1){return"rgb("+[c.r,c.g,c.b].join(",")+")"}else{return"rgba("+[c.r,c.g,c.b,c.a].join(",")+")"}};c.normalize=function(){function h(k,j,l){return j<k?k:(j>l?l:j)}c.r=h(0,parseInt(c.r),255);c.g=h(0,parseInt(c.g),255);c.b=h(0,parseInt(c.b),255);c.a=h(0,c.a,1);return c};c.clone=function(){return b.color.make(c.r,c.b,c.g,c.a)};return c.normalize()};b.color.extract=function(d,e){var c;do{c=d.css(e).toLowerCase();if(c!=""&&c!="transparent"){break}d=d.parent()}while(!b.nodeName(d.get(0),"body"));if(c=="rgba(0, 0, 0, 0)"){c="transparent"}return b.color.parse(c)};b.color.parse=function(c){var d,f=b.color.make;if(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec
 (c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10))}if(d=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10),parseFloat(d[4]))}if(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55)}if(d=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55,parseFloat(d[4]))}if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c)){return f(parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16))}if(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c)){return f(parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16))}var e=b.trim(c).toLowerCase();if(e=="transparent
 "){return f(255,255,255,0)}else{d=a[e]||[0,0,0];return f(d[0],d[1],d[2])}};var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);(function(c){function b(av,ai,J,af){var
  Q=[],O={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:true,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:0.85},xaxis:{show:null,position:"bottom",mode:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null,twelveHourClock:false},yaxis:{autoscaleMargin:0.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:false,fillColor:null,steps:false},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,align:"left",horizontal:false},shadowSize:3},grid:{show:true,aboveData:false,color:"#545454",backgroundColor:null,bo
 rderColor:null,tickColor:null,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:false,hoverable:false,autoHighlight:true,mouseActiveRadius:10},hooks:{}},az=null,ad=null,y=null,H=null,A=null,p=[],aw=[],q={left:0,right:0,top:0,bottom:0},G=0,I=0,h=0,w=0,ak={processOptions:[],processRawData:[],processDatapoints:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},aq=this;aq.setData=aj;aq.setupGrid=t;aq.draw=W;aq.getPlaceholder=function(){return av};aq.getCanvas=function(){return az};aq.getPlotOffset=function(){return q};aq.width=function(){return h};aq.height=function(){return w};aq.offset=function(){var aB=y.offset();aB.left+=q.left;aB.top+=q.top;return aB};aq.getData=function(){return Q};aq.getAxes=function(){var aC={},aB;c.each(p.concat(aw),function(aD,aE){if(aE){aC[aE.direction+(aE.n!=1?aE.n:"")+"axis"]=aE}});return aC};aq.getXAxes=function(){return p};aq.getYAxes=function(){return aw};aq.c
 2p=C;aq.p2c=ar;aq.getOptions=function(){return O};aq.highlight=x;aq.unhighlight=T;aq.triggerRedrawOverlay=f;aq.pointOffset=function(aB){return{left:parseInt(p[aA(aB,"x")-1].p2c(+aB.x)+q.left),top:parseInt(aw[aA(aB,"y")-1].p2c(+aB.y)+q.top)}};aq.shutdown=ag;aq.resize=function(){B();g(az);g(ad)};aq.hooks=ak;F(aq);Z(J);X();aj(ai);t();W();ah();function an(aD,aB){aB=[aq].concat(aB);for(var aC=0;aC<aD.length;++aC){aD[aC].apply(this,aB)}}function F(){for(var aB=0;aB<af.length;++aB){var aC=af[aB];aC.init(aq);if(aC.options){c.extend(true,O,aC.options)}}}function Z(aC){var aB;c.extend(true,O,aC);if(O.xaxis.color==null){O.xaxis.color=O.grid.color}if(O.yaxis.color==null){O.yaxis.color=O.grid.color}if(O.xaxis.tickColor==null){O.xaxis.tickColor=O.grid.tickColor}if(O.yaxis.tickColor==null){O.yaxis.tickColor=O.grid.tickColor}if(O.grid.borderColor==null){O.grid.borderColor=O.grid.color}if(O.grid.tickColor==null){O.grid.tickColor=c.color.parse(O.grid.color).scale("a",0.22).toString()}for(aB=0;aB<Math
 .max(1,O.xaxes.length);++aB){O.xaxes[aB]=c.extend(true,{},O.xaxis,O.xaxes[aB])}for(aB=0;aB<Math.max(1,O.yaxes.length);++aB){O.yaxes[aB]=c.extend(true,{},O.yaxis,O.yaxes[aB])}if(O.xaxis.noTicks&&O.xaxis.ticks==null){O.xaxis.ticks=O.xaxis.noTicks}if(O.yaxis.noTicks&&O.yaxis.ticks==null){O.yaxis.ticks=O.yaxis.noTicks}if(O.x2axis){O.xaxes[1]=c.extend(true,{},O.xaxis,O.x2axis);O.xaxes[1].position="top"}if(O.y2axis){O.yaxes[1]=c.extend(true,{},O.yaxis,O.y2axis);O.yaxes[1].position="right"}if(O.grid.coloredAreas){O.grid.markings=O.grid.coloredAreas}if(O.grid.coloredAreasColor){O.grid.markingsColor=O.grid.coloredAreasColor}if(O.lines){c.extend(true,O.series.lines,O.lines)}if(O.points){c.extend(true,O.series.points,O.points)}if(O.bars){c.extend(true,O.series.bars,O.bars)}if(O.shadowSize!=null){O.series.shadowSize=O.shadowSize}for(aB=0;aB<O.xaxes.length;++aB){V(p,aB+1).options=O.xaxes[aB]}for(aB=0;aB<O.yaxes.length;++aB){V(aw,aB+1).options=O.yaxes[aB]}for(var aD in ak){if(O.hooks[aD]&&O.hooks
 [aD].length){ak[aD]=ak[aD].concat(O.hooks[aD])}}an(ak.processOptions,[O])}function aj(aB){Q=Y(aB);ax();z()}function Y(aE){var aC=[];for(var aB=0;aB<aE.length;++aB){var aD=c.extend(true,{},O.series);if(aE[aB].data!=null){aD.data=aE[aB].data;delete aE[aB].data;c.extend(true,aD,aE[aB]);aE[aB].data=aD.data}else{aD.data=aE[aB]}aC.push(aD)}return aC}function aA(aC,aD){var aB=aC[aD+"axis"];if(typeof aB=="object"){aB=aB.n}if(typeof aB!="number"){aB=1}return aB}function m(){return c.grep(p.concat(aw),function(aB){return aB})}function C(aE){var aC={},aB,aD;for(aB=0;aB<p.length;++aB){aD=p[aB];if(aD&&aD.used){aC["x"+aD.n]=aD.c2p(aE.left)}}for(aB=0;aB<aw.length;++aB){aD=aw[aB];if(aD&&aD.used){aC["y"+aD.n]=aD.c2p(aE.top)}}if(aC.x1!==undefined){aC.x=aC.x1}if(aC.y1!==undefined){aC.y=aC.y1}return aC}function ar(aF){var aD={},aC,aE,aB;for(aC=0;aC<p.length;++aC){aE=p[aC];if(aE&&aE.used){aB="x"+aE.n;if(aF[aB]==null&&aE.n==1){aB="x"}if(aF[aB]!=null){aD.left=aE.p2c(aF[aB]);break}}}for(aC=0;aC<aw.length;+
 +aC){aE=aw[aC];if(aE&&aE.used){aB="y"+aE.n;if(aF[aB]==null&&aE.n==1){aB="y"}if(aF[aB]!=null){aD.top=aE.p2c(aF[aB]);break}}}return aD}function V(aC,aB){if(!aC[aB-1]){aC[aB-1]={n:aB,direction:aC==p?"x":"y",options:c.extend(true,{},aC==p?O.xaxis:O.yaxis)}}return aC[aB-1]}function ax(){var aG;var aM=Q.length,aB=[],aE=[];for(aG=0;aG<Q.length;++aG){var aJ=Q[aG].color;if(aJ!=null){--aM;if(typeof aJ=="number"){aE.push(aJ)}else{aB.push(c.color.parse(Q[aG].color))}}}for(aG=0;aG<aE.length;++aG){aM=Math.max(aM,aE[aG]+1)}var aC=[],aF=0;aG=0;while(aC.length<aM){var aI;if(O.colors.length==aG){aI=c.color.make(100,100,100)}else{aI=c.color.parse(O.colors[aG])}var aD=aF%2==1?-1:1;aI.scale("rgb",1+aD*Math.ceil(aF/2)*0.2);aC.push(aI);++aG;if(aG>=O.colors.length){aG=0;++aF}}var aH=0,aN;for(aG=0;aG<Q.length;++aG){aN=Q[aG];if(aN.color==null){aN.color=aC[aH].toString();++aH}else{if(typeof aN.color=="number"){aN.color=aC[aN.color].toString()}}if(aN.lines.show==null){var aL,aK=true;for(aL in aN){if(aN[aL]&&aN
 [aL].show){aK=false;break}}if(aK){aN.lines.show=true}}aN.xaxis=V(p,aA(aN,"x"));aN.yaxis=V(aw,aA(aN,"y"))}}function z(){var aO=Number.POSITIVE_INFINITY,aI=Number.NEGATIVE_INFINITY,aB=Number.MAX_VALUE,aU,aS,aR,aN,aD,aJ,aT,aP,aH,aG,aC,a0,aX,aL;function aF(a3,a2,a1){if(a2<a3.datamin&&a2!=-aB){a3.datamin=a2}if(a1>a3.datamax&&a1!=aB){a3.datamax=a1}}c.each(m(),function(a1,a2){a2.datamin=aO;a2.datamax=aI;a2.used=false});for(aU=0;aU<Q.length;++aU){aJ=Q[aU];aJ.datapoints={points:[]};an(ak.processRawData,[aJ,aJ.data,aJ.datapoints])}for(aU=0;aU<Q.length;++aU){aJ=Q[aU];var aZ=aJ.data,aW=aJ.datapoints.format;if(!aW){aW=[];aW.push({x:true,number:true,required:true});aW.push({y:true,number:true,required:true});if(aJ.bars.show||(aJ.lines.show&&aJ.lines.fill)){aW.push({y:true,number:true,required:false,defaultValue:0});if(aJ.bars.horizontal){delete aW[aW.length-1].y;aW[aW.length-1].x=true}}aJ.datapoints.format=aW}if(aJ.datapoints.pointsize!=null){continue}aJ.datapoints.pointsize=aW.length;aP=aJ.datap
 oints.pointsize;aT=aJ.datapoints.points;insertSteps=aJ.lines.show&&aJ.lines.steps;aJ.xaxis.used=aJ.yaxis.used=true;for(aS=aR=0;aS<aZ.length;++aS,aR+=aP){aL=aZ[aS];var aE=aL==null;if(!aE){for(aN=0;aN<aP;++aN){a0=aL[aN];aX=aW[aN];if(aX){if(aX.number&&a0!=null){a0=+a0;if(isNaN(a0)){a0=null}else{if(a0==Infinity){a0=aB}else{if(a0==-Infinity){a0=-aB}}}}if(a0==null){if(aX.required){aE=true}if(aX.defaultValue!=null){a0=aX.defaultValue}}}aT[aR+aN]=a0}}if(aE){for(aN=0;aN<aP;++aN){a0=aT[aR+aN];if(a0!=null){aX=aW[aN];if(aX.x){aF(aJ.xaxis,a0,a0)}if(aX.y){aF(aJ.yaxis,a0,a0)}}aT[aR+aN]=null}}else{if(insertSteps&&aR>0&&aT[aR-aP]!=null&&aT[aR-aP]!=aT[aR]&&aT[aR-aP+1]!=aT[aR+1]){for(aN=0;aN<aP;++aN){aT[aR+aP+aN]=aT[aR+aN]}aT[aR+1]=aT[aR-aP+1];aR+=aP}}}}for(aU=0;aU<Q.length;++aU){aJ=Q[aU];an(ak.processDatapoints,[aJ,aJ.datapoints])}for(aU=0;aU<Q.length;++aU){aJ=Q[aU];aT=aJ.datapoints.points,aP=aJ.datapoints.pointsize;var aK=aO,aQ=aO,aM=aI,aV=aI;for(aS=0;aS<aT.length;aS+=aP){if(aT[aS]==null){continue}f
 or(aN=0;aN<aP;++aN){a0=aT[aS+aN];aX=aW[aN];if(!aX||a0==aB||a0==-aB){continue}if(aX.x){if(a0<aK){aK=a0}if(a0>aM){aM=a0}}if(aX.y){if(a0<aQ){aQ=a0}if(a0>aV){aV=a0}}}}if(aJ.bars.show){var aY=aJ.bars.align=="left"?0:-aJ.bars.barWidth/2;if(aJ.bars.horizontal){aQ+=aY;aV+=aY+aJ.bars.barWidth}else{aK+=aY;aM+=aY+aJ.bars.barWidth}}aF(aJ.xaxis,aK,aM);aF(aJ.yaxis,aQ,aV)}c.each(m(),function(a1,a2){if(a2.datamin==aO){a2.datamin=null}if(a2.datamax==aI){a2.datamax=null}})}function j(aB,aC){var aD=document.createElement("canvas");aD.className=aC;aD.width=G;aD.height=I;if(!aB){c(aD).css({position:"absolute",left:0,top:0})}c(aD).appendTo(av);if(!aD.getContext){aD=window.G_vmlCanvasManager.initElement(aD)}aD.getContext("2d").save();return aD}function B(){G=av.width();I=av.height();if(G<=0||I<=0){throw"Invalid dimensions for plot, width = "+G+", height = "+I}}function g(aC){if(aC.width!=G){aC.width=G}if(aC.height!=I){aC.height=I}var aB=aC.getContext("2d");aB.restore();aB.save()}function X(){var aC,aB=av.
 children("canvas.base"),aD=av.children("canvas.overlay");if(aB.length==0||aD==0){av.html("");av.css({padding:0});if(av.css("position")=="static"){av.css("position","relative")}B();az=j(true,"base");ad=j(false,"overlay");aC=false}else{az=aB.get(0);ad=aD.get(0);aC=true}H=az.getContext("2d");A=ad.getContext("2d");y=c([ad,az]);if(aC){av.data("plot").shutdown();aq.resize();A.clearRect(0,0,G,I);y.unbind();av.children().not([az,ad]).remove()}av.data("plot",aq)}function ah(){if(O.grid.hoverable){y.mousemove(aa);y.mouseleave(l)}if(O.grid.clickable){y.click(R)}an(ak.bindEvents,[y])}function ag(){if(M){clearTimeout(M)}y.unbind("mousemove",aa);y.unbind("mouseleave",l);y.unbind("click",R);an(ak.shutdown,[y])}function r(aG){function aC(aH){return aH}var aF,aB,aD=aG.options.transform||aC,aE=aG.options.inverseTransform;if(aG.direction=="x"){aF=aG.scale=h/Math.abs(aD(aG.max)-aD(aG.min));aB=Math.min(aD(aG.max),aD(aG.min))}else{aF=aG.scale=w/Math.abs(aD(aG.max)-aD(aG.min));aF=-aF;aB=Math.max(aD(aG.max
 ),aD(aG.min))}if(aD==aC){aG.p2c=function(aH){return(aH-aB)*aF}}else{aG.p2c=function(aH){return(aD(aH)-aB)*aF}}if(!aE){aG.c2p=function(aH){return aB+aH/aF}}else{aG.c2p=function(aH){return aE(aB+aH/aF)}}}function L(aD){var aB=aD.options,aF,aJ=aD.ticks||[],aI=[],aE,aK=aB.labelWidth,aG=aB.labelHeight,aC;function aH(aM,aL){return c('<div style="position:absolute;top:-10000px;'+aL+'font-size:smaller"><div class="'+aD.direction+"Axis "+aD.direction+aD.n+'Axis">'+aM.join("")+"</div></div>").appendTo(av)}if(aD.direction=="x"){if(aK==null){aK=Math.floor(G/(aJ.length>0?aJ.length:1))}if(aG==null){aI=[];for(aF=0;aF<aJ.length;++aF){aE=aJ[aF].label;if(aE){aI.push('<div class="tickLabel" style="float:left;width:'+aK+'px">'+aE+"</div>")}}if(aI.length>0){aI.push('<div style="clear:left"></div>');aC=aH(aI,"width:10000px;");aG=aC.height();aC.remove()}}}else{if(aK==null||aG==null){for(aF=0;aF<aJ.length;++aF){aE=aJ[aF].label;if(aE){aI.push('<div class="tickLabel">'+aE+"</div>")}}if(aI.length>0){aC=aH(aI,
 "");if(aK==null){aK=aC.children().width()}if(aG==null){aG=aC.find("div.tickLabel").height()}aC.remove()}}}if(aK==null){aK=0}if(aG==null){aG=0}aD.labelWidth=aK;aD.labelHeight=aG}function au(aD){var aC=aD.labelWidth,aL=aD.labelHeight,aH=aD.options.position,aF=aD.options.tickLength,aG=O.grid.axisMargin,aJ=O.grid.labelMargin,aK=aD.direction=="x"?p:aw,aE;var aB=c.grep(aK,function(aN){return aN&&aN.options.position==aH&&aN.reserveSpace});if(c.inArray(aD,aB)==aB.length-1){aG=0}if(aF==null){aF="full"}var aI=c.grep(aK,function(aN){return aN&&aN.reserveSpace});var aM=c.inArray(aD,aI)==0;if(!aM&&aF=="full"){aF=5}if(!isNaN(+aF)){aJ+=+aF}if(aD.direction=="x"){aL+=aJ;if(aH=="bottom"){q.bottom+=aL+aG;aD.box={top:I-q.bottom,height:aL}}else{aD.box={top:q.top+aG,height:aL};q.top+=aL+aG}}else{aC+=aJ;if(aH=="left"){aD.box={left:q.left+aG,width:aC};q.left+=aC+aG}else{q.right+=aC+aG;aD.box={left:G-q.right,width:aC}}}aD.position=aH;aD.tickLength=aF;aD.box.padding=aJ;aD.innermost=aM}function U(aB){if(aB.di
 rection=="x"){aB.box.left=q.left;aB.box.width=h}else{aB.box.top=q.top;aB.box.height=w}}function t(){var aC,aE=m();c.each(aE,function(aF,aG){aG.show=aG.options.show;if(aG.show==null){aG.show=aG.used}aG.reserveSpace=aG.show||aG.options.reserveSpace;n(aG)});allocatedAxes=c.grep(aE,function(aF){return aF.reserveSpace});q.left=q.right=q.top=q.bottom=0;if(O.grid.show){c.each(allocatedAxes,function(aF,aG){S(aG);P(aG);ap(aG,aG.ticks);L(aG)});for(aC=allocatedAxes.length-1;aC>=0;--aC){au(allocatedAxes[aC])}var aD=O.grid.minBorderMargin;if(aD==null){aD=0;for(aC=0;aC<Q.length;++aC){aD=Math.max(aD,Q[aC].points.radius+Q[aC].points.lineWidth/2)}}for(var aB in q){q[aB]+=O.grid.borderWidth;q[aB]=Math.max(aD,q[aB])}}h=G-q.left-q.right;w=I-q.bottom-q.top;c.each(aE,function(aF,aG){r(aG)});if(O.grid.show){c.each(allocatedAxes,function(aF,aG){U(aG)});k()}o()}function n(aE){var aF=aE.options,aD=+(aF.min!=null?aF.min:aE.datamin),aB=+(aF.max!=null?aF.max:aE.datamax),aH=aB-aD;if(aH==0){var aC=aB==0?1:0.01;if
 (aF.min==null){aD-=aC}if(aF.max==null||aF.min!=null){aB+=aC}}else{var aG=aF.autoscaleMargin;if(aG!=null){if(aF.min==null){aD-=aH*aG;if(aD<0&&aE.datamin!=null&&aE.datamin>=0){aD=0}}if(aF.max==null){aB+=aH*aG;if(aB>0&&aE.datamax!=null&&aE.datamax<=0){aB=0}}}}aE.min=aD;aE.max=aB}function S(aG){var aM=aG.options;var aH;if(typeof aM.ticks=="number"&&aM.ticks>0){aH=aM.ticks}else{aH=0.3*Math.sqrt(aG.direction=="x"?G:I)}var aT=(aG.max-aG.min)/aH,aO,aB,aN,aR,aS,aQ,aI;if(aM.mode=="time"){var aJ={second:1000,minute:60*1000,hour:60*60*1000,day:24*60*60*1000,month:30*24*60*60*1000,year:365.2425*24*60*60*1000};var aK=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[0.25,"month"],[0.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];var aC=0;if(aM.minTickSize!=null){if(typeof aM.tickSize=="number"){aC=aM.tic
 kSize}else{aC=aM.minTickSize[0]*aJ[aM.minTickSize[1]]}}for(var aS=0;aS<aK.length-1;++aS){if(aT<(aK[aS][0]*aJ[aK[aS][1]]+aK[aS+1][0]*aJ[aK[aS+1][1]])/2&&aK[aS][0]*aJ[aK[aS][1]]>=aC){break}}aO=aK[aS][0];aN=aK[aS][1];if(aN=="year"){aQ=Math.pow(10,Math.floor(Math.log(aT/aJ.year)/Math.LN10));aI=(aT/aJ.year)/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ}aG.tickSize=aM.tickSize||[aO,aN];aB=function(aX){var a2=[],a0=aX.tickSize[0],a3=aX.tickSize[1],a1=new Date(aX.min);var aW=a0*aJ[a3];if(a3=="second"){a1.setUTCSeconds(a(a1.getUTCSeconds(),a0))}if(a3=="minute"){a1.setUTCMinutes(a(a1.getUTCMinutes(),a0))}if(a3=="hour"){a1.setUTCHours(a(a1.getUTCHours(),a0))}if(a3=="month"){a1.setUTCMonth(a(a1.getUTCMonth(),a0))}if(a3=="year"){a1.setUTCFullYear(a(a1.getUTCFullYear(),a0))}a1.setUTCMilliseconds(0);if(aW>=aJ.minute){a1.setUTCSeconds(0)}if(aW>=aJ.hour){a1.setUTCMinutes(0)}if(aW>=aJ.day){a1.setUTCHours(0)}if(aW>=aJ.day*4){a1.setUTCDate(1)}if(aW>=aJ.year){a1.setUTCMo
 nth(0)}var a5=0,a4=Number.NaN,aY;do{aY=a4;a4=a1.getTime();a2.push(a4);if(a3=="month"){if(a0<1){a1.setUTCDate(1);var aV=a1.getTime();a1.setUTCMonth(a1.getUTCMonth()+1);var aZ=a1.getTime();a1.setTime(a4+a5*aJ.hour+(aZ-aV)*a0);a5=a1.getUTCHours();a1.setUTCHours(0)}else{a1.setUTCMonth(a1.getUTCMonth()+a0)}}else{if(a3=="year"){a1.setUTCFullYear(a1.getUTCFullYear()+a0)}else{a1.setTime(a4+aW)}}}while(a4<aX.max&&a4!=aY);return a2};aR=function(aV,aY){var a0=new Date(aV);if(aM.timeformat!=null){return c.plot.formatDate(a0,aM.timeformat,aM.monthNames)}var aW=aY.tickSize[0]*aJ[aY.tickSize[1]];var aX=aY.max-aY.min;var aZ=(aM.twelveHourClock)?" %p":"";if(aW<aJ.minute){fmt="%h:%M:%S"+aZ}else{if(aW<aJ.day){if(aX<2*aJ.day){fmt="%h:%M"+aZ}else{fmt="%b %d %h:%M"+aZ}}else{if(aW<aJ.month){fmt="%b %d"}else{if(aW<aJ.year){if(aX<aJ.year){fmt="%b"}else{fmt="%b %y"}}else{fmt="%y"}}}}return c.plot.formatDate(a0,fmt,aM.monthNames)}}else{var aU=aM.tickDecimals;var aP=-Math.floor(Math.log(aT)/Math.LN10);if(aU!=n
 ull&&aP>aU){aP=aU}aQ=Math.pow(10,-aP);aI=aT/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2;if(aI>2.25&&(aU==null||aP+1<=aU)){aO=2.5;++aP}}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ;if(aM.minTickSize!=null&&aO<aM.minTickSize){aO=aM.minTickSize}aG.tickDecimals=Math.max(0,aU!=null?aU:aP);aG.tickSize=aM.tickSize||aO;aB=function(aX){var aZ=[];var a0=a(aX.min,aX.tickSize),aW=0,aV=Number.NaN,aY;do{aY=aV;aV=a0+aW*aX.tickSize;aZ.push(aV);++aW}while(aV<aX.max&&aV!=aY);return aZ};aR=function(aV,aW){return aV.toFixed(aW.tickDecimals)}}if(aM.alignTicksWithAxis!=null){var aF=(aG.direction=="x"?p:aw)[aM.alignTicksWithAxis-1];if(aF&&aF.used&&aF!=aG){var aL=aB(aG);if(aL.length>0){if(aM.min==null){aG.min=Math.min(aG.min,aL[0])}if(aM.max==null&&aL.length>1){aG.max=Math.max(aG.max,aL[aL.length-1])}}aB=function(aX){var aY=[],aV,aW;for(aW=0;aW<aF.ticks.length;++aW){aV=(aF.ticks[aW].v-aF.min)/(aF.max-aF.min);aV=aX.min+aV*(aX.max-aX.min);aY.push(aV)}return aY};if(aG.mode!="time"&&aM.tickDecimals==null){var aE=Math.ma
 x(0,-Math.floor(Math.log(aT)/Math.LN10)+1),aD=aB(aG);if(!(aD.length>1&&/\..*0$/.test((aD[1]-aD[0]).toFixed(aE)))){aG.tickDecimals=aE}}}}aG.tickGenerator=aB;if(c.isFunction(aM.tickFormatter)){aG.tickFormatter=function(aV,aW){return""+aM.tickFormatter(aV,aW)}}else{aG.tickFormatter=aR}}function P(aF){var aH=aF.options.ticks,aG=[];if(aH==null||(typeof aH=="number"&&aH>0)){aG=aF.tickGenerator(aF)}else{if(aH){if(c.isFunction(aH)){aG=aH({min:aF.min,max:aF.max})}else{aG=aH}}}var aE,aB;aF.ticks=[];for(aE=0;aE<aG.length;++aE){var aC=null;var aD=aG[aE];if(typeof aD=="object"){aB=+aD[0];if(aD.length>1){aC=aD[1]}}else{aB=+aD}if(aC==null){aC=aF.tickFormatter(aB,aF)}if(!isNaN(aB)){aF.ticks.push({v:aB,label:aC})}}}function ap(aB,aC){if(aB.options.autoscaleMargin&&aC.length>0){if(aB.options.min==null){aB.min=Math.min(aB.min,aC[0].v)}if(aB.options.max==null&&aC.length>1){aB.max=Math.max(aB.max,aC[aC.length-1].v)}}}function W(){H.clearRect(0,0,G,I);var aC=O.grid;if(aC.show&&aC.backgroundColor){N()}if(
 aC.show&&!aC.aboveData){ac()}for(var aB=0;aB<Q.length;++aB){an(ak.drawSeries,[H,Q[aB]]);d(Q[aB])}an(ak.draw,[H]);if(aC.show&&aC.aboveData){ac()}}function D(aB,aI){var aE,aH,aG,aD,aF=m();for(i=0;i<aF.length;++i){aE=aF[i];if(aE.direction==aI){aD=aI+aE.n+"axis";if(!aB[aD]&&aE.n==1){aD=aI+"axis"}if(aB[aD]){aH=aB[aD].from;aG=aB[aD].to;break}}}if(!aB[aD]){aE=aI=="x"?p[0]:aw[0];aH=aB[aI+"1"];aG=aB[aI+"2"]}if(aH!=null&&aG!=null&&aH>aG){var aC=aH;aH=aG;aG=aC}return{from:aH,to:aG,axis:aE}}function N(){H.save();H.translate(q.left,q.top);H.fillStyle=am(O.grid.backgroundColor,w,0,"rgba(255, 255, 255, 0)");H.fillRect(0,0,h,w);H.restore()}function ac(){var aF;H.save();H.translate(q.left,q.top);var aH=O.grid.markings;if(aH){if(c.isFunction(aH)){var aK=aq.getAxes();aK.xmin=aK.xaxis.min;aK.xmax=aK.xaxis.max;aK.ymin=aK.yaxis.min;aK.ymax=aK.yaxis.max;aH=aH(aK)}for(aF=0;aF<aH.length;++aF){var aD=aH[aF],aC=D(aD,"x"),aI=D(aD,"y");if(aC.from==null){aC.from=aC.axis.min}if(aC.to==null){aC.to=aC.axis.max}if(a
 I.from==null){aI.from=aI.axis.min}if(aI.to==null){aI.to=aI.axis.max}if(aC.to<aC.axis.min||aC.from>aC.axis.max||aI.to<aI.axis.min||aI.from>aI.axis.max){continue}aC.from=Math.max(aC.from,aC.axis.min);aC.to=Math.min(aC.to,aC.axis.max);aI.from=Math.max(aI.from,aI.axis.min);aI.to=Math.min(aI.to,aI.axis.max);if(aC.from==aC.to&&aI.from==aI.to){continue}aC.from=aC.axis.p2c(aC.from);aC.to=aC.axis.p2c(aC.to);aI.from=aI.axis.p2c(aI.from);aI.to=aI.axis.p2c(aI.to);if(aC.from==aC.to||aI.from==aI.to){H.beginPath();H.strokeStyle=aD.color||O.grid.markingsColor;H.lineWidth=aD.lineWidth||O.grid.markingsLineWidth;H.moveTo(aC.from,aI.from);H.lineTo(aC.to,aI.to);H.stroke()}else{H.fillStyle=aD.color||O.grid.markingsColor;H.fillRect(aC.from,aI.to,aC.to-aC.from,aI.from-aI.to)}}}var aK=m(),aM=O.grid.borderWidth;for(var aE=0;aE<aK.length;++aE){var aB=aK[aE],aG=aB.box,aQ=aB.tickLength,aN,aL,aP,aJ;if(!aB.show||aB.ticks.length==0){continue}H.strokeStyle=aB.options.tickColor||c.color.parse(aB.options.color).scale
 ("a",0.22).toString();H.lineWidth=1;if(aB.direction=="x"){aN=0;if(aQ=="full"){aL=(aB.position=="top"?0:w)}else{aL=aG.top-q.top+(aB.position=="top"?aG.height:0)}}else{aL=0;if(aQ=="full"){aN=(aB.position=="left"?0:h)}else{aN=aG.left-q.left+(aB.position=="left"?aG.width:0)}}if(!aB.innermost){H.beginPath();aP=aJ=0;if(aB.direction=="x"){aP=h}else{aJ=w}if(H.lineWidth==1){aN=Math.floor(aN)+0.5;aL=Math.floor(aL)+0.5}H.moveTo(aN,aL);H.lineTo(aN+aP,aL+aJ);H.stroke()}H.beginPath();for(aF=0;aF<aB.ticks.length;++aF){var aO=aB.ticks[aF].v;aP=aJ=0;if(aO<aB.min||aO>aB.max||(aQ=="full"&&aM>0&&(aO==aB.min||aO==aB.max))){continue}if(aB.direction=="x"){aN=aB.p2c(aO);aJ=aQ=="full"?-w:aQ;if(aB.position=="top"){aJ=-aJ}}else{aL=aB.p2c(aO);aP=aQ=="full"?-h:aQ;if(aB.position=="left"){aP=-aP}}if(H.lineWidth==1){if(aB.direction=="x"){aN=Math.floor(aN)+0.5}else{aL=Math.floor(aL)+0.5}}H.moveTo(aN,aL);H.lineTo(aN+aP,aL+aJ)}H.stroke()}if(aM){H.lineWidth=aM;H.strokeStyle=O.grid.borderColor;H.strokeRect(-aM/2,-aM/2,
 h+aM,w+aM)}H.restore()}function k(){av.find(".tickLabels").remove();var aG=['<div class="tickLabels" style="font-size:smaller">'];var aJ=m();for(var aD=0;aD<aJ.length;++aD){var aC=aJ[aD],aF=aC.box;if(!aC.show){continue}aG.push('<div class="'+aC.direction+"Axis "+aC.direction+aC.n+'Axis" style="color:'+aC.options.color+'">');for(var aE=0;aE<aC.ticks.length;++aE){var aH=aC.ticks[aE];if(!aH.label||aH.v<aC.min||aH.v>aC.max){continue}var aK={},aI;if(aC.direction=="x"){aI="center";aK.left=Math.round(q.left+aC.p2c(aH.v)-aC.labelWidth/2);if(aC.position=="bottom"){aK.top=aF.top+aF.padding}else{aK.bottom=I-(aF.top+aF.height-aF.padding)}}else{aK.top=Math.round(q.top+aC.p2c(aH.v)-aC.labelHeight/2);if(aC.position=="left"){aK.right=G-(aF.left+aF.width-aF.padding);aI="right"}else{aK.left=aF.left+aF.padding;aI="left"}}aK.width=aC.labelWidth;var aB=["position:absolute","text-align:"+aI];for(var aL in aK){aB.push(aL+":"+aK[aL]+"px")}aG.push('<div class="tickLabel" style="'+aB.join(";")+'">'+aH.label+
 "</div>")}aG.push("</div>")}aG.push("</div>");av.append(aG.join(""))}function d(aB){if(aB.lines.show){at(aB)}if(aB.bars.show){e(aB)}if(aB.points.show){ao(aB)}}function at(aE){function aD(aP,aQ,aI,aU,aT){var aV=aP.points,aJ=aP.pointsize,aN=null,aM=null;H.beginPath();for(var aO=aJ;aO<aV.length;aO+=aJ){var aL=aV[aO-aJ],aS=aV[aO-aJ+1],aK=aV[aO],aR=aV[aO+1];if(aL==null||aK==null){continue}if(aS<=aR&&aS<aT.min){if(aR<aT.min){continue}aL=(aT.min-aS)/(aR-aS)*(aK-aL)+aL;aS=aT.min}else{if(aR<=aS&&aR<aT.min){if(aS<aT.min){continue}aK=(aT.min-aS)/(aR-aS)*(aK-aL)+aL;aR=aT.min}}if(aS>=aR&&aS>aT.max){if(aR>aT.max){continue}aL=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aS=aT.max}else{if(aR>=aS&&aR>aT.max){if(aS>aT.max){continue}aK=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aR=aT.max}}if(aL<=aK&&aL<aU.min){if(aK<aU.min){continue}aS=(aU.min-aL)/(aK-aL)*(aR-aS)+aS;aL=aU.min}else{if(aK<=aL&&aK<aU.min){if(aL<aU.min){continue}aR=(aU.min-aL)/(aK-aL)*(aR-aS)+aS;aK=aU.min}}if(aL>=aK&&aL>aU.max){if(aK>aU.max){continue}aS=(aU.max-aL
 )/(aK-aL)*(aR-aS)+aS;aL=aU.max}else{if(aK>=aL&&aK>aU.max){if(aL>aU.max){continue}aR=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aK=aU.max}}if(aL!=aN||aS!=aM){H.moveTo(aU.p2c(aL)+aQ,aT.p2c(aS)+aI)}aN=aK;aM=aR;H.lineTo(aU.p2c(aK)+aQ,aT.p2c(aR)+aI)}H.stroke()}function aF(aI,aQ,aP){var aW=aI.points,aV=aI.pointsize,aN=Math.min(Math.max(0,aP.min),aP.max),aX=0,aU,aT=false,aM=1,aL=0,aR=0;while(true){if(aV>0&&aX>aW.length+aV){break}aX+=aV;var aZ=aW[aX-aV],aK=aW[aX-aV+aM],aY=aW[aX],aJ=aW[aX+aM];if(aT){if(aV>0&&aZ!=null&&aY==null){aR=aX;aV=-aV;aM=2;continue}if(aV<0&&aX==aL+aV){H.fill();aT=false;aV=-aV;aM=1;aX=aL=aR+aV;continue}}if(aZ==null||aY==null){continue}if(aZ<=aY&&aZ<aQ.min){if(aY<aQ.min){continue}aK=(aQ.min-aZ)/(aY-aZ)*(aJ-aK)+aK;aZ=aQ.min}else{if(aY<=aZ&&aY<aQ.min){if(aZ<aQ.min){continue}aJ=(aQ.min-aZ)/(aY-aZ)*(aJ-aK)+aK;aY=aQ.min}}if(aZ>=aY&&aZ>aQ.max){if(aY>aQ.max){continue}aK=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aZ=aQ.max}else{if(aY>=aZ&&aY>aQ.max){if(aZ>aQ.max){continue}aJ=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)
 +aK;aY=aQ.max}}if(!aT){H.beginPath();H.moveTo(aQ.p2c(aZ),aP.p2c(aN));aT=true}if(aK>=aP.max&&aJ>=aP.max){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.max));H.lineTo(aQ.p2c(aY),aP.p2c(aP.max));continue}else{if(aK<=aP.min&&aJ<=aP.min){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.min));H.lineTo(aQ.p2c(aY),aP.p2c(aP.min));continue}}var aO=aZ,aS=aY;if(aK<=aJ&&aK<aP.min&&aJ>=aP.min){aZ=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.min}else{if(aJ<=aK&&aJ<aP.min&&aK>=aP.min){aY=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.min}}if(aK>=aJ&&aK>aP.max&&aJ<=aP.max){aZ=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.max}else{if(aJ>=aK&&aJ>aP.max&&aK<=aP.max){aY=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.max}}if(aZ!=aO){H.lineTo(aQ.p2c(aO),aP.p2c(aK))}H.lineTo(aQ.p2c(aZ),aP.p2c(aK));H.lineTo(aQ.p2c(aY),aP.p2c(aJ));if(aY!=aS){H.lineTo(aQ.p2c(aY),aP.p2c(aJ));H.lineTo(aQ.p2c(aS),aP.p2c(aJ))}}}H.save();H.translate(q.left,q.top);H.lineJoin="round";var aG=aE.lines.lineWidth,aB=aE.shadowSize;if(aG>0&&aB>0){H.lineWidth=aB;H.strokeStyle="rgba(0,0,0,0.1)";var aH=Math.PI/
 18;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/2),Math.cos(aH)*(aG/2+aB/2),aE.xaxis,aE.yaxis);H.lineWidth=aB/2;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/4),Math.cos(aH)*(aG/2+aB/4),aE.xaxis,aE.yaxis)}H.lineWidth=aG;H.strokeStyle=aE.color;var aC=ae(aE.lines,aE.color,0,w);if(aC){H.fillStyle=aC;aF(aE.datapoints,aE.xaxis,aE.yaxis)}if(aG>0){aD(aE.datapoints,0,0,aE.xaxis,aE.yaxis)}H.restore()}function ao(aE){function aH(aN,aM,aU,aK,aS,aT,aQ,aJ){var aR=aN.points,aI=aN.pointsize;for(var aL=0;aL<aR.length;aL+=aI){var aP=aR[aL],aO=aR[aL+1];if(aP==null||aP<aT.min||aP>aT.max||aO<aQ.min||aO>aQ.max){continue}H.beginPath();aP=aT.p2c(aP);aO=aQ.p2c(aO)+aK;if(aJ=="circle"){H.arc(aP,aO,aM,0,aS?Math.PI:Math.PI*2,false)}else{aJ(H,aP,aO,aM,aS)}H.closePath();if(aU){H.fillStyle=aU;H.fill()}H.stroke()}}H.save();H.translate(q.left,q.top);var aG=aE.points.lineWidth,aC=aE.shadowSize,aB=aE.points.radius,aF=aE.points.symbol;if(aG>0&&aC>0){var aD=aC/2;H.lineWidth=aD;H.strokeStyle="rgba(0,0,0,0.1)";aH(aE.datapoints,aB,nul
 l,aD+aD/2,true,aE.xaxis,aE.yaxis,aF);H.strokeStyle="rgba(0,0,0,0.2)";aH(aE.datapoints,aB,null,aD/2,true,aE.xaxis,aE.yaxis,aF)}H.lineWidth=aG;H.strokeStyle=aE.color;aH(aE.datapoints,aB,ae(aE.points,aE.color),0,false,aE.xaxis,aE.yaxis,aF);H.restore()}function E(aN,aM,aV,aI,aQ,aF,aD,aL,aK,aU,aR,aC){var aE,aT,aJ,aP,aG,aB,aO,aH,aS;if(aR){aH=aB=aO=true;aG=false;aE=aV;aT=aN;aP=aM+aI;aJ=aM+aQ;if(aT<aE){aS=aT;aT=aE;aE=aS;aG=true;aB=false}}else{aG=aB=aO=true;aH=false;aE=aN+aI;aT=aN+aQ;aJ=aV;aP=aM;if(aP<aJ){aS=aP;aP=aJ;aJ=aS;aH=true;aO=false}}if(aT<aL.min||aE>aL.max||aP<aK.min||aJ>aK.max){return}if(aE<aL.min){aE=aL.min;aG=false}if(aT>aL.max){aT=aL.max;aB=false}if(aJ<aK.min){aJ=aK.min;aH=false}if(aP>aK.max){aP=aK.max;aO=false}aE=aL.p2c(aE);aJ=aK.p2c(aJ);aT=aL.p2c(aT);aP=aK.p2c(aP);if(aD){aU.beginPath();aU.moveTo(aE,aJ);aU.lineTo(aE,aP);aU.lineTo(aT,aP);aU.lineTo(aT,aJ);aU.fillStyle=aD(aJ,aP);aU.fill()}if(aC>0&&(aG||aB||aO||aH)){aU.beginPath();aU.moveTo(aE,aJ+aF);if(aG){aU.lineTo(aE,aP+aF)}else{
 aU.moveTo(aE,aP+aF)}if(aO){aU.lineTo(aT,aP+aF)}else{aU.moveTo(aT,aP+aF)}if(aB){aU.lineTo(aT,aJ+aF)}else{aU.moveTo(aT,aJ+aF)}if(aH){aU.lineTo(aE,aJ+aF)}else{aU.moveTo(aE,aJ+aF)}aU.stroke()}}function e(aD){function aC(aJ,aI,aL,aG,aK,aN,aM){var aO=aJ.points,aF=aJ.pointsize;for(var aH=0;aH<aO.length;aH+=aF){if(aO[aH]==null){continue}E(aO[aH],aO[aH+1],aO[aH+2],aI,aL,aG,aK,aN,aM,H,aD.bars.horizontal,aD.bars.lineWidth)}}H.save();H.translate(q.left,q.top);H.lineWidth=aD.bars.lineWidth;H.strokeStyle=aD.color;var aB=aD.bars.align=="left"?0:-aD.bars.barWidth/2;var aE=aD.bars.fill?function(aF,aG){return ae(aD.bars,aD.color,aF,aG)}:null;aC(aD.datapoints,aB,aB+aD.bars.barWidth,0,aE,aD.xaxis,aD.yaxis);H.restore()}function ae(aD,aB,aC,aF){var aE=aD.fill;if(!aE){return null}if(aD.fillColor){return am(aD.fillColor,aC,aF,aB)}var aG=c.color.parse(aB);aG.a=typeof aE=="number"?aE:0.4;aG.normalize();return aG.toString()}function o(){av.find(".legend").remove();if(!O.legend.show){return}var aH=[],aF=false,
 aN=O.legend.labelFormatter,aM,aJ;for(var aE=0;aE<Q.length;++aE){aM=Q[aE];aJ=aM.label;if(!aJ){continue}if(aE%O.legend.noColumns==0){if(aF){aH.push("</tr>")}aH.push("<tr>");aF=true}if(aN){aJ=aN(aJ,aM)}aH.push('<td class="legendColorBox"><div style="border:1px solid '+O.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+aM.color+';overflow:hidden"></div></div></td><td class="legendLabel">'+aJ+"</td>")}if(aF){aH.push("</tr>")}if(aH.length==0){return}var aL='<table style="font-size:smaller;color:'+O.grid.color+'">'+aH.join("")+"</table>";if(O.legend.container!=null){c(O.legend.container).html(aL)}else{var aI="",aC=O.legend.position,aD=O.legend.margin;if(aD[0]==null){aD=[aD,aD]}if(aC.charAt(0)=="n"){aI+="top:"+(aD[1]+q.top)+"px;"}else{if(aC.charAt(0)=="s"){aI+="bottom:"+(aD[1]+q.bottom)+"px;"}}if(aC.charAt(1)=="e"){aI+="right:"+(aD[0]+q.right)+"px;"}else{if(aC.charAt(1)=="w"){aI+="left:"+(aD[0]+q.left)+"px;"}}var aK=c('<div class="legend">'+aL.repl
 ace('style="','style="position:absolute;'+aI+";")+"</div>").appendTo(av);if(O.legend.backgroundOpacity!=0){var aG=O.legend.backgroundColor;if(aG==null){aG=O.grid.backgroundColor;if(aG&&typeof aG=="string"){aG=c.color.parse(aG)}else{aG=c.color.extract(aK,"background-color")}aG.a=1;aG=aG.toString()}var aB=aK.children();c('<div style="position:absolute;width:'+aB.width()+"px;height:"+aB.height()+"px;"+aI+"background-color:"+aG+';"> </div>').prependTo(aK).css("opacity",O.legend.backgroundOpacity)}}}var ab=[],M=null;function K(aI,aG,aD){var aO=O.grid.mouseActiveRadius,a0=aO*aO+1,aY=null,aR=false,aW,aU;for(aW=Q.length-1;aW>=0;--aW){if(!aD(Q[aW])){continue}var aP=Q[aW],aH=aP.xaxis,aF=aP.yaxis,aV=aP.datapoints.points,aT=aP.datapoints.pointsize,aQ=aH.c2p(aI),aN=aF.c2p(aG),aC=aO/aH.scale,aB=aO/aF.scale;if(aH.options.inverseTransform){aC=Number.MAX_VALUE}if(aF.options.inverseTransform){aB=Number.MAX_VALUE}if(aP.lines.show||aP.points.show){for(aU=0;aU<aV.length;aU+=aT){var aK=aV[aU],aJ=aV[aU+1]
 ;if(aK==null){continue}if(aK-aQ>aC||aK-aQ<-aC||aJ-aN>aB||aJ-aN<-aB){continue}var aM=Math.abs(aH.p2c(aK)-aI),aL=Math.abs(aF.p2c(aJ)-aG),aS=aM*aM+aL*aL;if(aS<a0){a0=aS;aY=[aW,aU/aT]}}}if(aP.bars.show&&!aY){var aE=aP.bars.align=="left"?0:-aP.bars.barWidth/2,aX=aE+aP.bars.barWidth;for(aU=0;aU<aV.length;aU+=aT){var aK=aV[aU],aJ=aV[aU+1],aZ=aV[aU+2];if(aK==null){continue}if(Q[aW].bars.horizontal?(aQ<=Math.max(aZ,aK)&&aQ>=Math.min(aZ,aK)&&aN>=aJ+aE&&aN<=aJ+aX):(aQ>=aK+aE&&aQ<=aK+aX&&aN>=Math.min(aZ,aJ)&&aN<=Math.max(aZ,aJ))){aY=[aW,aU/aT]}}}}if(aY){aW=aY[0];aU=aY[1];aT=Q[aW].datapoints.pointsize;return{datapoint:Q[aW].datapoints.points.slice(aU*aT,(aU+1)*aT),dataIndex:aU,series:Q[aW],seriesIndex:aW}}return null}function aa(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return aC.hoverable!=false})}}function l(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return false})}}function R(aB){u("plotclick",aB,function(aC){return aC.clickable!=false})}function u(aC,aB,aD){var aE=y.
 offset(),aH=aB.pageX-aE.left-q.left,aF=aB.pageY-aE.top-q.top,aJ=C({left:aH,top:aF});aJ.pageX=aB.pageX;aJ.pageY=aB.pageY;var aK=K(aH,aF,aD);if(aK){aK.pageX=parseInt(aK.series.xaxis.p2c(aK.datapoint[0])+aE.left+q.left);aK.pageY=parseInt(aK.series.yaxis.p2c(aK.datapoint[1])+aE.top+q.top)}if(O.grid.autoHighlight){for(var aG=0;aG<ab.length;++aG){var aI=ab[aG];if(aI.auto==aC&&!(aK&&aI.series==aK.series&&aI.point[0]==aK.datapoint[0]&&aI.point[1]==aK.datapoint[1])){T(aI.series,aI.point)}}if(aK){x(aK.series,aK.datapoint,aC)}}av.trigger(aC,[aJ,aK])}function f(){if(!M){M=setTimeout(s,30)}}function s(){M=null;A.save();A.clearRect(0,0,G,I);A.translate(q.left,q.top);var aC,aB;for(aC=0;aC<ab.length;++aC){aB=ab[aC];if(aB.series.bars.show){v(aB.series,aB.point)}else{ay(aB.series,aB.point)}}A.restore();an(ak.drawOverlay,[A])}function x(aD,aB,aF){if(typeof aD=="number"){aD=Q[aD]}if(typeof aB=="number"){var aE=aD.datapoints.pointsize;aB=aD.datapoints.points.slice(aE*aB,aE*(aB+1))}var aC=al(aD,aB);if(aC
 ==-1){ab.push({series:aD,point:aB,auto:aF});f()}else{if(!aF){ab[aC].auto=false}}}function T(aD,aB){if(aD==null&&aB==null){ab=[];f()}if(typeof aD=="number"){aD=Q[aD]}if(typeof aB=="number"){aB=aD.data[aB]}var aC=al(aD,aB);if(aC!=-1){ab.splice(aC,1);f()}}function al(aD,aE){for(var aB=0;aB<ab.length;++aB){var aC=ab[aB];if(aC.series==aD&&aC.point[0]==aE[0]&&aC.point[1]==aE[1]){return aB}}return -1}function ay(aE,aD){var aC=aD[0],aI=aD[1],aH=aE.xaxis,aG=aE.yaxis;if(aC<aH.min||aC>aH.max||aI<aG.min||aI>aG.max){return}var aF=aE.points.radius+aE.points.lineWidth/2;A.lineWidth=aF;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aB=1.5*aF,aC=aH.p2c(aC),aI=aG.p2c(aI);A.beginPath();if(aE.points.symbol=="circle"){A.arc(aC,aI,aB,0,2*Math.PI,false)}else{aE.points.symbol(A,aC,aI,aB,false)}A.closePath();A.stroke()}function v(aE,aB){A.lineWidth=aE.bars.lineWidth;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aD=c.color.parse(aE.color).scale("a",0.5).toString();v
 ar aC=aE.bars.align=="left"?0:-aE.bars.barWidth/2;E(aB[0],aB[1],aB[2]||0,aC,aC+aE.bars.barWidth,0,function(){return aD},aE.xaxis,aE.yaxis,A,aE.bars.horizontal,aE.bars.lineWidth)}function am(aJ,aB,aH,aC){if(typeof aJ=="string"){return aJ}else{var aI=H.createLinearGradient(0,aH,0,aB);for(var aE=0,aD=aJ.colors.length;aE<aD;++aE){var aF=aJ.colors[aE];if(typeof aF!="string"){var aG=c.color.parse(aC);if(aF.brightness!=null){aG=aG.scale("rgb",aF.brightness)}if(aF.opacity!=null){aG.a*=aF.opacity}aF=aG.toString()}aI.addColorStop(aE/(aD-1),aF)}return aI}}}c.plot=function(g,e,d){var f=new b(c(g),e,d,c.plot.plugins);return f};c.plot.version="0.7";c.plot.plugins=[];c.plot.formatDate=function(l,f,h){var o=function(d){d=""+d;return d.length==1?"0"+d:d};var e=[];var p=false,j=false;var n=l.getUTCHours();var k=n<12;if(h==null){h=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}if(f.search(/%p|%P/)!=-1){if(n>12){n=n-12}else{if(n==0){n=12}}}for(var g=0;g<f.length;++g){var m=f.
 charAt(g);if(p){switch(m){case"h":m=""+n;break;case"H":m=o(n);break;case"M":m=o(l.getUTCMinutes());break;case"S":m=o(l.getUTCSeconds());break;case"d":m=""+l.getUTCDate();break;case"m":m=""+(l.getUTCMonth()+1);break;case"y":m=""+l.getUTCFullYear();break;case"b":m=""+h[l.getUTCMonth()];break;case"p":m=(k)?("am"):("pm");break;case"P":m=(k)?("AM"):("PM");break;case"0":m="";j=true;break}if(m&&j){m=o(m);j=false}e.push(m);if(!j){p=false}}else{if(m=="%"){p=true}else{e.push(m)}}}return e.join("")};function a(e,d){return d*Math.floor(e/d)}})(jQuery);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.form.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.form.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.form.js
new file mode 100644
index 0000000..d9266bd
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery.form.js
@@ -0,0 +1,601 @@
+/*
+ * jQuery Form Plugin
+ * version: 2.12 (06/07/2008)
+ * @requires jQuery v1.2.2 or later
+ *
+ * Examples and documentation at: http://malsup.com/jquery/form/
+ * Dual licensed under the MIT and GPL licenses:
+ *   http://www.opensource.org/licenses/mit-license.php
+ *   http://www.gnu.org/licenses/gpl.html
+ *
+ * Revision: $Id$
+ */
+(function($) {
+
+/*
+    Usage Note:  
+    -----------
+    Do not use both ajaxSubmit and ajaxForm on the same form.  These
+    functions are intended to be exclusive.  Use ajaxSubmit if you want
+    to bind your own submit handler to the form.  For example,
+
+    $(document).ready(function() {
+        $('#myForm').bind('submit', function() {
+            $(this).ajaxSubmit({
+                target: '#output'
+            });
+            return false; // <-- important!
+        });
+    });
+
+    Use ajaxForm when you want the plugin to manage all the event binding
+    for you.  For example,
+
+    $(document).ready(function() {
+        $('#myForm').ajaxForm({
+            target: '#output'
+        });
+    });
+        
+    When using ajaxForm, the ajaxSubmit function will be invoked for you
+    at the appropriate time.  
+*/
+
+/**
+ * ajaxSubmit() provides a mechanism for immediately submitting 
+ * an HTML form using AJAX.
+ */
+$.fn.ajaxSubmit = function(options) {
+    // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
+    if (!this.length) {
+        log('ajaxSubmit: skipping submit process - no element selected');
+        return this;
+    }
+
+    if (typeof options == 'function')
+        options = { success: options };
+
+    options = $.extend({
+        url:  this.attr('action') || window.location.toString(),
+        type: this.attr('method') || 'GET'
+    }, options || {});
+
+    // hook for manipulating the form data before it is extracted;
+    // convenient for use with rich editors like tinyMCE or FCKEditor
+    var veto = {};
+    this.trigger('form-pre-serialize', [this, options, veto]);
+    if (veto.veto) {
+        log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
+        return this;
+   }
+
+    var a = this.formToArray(options.semantic);
+    if (options.data) {
+        options.extraData = options.data;
+        for (var n in options.data)
+            a.push( { name: n, value: options.data[n] } );
+    }
+
+    // give pre-submit callback an opportunity to abort the submit
+    if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
+        log('ajaxSubmit: submit aborted via beforeSubmit callback');
+        return this;
+    }    
+
+    // fire vetoable 'validate' event
+    this.trigger('form-submit-validate', [a, this, options, veto]);
+    if (veto.veto) {
+        log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
+        return this;
+    }    
+
+    var q = $.param(a);
+
+    if (options.type.toUpperCase() == 'GET') {
+        options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
+        options.data = null;  // data is null for 'get'
+    }
+    else
+        options.data = q; // data is the query string for 'post'
+
+    var $form = this, callbacks = [];
+    if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
+    if (options.clearForm) callbacks.push(function() { $form.clearForm(); });
+
+    // perform a load on the target only if dataType is not provided
+    if (!options.dataType && options.target) {
+        var oldSuccess = options.success || function(){};
+        callbacks.push(function(data) {
+            $(options.target).html(data).each(oldSuccess, arguments);
+        });
+    }
+    else if (options.success)
+        callbacks.push(options.success);
+
+    options.success = function(data, status) {
+        for (var i=0, max=callbacks.length; i < max; i++)
+            callbacks[i](data, status, $form);
+    };
+
+    // are there files to upload?
+    var files = $('input:file', this).fieldValue();
+    var found = false;
+    for (var j=0; j < files.length; j++)
+        if (files[j])
+            found = true;
+
+    // options.iframe allows user to force iframe mode
+   if (options.iframe || found) { 
+       // hack to fix Safari hang (thanks to Tim Molendijk for this)
+       // see:  http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
+       if ($.browser.safari && options.closeKeepAlive)
+           $.get(options.closeKeepAlive, fileUpload);
+       else
+           fileUpload();
+       }
+   else
+       $.ajax(options);
+
+    // fire 'notify' event
+    this.trigger('form-submit-notify', [this, options]);
+    return this;
+
+
+    // private function for handling file uploads (hat tip to YAHOO!)
+    function fileUpload() {
+        var form = $form[0];
+        
+        if ($(':input[@name=submit]', form).length) {
+            alert('Error: Form elements must not be named "submit".');
+            return;
+        }
+        
+        var opts = $.extend({}, $.ajaxSettings, options);
+
+        var id = 'jqFormIO' + (new Date().getTime());
+        var $io = $('<iframe id="' + id + '" name="' + id + '" />');
+        var io = $io[0];
+
+        if ($.browser.msie || $.browser.opera) 
+            io.src = 'javascript:false;document.write("");';
+        $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
+
+        var xhr = { // mock object
+            responseText: null,
+            responseXML: null,
+            status: 0,
+            statusText: 'n/a',
+            getAllResponseHeaders: function() {},
+            getResponseHeader: function() {},
+            setRequestHeader: function() {}
+        };
+
+        var g = opts.global;
+        // trigger ajax global events so that activity/block indicators work like normal
+        if (g && ! $.active++) $.event.trigger("ajaxStart");
+        if (g) $.event.trigger("ajaxSend", [xhr, opts]);
+
+        var cbInvoked = 0;
+        var timedOut = 0;
+
+        // add submitting element to data if we know it
+        var sub = form.clk;
+        if (sub) {
+            var n = sub.name;
+            if (n && !sub.disabled) {
+                options.extraData = options.extraData || {};
+                options.extraData[n] = sub.value;
+                if (sub.type == "image") {
+                    options.extraData[name+'.x'] = form.clk_x;
+                    options.extraData[name+'.y'] = form.clk_y;
+                }
+            }
+        }
+        
+        // take a breath so that pending repaints get some cpu time before the upload starts
+        setTimeout(function() {
+            // make sure form attrs are set
+            var t = $form.attr('target'), a = $form.attr('action');
+            $form.attr({
+                target:   id,
+                encoding: 'multipart/form-data',
+                enctype:  'multipart/form-data',
+                method:   'POST',
+                action:   opts.url
+            });
+
+            // support timout
+            if (opts.timeout)
+                setTimeout(function() { timedOut = true; cb(); }, opts.timeout);
+
+            // add "extra" data to form if provided in options
+            var extraInputs = [];
+            try {
+                if (options.extraData)
+                    for (var n in options.extraData)
+                        extraInputs.push(
+                            $('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />')
+                                .appendTo(form)[0]);
+            
+                // add iframe to doc and submit the form
+                $io.appendTo('body');
+                io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
+                form.submit();
+            }
+            finally {
+                // reset attrs and remove "extra" input elements
+                $form.attr('action', a);
+                t ? $form.attr('target', t) : $form.removeAttr('target');
+                $(extraInputs).remove();
+            }
+        }, 10);
+
+        function cb() {
+            if (cbInvoked++) return;
+            
+            io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
+
+            var operaHack = 0;
+            var ok = true;
+            try {
+                if (timedOut) throw 'timeout';
+                // extract the server response from the iframe
+                var data, doc;
+
+                doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
+                
+                if (doc.body == null && !operaHack && $.browser.opera) {
+                    // In Opera 9.2.x the iframe DOM is not always traversable when
+                    // the onload callback fires so we give Opera 100ms to right itself
+                    operaHack = 1;
+                    cbInvoked--;
+                    setTimeout(cb, 100);
+                    return;
+                }
+                
+                xhr.responseText = doc.body ? doc.body.innerHTML : null;
+                xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
+                xhr.getResponseHeader = function(header){
+                    var headers = {'content-type': opts.dataType};
+                    return headers[header];
+                };
+
+                if (opts.dataType == 'json' || opts.dataType == 'script') {
+                    var ta = doc.getElementsByTagName('textarea')[0];
+                    xhr.responseText = ta ? ta.value : xhr.responseText;
+                }
+                else if (opts.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
+                    xhr.responseXML = toXml(xhr.responseText);
+                }
+                data = $.httpData(xhr, opts.dataType);
+            }
+            catch(e){
+                ok = false;
+                $.handleError(opts, xhr, 'error', e);
+            }
+
+            // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
+            if (ok) {
+                opts.success(data, 'success');
+                if (g) $.event.trigger("ajaxSuccess", [xhr, opts]);
+            }
+            if (g) $.event.trigger("ajaxComplete", [xhr, opts]);
+            if (g && ! --$.active) $.event.trigger("ajaxStop");
+            if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');
+
+            // clean up
+            setTimeout(function() {
+                $io.remove();
+                xhr.responseXML = null;
+            }, 100);
+        };
+
+        function toXml(s, doc) {
+            if (window.ActiveXObject) {
+                doc = new ActiveXObject('Microsoft.XMLDOM');
+                doc.async = 'false';
+                doc.loadXML(s);
+            }
+            else
+                doc = (new DOMParser()).parseFromString(s, 'text/xml');
+            return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
+        };
+    };
+};
+
+/**
+ * ajaxForm() provides a mechanism for fully automating form submission.
+ *
+ * The advantages of using this method instead of ajaxSubmit() are:
+ *
+ * 1: This method will include coordinates for <input type="image" /> elements (if the element
+ *    is used to submit the form).
+ * 2. This method will include the submit element's name/value data (for the element that was
+ *    used to submit the form).
+ * 3. This method binds the submit() method to the form for you.
+ *
+ * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
+ * passes the options argument along after properly binding events for submit elements and
+ * the form itself.
+ */ 
+$.fn.ajaxForm = function(options) {
+    return this.ajaxFormUnbind().bind('submit.form-plugin',function() {
+        $(this).ajaxSubmit(options);
+        return false;
+    }).each(function() {
+        // store options in hash
+        $(":submit,input:image", this).bind('click.form-plugin',function(e) {
+            var $form = this.form;
+            $form.clk = this;
+            if (this.type == 'image') {
+                if (e.offsetX != undefined) {
+                    $form.clk_x = e.offsetX;
+                    $form.clk_y = e.offsetY;
+                } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
+                    var offset = $(this).offset();
+                    $form.clk_x = e.pageX - offset.left;
+                    $form.clk_y = e.pageY - offset.top;
+                } else {
+                    $form.clk_x = e.pageX - this.offsetLeft;
+                    $form.clk_y = e.pageY - this.offsetTop;
+                }
+            }
+            // clear form vars
+            setTimeout(function() { $form.clk = $form.clk_x = $form.clk_y = null; }, 10);
+        });
+    });
+};
+
+// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
+$.fn.ajaxFormUnbind = function() {
+    this.unbind('submit.form-plugin');
+    return this.each(function() {
+        $(":submit,input:image", this).unbind('click.form-plugin');
+    });
+
+};
+
+/**
+ * formToArray() gathers form element data into an array of objects that can
+ * be passed to any of the following ajax functions: $.get, $.post, or load.
+ * Each object in the array has both a 'name' and 'value' property.  An example of
+ * an array for a simple login form might be:
+ *
+ * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
+ *
+ * It is this array that is passed to pre-submit callback functions provided to the
+ * ajaxSubmit() and ajaxForm() methods.
+ */
+$.fn.formToArray = function(semantic) {
+    var a = [];
+    if (this.length == 0) return a;
+
+    var form = this[0];
+    var els = semantic ? form.getElementsByTagName('*') : form.elements;
+    if (!els) return a;
+    for(var i=0, max=els.length; i < max; i++) {
+        var el = els[i];
+        var n = el.name;
+        if (!n) continue;
+
+        if (semantic && form.clk && el.type == "image") {
+            // handle image inputs on the fly when semantic == true
+            if(!el.disabled && form.clk == el)
+                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
+            continue;
+        }
+
+        var v = $.fieldValue(el, true);
+        if (v && v.constructor == Array) {
+            for(var j=0, jmax=v.length; j < jmax; j++)
+                a.push({name: n, value: v[j]});
+        }
+        else if (v !== null && typeof v != 'undefined')
+            a.push({name: n, value: v});
+    }
+
+    if (!semantic && form.clk) {
+        // input type=='image' are not found in elements array! handle them here
+        var inputs = form.getElementsByTagName("input");
+        for(var i=0, max=inputs.length; i < max; i++) {
+            var input = inputs[i];
+            var n = input.name;
+            if(n && !input.disabled && input.type == "image" && form.clk == input)
+                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
+        }
+    }
+    return a;
+};
+
+/**
+ * Serializes form data into a 'submittable' string. This method will return a string
+ * in the format: name1=value1&amp;name2=value2
+ */
+$.fn.formSerialize = function(semantic) {
+    //hand off to jQuery.param for proper encoding
+    return $.param(this.formToArray(semantic));
+};
+
+/**
+ * Serializes all field elements in the jQuery object into a query string.
+ * This method will return a string in the format: name1=value1&amp;name2=value2
+ */
+$.fn.fieldSerialize = function(successful) {
+    var a = [];
+    this.each(function() {
+        var n = this.name;
+        if (!n) return;
+        var v = $.fieldValue(this, successful);
+        if (v && v.constructor == Array) {
+            for (var i=0,max=v.length; i < max; i++)
+                a.push({name: n, value: v[i]});
+        }
+        else if (v !== null && typeof v != 'undefined')
+            a.push({name: this.name, value: v});
+    });
+    //hand off to jQuery.param for proper encoding
+    return $.param(a);
+};
+
+/**
+ * Returns the value(s) of the element in the matched set.  For example, consider the following form:
+ *
+ *  <form><fieldset>
+ *      <input name="A" type="text" />
+ *      <input name="A" type="text" />
+ *      <input name="B" type="checkbox" value="B1" />
+ *      <input name="B" type="checkbox" value="B2"/>
+ *      <input name="C" type="radio" value="C1" />
+ *      <input name="C" type="radio" value="C2" />
+ *  </fieldset></form>
+ *
+ *  var v = $(':text').fieldValue();
+ *  // if no values are entered into the text inputs
+ *  v == ['','']
+ *  // if values entered into the text inputs are 'foo' and 'bar'
+ *  v == ['foo','bar']
+ *
+ *  var v = $(':checkbox').fieldValue();
+ *  // if neither checkbox is checked
+ *  v === undefined
+ *  // if both checkboxes are checked
+ *  v == ['B1', 'B2']
+ *
+ *  var v = $(':radio').fieldValue();
+ *  // if neither radio is checked
+ *  v === undefined
+ *  // if first radio is checked
+ *  v == ['C1']
+ *
+ * The successful argument controls whether or not the field element must be 'successful'
+ * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
+ * The default value of the successful argument is true.  If this value is false the value(s)
+ * for each element is returned.
+ *
+ * Note: This method *always* returns an array.  If no valid value can be determined the
+ *       array will be empty, otherwise it will contain one or more values.
+ */
+$.fn.fieldValue = function(successful) {
+    for (var val=[], i=0, max=this.length; i < max; i++) {
+        var el = this[i];
+        var v = $.fieldValue(el, successful);
+        if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
+            continue;
+        v.constructor == Array ? $.merge(val, v) : val.push(v);
+    }
+    return val;
+};
+
+/**
+ * Returns the value of the field element.
+ */
+$.fieldValue = function(el, successful) {
+    var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
+    if (typeof successful == 'undefined') successful = true;
+
+    if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
+        (t == 'checkbox' || t == 'radio') && !el.checked ||
+        (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
+        tag == 'select' && el.selectedIndex == -1))
+            return null;
+
+    if (tag == 'select') {
+        var index = el.selectedIndex;
+        if (index < 0) return null;
+        var a = [], ops = el.options;
+        var one = (t == 'select-one');
+        var max = (one ? index+1 : ops.length);
+        for(var i=(one ? index : 0); i < max; i++) {
+            var op = ops[i];
+            if (op.selected) {
+                // extra pain for IE...
+                var v = $.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value;
+                if (one) return v;
+                a.push(v);
+            }
+        }
+        return a;
+    }
+    return el.value;
+};
+
+/**
+ * Clears the form data.  Takes the following actions on the form's input fields:
+ *  - input text fields will have their 'value' property set to the empty string
+ *  - select elements will have their 'selectedIndex' property set to -1
+ *  - checkbox and radio inputs will have their 'checked' property set to false
+ *  - inputs of type submit, button, reset, and hidden will *not* be effected
+ *  - button elements will *not* be effected
+ */
+$.fn.clearForm = function() {
+    return this.each(function() {
+        $('input,select,textarea', this).clearFields();
+    });
+};
+
+/**
+ * Clears the selected form elements.
+ */
+$.fn.clearFields = $.fn.clearInputs = function() {
+    return this.each(function() {
+        var t = this.type, tag = this.tagName.toLowerCase();
+        if (t == 'text' || t == 'password' || tag == 'textarea')
+            this.value = '';
+        else if (t == 'checkbox' || t == 'radio')
+            this.checked = false;
+        else if (tag == 'select')
+            this.selectedIndex = -1;
+    });
+};
+
+/**
+ * Resets the form data.  Causes all form elements to be reset to their original value.
+ */
+$.fn.resetForm = function() {
+    return this.each(function() {
+        // guard against an input with the name of 'reset'
+        // note that IE reports the reset function as an 'object'
+        if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
+            this.reset();
+    });
+};
+
+/**
+ * Enables or disables any matching elements.
+ */
+$.fn.enable = function(b) { 
+    if (b == undefined) b = true;
+    return this.each(function() { 
+        this.disabled = !b 
+    });
+};
+
+/**
+ * Checks/unchecks any matching checkboxes or radio buttons and
+ * selects/deselects and matching option elements.
+ */
+$.fn.select = function(select) {
+    if (select == undefined) select = true;
+    return this.each(function() { 
+        var t = this.type;
+        if (t == 'checkbox' || t == 'radio')
+            this.checked = select;
+        else if (this.tagName.toLowerCase() == 'option') {
+            var $sel = $(this).parent('select');
+            if (select && $sel[0] && $sel[0].type == 'select-one') {
+                // deselect all other options
+                $sel.find('option').select(false);
+            }
+            this.selected = select;
+        }
+    });
+};
+
+// helper fn for console logging
+// set $.fn.ajaxSubmit.debug to true to enable debug logging
+function log() {
+    if ($.fn.ajaxSubmit.debug && window.console && window.console.log)
+        window.console.log('[jquery.form] ' + Array.prototype.join.call(arguments,''));
+};
+
+})(jQuery);


[36/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery-1.5.2.min.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery-1.5.2.min.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery-1.5.2.min.js
new file mode 100644
index 0000000..f78f96a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery-1.5.2.min.js
@@ -0,0 +1,16 @@
+/*!
+ * jQuery JavaScript Library v1.5.2
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Mar 31 15:28:23 2011 -0400
+ */
+(function(a,b){function ci(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cf(a){if(!b_[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";b_[a]=c}return b_[a]}function ce(a,b){var c={};d.each(cd.concat.apply([],cd.slice(0,b)),function(){c[this]=a});return c}function b$(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bZ(){try{return new a.XMLHttpRequest}catch(b){}}function bY(){d(a).unload(function(){for(var a in bW)bW[a](0,1)})}function bS(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h==="string"&&(f[h.toLowerCase()]=a.converters[h]);l=k,k=e[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=f[m]||f["* "+k];if(!n){p=b;for(o in f){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=f[j[1]+" "+k];if(p){o=f[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&d.error("No con
 version from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bR(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bQ(a,b,c,e){if(d.isArray(b)&&b.length)d.each(b,function(b,f){c||bs.test(a)?e(a,f):bQ(a+"["+(typeof f==="object"||d.isArray(f)?b:"")+"]",f,c,e)});else if(c||b==null||typeof b!=="object")e(a,b);else if(d.isArray(b)||d.isEmptyObject(b))e(a,"");else for(var f in b)bQ(a+"["+f+"]",b[f],c,e)}function bP(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bJ,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l==="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bP(a,c,d,e,l,g)));(k||!l)&&!g["*"
 ]&&(l=bP(a,c,d,e,"*",g));return l}function bO(a){return function(b,c){typeof b!=="string"&&(c=b,b="*");if(d.isFunction(c)){var e=b.toLowerCase().split(bD),f=0,g=e.length,h,i,j;for(;f<g;f++)h=e[f],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bq(a,b,c){var e=b==="width"?bk:bl,f=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return f;d.each(e,function(){c||(f-=parseFloat(d.css(a,"padding"+this))||0),c==="margin"?f+=parseFloat(d.css(a,"margin"+this))||0:f-=parseFloat(d.css(a,"border"+this+"Width"))||0});return f}function bc(a,b){b.src?d.ajax({url:b.src,async:!1,dataType:"script"}):d.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function bb(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function ba(a,b){if(b.nodeType===1){var c=b.nodeName.toLowerCase();b.clearAttributes(),b.mergeAttributes(a);if(c==="object")b.outerHTML
 =a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(d.expando)}}function _(a,b){if(b.nodeType===1&&d.hasData(a)){var c=d.expando,e=d.data(a),f=d.data(b,e);if(e=e[c]){var g=e.events;f=f[c]=d.extend({},e);if(g){delete f.handle,f.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)d.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function $(a,b){return d.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Q(a,b,c){if(d.isFunction(b))return d.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return d.grep(a,function(a,d){return a===b===c});if(typeof b==="string"){var e=d.grep(a,function(a){return a.nodeType===1});if(L
 .test(b))return d.filter(b,e,!c);b=d.filter(b,e)}return d.grep(a,function(a,e){return d.inArray(a,b)>=0===c})}function P(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function H(a,b){return(a&&a!=="*"?a+".":"")+b.replace(t,"`").replace(u,"&")}function G(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,p=[],q=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;i<t.length;i++)g=t[i],g.origType.replace(r,"")===a.type?q.push(g.selector):t.splice(i--,1);f=d(a.target).closest(q,a.currentTarget);for(j=0,k=f.length;j<k;j++){m=f[j];for(i=0;i<t.length;i++){g=t[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,e=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,e=d(a.relatedTarget).closest(g.selector)[0];(!e||e!==h)&&p.push({elem:h,handleObj:
 g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){f=p[j];if(c&&f.level>c)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function E(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function y(){return!0}function x(){return!1}function i(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function h(a,c,e){if(e===b&&a.nodeType===1){e=a.getAttribute("data-"+c);if(typeof e==="string"){try{e=e==="true"?!0:e==="false"?!1:e==="null"?null:d.isNaN(e)?g.test(e)?d.parseJSON(e):e:parseFloat(e)}catch(f){}d.data(a,c,e)}else e=b}return e}var c=a.document,d=function(){function G(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(G,1);return}d.ready()}}var d=function(a,b){return new d.fn.init
 (a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x,y,z=Object.prototype.toString,A=Object.prototype.hasOwnProperty,B=Array.prototype.push,C=Array.prototype.slice,D=String.prototype.trim,E=Array.prototype.indexOf,F={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k
 =e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return C.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?B.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(t
 his,a,b)},ready:function(a){d.bindReady(),x.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(C.apply(this,arguments),"slice",C.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:B,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){e=i[c],f=a[c];if(i===f)continue;l&&f&&(d.isPlainObject(f)||(g=d.isArray(f)))?(g?(g=!1,h=e&&d.isArray(e)?e:[]):h=e&&d.isPlainObject(e)?e:{},i[c]=d.extend(l,h,f)):f!==b&&(i[c]=f)}return i},d.extend({noConflict:function(b)
 {a.$=f,b&&(a.jQuery=e);return d},isReady:!1,readyWait:1,ready:function(a){a===!0&&d.readyWait--;if(!d.readyWait||a!==!0&&!d.isReady){if(!c.body)return setTimeout(d.ready,1);d.isReady=!0;if(a!==!0&&--d.readyWait>0)return;x.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=d._Deferred();if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",y,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",y),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&G()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):F[z.call(a)]||"object"},isPlainOb
 ject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!A.call(a,"constructor")&&!A.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||A.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.append
 Child(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g<h;)if(c.apply(a[g++],e)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(var j=a[0];g<h&&c.call(j,g,j)!==!1;j=a[++g]){}return a},trim:D?function(a){return a==null?"":D.call(a)}:function(a){return a==null?"":(a+"").replace(j,"").replace(k,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var e=d.type(a);a.length==null||e==="string"||e==="function"||e==="regexp"||d.isWindow(a)?B.call(c,a):d.merge(c,a)}return c},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length==="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++
 ]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,b,c){var d=[],e;for(var f=0,g=a.length;f<g;f++)e=b(a[f],f,c),e!=null&&(d[d.length]=e);return d.concat.apply([],d)},guid:1,proxy:function(a,c,e){arguments.length===2&&(typeof c==="string"?(e=a,a=e[c],c=b):c&&!d.isFunction(c)&&(e=c,c=b)),!c&&a&&(c=function(){return a.apply(e||this,arguments)}),a&&(c.guid=a.guid=a.guid||c.guid||d.guid++);return c},access:function(a,c,e,f,g,h){var i=a.length;if(typeof c==="object"){for(var j in c)d.access(a,j,c[j],f,g,e);return a}if(e!==b){f=!h&&f&&d.isFunction(e);for(var k=0;k<i;k++)g(a[k],c,f?e.call(a[k],k,g(a[k],c)):e,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a
 .fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){F["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),E&&(d.inArray=function(a,b){return E.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?y=function(){c.removeEventListener("DOMContentLoaded",y,!1),d.ready()}:c.attachEvent&&(y=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",y),d.ready())});return d}(),e="then done fail isResolved isRejected promise".split(" "),f=[].slice;d.extend({_Deferred:function(){var a=[],b,c,e,f={done:function(){if(!e){var c=a
 rguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=d.type(i),j==="array"?f.done.apply(f,i):j==="function"&&a.push(i);k&&f.resolveWith(k[0],k[1])}return this},resolveWith:function(d,f){if(!e&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(d,f)}finally{b=[d,f],c=0}}return this},resolve:function(){f.resolveWith(this,arguments);return this},isResolved:function(){return c||b},cancel:function(){e=1,a=[];return this}};return f},Deferred:function(a){var b=d._Deferred(),c=d._Deferred(),f;d.extend(b,{then:function(a,c){b.done(a).fail(c);return this},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,promise:function(a){if(a==null){if(f)return f;f=a={}}var c=e.length;while(c--)a[e[c]]=b[e[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?f.call(arguments,0):c,--g||h.resolveWith(h,f.call(b,0))}}var b=arguments,c=0,e=b.length,g=e,h=e<=1&
 &a&&d.isFunction(a.promise)?a:d.Deferred();if(e>1){for(;c<e;c++)b[c]&&d.isFunction(b[c].promise)?b[c].promise().then(i(c),h.reject):--g;g||h.resolveWith(h,b)}else h!==a&&h.resolveWith(h,e?[a]:[]);return h.promise()}}),function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!
 1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0,reliableMarginRight:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e)}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChi
 ld.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(a.style.width="1px",a.style.marginRight="0",d.support.reliableMarginRight=(parseInt(c.defaultView.getComputedStyle(a,null).marginRight,10)||0)===0),b.removeChild(a).style.display="none",a=e=nu
 ll}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function");return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}}();var g=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!i(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i
 [g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,j=g?b[d.expando]:d.expando;if(!h[j])return;if(c){var k=e?h[j][f]:h[j];if(k){delete k[c];if(!i(k))return}}if(e){delete h[j][f];if(!i(h[j]))return}var l=h[j][f];d.support.deleteExpando||h!=a?delete h[j]:h[j]=null,l?(h[j]={},g||(h[j].toJSON=d.noop),h[j][f]=l):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var f=this[0].attributes,g;for(var i=0,j=f.length;i<j;i++)g=f[i].name,g.indexOf("data-")===0&&(g=g.substr(5),h(this[0],g,e[g]))}}return e}if(typeof a==="object")return this.each(func
 tion(){d.data(this,a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(c===b){e=this.triggerHandler("getData"+k[1]+"!",[k[0]]),e===b&&this.length&&(e=d.data(this[0],a),e=h(this[0],a,e));return e===b&&k[1]?this.data(k[0]):e}return this.each(function(){var b=d(this),e=[k[0],c];b.triggerHandler("setData"+k[1]+"!",e),d.data(this,a,c),b.triggerHandler("changeData"+k[1]+"!",e)})},removeData:function(a){return this.each(function(){d.removeData(this,a)})}}),d.extend({queue:function(a,b,c){if(a){b=(b||"fx")+"queue";var e=d._data(a,b);if(!c)return e||[];!e||d.isArray(c)?e=d._data(a,b,d.makeArray(c)):e.push(c);return e}},dequeue:function(a,b){b=b||"fx";var c=d.queue(a,b),e=c.shift();e==="inprogress"&&(e=c.shift()),e&&(b==="fx"&&c.unshift("inprogress"),e.call(a,function(){d.dequeue(a,b)})),c.length||d.removeData(a,b+"queue",!0)}}),d.fn.extend({queue:function(a,c){typeof a!=="string"&&(c=a,a="fx");if(c===b)return d.queue(this[0],a);return this.each(function(b){var e=d.queue(this,a,c);a==="fx"&&e[0]
 !=="inprogress"&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},delay:function(a,b){a=d.fx?d.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){d.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var j=/[\n\t\r]/g,k=/\s+/,l=/\r/g,m=/^(?:href|src|style)$/,n=/^(?:button|input)$/i,o=/^(?:button|input|object|select|textarea)$/i,p=/^a(?:rea)?$/i,q=/^(?:radio|checkbox)$/i;d.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"},d.fn.extend({attr:function(a,b){return d.access(this,a,b,!0,d.attr)},removeAttr:function(a,b){return this.each(function(){d.attr(this,a,""),this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.addClass(a.call(this,b,c.attr("clas
 s")))});if(a&&typeof a==="string"){var b=(a||"").split(k);for(var c=0,e=this.length;c<e;c++){var f=this[c];if(f.nodeType===1)if(f.className){var g=" "+f.className+" ",h=f.className;for(var i=0,j=b.length;i<j;i++)g.indexOf(" "+b[i]+" ")<0&&(h+=" "+b[i]);f.className=d.trim(h)}else f.className=a}}return this},removeClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"||a===b){var c=(a||"").split(k);for(var e=0,f=this.length;e<f;e++){var g=this[e];if(g.nodeType===1&&g.className)if(a){var h=(" "+g.className+" ").replace(j," ");for(var i=0,l=c.length;i<l;i++)h=h.replace(" "+c[i]+" "," ");g.className=d.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,e=typeof b==="boolean";if(d.isFunction(a))return this.each(function(c){var e=d(this);e.toggleClass(a.call(this,c,e.attr("class"),b),b)});return this.each(function(){if(c==="string"){var f,g=0,h=d(this),i=b,j=a.s
 plit(k);while(f=j[g++])i=e?i:!h.hasClass(f),h[i?"addClass":"removeClass"](f)}else if(c==="undefined"||c==="boolean")this.className&&d._data(this,"__className__",this.className),this.className=this.className||a===!1?"":d._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(j," ").indexOf(b)>-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var j=i?f:0,k=i?f+1:h.length;j<k;j++){var m=h[j];if(m.selected&&(d.support.optDisabled?!m.disabled:m.getAttribute("disabled")===null)&&(!m.parentNode.disabled||!d.nodeName(m.parentNode,"optgroup"))){a=d(m).val();if(i)return a;g.push(a)}}if(i&&!g.length&&h.length)return d(h[f]).val();return g}if(q.test(c.type)&&!d.support.checkOn)r
 eturn c.getAttribute("value")===null?"on":c.value;return(c.value||"").replace(l,"")}return b}var n=d.isFunction(a);return this.each(function(b){var c=d(this),e=a;if(this.nodeType===1){n&&(e=a.call(this,b,c.val())),e==null?e="":typeof e==="number"?e+="":d.isArray(e)&&(e=d.map(e,function(a){return a==null?"":a+""}));if(d.isArray(e)&&q.test(this.type))this.checked=d.inArray(c.val(),e)>=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=m.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNod
 e.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&n.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var k=a.getAttributeNode("tabIndex");return k&&k.specified?k.value:o.test(a.nodeName)||p.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var l=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return l===null?b:l}h&&(a[c]=e);return a[c]}});var r=/\.(.*)$/,s=/^(?:textarea|input|select)$/i,t=/\./g,u=/ /g,v=/[^\w\s.|`]/g,w=function(a){return a.replace(v,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=x;else
  if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(a){return typeof d!=="undefined"&&d.event.triggered!==a.type?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=x);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.ty
 pe);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),w).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))d.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=d.event.special[h]||{};for(j=f||0;j<p.length;j++){q=p[j];if(e.guid===q.guid){if(l||n.test(q.namespace))f==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(f!=null)break}}if(p.length===0||f!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&d.removeEvent(a,h,s.handle),g=null,delete t[h]}if(d.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,d.isEmptyObject(s)&&d.removeData(a,b,!0)}}},trigger:function(a,c,e){var f=a.type||a,g=arguments[3];if(!g){a=typeof a==="object"?a[d.expando]?a:d.extend(d.Event(f),a):d.Event(f),f.ind
 exOf("!")>=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(r,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=a.type,l[m]())}catch(p){}k&&(l["on"+m]=k),d.event.triggered=b}}},handle:function(c){var e,f,g,h,i,j=[],k=
 d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l<m;l++){var n=f[l];if(e||h.test(n.namespace)){c.handler=n.handler,c.data=n.data,c.handleObj=n;var o=n.handler.apply(this,k);o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[d.expando])return a;va
 r e=a;a=d.Event(e);for(var f=this.props.length,g;f;)g=this.props[--f],a[g]=e[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=c.documentElement,i=c.body;a.pageX=a.clientX+(h&&h.scrollLeft||i&&i.scrollLeft||0)-(h&&h.clientLeft||i&&i.clientLeft||0),a.pageY=a.clientY+(h&&h.scrollTop||i&&i.scrollTop||0)-(h&&h.clientTop||i&&i.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:d.proxy,special:{ready:{setup:d.bindReady,teardown:d.noop},live:{add:function(a){d.event.add(this,H(a.origType,a.selector),d.extend({},a,{handler:G,guid:a.handler.guid}))},remove:function(a){d.event.remove(this,H(a.origType,a.s
 elector),a)}},beforeunload:{setup:function(a,b,c){d.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},d.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},d.Event=function(a){if(!this.preventDefault)return new d.Event(a);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?y:x):this.type=a,this.timeStamp=d.now(),this[d.expando]=!0},d.Event.prototype={preventDefault:function(){this.isDefaultPrevented=y;var a=this.originalEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=y;var a=this.originalEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=y,this.stopP
 ropagation()},isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x};var z=function(a){var b=a.relatedTarget;try{if(b&&b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&(a.type=a.data,d.event.handle.apply(this,arguments))}catch(e){}},A=function(a){a.type=a.data,d.event.handle.apply(this,arguments)};d.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){d.event.special[a]={setup:function(c){d.event.add(this,b,c&&c.selector?A:z,a)},teardown:function(a){d.event.remove(this,b,a&&a.selector?A:z)}}}),d.support.submitBubbles||(d.event.special.submit={setup:function(a,b){if(this.nodeName&&this.nodeName.toLowerCase()!=="form")d.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&d(b).closest("form").length&&E("submit",this,arguments)}),d.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&d(b).closest("form").length&&a.keyCode===13&&E
 ("submit",this,arguments)});else return!1},teardown:function(a){d.event.remove(this,".specialSubmit")}});if(!d.support.changeBubbles){var B,C=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},D=function D(a){var c=a.target,e,f;if(s.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=C(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:D,beforedeactivate:D,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&D.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radi
 o")||c==="select-multiple")&&D.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",C(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in B)d.event.add(this,c+".specialChange",B[c]);return s.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return s.test(this.nodeName)}},B=d.event.special.change.filters,B.focus=B.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function f(a){var c=d.event.fix(a);c.type=b,c.originalEvent={},d.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var e=0;d.event.special[b]={setup:function(){e++===0&&c.addEventListener(a,f,!0)},teardown:function(){--e===0&&c.removeEventListener(a,f,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f
 .apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i<j;i++)d.event.add(this[i],a,h,e);return this}}),d.fn.extend({unbind:function(a,b){if(typeof a!=="object"||a.preventDefault)for(var e=0,f=this.length;e<f;e++)d.event.remove(this[e],a,b);else for(var c in a)this.unbind(c,a[c]);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){d.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var c=d.Event(a);c.preventDefault(),c.stopPropagation(),d.event.trigger(c,b,this[0]);return c.result}},toggle:function(a){var b=arguments,c=1;while(c<b.length)d.proxy(a,b[c++]);return this.click(d.proxy(a,function(e){var f=(d._data(this,"lastToggle"+a.guid)||0)%c;d._data(this,"lastToggle"+a.guid,f+1),e.preventDefault();return b[f].apply(this,arguments)||!1}))},hover:function(a,b){re
 turn this.mouseenter(a).mouseleave(b||a)}});var F={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};d.each(["live","die"],function(a,c){d.fn[c]=function(a,e,f,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:d(this.context);if(typeof a==="object"&&!a.preventDefault){for(var o in a)n[c](o,e,a[o],m);return this}d.isFunction(e)&&(f=e,e=b),a=(a||"").split(" ");while((h=a[i++])!=null){j=r.exec(h),k="",j&&(k=j[0],h=h.replace(r,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,h==="focus"||h==="blur"?(a.push(F[h]+k),h=h+k):h=(F[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)d.event.add(n[p],"live."+H(h,m),{data:e,selector:m,handler:f,origType:h,origHandler:f,preType:l});else n.unbind("live."+H(h,m),f)}return this}}),d.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){
 d.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!=="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)ret
 urn[];if(!b||typeof b!=="string")return e;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else f
 or(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!=="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")c
 ontinue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(f){if(f===!0)continue}else g=o=!0}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)
 ]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b==="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1){}a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("previousSibling",b,f,a,d,c)}},find:{ID:funct
 ion(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!=="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]
 =b[3]-0}else a[2]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.
 type;return"text"===c&&(b===c||b===null)},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="no
 t"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f===
 "~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocument
 Position||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(a===b){g=!0;return 0}if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getEle
 mentById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML
 (e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div")
 ,e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML
 =function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};d.find=k,d.expr=k.selectors,d.expr[":"]=d.expr.filters,d.unique=k.uniqueSort,d.text=k.getText,d.isXMLDoc=k.isXML,d.contains=k.contains}();var I=/Until$/,J=/^(?:parents|prevUntil|prevAll)/,K=/,/,L=/^.[^:#\[\.,]*$/,M=Array.prototype.slice,N=d.expr.match.POS,O={children:!0,contents:!0,next:!0,prev:!0};d.fn.extend({find:function(a){var b=this.pushStack("","find",a),c=0;for(var e=0,f=this.length;e<f;e++){c=b.length,d.find(a,this[e],b);if(e>0)for(var g=c;g<b.length;g++)for(var h=0;h<c;h++)if(b[h]===b[g]){b.splice(g--,1);break}}return b},has:function(a){var b=d(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(d.contains(this,b[a]))return!0})},not:function(a){return this.
 pushStack(Q(this,a,!1),"not",a)},filter:function(a){return this.pushStack(Q(this,a,!0),"filter",a)},is:function(a){return!!a&&d.filter(a,this).length>0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e<f;e++)i=a[e],j[i]||(j[i]=d.expr.match.POS.test(i)?d(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=N.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e<f;e++){g=this[e];while(g){if(l?l.index(g)>-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get
 (),c);return this.pushStack(P(c[0])||P(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=M.call(arguments);I.test(a)||(e=c),e&&typeof e==="string
 "&&(f=d.filter(e,f)),f=this.length>1&&!O[a]?d.unique(f):f,(this.length>1||K.test(e))&&J.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var R=/ jQuery\d+="(?:\d+|null)"/g,S=/^\s+/,T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,U=/<([\w:]+)/,V=/<tbody/i,W=/<|&#?\w+;/,X=/<(?:script|object|embed|option|style)/i,Y=/checked\s*(?:[^=]|=\s*.checked.)/i,Z={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2
 ,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};Z.optgroup=Z.option,Z.tbody=Z.tfoot=Z.colgroup=Z.caption=Z.thead,Z.th=Z.td,d.support.htmlSerialize||(Z._default=[1,"div<div>","</div>"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(
 b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(
 this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(R,""):null;if(typeof a!=="string"||X.test(a)||!d.support.leadingWhitespace&&S.test(a)||Z[(U.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(T,"<$1></$2>");try{for(var c=0,e=this.length;c<e;c++)this[c].nodeType===1&&(d.cl
 eanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(f){this.empty().append(a)}}return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(d.isFunction(a))return this.each(function(b){var c=d(this),e=c.html();c.replaceWith(a.call(this,b,e))});typeof a!=="string"&&(a=d(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;d(this).remove(),b?d(b).before(a):d(c).append(a)})}return this.length?this.pushStack(d(d.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,e){var f,g,h,i,j=a[0],k=[];if(!d.support.checkClone&&arguments.length===3&&typeof j==="string"&&Y.test(j))return this.each(function(){d(this).domManip(a,c,e,!0)});if(d.isFunction(j))return this.each(function(f){var g=d(this);a[0]=j.call(this,f,c?g.html():b),g.domManip(a,c,e)});if(this[0]){i=j&&j.parentNode,d.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?f={fragment:i}:f=d.buildFragment
 (a,this,k),h=f.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&d.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)e.call(c?$(this[l],g):this[l],f.cacheable||m>1&&l<n?d.clone(h,!0,!0):h)}k.length&&d.each(k,bc)}return this}}),d.buildFragment=function(a,b,e){var f,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]==="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!X.test(a[0])&&(d.support.checkClone||!Y.test(a[0]))&&(g=!0,h=d.fragments[a[0]],h&&(h!==1&&(f=h))),f||(f=i.createDocumentFragment(),d.clean(a,i,f,e)),g&&(d.fragments[a[0]]=h?f:1);return{fragment:f,cacheable:g}},d.fragments={},d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(c){var e=[],f=d(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&f.length===1){f[b](this[0]);return this}for(var h=0,i=f.length;h<i;h++){var j=(h>0?this.clone(!0):
 this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){ba(a,e),f=bb(a),g=bb(e);for(h=0;f[h];++h)ba(f[h],g[h])}if(b){_(a,e);if(c){f=bb(a),g=bb(e);for(h=0;f[h];++h)_(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||W.test(i)){if(typeof i==="string"){i=i.replace(T,"<$1></$2>");var j=(U.exec(i)||["",""])[1].toLowerCase(),k=Z[j]||Z._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=V.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]==="<table>"&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody"
 )&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&S.test(i)&&m.insertBefore(b.createTextNode(S.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bd=/alpha\
 ([^)]*\)/i,be=/opacity=([^)]*)/,bf=/-([a-z])/ig,bg=/([A-Z]|^ms)/g,bh=/^-?\d+(?:px)?$/i,bi=/^-?\d/,bj={position:"absolute",visibility:"hidden",display:"block"},bk=["Left","Right"],bl=["Top","Bottom"],bm,bn,bo,bp=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bm(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.se
 t(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bm)return bm(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bf,bp)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bq(a,b,e):d.swap(a,bj,function(){f=bq(a,b,e)});if(f<=0){f=bm(a,b,b),f==="0px"&&bo&&(f=bo(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bh.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return be.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c
 =a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bd.test(f)?f.replace(bd,e):c.filter+" "+e}}),d(function(){d.support.reliableMarginRight||(d.cssHooks.marginRight={get:function(a,b){var c;d.swap(a,{display:"inline-block"},function(){b?c=bm(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bn=function(a,c,e){var f,g,h;e=e.replace(bg,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bo=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bh.test(d)&&bi.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bm=bn||bo,d.expr&&
 d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var br=/%20/g,bs=/\[\]$/,bt=/\r?\n/g,bu=/#.*$/,bv=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bw=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bx=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,by=/^(?:GET|HEAD)$/,bz=/^\/\//,bA=/\?/,bB=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bC=/^(?:select|textarea)/i,bD=/\s+/,bE=/([?&])_=[^&]*/,bF=/(^|\-)([a-z])/g,bG=function(a,b,c){return b+c.toUpperCase()},bH=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bI=d.fn.load,bJ={},bK={},bL,bM;try{bL=c.location.href}catch(bN){bL=c.createElement("a"),bL.href="",bL=bL.href}bM=bH.exec(bL.toLowerCase())||[],d.fn.extend({load:function(a,c,e){if(typeof a!=="string"&&bI)return bI.apply(thi
 s,arguments);if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var g=a.slice(f,a.length);a=a.slice(0,f)}var h="GET";c&&(d.isFunction(c)?(e=c,c=b):typeof c==="object"&&(c=d.param(c,d.ajaxSettings.traditional),h="POST"));var i=this;d.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?d("<div>").append(c.replace(bB,"")).find(g):c)),e&&i.each(e,[c,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bC.test(this.nodeName)||bw.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bt,"\r\n")}}):{name:b.name,value:c.replace(bt,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess 
 ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,c){d[c]=function(a,e,f,g){d.isFunction(e)&&(g=g||f,f=e,e=b);return d.ajax({type:c,url:a,data:e,success:f,dataType:g})}}),d.extend({getScript:function(a,c){return d.get(a,b,c,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a,b){b?d.extend(!0,a,d.ajaxSettings,b):(b=a,a=d.extend(!0,d.ajaxSettings,b));for(var c in {context:1,url:1})c in b?a[c]=b[c]:c in d.ajaxSettings&&(a[c]=d.ajaxSettings[c]);return a},ajaxSettings:{url:bL,isLocal:bx.test(bM[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.
 parseXML}},ajaxPrefilter:bO(bJ),ajaxTransport:bO(bK),ajax:function(a,c){function v(a,c,l,n){if(r!==2){r=2,p&&clearTimeout(p),o=b,m=n||"",u.readyState=a?4:0;var q,t,v,w=l?bR(e,u,l):b,x,y;if(a>=200&&a<300||a===304){if(e.ifModified){if(x=u.getResponseHeader("Last-Modified"))d.lastModified[k]=x;if(y=u.getResponseHeader("Etag"))d.etag[k]=y}if(a===304)c="notmodified",q=!0;else try{t=bS(e,w),c="success",q=!0}catch(z){c="parsererror",v=z}}else{v=c;if(!c||a)c="error",a<0&&(a=0)}u.status=a,u.statusText=c,q?h.resolveWith(f,[t,c,u]):h.rejectWith(f,[u,c,v]),u.statusCode(j),j=b,s&&g.trigger("ajax"+(q?"Success":"Error"),[u,e,q?t:v]),i.resolveWith(f,[u,c]),s&&(g.trigger("ajaxComplete",[u,e]),--d.active||d.event.trigger("ajaxStop"))}}typeof a==="object"&&(c=a,a=b),c=c||{};var e=d.ajaxSetup({},c),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof d)?d(f):d.event,h=d.Deferred(),i=d._Deferred(),j=e.statusCode||{},k,l={},m,n,o,p,q,r=0,s,t,u={readyState:0,setRequestHeader:function(a,b){r||(l[a.toLowerCase
 ().replace(bF,bG)]=b);return this},getAllResponseHeaders:function(){return r===2?m:null},getResponseHeader:function(a){var c;if(r===2){if(!n){n={};while(c=bv.exec(m))n[c[1].toLowerCase()]=c[2]}c=n[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){r||(e.mimeType=a);return this},abort:function(a){a=a||"abort",o&&o.abort(a),v(0,a);return this}};h.promise(u),u.success=u.done,u.error=u.fail,u.complete=i.done,u.statusCode=function(a){if(a){var b;if(r<2)for(b in a)j[b]=[j[b],a[b]];else b=a[u.status],u.then(b,b)}return this},e.url=((a||e.url)+"").replace(bu,"").replace(bz,bM[1]+"//"),e.dataTypes=d.trim(e.dataType||"*").toLowerCase().split(bD),e.crossDomain==null&&(q=bH.exec(e.url.toLowerCase()),e.crossDomain=q&&(q[1]!=bM[1]||q[2]!=bM[2]||(q[3]||(q[1]==="http:"?80:443))!=(bM[3]||(bM[1]==="http:"?80:443)))),e.data&&e.processData&&typeof e.data!=="string"&&(e.data=d.param(e.data,e.traditional)),bP(bJ,e,c,u);if(r===2)return!1;s=e.global,e.type=e.type.toUpperCase(),e.hasContent=
 !by.test(e.type),s&&d.active++===0&&d.event.trigger("ajaxStart");if(!e.hasContent){e.data&&(e.url+=(bA.test(e.url)?"&":"?")+e.data),k=e.url;if(e.cache===!1){var w=d.now(),x=e.url.replace(bE,"$1_="+w);e.url=x+(x===e.url?(bA.test(e.url)?"&":"?")+"_="+w:"")}}if(e.data&&e.hasContent&&e.contentType!==!1||c.contentType)l["Content-Type"]=e.contentType;e.ifModified&&(k=k||e.url,d.lastModified[k]&&(l["If-Modified-Since"]=d.lastModified[k]),d.etag[k]&&(l["If-None-Match"]=d.etag[k])),l.Accept=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+(e.dataTypes[0]!=="*"?", */*; q=0.01":""):e.accepts["*"];for(t in e.headers)u.setRequestHeader(t,e.headers[t]);if(e.beforeSend&&(e.beforeSend.call(f,u,e)===!1||r===2)){u.abort();return!1}for(t in {success:1,error:1,complete:1})u[t](e[t]);o=bP(bK,e,c,u);if(o){u.readyState=1,s&&g.trigger("ajaxSend",[u,e]),e.async&&e.timeout>0&&(p=setTimeout(function(){u.abort("timeout")},e.timeout));try{r=1,o.send(l,v)}catch(y){status<2?v(-1,y):d.error(y)}}
 else v(-1,"No Transport");return u},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,function(){f(this.name,this.value)});else for(var g in a)bQ(g,a[g],c,f);return e.join("&").replace(br,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bT=d.now(),bU=/(\=)\?(&|$)|\?\?/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bT++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){var f=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bU.test(b.url)||f&&bU.test(b.data))){var g,h=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2",m=function(){a[h]=i,g&&d.isFunction(i)&&a[h](g[0])};b.jsonp!==!1&&(j=j.replace(bU,l),b.url===j&&(f&&(k=k.replace(bU,l)),b.data===k&&(j+=(/\?/.tes
 t(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},e.then(m,m),b.converters["script json"]=function(){g||d.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.inser
 tBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bV=d.now(),bW,bX;d.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&bZ()||b$()}:bZ,bX=d.ajaxSettings.xhr(),d.support.ajax=!!bX,d.support.cors=bX&&"withCredentials"in bX,bX=b,d.support.ajax&&d.ajaxTransport(function(a){if(!a.crossDomain||d.support.cors){var c;return{send:function(e,f){var g=a.xhr(),h,i;a.username?g.open(a.type,a.url,a.async,a.username,a.password):g.open(a.type,a.url,a.async);if(a.xhrFields)for(i in a.xhrFields)g[i]=a.xhrFields[i];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType),!a.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(i in e)g.setRequestHeader(i,e[i])}catch(j){}g.send(a.hasContent&&a.data||null),c=function(e,i){var j,k,l,m,n;try{if(c&&(i||g.readyState===4)){c=b,h&&(g.onreadystatechange=d.noop,delete bW[h]);if(i)g.readyState!==4&&g.abort();else{j=g.status,l=g.getAllResponseHeaders(),m={},n=g.responseXML,n&&n.documentElement&
 &(m.xml=n),m.text=g.responseText;try{k=g.statusText}catch(o){k=""}j||!a.isLocal||a.crossDomain?j===1223&&(j=204):j=m.text?200:404}}}catch(p){i||f(-1,p)}m&&f(j,k,m,l)},a.async&&g.readyState!==4?(bW||(bW={},bY()),h=bV++,g.onreadystatechange=bW[h]=c):c()},abort:function(){c&&c(0,1)}}}});var b_={},ca=/^(?:toggle|show|hide)$/,cb=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cc,cd=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(ce("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)e=this[g],f=e.style.display,!d._data(e,"olddisplay")&&f==="none"&&(f=e.style.display=""),f===""&&d.css(e,"display")==="none"&&d._data(e,"olddisplay",cf(e.nodeName));for(g=0;g<h;g++){e=this[g],f=e.style.display;if(f===""||f==="none")e.style.display=d._data(e,"olddisplay")||""}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ce("hide",3),
 a,b,c);for(var e=0,f=this.length;e<f;e++){var g=d.css(this[e],"display");g!=="none"&&!d._data(this[e],"olddisplay")&&d._data(this[e],"olddisplay",g)}for(e=0;e<f;e++)this[e].style.display="none";return this},_toggle:d.fn.toggle,toggle:function(a,b,c){var e=typeof a==="boolean";d.isFunction(a)&&d.isFunction(b)?this._toggle.apply(this,arguments):a==null||e?this.each(function(){var b=e?a:d(this).is(":hidden");d(this)[b?"show":"hide"]()}):this.animate(ce("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,e){var f=d.speed(b,c,e);if(d.isEmptyObject(a))return this.each(f.complete);return this[f.queue===!1?"each":"queue"](function(){var b=d.extend({},f),c,e=this.nodeType===1,g=e&&d(this).is(":hidden"),h=this;for(c in a){var i=d.camelCase(c);c!==i&&(a[i]=a[c],delete a[c],c=i);if(a[c]==="hide"&&g||a[c]==="show"&&!g)return b.complete.call(this);if(e&&(c==="height"||c==="width")){
 b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(d.css(this,"display")==="inline"&&d.css(this,"float")==="none")if(d.support.inlineBlockNeedsLayout){var j=cf(this.nodeName);j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)}else this.style.display="inline-block"}d.isArray(a[c])&&((b.specialEasing=b.specialEasing||{})[c]=a[c][1],a[c]=a[c][0])}b.overflow!=null&&(this.style.overflow="hidden"),b.curAnim=d.extend({},a),d.each(a,function(c,e){var f=new d.fx(h,b,c);if(ca.test(e))f[e==="toggle"?g?"show":"hide":e](a);else{var i=cb.exec(e),j=f.cur();if(i){var k=parseFloat(i[2]),l=i[3]||(d.cssNumber[c]?"":"px");l!=="px"&&(d.style(h,c,(k||1)+l),j=(k||1)/f.cur()*j,d.style(h,c,j+l)),i[1]&&(k=(i[1]==="-="?-1:1)*k+j),f.custom(j,k,l)}else f.custom(j,e,"")}});return!0})},stop:function(a,b){var c=d.timers;a&&this.queue([]),this.each(function(){for(var a=c.length-1;a>=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.d
 equeue();return this}}),d.each({slideDown:ce("show",1),slideUp:ce("hide",1),slideToggle:ce("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.
 fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=d.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||(d.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!cc&&(cc=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.
 curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||d.fx.stop()},interval:13,stop:function(){clearInterval(cc),cc=null},speeds:{slow:600,fast:200,_def
 ault:400},step:{opacity:function(a){d.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),d.expr&&d.expr.filters&&(d.expr.filters.animated=function(a){return d.grep(d.timers,function(b){return a===b.elem}).length});var cg=/^t(?:able|d|h)$/i,ch=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?d.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,g=f.documentElement;if(!c||!d.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=f.body,i=ci(f),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||d.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||d.support.boxMode
 l&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:d.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);d.offset.initialize();var c,e=b.offsetParent,f=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(d.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===e&&(l+=b.offsetTop,m+=b.offsetLeft,d.offset.doesNotAddBorder&&(!d.offset.doesAddBorderForTableAndCells||!cg.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),f=e,e=b.offsetParent),d.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeft
 Width)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;d.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},d.offset={initialize:function(){var a=c.body,b=c.createElement("div"),e,f,g,h,i=parseFloat(d.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position=
 "fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=(e==="absolute"||e==="fixed")&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(
 a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=ch.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!ch.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=ci(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=ci(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,
 c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}}),a.jQuery=a.$=d})(window);
\ No newline at end of file


[48/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JspServlet.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JspServlet.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JspServlet.java
new file mode 100644
index 0000000..7e2792f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JspServlet.java
@@ -0,0 +1,458 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.osgi.framework.Bundle;
+
+import javax.servlet.*;
+import javax.servlet.descriptor.JspConfigDescriptor;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.util.*;
+
+/**
+ * <p>
+ * JSPServlet wraps the Apache Jasper Servlet making it appropriate for running in an OSGi environment under the Http Service.
+ * The Jasper JSPServlet makes use of the Thread Context Classloader to support compile and runtime of JSPs and to accommodate running
+ * in an OSGi environment, a Bundle is used to provide the similar context normally provided by the webapp.
+ * </p>
+ * <p>
+ * The Jasper Servlet will search the ServletContext to find JSPs, tag library descriptors, and additional information in the web.xml
+ * as per the JSP 2.0 specification. In addition to the ServletContext this implementation will search the bundle (but not attached
+ * fragments) for matching resources in a manner consistent with the Http Service's notion of a resource. By using alias and bundleResourcePath the JSP lookup should be in
+ * line with the resource mapping specified in {102.4} of the OSGi HttpService.
+ * </p>
+ * <p>
+ * TLD discovery is slightly different, to clarify it occurs in one of three ways:
+ * <ol>
+ * <li> declarations found in /WEB-INF/web.xml (found either on the bundleResourcePath in the bundle or in the ServletContext)</li>
+ * <li> tld files found under /WEB-INF (found either on the bundleResourcePath in the bundle or in the ServletContext)</li>
+ * <li> tld files found in jars on the Bundle-Classpath (see org.eclipse.equinox.internal.jsp.jasper.JSPClassLoader)</li>
+ * </ol>
+ * </p>
+ * <p>
+ * Other than the setting and resetting of the thread context classloader and additional resource lookups in the bundle the JSPServlet
+ * is behaviourally consistent with the JSP 2.0 specification and regular Jasper operation.
+ * </p>
+ */
+public class JspServlet extends HttpServlet {
+
+    private static class BundlePermissionCollection extends PermissionCollection {
+        private Bundle bundle;
+
+        public BundlePermissionCollection(Bundle bundle) {
+            this.bundle = bundle;
+            super.setReadOnly();
+        }
+
+        public void add(Permission permission) {
+             throw new SecurityException();
+        }
+
+        public boolean implies(Permission permission) {
+              return bundle.hasPermission(permission);
+        }
+
+        public Enumeration elements() {
+             return Collections.enumeration(Collections.EMPTY_LIST);
+        }
+    }
+    
+    private Servlet jspServlet = new org.apache.jasper.servlet.JspServlet();
+    Bundle bundle;
+    private BundlePermissionCollection bundlePermissions;
+    private URLClassLoader jspLoader;
+    private String bundleResourcePath;
+    private String alias;
+    private UIResourceRegistry uiResourceRegistry;
+
+    public JspServlet(Bundle bundle, UIResourceRegistry uiResourceRegistry, String alias) {
+        this.bundle = bundle;
+        this.uiResourceRegistry = uiResourceRegistry;
+        this.alias = (alias == null || alias.equals("/")) ? null : alias; //$NON-NLS-1$
+        try {
+            if (System.getSecurityManager() != null) {
+                bundlePermissions = new BundlePermissionCollection(bundle);
+            }
+            jspLoader =  new JspClassLoader(bundle, bundlePermissions);
+        } catch (Throwable e) {
+            e.printStackTrace();  
+        }
+    }
+
+    public JspServlet(Bundle bundle, UIResourceRegistry uiResourceRegistry) {
+        this(bundle, uiResourceRegistry, null);
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        ClassLoader original = Thread.currentThread().getContextClassLoader();
+        try {
+            Thread.currentThread().setContextClassLoader(jspLoader);
+            jspServlet.init(new ServletConfigAdaptor(config));
+            // If a SecurityManager is set we need to override the permissions collection set in Jasper's JSPRuntimeContext
+            			if (System.getSecurityManager() != null) {
+            				try {
+            					Field jspRuntimeContextField = jspServlet.getClass().getDeclaredField("rctxt"); //$NON-NLS-1$
+            					jspRuntimeContextField.setAccessible(true);
+            					Object jspRuntimeContext = jspRuntimeContextField.get(jspServlet);
+            					Field permissionCollectionField = jspRuntimeContext.getClass().getDeclaredField("permissionCollection"); //$NON-NLS-1$
+            					permissionCollectionField.setAccessible(true);
+            					permissionCollectionField.set(jspRuntimeContext, bundlePermissions);
+            				} catch (Exception e) {
+            					throw new ServletException("Cannot initialize JSPServlet. Failed to set JSPRuntimeContext permission collection."); //$NON-NLS-1$
+            				}
+            			}
+        } finally {
+            Thread.currentThread().setContextClassLoader(original);
+        }
+    }
+
+    public void destroy() {
+        ClassLoader original = Thread.currentThread().getContextClassLoader();
+        try {
+            Thread.currentThread().setContextClassLoader(jspLoader);
+            jspServlet.destroy();
+        } finally {
+            Thread.currentThread().setContextClassLoader(original);
+        }
+    }
+
+    public void service(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException,
+                   IOException {
+        String pathInfo = request.getPathInfo();
+        if (pathInfo != null && pathInfo.startsWith("/WEB-INF/")) { //$NON-NLS-1$
+            response.sendError(HttpServletResponse.SC_NOT_FOUND);
+            return;
+        }
+
+        ClassLoader original = Thread.currentThread().getContextClassLoader();
+        try {
+            Thread.currentThread().setContextClassLoader(jspLoader);
+            jspServlet.service(request, response);
+        } finally {
+            Thread.currentThread().setContextClassLoader(original);
+        }
+    }
+
+    public ServletConfig getServletConfig() {
+        return jspServlet.getServletConfig();
+    }
+
+    public String getServletInfo() {
+        return jspServlet.getServletInfo();
+    }
+
+    public class ServletConfigAdaptor implements ServletConfig {
+        private ServletConfig config;
+        private ServletContext context;
+
+        public ServletConfigAdaptor(ServletConfig config) {
+            this.config = config;
+            this.context = new ServletContextAdaptor(config.getServletContext());
+        }
+
+        public String getInitParameter(String arg0) {
+            return config.getInitParameter(arg0);
+        }
+
+        public Enumeration getInitParameterNames() {
+            return config.getInitParameterNames();
+        }
+
+        public ServletContext getServletContext() {
+            return context;
+        }
+
+        public String getServletName() {
+            return config.getServletName();
+        }
+    }
+
+    public class ServletContextAdaptor implements ServletContext {
+        private ServletContext delegate;
+
+        public ServletContextAdaptor(ServletContext delegate) {
+            this.delegate = delegate;
+        }
+
+        public URL getResource(String name) throws MalformedURLException {
+            if (alias != null && name.startsWith(alias)) {
+                name = name.substring(alias.length());
+            }
+
+            URL url = uiResourceRegistry.getUIResource(name);
+            if (url != null) {
+                return url;
+            }
+
+            return delegate.getResource(name);
+        }
+
+        public InputStream getResourceAsStream(String name) {
+            try {
+                URL resourceURL = getResource(name);
+                if (resourceURL != null) {
+                    return resourceURL.openStream();
+                }
+            } catch (IOException e) {
+                log("Error opening stream for resource '" + name + "'",
+                    e); //$NON-NLS-1$ //$NON-NLS-2$
+            }
+            return null;
+        }
+
+        public Set getResourcePaths(String name) {
+            Set<String> result = delegate.getResourcePaths(name);
+            Set<String> resultFromProviders = uiResourceRegistry.getUIResourcePaths(name);
+
+            //Merging two sets.
+            if (resultFromProviders != null && result != null) {
+                for (String resourcePath : resultFromProviders) {
+                    result.add(resourcePath);
+                }
+                return result;
+            } else if (resultFromProviders != null) {
+                return resultFromProviders;
+            } else {
+                return result;
+            }
+
+        }
+
+        public RequestDispatcher getRequestDispatcher(String arg0) {
+            return delegate.getRequestDispatcher(arg0);
+        }
+
+        public Object getAttribute(String arg0) {
+            return delegate.getAttribute(arg0);
+        }
+
+        public Enumeration getAttributeNames() {
+            return delegate.getAttributeNames();
+        }
+
+        public ServletContext getContext(String arg0) {
+            return delegate.getContext(arg0);
+        }
+
+        public String getInitParameter(String arg0) {
+            return delegate.getInitParameter(arg0);
+        }
+
+        public Enumeration getInitParameterNames() {
+            return delegate.getInitParameterNames();
+        }
+
+	public boolean setInitParameter(String s, String s1) {
+            return delegate.setInitParameter(s,s1);
+        }
+
+        public int getMajorVersion() {
+            return delegate.getMajorVersion();
+        }
+
+        public String getMimeType(String arg0) {
+            return delegate.getMimeType(arg0);
+        }
+
+        public int getMinorVersion() {
+            return delegate.getMinorVersion();
+        }
+
+	 public int getEffectiveMajorVersion() {
+            return delegate.getEffectiveMajorVersion();
+        }
+
+        public int getEffectiveMinorVersion() {
+            return delegate.getEffectiveMinorVersion();
+        }
+
+        public RequestDispatcher getNamedDispatcher(String arg0) {
+            return delegate.getNamedDispatcher(arg0);
+        }
+
+        public String getRealPath(String arg0) {
+            return delegate.getRealPath(arg0);
+        }
+
+        public String getServerInfo() {
+            return delegate.getServerInfo();
+        }
+
+        /**
+         * @deprecated *
+         */
+        public Servlet getServlet(String arg0) throws ServletException {
+            return delegate.getServlet(arg0);
+        }
+
+        public String getServletContextName() {
+            return delegate.getServletContextName();
+        }
+
+	public ServletRegistration.Dynamic addServlet(String s, String s1) {
+            return delegate.addServlet(s, s1);
+        }
+
+        public ServletRegistration.Dynamic addServlet(String s, Servlet servlet) {
+            return delegate.addServlet(s, servlet);
+        }
+
+        public ServletRegistration.Dynamic addServlet(String s, Class<? extends Servlet> aClass) {
+            return delegate.addServlet(s, aClass);
+        }
+
+        public <T extends Servlet> T createServlet(Class<T> tClass) throws ServletException {
+            return delegate.createServlet(tClass);
+        }
+
+        public ServletRegistration getServletRegistration(String s) {
+            return delegate.getServletRegistration(s);
+        }
+
+        public Map<String, ? extends ServletRegistration> getServletRegistrations() {
+            return delegate.getServletRegistrations();
+        }
+
+        public FilterRegistration.Dynamic addFilter(String s, String s1) {
+            return delegate.addFilter(s,s1);
+        }
+
+        public FilterRegistration.Dynamic addFilter(String s, Filter filter) {
+            return delegate.addFilter(s, filter);
+        }
+
+        public FilterRegistration.Dynamic addFilter(String s, Class<? extends Filter> aClass) {
+            return delegate.addFilter(s, aClass);
+        }
+
+        public <T extends Filter> T createFilter(Class<T> tClass) throws ServletException {
+            return delegate.createFilter(tClass);
+        }
+
+        public FilterRegistration getFilterRegistration(String s) {
+            return delegate.getFilterRegistration(s);
+        }
+
+        public Map<String, ? extends FilterRegistration> getFilterRegistrations() {
+            return delegate.getFilterRegistrations();
+        }
+
+        public SessionCookieConfig getSessionCookieConfig() {
+            return delegate.getSessionCookieConfig();
+        }
+
+        public void setSessionTrackingModes(Set<SessionTrackingMode> sessionTrackingModes) throws IllegalStateException, IllegalArgumentException {
+            delegate.setSessionTrackingModes(sessionTrackingModes);
+        }
+
+        public Set<SessionTrackingMode> getDefaultSessionTrackingModes() {
+            return delegate.getDefaultSessionTrackingModes();
+        }
+
+        public Set<SessionTrackingMode> getEffectiveSessionTrackingModes() {
+            return delegate.getEffectiveSessionTrackingModes();
+        }
+
+        public void addListener(Class<? extends EventListener> aClass) {
+            delegate.addListener(aClass);
+        }
+
+        public void addListener(String s) {
+            delegate.addListener(s);
+        }
+
+        public <T extends EventListener> void addListener(T t) {
+            delegate.addListener(t);
+        }
+
+        public <T extends EventListener> T createListener(Class<T> tClass) throws ServletException {
+            return delegate.createListener(tClass);
+        }
+
+        public void declareRoles(String... strings) {
+            delegate.declareRoles(strings);
+        }
+
+        public ClassLoader getClassLoader() {
+            return delegate.getClassLoader();
+        }
+
+        public JspConfigDescriptor getJspConfigDescriptor() {
+            return delegate.getJspConfigDescriptor();
+        }
+
+        /**
+         * @deprecated *
+         */
+        public Enumeration getServletNames() {
+            return delegate.getServletNames();
+        }
+
+        /**
+         * @deprecated *
+         */
+        public Enumeration getServlets() {
+            return delegate.getServlets();
+        }
+
+        /**
+         * @deprecated *
+         */
+        public void log(Exception arg0, String arg1) {
+            delegate.log(arg0, arg1);
+        }
+
+        public void log(String arg0, Throwable arg1) {
+            delegate.log(arg0, arg1);
+        }
+
+        public void log(String arg0) {
+            delegate.log(arg0);
+        }
+
+        public void removeAttribute(String arg0) {
+            delegate.removeAttribute(arg0);
+        }
+
+        public void setAttribute(String arg0, Object arg1) {
+            delegate.setAttribute(arg0, arg1);
+        }
+
+        // Added in Servlet 2.5
+        public String getContextPath() {
+            try {
+                Method getContextPathMethod =
+                        delegate.getClass().getMethod("getContextPath", null); //$NON-NLS-1$
+                return (String) getContextPathMethod.invoke(delegate, null);
+            } catch (Exception e) {
+                // ignore
+            }
+            return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/MenuAdminClient.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/MenuAdminClient.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/MenuAdminClient.java
new file mode 100644
index 0000000..ab51b62
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/MenuAdminClient.java
@@ -0,0 +1,735 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.wso2.carbon.ui.deployment.beans.BreadCrumbItem;
+import org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions;
+import org.wso2.carbon.ui.deployment.beans.Menu;
+import org.wso2.carbon.utils.ServerConstants;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.*;
+
+public class MenuAdminClient {
+    private static Log log = LogFactory.getLog(MenuAdminClient.class);
+    private Menu[] menus;
+    private StringBuffer menuContent;
+    private Map<String, Menu> parentMenuItems;
+    private Map<String, ArrayList<Menu>> childMenuItems;
+    private Map<String, String> breadcrumbMap = new HashMap<String, String>();
+    //eg: holds ../service-mgt/index.jsp : region1,services_list_menu
+    private Map<String, String> indexPageBreadcrumbParamMap;
+    public static final String USER_MENU_ITEMS = "UserMenuItems";
+    public static final String USER_CUSTOM_MENU_ITEMS = "UserCustomMenuItems";
+    public static final String USER_MENU_ITEMS_FILTERED = "UserMenuItemsFiltered";
+    
+    public MenuAdminClient() {
+
+    }
+
+    public Map<String, String> getBreadcrumbMap() {
+        return breadcrumbMap;
+    }
+
+    public void setBreadcrumbMap(HashMap<String, String> breadcrumbMap) {
+        this.breadcrumbMap = breadcrumbMap;
+    }
+
+    /**
+     * Calls the OSGi service for UI & retrieves Menu definitions
+     */
+    private void populateMenuDefinitionsFromOSGiService(String loggedInUserName
+            ,boolean isSuperTenant
+    		,ArrayList<String> userPermission
+    		,HttpServletRequest request) {
+
+    	if(loggedInUserName != null){
+    		//A user has logged in, get menus from user's session
+            Menu[] userMenus = (Menu[]) request.getSession().getAttribute(USER_MENU_ITEMS);
+            if (userMenus != null) {
+                Set<Menu> menuList = new LinkedHashSet<Menu>();
+                menuList.addAll(Arrays.<Menu>asList(userMenus));
+                Menu[] customMenus = (Menu[]) request.getSession().getAttribute(USER_CUSTOM_MENU_ITEMS);
+                if (customMenus != null) {
+                    menuList.addAll(Arrays.<Menu>asList(customMenus));
+                }
+                menus = menuList.toArray(new Menu[menuList.size()]);
+            }
+            if (menus == null){
+                setDefaultMenus(loggedInUserName, isSuperTenant, userPermission, request);
+            }
+            
+    		String filtered = (String)request.getSession().getAttribute(MenuAdminClient.USER_MENU_ITEMS_FILTERED);
+    		if("false".equals(filtered)){
+    			CarbonUIDefinitions o = new CarbonUIDefinitions();
+    			Menu[] filteredMenus = o.getMenuDefinitions(loggedInUserName, isSuperTenant, userPermission, request, menus);
+    			menus = filteredMenus;
+    			request.getSession().setAttribute(USER_MENU_ITEMS,menus);
+    		}
+    		if(menus != null){
+    			if(log.isDebugEnabled()){
+    				log.debug("Loaded menu items from user session");
+    			}
+    			return;
+    		}
+    	}
+
+        setDefaultMenus(loggedInUserName, isSuperTenant, userPermission, request);
+    }
+
+    private void setDefaultMenus(String loggedInUserName,
+                                 boolean isSuperTenant,
+                                 ArrayList<String> userPermission,
+                                 HttpServletRequest request) {
+        BundleContext bundleContext = CarbonUIUtil.getBundleContext();
+        if (bundleContext != null) {
+            ServiceReference reference = bundleContext.getServiceReference(CarbonUIDefinitions.class.getName());
+            CarbonUIDefinitions carbonUIDefinitions;
+            if (reference != null) {
+                carbonUIDefinitions = (CarbonUIDefinitions) bundleContext.getService(reference);
+                Menu[] userMenus = carbonUIDefinitions.getMenuDefinitions(loggedInUserName,
+                            isSuperTenant, userPermission,request);
+                if (userMenus != null) {
+                    Set<Menu> menuList = new LinkedHashSet<Menu>();
+                    menuList.addAll(Arrays.<Menu>asList(userMenus));
+                    Menu[] customMenus =
+                            (Menu[]) request.getSession().getAttribute(USER_CUSTOM_MENU_ITEMS);
+                    if (customMenus != null) {
+                        menuList.addAll(Arrays.<Menu>asList(customMenus));
+                    }
+                    menus = menuList.toArray(new Menu[menuList.size()]);
+                	if (log.isDebugEnabled()) {
+                        log.debug("Found exiting menu items in OSGI context");
+                    }
+                }
+            }
+        }
+    }
+
+    private String findNavigationPathFromRoot(String lastMenuItem, String path) {
+        for (int a = 0; a < menus.length; a++) {
+            Menu menu = menus[a];
+            if (log.isDebugEnabled()) {
+                log.debug(a + " : " + lastMenuItem + " : " + menu.getId());
+            }
+            if (menu.getId() != null && menu.getId().equals(lastMenuItem)) {
+                //path = ":"+menu.getI18nKey()+"#"+menu.getI18nBundle() + path;
+                path = "," + menu.getId() + path;
+                String parentMenuId = menu.getParentMenu();
+                if (parentMenuId.trim().length() > 0) {
+                    path = findNavigationPathFromRoot(parentMenuId, path);
+                } else {
+                    break;
+                }
+            }
+        }
+        return path;
+    }
+
+    /**
+     *
+     */
+    public void setBreadCrumbMap(HttpServletRequest request) {
+        Locale locale;
+        HashMap<String, BreadCrumbItem> breadCrumbs = new HashMap<String, BreadCrumbItem>();
+        if (menus != null) {
+            for (int a = 0; a < menus.length; a++) {
+                Menu menu = menus[a];
+                if (menu.getId() != null) {
+                    BreadCrumbItem bc = new BreadCrumbItem();
+                    CarbonUIUtil.setLocaleToSession(request);
+
+                    locale = CarbonUIUtil.getLocaleFromSession(request);
+                    java.util.ResourceBundle bundle = null;
+                    try {
+                    	if(menu.getI18nBundle() != null){
+                            bundle = java.util.ResourceBundle.getBundle(menu.getI18nBundle(), locale);
+                    	}
+                    } catch (java.util.MissingResourceException e) {
+                        if (log.isDebugEnabled()) {
+                            log.debug("Cannot find resource bundle : " + menu.getI18nBundle());
+                        }
+                    }
+
+                    String menuText = menu.getI18nKey();
+                    if (bundle != null) {
+                        String tmp = null;
+                        try {
+                        	if(menu.getI18nKey() != null){
+                                tmp = bundle.getString(menu.getI18nKey());                        		
+                        	}
+                        } catch (java.util.MissingResourceException e) {
+                            //Missing key should not be a blocking factor for UI rendering
+                            if (log.isDebugEnabled()) {
+                                log.debug("Cannot find resource for key :" + menu.getI18nKey());
+                            }
+                        }
+                        if (tmp != null) {
+                            menuText = tmp;
+                        }
+                    }
+
+                    bc.setConvertedText(menuText);
+                    bc.setI18nBundle(menu.getI18nBundle());
+                    bc.setI18nKey(menu.getI18nKey());
+                    bc.setId(menu.getId());
+                    bc.setLink(menu.getLink() + "?region=" + menu.getRegion() + "&amp;item=" +
+                            menu.getId() + (menu.getUrlParameters() != null ?
+                            "&amp;" + menu.getUrlParameters() : "") + "&amp;ordinal=0");
+                    breadCrumbs.put(menu.getId(), bc);
+                }
+            }
+        }
+        request.getSession().setAttribute("breadcrumbs", breadCrumbs);
+    }
+
+    /**
+     * Returns left hand side menu as a String
+     *
+     * @param region
+     */
+    public String getMenuContent(String region, HttpServletRequest request) {
+        boolean authenticated = isAuthenticated(request);
+        ArrayList<String> userPermission = new ArrayList<String>();
+
+        String loggedInUserName = null;
+        boolean isSuperTenant = false;
+        if (authenticated) {
+            loggedInUserName = (String) request.getSession().getAttribute(CarbonSecuredHttpContext.LOGGED_USER);
+            userPermission = (ArrayList<String>) request.getSession().getAttribute(ServerConstants.USER_PERMISSIONS);
+            isSuperTenant = CarbonUIUtil.isSuperTenant(request);
+        }
+        
+
+        populateMenuDefinitionsFromOSGiService(loggedInUserName,isSuperTenant,userPermission,request);
+        //populate();
+        checkForIndexPageBreadcrumbParamMap(request);
+        if (menus != null && menus.length > 0) {
+            if (log.isDebugEnabled()) {
+                log.debug("Size of menu items for region : " + region + " is " + menus.length);
+                for (int a = 0; a < menus.length; a++) {
+                    log.debug(menus[a]);
+                }
+            }
+
+            menuContent = new StringBuffer();
+            appendMenuHeader();
+            if (region.equals("region1")) {
+                Locale locale =CarbonUIUtil.getLocaleFromSession(request);
+                appendHomeLink(locale);
+            }
+
+            //build a hierarchy of MenuItems
+            parentMenuItems = new HashMap<String, Menu>();
+            childMenuItems = new HashMap<String, ArrayList<Menu>>();
+
+            for (int a = 0; a < menus.length; a++) {
+                boolean display = false;
+                if (!authenticated) {
+                    if (!menus[a].getRequireAuthentication()) {
+                        display = true;
+                    }
+                } else {
+                    //display all menu items for logged in user
+                    display = true;
+                }
+
+                if (region.equals(menus[a].getRegion()) && display) {
+                    if ("".equals(menus[a].getParentMenu())) {
+                        parentMenuItems.put(menus[a].getId(), menus[a]);
+                    } else {
+                        ArrayList<Menu> childMenus = (ArrayList) childMenuItems.get(menus[a].getParentMenu());
+                        if (childMenus != null && childMenus.size() > 0) {
+                            childMenus.add(menus[a]);
+                        } else {
+                            ArrayList<Menu> tmp = new ArrayList();
+                            tmp.add(menus[a]);
+                            childMenuItems.put(menus[a].getParentMenu(), tmp);
+                        }
+                    }
+                }
+            }
+
+            //Iterate through the parent menu items & build the menu style
+            String[] sortedParentMenuIds = sortMenuItems(parentMenuItems);
+            for (int a = 0; a < sortedParentMenuIds.length; a++) {
+                String key = sortedParentMenuIds[a];
+                Menu menu = (Menu) parentMenuItems.get(key);
+                ArrayList childMenusForParent = (ArrayList) childMenuItems.get(menu.getId());
+                if(childMenusForParent != null){ //if no child menu items, do not print the parent
+                    menuContent.append(getHtmlForMenuItem(menu, request));
+                    prepareHTMLForChildMenuItems(menu.getId(), request);
+                }
+            }
+            //Old way of generating menu items without ordering
+/*
+			Iterator itrParentMenuKeys = parentMenuItems.keySet().iterator();
+			while(itrParentMenuKeys.hasNext()){
+				String key = (String)itrParentMenuKeys.next();
+				Menu menu = (Menu)parentMenuItems.get(key);
+				menuContent.append(getHtmlForMenuItem(menu,locale));
+				prepareHTMLForChildMenuItems(key,locale);
+			}
+*/
+            appendMenuFooter();
+            request.getSession().setAttribute(region + "menu-id-breadcrumb-map", breadcrumbMap);
+            request.getSession().setAttribute("index-page-breadcrumb-param-map", indexPageBreadcrumbParamMap);
+
+            return menuContent.toString();
+        } else {
+            //no menu, return empty String
+            return "";
+        }
+    }
+
+    private void checkForIndexPageBreadcrumbParamMap(HttpServletRequest request) {
+        HashMap<String, String> tmp = (HashMap<String, String>) request.getSession().getAttribute("index-page-breadcrumb-param-map");
+        if (tmp != null) {
+            this.indexPageBreadcrumbParamMap = tmp;
+        } else {
+            this.indexPageBreadcrumbParamMap = new HashMap<String, String>();
+        }
+    }
+
+    /**
+     * check for authenticated session
+     *
+     * @param request
+     * @return
+     */
+    private boolean isAuthenticated(HttpServletRequest request) {
+        Boolean authenticatedObj = (Boolean) request.getSession().getAttribute("authenticated");
+        boolean authenticated = false;
+        if (authenticatedObj != null) {
+            authenticated = authenticatedObj.booleanValue();
+        }
+        return authenticated;
+    }
+
+    /**
+     * @param menuItems
+     * @return
+     */
+    private String[] sortMenuItems(Map menuItems) {
+        Iterator itrMenuKeys = menuItems.keySet().iterator();
+        int[] menuOrder = new int[menuItems.size()];
+        String[] menuIds = new String[menuItems.size()];
+
+        int index = 0;
+        while (itrMenuKeys.hasNext()) {
+            String key = (String) itrMenuKeys.next();
+            Menu menu = (Menu) menuItems.get(key);
+            int ordinal;
+            try {
+                ordinal = Integer.parseInt(menu.getOrder());
+            } catch (NumberFormatException e) {
+                //if provided value is NaN, this menu item deserves the last position ;-)
+                ordinal = 200;
+                log.debug("Hey...whoever defined the menu item : " + menu.getId()
+                        + ",please provide a integer value for 'order'", e);
+            }
+            menuOrder[index] = ordinal;
+            menuIds[index] = menu.getId();
+            index++;
+        }
+        sortArray(menuOrder, menuIds);
+        return menuIds;
+    }
+
+    /**
+     * @param parentMenuId
+     */
+    private void prepareHTMLForChildMenuItems(String parentMenuId, HttpServletRequest request) {
+        Locale locale = request.getLocale();
+        ArrayList childMenusForParent = (ArrayList) childMenuItems.get(parentMenuId);
+        if (childMenusForParent != null) {
+            //create a hashmap of child Menu items for parent
+            Iterator itrChildMenusForParent = childMenusForParent.iterator();
+            HashMap childMenus = new HashMap();
+            for (; itrChildMenusForParent.hasNext();) {
+                Menu menu = (Menu) itrChildMenusForParent.next();
+                childMenus.put(menu.getId(), menu);
+            }
+            String[] sortedMenuIds = sortMenuItems(childMenus);
+
+            if (sortedMenuIds.length > 0) {
+                menuContent.append("<li class=\"normal\">");
+                menuContent.append("<ul class=\"sub\">");
+                for (int a = 0; a < sortedMenuIds.length; a++) {
+                    Menu menu = (Menu) childMenus.get(sortedMenuIds[a]);
+                    
+                    ArrayList childs = (ArrayList) childMenuItems.get(menu.getId());
+                    if(childs == null){
+                    	if(! menu.getLink().equals("#") && menu.getLink().trim().length() > 0){
+                    		//This is the last menu item, print it
+                    		menuContent.append(getHtmlForMenuItem(menu, request));
+                    	}                    	
+                    }else{
+                    	//If no childs & current menu item does not contain an link
+                    	//do not print                    
+                        menuContent.append(getHtmlForMenuItem(menu, request));
+                        prepareHTMLForChildMenuItems(menu.getId(), request);                    	
+                    }                 
+                }
+                menuContent.append("</ul>");
+                menuContent.append("</li>");
+            }
+        }
+    }
+
+    /**
+     * @param menu
+     * @return
+     */
+    private String getHtmlForMenuItem(Menu menu, HttpServletRequest request) {
+        Locale locale;
+        CarbonUIUtil.setLocaleToSession(request);
+        locale = CarbonUIUtil.getLocaleFromSession(request);
+        java.util.ResourceBundle bundle = null;
+        try {
+            if (menu.getI18nBundle() != null) {
+                bundle = java.util.ResourceBundle.getBundle(menu.getI18nBundle(), locale);
+            }
+        } catch (MissingResourceException e) {
+            if(log.isDebugEnabled()){
+                log.debug("Cannot find resource bundle : "+menu.getI18nBundle());
+            }
+        }
+
+        String menuText = menu.getI18nKey();
+        if (bundle != null) {
+            String tmp = null;
+            try {
+                tmp = bundle.getString(menu.getI18nKey());
+            } catch (MissingResourceException e) {
+                //Missing key should not be a blocking factor for UI rendering
+
+                if(log.isDebugEnabled()){
+                    log.debug("Cannot find resource for key :"+menu.getI18nKey());
+                }
+            }
+            if (tmp != null) {
+                menuText = tmp;
+            }
+        }
+
+        String html = "";
+        if (menu.getParentMenu().trim().length() == 0
+                || menu.getLink().trim().length() == 0) {
+            html = "<li id=\""
+            	+menu.getRegion()
+            	+"_"+ menu.getId()
+            	+"\" class=\"menu-header\"  onclick=\"mainMenuCollapse(this.childNodes[0])\" style=\"cursor:pointer\">" 
+            	+ "<img src=\"../admin/images/up-arrow.gif\" " +
+            			"class=\"mMenuHeaders\" id=\""+menu.getRegion()+"_"+ menu.getId()+"\"/>"
+            	+ menuText            	
+            	+ "</li>";
+        } else {
+        	String link = menu.getLink() + "?region=" + menu.getRegion() + "&amp;item=" + menu.getId();
+
+        	//if user has set url parameters, append it to link
+        	String urlParameters = menu.getUrlParameters();
+        	if(urlParameters != null && urlParameters.trim().length() > 0){
+        		link = link +"&amp;"+menu.getUrlParameters();
+        	}
+        	
+            String iconPath = "../admin/images/default-menu-icon.gif";
+            if (menu.getIcon() != null && menu.getIcon().trim().length() > 0) {
+                iconPath = menu.getIcon();
+            }
+            String breadCrumbPath = findNavigationPathFromRoot(menu.getId(), "");
+            breadCrumbPath = breadCrumbPath.replaceFirst(",", "");
+            breadcrumbMap.put(menu.getRegion().trim() + "-" + menu.getId().trim(), breadCrumbPath);
+            String params = menu.getRegion().trim() + "," + menu.getId().trim();
+            indexPageBreadcrumbParamMap.put(link, params);
+
+            String style = "";
+            if (menu.getLink().equals("#")) {
+                style = "menu-disabled-link";
+                html = "<li class=\"" + style + "\" style=\"background-image: url(" + iconPath + ");\">"+ menuText + "</li>" + "\n";
+            } else {
+                style = "menu-default";
+                html = "<li><a href=\"" + link + "\" class=\"" + style + "\" style=\"background-image: url(" + iconPath + ");\">" + menuText + "</a></li>" + "\n";
+            }           
+            
+            //html = "<li><a href=\"" + menu.getLink() + "?region=" + menu.getRegion() + "&amp;item=" + menu.getId() + "\" class=\"" + style + "\" style=\"background-image: url(" + iconPath + ");\">" + menuText + "</a></li>" + "\n";
+        }
+        return html;
+    }
+
+
+    private void appendHomeLink(Locale locale) {
+    	String homeText = CarbonUIUtil.geti18nString("component.home", "org.wso2.carbon.i18n.Resources", locale);
+        menuContent.append("<li><a href=\""+ CarbonUIUtil.getHomePage() +"\" class=\"menu-home\">"+homeText+"</a></li>");
+    }
+
+    /**
+     *
+     */
+    private void appendMenuHeader() {
+        menuContent.append("<div id=\"menu\">");
+        menuContent.append(" <ul class=\"main\">");
+    }
+
+    /**
+     *
+     */
+    private void appendMenuFooter() {
+        menuContent.append(" </ul>");
+        menuContent.append("</div>");
+    }
+
+    /**
+     * @param a
+     * @param names
+     */
+    static void sortArray(int[] a, String[] names) {
+        for (int i = 0; i < a.length - 1; i++) {
+            for (int j = i + 1; j < a.length; j++) {
+                if (a[i] > a[j]) {
+                    int temp = a[i];
+                    String name = names[i];
+                    a[i] = a[j];
+                    names[i] = names[j];
+                    a[j] = temp;
+                    names[j] = name;
+                }
+            }
+        }
+    }
+
+
+    /**
+     * To be used only for testing purposes
+     *
+     * @param region
+     * @param locale
+     * @return
+     */
+    /*
+     static void printArray(int[] a) {
+         for (int i = 0; i < a.length; i++)
+             System.out.print(" " + a[i]);
+         System.out.print("\n");
+     }
+
+     static void printArray(String[] a) {
+         for (int i = 0; i < a.length; i++)
+             System.out.print(" " + a[i]);
+         System.out.print("\n");
+     }
+
+     public static void main(String[] args) {
+         int[] num = {1,7,4,3,6};
+         String[] names = {"nandika","dinuka","prabath","sumedha","chamara"};
+         printArray(num);
+         sortArray(num,names);
+         printArray(num);
+         printArray(names);
+     }
+
+     public String getStaticMenuContent(String region,Locale locale){
+         String menuContent = "";
+         if("region1".equals(region)){
+             menuContent =
+                 "<div id=\"menu\">"+
+                 "<div class=\"menu-content\">"+
+                 " <ul class=\"main\">"+
+                 "	<li class=\"home\"><a href=\"../server-admin/index.jsp\">Home</a></li>"+
+                 "	<li class=\"manage\">Manage</li>"+
+                 "	<li class=\"normal\">"+
+                 "	<ul class=\"sub\">"+
+                 "		<li class=\"list-ds\"><a href=\"../service-mgt/service_mgt.jsp\">Services</a></li>"+
+                 "		<li>"+
+                 "		<ul class=\"sub\">"+
+                 "			<li class=\"list-ds\"><a href=\"../axis1/index.jsp\">Axis1</a></li>"+
+                 "			<li class=\"list-ds\"><a href=\"../bpel/index.jsp\">BPEL</a></li>"+
+                 "			<li class=\"list-ds\"><a href=\"../ejb/index.jsp\">EJB</a></li>"+
+                 "			<li class=\"list-ds\"><a href=\"../jaxws/index.jsp\">JAXWS</a></li>"+
+                 "			<li class=\"list-ds\"><a href=\"../pojo/index.jsp\">POJO</a></li>"+
+                 "			<li class=\"list-ds\"><a href=\"../spring/index.jsp\">JAXWS</a></li>"+
+                 "		</ul>"+
+                 "		</li>"+
+                 "		<li class=\"global\"><a href=\"../modulemgt/index.jsp\">Global Configurations</a></li>"+
+                 "		<li class=\"logging\"><a href=\"../log-admin/index.html\" >Logging</a></li>"+
+                 "		<li class=\"transports\"><a href=\"../transport-mgt/index.html\" >Transports</a></li>"+
+                 "		<li class=\"security\">Security</li>"+
+                 "		<li>"+
+                 "		<ul class=\"sub\">"+
+                 "			<li class=\"user-stores\"><a href=\"../security/userstoremgt/userstore-mgt.jsp\">User Stores</a></li>"+
+                 "			<li class=\"user-groups\"><a href=\"../security/usergroupmgt/usergroup-mgt.jsp\" >User Groups</a></li>"+
+                 "			<li class=\"keystores\"><a href=\"../security/keystoremgt/keystore-mgt.jsp\"  >Keystores</a></li>"+
+                 "			<li class=\"users\"><a href=\"../security/usermgt/user-mgt.jsp\"  >Users</a></li>"+
+                 "		</ul>"+
+                 "		</li>"+
+                 "		<li class=\"restart\"><a href=\"../server-admin/shutdown.jsp\">Shutdown/Restart</a></li>"+
+                 "		<li class=\"restart\"><a href=\"../viewflows/index.jsp\">Flows</a></li>"+
+                 "	</ul>"+
+                 "	</li>"+
+                 "	<li class=\"monitor\">Monitor</li>"+
+                 "	<li class=\"normal\">"+
+                 "	<ul class=\"sub\">"+
+                 "		<li class=\"logs\"><a href=\"../log-view/index.html\" >Logs</a></li>"+
+                 "		<li class=\"tracer\"><a href=\"../tracer/index.html\" >Tracer</a></li>"+
+                 "		<li class=\"stats\"><a href=\"../statistics/index.html\" >Statistics</a></li>"+
+                 "	</ul>"+
+                 "	</li>"+
+                 " </ul>"+
+                 "</div>"+
+                 "<div class=\"menu-bottom\"></div>"+
+                 "</div>";
+         }
+         return menuContent;
+     }
+
+     */
+
+    /*
+        public static void main(String[] args) {
+            MenuAdminClient a = new MenuAdminClient();
+            a.populate();
+            System.out.println(a.getMenuContent("region1",Locale.getDefault()));
+            //System.out.println(a.findNavigationPathFromRoot("security_user_stores",""));
+        }
+
+        private void populate(){
+            menus = new Menu[6];
+
+            menus[0] = new Menu();
+            menus[0].setId("root_home");
+            menus[0].setI18nKey("component.home");
+            menus[0].setI18nBundle("org.wso2.carbon.i18n.Resources");
+            menus[0].setParentMenu("");
+            menus[0].setLink("../home/link.html");
+            menus[0].setRegion("region1");
+            menus[0].setOrder("1");
+            menus[0].setIcon("../home/home.ico");
+            menus[0].setStyleClass("home");
+
+            menus[1] = new Menu();
+            menus[1].setId("root_manage");
+            menus[1].setI18nKey("component.manage");
+            menus[1].setI18nBundle("org.wso2.carbon.i18n.Resources");
+            menus[1].setParentMenu("");
+            menus[1].setLink("#");
+            menus[1].setRegion("region1");
+            menus[1].setOrder("2");
+            menus[1].setIcon("../home/manage.ico");
+            menus[1].setStyleClass("manage");
+
+            menus[2] = new Menu();
+            menus[2].setId("root_monitor");
+            menus[2].setI18nKey("component.monitor");
+            menus[2].setI18nBundle("org.wso2.carbon.i18n.Resources");
+            menus[2].setParentMenu("");
+            menus[2].setLink("#");
+            menus[2].setRegion("region1");
+            menus[2].setOrder("2");
+            menus[2].setIcon("../home/monitor.ico");
+            menus[2].setStyleClass("monitor");
+
+            menus[3] = new Menu();
+            menus[3].setId("manage_security");
+            menus[3].setI18nKey("manage.security");
+            menus[3].setI18nBundle("org.wso2.carbon.i18n.Resources");
+            menus[3].setParentMenu("root_manage");
+            menus[3].setLink("#");
+            menus[3].setRegion("region1");
+            menus[3].setOrder("2");
+            menus[3].setIcon("../home/security.ico");
+            menus[3].setStyleClass("security");
+
+
+            menus[4] = new Menu();
+            menus[4].setId("manage_transports");
+            menus[4].setI18nKey("manage.transports");
+            menus[4].setI18nBundle("org.wso2.carbon.i18n.Resources");
+            menus[4].setParentMenu("root_manage");
+            menus[4].setLink("#");
+            menus[4].setRegion("region1");
+            menus[4].setOrder("2");
+            menus[4].setIcon("../home/transports.ico");
+            menus[4].setStyleClass("transports");
+
+
+            menus[5] = new Menu();
+            menus[5].setId("security_user_stores");
+            menus[5].setI18nKey("security.user-stores");
+            menus[5].setI18nBundle("org.wso2.carbon.i18n.Resources");
+            menus[5].setParentMenu("manage_security");
+            menus[5].setLink("../security/userStore.jsp");
+            menus[5].setRegion("region1");
+            menus[5].setOrder("2");
+            menus[5].setIcon("../home/transports.ico");
+            menus[5].setStyleClass("user-stores");
+
+
+
+            menus[6] = new Menu();
+            menus[6].setId("security_user_groups");
+            menus[6].setI18nKey("security.user-groups");
+            menus[6].setI18nBundle("org.wso2.carbon.i18n.Resources");
+            menus[6].setParentMenu("manage_security");
+            menus[6].setLink("../security/userGroups.jsp");
+            menus[6].setRegion("region1");
+            menus[6].setOrder("2");
+            menus[6].setIcon("../home/transports.ico");
+            menus[6].setStyleClass("user-groups");
+
+            menus[7] = new Menu();
+            menus[7].setId("root_manage");
+            menus[7].setI18nKey("component.manage");
+            menus[7].setI18nBundle("org.wso2.carbon.i18n.Resources");
+            menus[7].setParentMenu("");
+            menus[7].setLink("#");
+            menus[7].setRegion("region2");
+            menus[7].setOrder("2");
+            menus[7].setIcon("../home/manage.ico");
+            menus[7].setStyleClass("manage");
+
+            menus[8] = new Menu();
+            menus[8].setId("security_user_stores");
+            menus[8].setI18nKey("security.user-stores");
+            menus[8].setI18nBundle("org.wso2.carbon.i18n.Resources");
+            menus[8].setParentMenu("manage_security");
+            menus[8].setLink("../security/userStore.jsp");
+            menus[8].setRegion("region2");
+            menus[8].setOrder("2");
+            menus[8].setIcon("../home/transports.ico");
+            menus[8].setStyleClass("user-stores");
+
+            menus[9] = new Menu();
+            menus[9].setId("manage_security");
+            menus[9].setI18nKey("manage.security");
+            menus[9].setI18nBundle("org.wso2.carbon.i18n.Resources");
+            menus[9].setParentMenu("root_manage");
+            menus[9].setLink("#");
+            menus[9].setRegion("region2");
+            menus[9].setOrder("2");
+            menus[9].setIcon("../home/security.ico");
+            menus[9].setStyleClass("security");
+        }
+    */
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/SecuredComponentEntryHttpContext.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/SecuredComponentEntryHttpContext.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/SecuredComponentEntryHttpContext.java
new file mode 100644
index 0000000..ca5b2af
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/SecuredComponentEntryHttpContext.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.eclipse.equinox.http.helper.BundleEntryHttpContext;
+import org.osgi.framework.Bundle;
+import org.wso2.carbon.registry.core.Registry;
+
+public class SecuredComponentEntryHttpContext extends BundleEntryHttpContext {
+
+	private String bundlePath;
+
+	protected Registry registry;
+
+    protected UIResourceRegistry uiResourceRegistry;
+
+    protected Log log = LogFactory.getLog(this.getClass());
+
+	public SecuredComponentEntryHttpContext(Bundle bundle) {
+		super(bundle);
+	}
+
+	public SecuredComponentEntryHttpContext(Bundle bundle, String bundlePath, UIResourceRegistry uiResourceRegistry) {
+		super(bundle, bundlePath);
+		this.bundlePath = bundlePath;
+        this.uiResourceRegistry = uiResourceRegistry;
+    }
+
+	public SecuredComponentEntryHttpContext(Bundle bundle, String s, Registry registry) {
+		super(bundle, s);
+		this.registry = registry;
+    }
+
+    public URL getResource(String resourceName) {
+        URL url = super.getResource(resourceName);
+        if (url != null) {
+            return url;
+        }
+
+        url = uiResourceRegistry.getUIResource(resourceName);
+
+        if (url != null) {
+            return url;
+        } else {
+            int lastSlash = resourceName.lastIndexOf('/');
+            if (lastSlash == -1) {
+                return null;
+            }
+            String file = resourceName.substring(lastSlash + 1);
+            if (file.endsWith(".js") && isListed(file)) {
+                try {
+                    return new URL("carbon://generate/" + file);
+                } catch (MalformedURLException e) {
+                    return null;
+                }
+            }
+            return null;
+        }
+    }
+
+   
+
+	/**
+	 * TODO: fix this from a configuration file
+	 *
+	 * @param file
+	 *            File
+	 * @return bool
+	 */
+	private boolean isListed(String file) {
+		return "global-params.js".equals(file);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TextJavascriptHandler.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TextJavascriptHandler.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TextJavascriptHandler.java
new file mode 100644
index 0000000..8df231e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TextJavascriptHandler.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+/**
+ *
+ */
+public class TextJavascriptHandler extends TextPlainHandler {
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TextPlainHandler.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TextPlainHandler.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TextPlainHandler.java
new file mode 100644
index 0000000..d2fa16e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TextPlainHandler.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.ContentHandler;
+import java.net.URLConnection;
+
+/**
+ *
+ */
+public class TextPlainHandler extends ContentHandler {
+
+    public Object getContent(URLConnection conn) throws IOException {
+        InputStream in = conn.getInputStream();
+        InputStreamReader r = new InputStreamReader(in);
+        StringBuffer sb = new StringBuffer();
+        int c;
+        while ((c = r.read()) >= 0) {
+            sb.append((char) c);
+        }
+        r.close();
+        in.close();
+        return sb.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TilesJspServlet.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TilesJspServlet.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TilesJspServlet.java
new file mode 100644
index 0000000..0b6773e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TilesJspServlet.java
@@ -0,0 +1,107 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.ServiceReference;
+import org.wso2.carbon.ui.action.ActionHelper;
+import org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.HashMap;
+
+public class TilesJspServlet extends JspServlet {
+    private static final long serialVersionUID = 1L;
+    private static Log log = LogFactory.getLog(TilesJspServlet.class);
+
+    public TilesJspServlet(Bundle bundle, UIResourceRegistry uiResourceRegistry) {
+        super(bundle, uiResourceRegistry);
+    }
+
+    public void service(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+        String actionUrl = request.getRequestURI();
+
+        //This is the layout page defined in
+        //"/org.wso2.carbon.component/src/main/resources/web/WEB-INF/tiles/main_defs.xml"
+        //Need to serve http requests other than to tiles body page,
+        //using the normal OSGi way
+
+        //retrieve urls that should be by-passed from tiles servlet
+        String resourceURI = actionUrl.replaceFirst(request.getContextPath() + "/", "../");
+
+        HashMap<String, String> urlsToBeByPassed = new HashMap<String, String>();
+        if (bundle != null) {
+            ServiceReference reference = bundle.getBundleContext()
+                    .getServiceReference(CarbonUIDefinitions.class.getName());
+            CarbonUIDefinitions carbonUIDefinitions = null;
+            if (reference != null) {
+                carbonUIDefinitions =
+                        (CarbonUIDefinitions) bundle.getBundleContext().getService(reference);
+                if (carbonUIDefinitions != null) {
+                    urlsToBeByPassed = carbonUIDefinitions.getSkipTilesUrls();
+                }
+            }
+        }
+
+        //if the current uri is marked to be by-passed, let it pass through
+        if (!urlsToBeByPassed.isEmpty()) {
+            if (urlsToBeByPassed.containsKey(resourceURI)) {
+                super.service(request, response);
+                return;
+            }
+        }
+
+
+        if ((actionUrl.lastIndexOf("/admin/layout/template.jsp") > -1)
+                || actionUrl.lastIndexOf("ajaxprocessor.jsp") > -1
+                || actionUrl.indexOf("gadgets/js") > -1) {
+            super.service(request, response);
+        } else if (actionUrl.startsWith("/carbon/registry/web/resources/foo/bar")) {
+            //TODO : consider the renamed ROOT war scenario
+            String resourcePath = actionUrl.replaceFirst("/carbon/registry/web/", "");
+            String pathToRegistry = "path=" + resourcePath;
+            if (log.isTraceEnabled()) {
+                log.trace("Forwarding to registry : " + pathToRegistry);
+            }
+            RequestDispatcher dispatcher =
+                    request.getRequestDispatcher("../registry/registry-web.jsp?" + pathToRegistry);
+            dispatcher.forward(request, response);
+        } else {
+            try {
+                if (log.isDebugEnabled()) {
+                    log.debug("request.getContextPath() : " + request.getContextPath());
+                    log.debug("actionUrl : " + actionUrl);
+                }
+                String newPath = actionUrl.replaceFirst(request.getContextPath(), "");
+
+                //todo: Insert filter work here
+
+                ActionHelper.render(newPath, request, response);
+            } catch (Exception e) {
+                log.fatal("Fatal error occurred while rendering UI using Tiles.", e);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIAnnouncement.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIAnnouncement.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIAnnouncement.java
new file mode 100644
index 0000000..0d22f91
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIAnnouncement.java
@@ -0,0 +1,26 @@
+/*
+ *  Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ *
+ */
+package org.wso2.carbon.ui;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.http.HttpSession;
+
+public interface UIAnnouncement {
+    String getAnnouncementHtml(HttpSession session, ServletConfig config);
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIAuthenticationExtender.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIAuthenticationExtender.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIAuthenticationExtender.java
new file mode 100644
index 0000000..1542d76
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIAuthenticationExtender.java
@@ -0,0 +1,40 @@
+/*
+ *  Copyright (c) 2005-2009, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ *
+ */
+package org.wso2.carbon.ui;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * An instance of this interface can be registered as an OSGi service, which will allow the Carbon
+ * UI to extend its authentication process.
+ */
+public interface UIAuthenticationExtender {
+
+    /**
+     * Method that will be executed if the login was successful.
+     *
+     * @param request   the HTTP Request.
+     * @param userName  the name of the logged in user.
+     * @param domain    the tenant domain.
+     * @param serverURL the URL of the BE server.
+     */
+    void onSuccessAdminLogin(HttpServletRequest request, String userName, String domain,
+                                    String serverURL);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIExtender.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIExtender.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIExtender.java
new file mode 100644
index 0000000..3e2ad00
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIExtender.java
@@ -0,0 +1,22 @@
+/*                                                                             
+ * Copyright 2004,2005 The Apache Software Foundation.                         
+ *                                                                             
+ * Licensed under the Apache License, Version 2.0 (the "License");             
+ * you may not use this file except in compliance with the License.            
+ * You may obtain a copy of the License at                                     
+ *                                                                             
+ *      http://www.apache.org/licenses/LICENSE-2.0                             
+ *                                                                             
+ * Unless required by applicable law or agreed to in writing, software         
+ * distributed under the License is distributed on an "AS IS" BASIS,           
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    
+ * See the License for the specific language governing permissions and         
+ * limitations under the License.                                              
+ */
+package org.wso2.carbon.ui;
+
+/**
+ *
+ */
+public interface UIExtender {
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIResourceRegistry.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIResourceRegistry.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIResourceRegistry.java
new file mode 100644
index 0000000..232b908
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIResourceRegistry.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2009-2010 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.wso2.carbon.ui.util.UIResourceProvider;
+import org.osgi.framework.*;
+
+import java.net.URL;
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * This class acts as a registry for UI resources. JspServlet and other parties who need UI resources,
+ * use an instance of this class to load UI resources.
+ * <p/>
+ * First this class loads the requested resource from the default resourceProvider, which is the
+ * BundleBasedUIResourceProvider. If it fails, the this class loads the resource from the custom UIResourceProviders
+ */
+public class UIResourceRegistry implements UIResourceProvider, ServiceListener {
+
+    private UIResourceProvider defaultUIResourceProvider;
+    private Set<UIResourceProvider> resourceProviderSet;
+    private BundleContext bundleContext;
+
+    public void initialize(BundleContext bundleContext) {
+        this.bundleContext = bundleContext;
+        resourceProviderSet = new HashSet<UIResourceProvider>();
+
+        try {
+            //1. Registering this class as a ServiceListener which is interested in services
+            //registered with UIResourceProvider key.
+            bundleContext.addServiceListener(this,
+                    "(" + Constants.OBJECTCLASS + "=" + UIResourceProvider.class.getName() + ")");
+
+            //2. Getting registered UIResourceProvider OSGi services.
+            ServiceReference[] references = bundleContext.getServiceReferences((String)null,
+                    "(" + Constants.OBJECTCLASS + "=" + UIResourceProvider.class.getName() + ")");
+
+            if (references != null && references.length > 0) {
+                for (ServiceReference reference : references) {
+                    UIResourceProvider uiResourceProvider = (UIResourceProvider) bundleContext.getService(reference);
+                    if (uiResourceProvider != null) {
+                        //Synchronized all the add methods, because this method may be invoked concurrently
+                        resourceProviderSet.add(uiResourceProvider);
+                    }
+                }
+            }
+        } catch (InvalidSyntaxException ignored) {
+        }
+    }
+
+    public URL getUIResource(String path) {
+        URL url = defaultUIResourceProvider.getUIResource(path);
+        if (url == null) {
+            for (UIResourceProvider resourceProvider : resourceProviderSet) {
+                url = resourceProvider.getUIResource(path);
+                if (url != null) {
+                    break;
+                }
+            }
+        }
+        return url;
+    }
+
+    public Set<String> getUIResourcePaths(String path) {
+        Set<String> resourcePathSet = defaultUIResourceProvider.getUIResourcePaths(path);
+        if (resourcePathSet.isEmpty()) {
+            for (UIResourceProvider resourceProvider : resourceProviderSet) {
+                resourcePathSet = resourceProvider.getUIResourcePaths(path);
+                if (!resourcePathSet.isEmpty()) {
+                    break;
+                }
+            }
+        }
+        return resourcePathSet;
+    }
+
+    public void setDefaultUIResourceProvider(UIResourceProvider defaultUIResourceProvider) {
+        this.defaultUIResourceProvider = defaultUIResourceProvider;
+    }
+
+    public void serviceChanged(ServiceEvent serviceEvent) {
+        if (serviceEvent.getType() == ServiceEvent.REGISTERED) {
+            UIResourceProvider uiResourceProvider = (UIResourceProvider)
+                    bundleContext.getService(serviceEvent.getServiceReference());
+            resourceProviderSet.add(uiResourceProvider);
+
+        } else if (serviceEvent.getType() == ServiceEvent.UNREGISTERING) {
+            UIResourceProvider uiResourceProvider = (UIResourceProvider)
+                    bundleContext.getService(serviceEvent.getServiceReference());
+            resourceProviderSet.remove(uiResourceProvider);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/Utils.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/Utils.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/Utils.java
new file mode 100644
index 0000000..00433b4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/Utils.java
@@ -0,0 +1,214 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.base.ServerConfiguration;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Enumeration;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.jar.JarFile;
+import java.util.zip.ZipEntry;
+
+/**
+ *
+ */
+public class Utils {
+
+    private static Log log = LogFactory.getLog(Utils.class);
+
+    public static void transform(InputStream xmlStream, InputStream xslStream,
+                                 OutputStream outputStream) throws TransformerException {
+        Source xmlStreamSource = new StreamSource(xmlStream);
+        Source xslStreamSource = new StreamSource(xslStream);
+        Result result = new StreamResult(outputStream);
+        Transformer transformer = TransformerFactory.newInstance().newTransformer(xslStreamSource);
+        transformer.transform(xmlStreamSource, result);
+    }
+
+    public static void copyDirectory(File sourceLocation, File targetLocation) throws IOException {
+
+        if (sourceLocation.isDirectory()) {
+            if (!targetLocation.exists()) {
+                targetLocation.mkdir();
+            }
+
+            String[] children = sourceLocation.list();
+            for (String aChildren : children) {
+                copyDirectory(new File(sourceLocation, aChildren),
+                        new File(targetLocation, aChildren));
+            }
+        } else {
+            InputStream in = new FileInputStream(sourceLocation);
+            OutputStream out = new FileOutputStream(targetLocation);
+
+            // Copy the bits from instream to outstream
+            byte[] buf = new byte[1024];
+            int len;
+            while ((len = in.read(buf)) > 0) {
+                out.write(buf, 0, len);
+            }
+            in.close();
+            out.close();
+        }
+    }
+
+
+    /**
+     * For a given Zip file, process each entry.
+     *
+     * @param zipFileLocation zipFileLocation
+     * @param targetLocation  targetLocation
+     * @throws org.wso2.carbon.core.CarbonException
+     *          CarbonException
+     */
+    public static void deployZipFile(File zipFileLocation, File targetLocation)
+            throws CarbonException {
+        try {
+            SortedSet<String> dirsMade = new TreeSet<String>();
+            JarFile jarFile = new JarFile(zipFileLocation);
+            Enumeration all = jarFile.entries();
+            while (all.hasMoreElements()) {
+                getFile((ZipEntry) all.nextElement(), jarFile, targetLocation, dirsMade);
+            }
+        } catch (IOException e) {
+            log.error("Error while copying component", e);
+            throw new CarbonException(e);
+        }
+    }
+
+    /**
+     * Process one file from the zip, given its name.
+     * Either print the name, or create the file on disk.
+     *
+     * @param e              zip entry
+     * @param zippy          jarfile
+     * @param targetLocation target
+     * @param dirsMade       dir
+     * @throws java.io.IOException will be thrown
+     */
+    private static void getFile(ZipEntry e, JarFile zippy, File targetLocation,
+                                SortedSet<String> dirsMade)
+            throws IOException {
+        byte[] b = new byte[1024];
+        String zipName = e.getName();
+
+        if (zipName.startsWith("/")) {
+            zipName = zipName.substring(1);
+        }
+        //Process only fliles that start with "ui"
+        if (!zipName.startsWith("ui")) {
+            return;
+        }
+        // Strip off the ui bit
+        zipName = zipName.substring(2);
+        // if a directory, just return. We mkdir for every file,
+        // since some widely-used Zip creators don't put out
+        // any directory entries, or put them in the wrong place.
+        if (zipName.endsWith("/")) {
+            return;
+        }
+        // Else must be a file; open the file for output
+        // Get the directory part.
+        int ix = zipName.lastIndexOf('/');
+        if (ix > 0) {
+            String dirName = zipName.substring(0, ix);
+            if (!dirsMade.contains(dirName)) {
+                File d = new File(targetLocation, dirName);
+                // If it already exists as a dir, don't do anything
+                if (!(d.exists() && d.isDirectory())) {
+                    // Try to create the directory, warn if it fails
+                    if (log.isDebugEnabled()) {
+                        log.debug("Deploying Directory: " + dirName);
+                    }
+                    if (!d.mkdirs()) {
+                        log.warn("Warning: unable to mkdir " + dirName);
+                    }
+                    dirsMade.add(dirName);
+                }
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("Deploying " + zipName);
+        }
+        File file = new File(targetLocation, zipName);
+        FileOutputStream os = new FileOutputStream(file);
+        InputStream is = zippy.getInputStream(e);
+        int n;
+        while ((n = is.read(b)) > 0) {
+            os.write(b, 0, n);
+        }
+        is.close();
+        os.close();
+    }
+
+    /**
+     * Deletes all files and subdirectories under dir.
+     * Returns true if all deletions were successful.
+     * If a deletion fails, the method stops attempting to delete and returns false.
+     *
+     * @param dir directory to delete
+     * @return status
+     */
+    public static boolean deleteDir(File dir) {
+        if (dir.isDirectory()) {
+            String[] children = dir.list();
+            for (int i = 0; i < children.length; i++) {
+                boolean success = deleteDir(new File(dir, children[i]));
+                if (!success) {
+                    return false;
+                }
+            }
+        }
+        // The directory is now empty so delete it
+        return dir.delete();
+    }
+
+    /**
+     * Read context name from carbon.xml
+     * "carbon" will be the default value
+     *
+     * @return webcontext name
+     */
+    public static String getWebContextName() {
+        String webContext = "carbon";
+        ServerConfiguration sc = ServerConfiguration.getInstance();
+        if (sc != null) {
+            String value = sc.getFirstProperty("WebContext");
+            if (value != null) {
+                webContext = value;
+            }
+        }
+        return webContext;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ActionHelper.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ActionHelper.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ActionHelper.java
new file mode 100644
index 0000000..99d3455
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ActionHelper.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui.action;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ *
+ */
+public class ActionHelper {
+	private static Log log = LogFactory.getLog(ActionHelper.class);
+
+    /**
+     *
+     * @param actionUrl url should be start with "/"
+     * @param request HttpServletRequest
+     * @param response HttpServletResponse
+     * @throws Exception Exception
+     */
+    public static void render(String actionUrl, HttpServletRequest request,
+                       HttpServletResponse response) throws Exception {
+        TilesContainer container = TilesAccess.getContainer(
+                request.getSession().getServletContext());
+        if(log.isDebugEnabled()){
+            log.debug("Rendering tiles main.layout with page : "+actionUrl+"("+request.getSession().getId()+")");        	
+        }
+        AttributeContext attributeContext = container.startContext(request, response);
+        Attribute attr = new Attribute(actionUrl);
+        attributeContext.putAttribute("body", attr);
+        try {
+            container.render("main.layout", request, response);
+            container.endContext(request, response);
+        } catch (Exception e) {
+            if (log.isDebugEnabled()) {  // Intentionally logged at debug level
+                log.debug("Error occurred while rendering." +
+                          " We generally see this 'harmless' exception on WebLogic. Hiding it.", e);
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ComponentAction.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ComponentAction.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ComponentAction.java
new file mode 100644
index 0000000..a483e5e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ComponentAction.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui.action;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import static org.wso2.carbon.ui.action.ActionHelper.render;
+
+/**
+* 
+*/
+public class ComponentAction  {
+
+    public ComponentAction() {
+    }
+
+    public void execute(HttpServletRequest request, HttpServletResponse response) throws Exception {
+        String actionUrl = ""; //TODO fix this
+        render(actionUrl, request, response);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ServiceAction.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ServiceAction.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ServiceAction.java
new file mode 100644
index 0000000..a5104a7
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ServiceAction.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui.action;
+
+
+/**
+ * org.wso2.carbon.action.ServiceAction interface for rendering definitions.
+ * This class is used only to hold reference in OSGi
+ */
+public interface ServiceAction {
+
+    /**
+     * This will set the component root which can be used in Services
+     * @param componentRoot componentRoot
+     */
+    void setComponentRoot(String componentRoot);
+   
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/FileDownloadServiceClient.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/FileDownloadServiceClient.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/FileDownloadServiceClient.java
new file mode 100644
index 0000000..0422c13
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/clients/FileDownloadServiceClient.java
@@ -0,0 +1,62 @@
+/*                                                                             
+ * Copyright 2004,2005 The Apache Software Foundation.                         
+ *                                                                             
+ * Licensed under the Apache License, Version 2.0 (the "License");             
+ * you may not use this file except in compliance with the License.            
+ * You may obtain a copy of the License at                                     
+ *                                                                             
+ *      http://www.apache.org/licenses/LICENSE-2.0                             
+ *                                                                             
+ * Unless required by applicable law or agreed to in writing, software         
+ * distributed under the License is distributed on an "AS IS" BASIS,           
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    
+ * See the License for the specific language governing permissions and         
+ * limitations under the License.                                              
+ */
+package org.wso2.carbon.ui.clients;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.core.common.IFileDownload;
+import org.wso2.carbon.core.commons.stub.filedownload.FileDownloadServiceStub;
+
+import javax.activation.DataHandler;
+import javax.servlet.http.HttpSession;
+import java.rmi.RemoteException;
+
+/**
+ *
+ */
+public class FileDownloadServiceClient implements IFileDownload {
+    
+    private static final Log log = LogFactory.getLog(FileDownloadServiceClient.class);
+    private FileDownloadServiceStub stub;
+    private HttpSession session;
+
+    public FileDownloadServiceClient(ConfigurationContext ctx, String serverURL,
+                             String cookie, HttpSession session) throws AxisFault {
+        this.session = session;
+        String serviceEPR = serverURL + "FileDownloadService";
+        stub = new FileDownloadServiceStub(ctx, serviceEPR);
+        ServiceClient client = stub._getServiceClient();
+        Options options = client.getOptions();
+        options.setManageSession(true);
+        if (cookie != null) {
+            options.setProperty(HTTPConstants.COOKIE_STRING, cookie);
+        }
+    }
+    
+    public DataHandler downloadFile(String id) {
+        try {
+            return stub.downloadFile(id);
+        } catch (RemoteException e) {
+            log.error("File download failed. ID: " + id);
+        }
+        return null;
+    }
+}


[30/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/prototype-1.6.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/prototype-1.6.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/prototype-1.6.js
new file mode 100644
index 0000000..5c73462
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/prototype-1.6.js
@@ -0,0 +1,4184 @@
+/*  Prototype JavaScript framework, version 1.6.0
+ *  (c) 2005-2007 Sam Stephenson
+ *
+ *  Prototype is freely distributable under the terms of an MIT-style license.
+ *  For details, see the Prototype web site: http://www.prototypejs.org/
+ *
+ *--------------------------------------------------------------------------*/
+
+var Prototype = {
+  Version: '1.6.0',
+
+  Browser: {
+    IE:     !!(window.attachEvent && !window.opera),
+    Opera:  !!window.opera,
+    WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
+    Gecko:  navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1,
+    MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
+  },
+
+  BrowserFeatures: {
+    XPath: !!document.evaluate,
+    ElementExtensions: !!window.HTMLElement,
+    SpecificElementExtensions:
+      document.createElement('div').__proto__ &&
+      document.createElement('div').__proto__ !==
+        document.createElement('form').__proto__
+  },
+
+  ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
+  JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
+
+  emptyFunction: function() { },
+  K: function(x) { return x }
+};
+
+if (Prototype.Browser.MobileSafari)
+  Prototype.BrowserFeatures.SpecificElementExtensions = false;
+
+if (Prototype.Browser.WebKit)
+  Prototype.BrowserFeatures.XPath = false;
+
+/* Based on Alex Arnell's inheritance implementation. */
+var Class = {
+  create: function() {
+    var parent = null, properties = $A(arguments);
+    if (Object.isFunction(properties[0]))
+      parent = properties.shift();
+
+    function klass() {
+      this.initialize.apply(this, arguments);
+    }
+
+    Object.extend(klass, Class.Methods);
+    klass.superclass = parent;
+    klass.subclasses = [];
+
+    if (parent) {
+      var subclass = function() { };
+      subclass.prototype = parent.prototype;
+      klass.prototype = new subclass;
+      parent.subclasses.push(klass);
+    }
+
+    for (var i = 0; i < properties.length; i++)
+      klass.addMethods(properties[i]);
+
+    if (!klass.prototype.initialize)
+      klass.prototype.initialize = Prototype.emptyFunction;
+
+    klass.prototype.constructor = klass;
+
+    return klass;
+  }
+};
+
+Class.Methods = {
+  addMethods: function(source) {
+    var ancestor   = this.superclass && this.superclass.prototype;
+    var properties = Object.keys(source);
+
+    if (!Object.keys({ toString: true }).length)
+      properties.push("toString", "valueOf");
+
+    for (var i = 0, length = properties.length; i < length; i++) {
+      var property = properties[i], value = source[property];
+      if (ancestor && Object.isFunction(value) &&
+          value.argumentNames().first() == "$super") {
+        var method = value, value = Object.extend((function(m) {
+          return function() { return ancestor[m].apply(this, arguments) };
+        })(property).wrap(method), {
+          valueOf:  function() { return method },
+          toString: function() { return method.toString() }
+        });
+      }
+      this.prototype[property] = value;
+    }
+
+    return this;
+  }
+};
+
+var Abstract = { };
+
+Object.extend = function(destination, source) {
+  for (var property in source)
+    destination[property] = source[property];
+  return destination;
+};
+
+Object.extend(Object, {
+  inspect: function(object) {
+    try {
+      if (object === undefined) return 'undefined';
+      if (object === null) return 'null';
+      return object.inspect ? object.inspect() : object.toString();
+    } catch (e) {
+      if (e instanceof RangeError) return '...';
+      throw e;
+    }
+  },
+
+  toJSON: function(object) {
+    var type = typeof object;
+    switch (type) {
+      case 'undefined':
+      case 'function':
+      case 'unknown': return;
+      case 'boolean': return object.toString();
+    }
+
+    if (object === null) return 'null';
+    if (object.toJSON) return object.toJSON();
+    if (Object.isElement(object)) return;
+
+    var results = [];
+    for (var property in object) {
+      var value = Object.toJSON(object[property]);
+      if (value !== undefined)
+        results.push(property.toJSON() + ': ' + value);
+    }
+
+    return '{' + results.join(', ') + '}';
+  },
+
+  toQueryString: function(object) {
+    return $H(object).toQueryString();
+  },
+
+  toHTML: function(object) {
+    return object && object.toHTML ? object.toHTML() : String.interpret(object);
+  },
+
+  keys: function(object) {
+    var keys = [];
+    for (var property in object)
+      keys.push(property);
+    return keys;
+  },
+
+  values: function(object) {
+    var values = [];
+    for (var property in object)
+      values.push(object[property]);
+    return values;
+  },
+
+  clone: function(object) {
+    return Object.extend({ }, object);
+  },
+
+  isElement: function(object) {
+    return object && object.nodeType == 1;
+  },
+
+  isArray: function(object) {
+    return object && object.constructor === Array;
+  },
+
+  isHash: function(object) {
+    return object instanceof Hash;
+  },
+
+  isFunction: function(object) {
+    return typeof object == "function";
+  },
+
+  isString: function(object) {
+    return typeof object == "string";
+  },
+
+  isNumber: function(object) {
+    return typeof object == "number";
+  },
+
+  isUndefined: function(object) {
+    return typeof object == "undefined";
+  }
+});
+
+Object.extend(Function.prototype, {
+  argumentNames: function() {
+    var names = this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");
+    return names.length == 1 && !names[0] ? [] : names;
+  },
+
+  bind: function() {
+    if (arguments.length < 2 && arguments[0] === undefined) return this;
+    var __method = this, args = $A(arguments), object = args.shift();
+    return function() {
+      return __method.apply(object, args.concat($A(arguments)));
+    }
+  },
+
+  bindAsEventListener: function() {
+    var __method = this, args = $A(arguments), object = args.shift();
+    return function(event) {
+      return __method.apply(object, [event || window.event].concat(args));
+    }
+  },
+
+  curry: function() {
+    if (!arguments.length) return this;
+    var __method = this, args = $A(arguments);
+    return function() {
+      return __method.apply(this, args.concat($A(arguments)));
+    }
+  },
+
+  delay: function() {
+    var __method = this, args = $A(arguments), timeout = args.shift() * 1000;
+    return window.setTimeout(function() {
+      return __method.apply(__method, args);
+    }, timeout);
+  },
+
+  wrap: function(wrapper) {
+    var __method = this;
+    return function() {
+      return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)));
+    }
+  },
+
+  methodize: function() {
+    if (this._methodized) return this._methodized;
+    var __method = this;
+    return this._methodized = function() {
+      return __method.apply(null, [this].concat($A(arguments)));
+    };
+  }
+});
+
+Function.prototype.defer = Function.prototype.delay.curry(0.01);
+
+Date.prototype.toJSON = function() {
+  return '"' + this.getUTCFullYear() + '-' +
+    (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
+    this.getUTCDate().toPaddedString(2) + 'T' +
+    this.getUTCHours().toPaddedString(2) + ':' +
+    this.getUTCMinutes().toPaddedString(2) + ':' +
+    this.getUTCSeconds().toPaddedString(2) + 'Z"';
+};
+
+var Try = {
+  these: function() {
+    var returnValue;
+
+    for (var i = 0, length = arguments.length; i < length; i++) {
+      var lambda = arguments[i];
+      try {
+        returnValue = lambda();
+        break;
+      } catch (e) { }
+    }
+
+    return returnValue;
+  }
+};
+
+RegExp.prototype.match = RegExp.prototype.test;
+
+RegExp.escape = function(str) {
+  return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
+};
+
+/*--------------------------------------------------------------------------*/
+
+var PeriodicalExecuter = Class.create({
+  initialize: function(callback, frequency) {
+    this.callback = callback;
+    this.frequency = frequency;
+    this.currentlyExecuting = false;
+
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  execute: function() {
+    this.callback(this);
+  },
+
+  stop: function() {
+    if (!this.timer) return;
+    clearInterval(this.timer);
+    this.timer = null;
+  },
+
+  onTimerEvent: function() {
+    if (!this.currentlyExecuting) {
+      try {
+        this.currentlyExecuting = true;
+        this.execute();
+      } finally {
+        this.currentlyExecuting = false;
+      }
+    }
+  }
+});
+Object.extend(String, {
+  interpret: function(value) {
+    return value == null ? '' : String(value);
+  },
+  specialChar: {
+    '\b': '\\b',
+    '\t': '\\t',
+    '\n': '\\n',
+    '\f': '\\f',
+    '\r': '\\r',
+    '\\': '\\\\'
+  }
+});
+
+Object.extend(String.prototype, {
+  gsub: function(pattern, replacement) {
+    var result = '', source = this, match;
+    replacement = arguments.callee.prepareReplacement(replacement);
+
+    while (source.length > 0) {
+      if (match = source.match(pattern)) {
+        result += source.slice(0, match.index);
+        result += String.interpret(replacement(match));
+        source  = source.slice(match.index + match[0].length);
+      } else {
+        result += source, source = '';
+      }
+    }
+    return result;
+  },
+
+  sub: function(pattern, replacement, count) {
+    replacement = this.gsub.prepareReplacement(replacement);
+    count = count === undefined ? 1 : count;
+
+    return this.gsub(pattern, function(match) {
+      if (--count < 0) return match[0];
+      return replacement(match);
+    });
+  },
+
+  scan: function(pattern, iterator) {
+    this.gsub(pattern, iterator);
+    return String(this);
+  },
+
+  truncate: function(length, truncation) {
+    length = length || 30;
+    truncation = truncation === undefined ? '...' : truncation;
+    return this.length > length ?
+      this.slice(0, length - truncation.length) + truncation : String(this);
+  },
+
+  strip: function() {
+    return this.replace(/^\s+/, '').replace(/\s+$/, '');
+  },
+
+  stripTags: function() {
+    return this.replace(/<\/?[^>]+>/gi, '');
+  },
+
+  stripScripts: function() {
+    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+  },
+
+  extractScripts: function() {
+    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+    return (this.match(matchAll) || []).map(function(scriptTag) {
+      return (scriptTag.match(matchOne) || ['', ''])[1];
+    });
+  },
+
+  evalScripts: function() {
+    return this.extractScripts().map(function(script) { return eval(script) });
+  },
+
+  escapeHTML: function() {
+    var self = arguments.callee;
+    self.text.data = this;
+    return self.div.innerHTML;
+  },
+
+  unescapeHTML: function() {
+    var div = new Element('div');
+    div.innerHTML = this.stripTags();
+    return div.childNodes[0] ? (div.childNodes.length > 1 ?
+      $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
+      div.childNodes[0].nodeValue) : '';
+  },
+
+  toQueryParams: function(separator) {
+    var match = this.strip().match(/([^?#]*)(#.*)?$/);
+    if (!match) return { };
+
+    return match[1].split(separator || '&').inject({ }, function(hash, pair) {
+      if ((pair = pair.split('='))[0]) {
+        var key = decodeURIComponent(pair.shift());
+        var value = pair.length > 1 ? pair.join('=') : pair[0];
+        if (value != undefined) value = decodeURIComponent(value);
+
+        if (key in hash) {
+          if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
+          hash[key].push(value);
+        }
+        else hash[key] = value;
+      }
+      return hash;
+    });
+  },
+
+  toArray: function() {
+    return this.split('');
+  },
+
+  succ: function() {
+    return this.slice(0, this.length - 1) +
+      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
+  },
+
+  times: function(count) {
+    return count < 1 ? '' : new Array(count + 1).join(this);
+  },
+
+  camelize: function() {
+    var parts = this.split('-'), len = parts.length;
+    if (len == 1) return parts[0];
+
+    var camelized = this.charAt(0) == '-'
+      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
+      : parts[0];
+
+    for (var i = 1; i < len; i++)
+      camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
+
+    return camelized;
+  },
+
+  capitalize: function() {
+    return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
+  },
+
+  underscore: function() {
+    return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
+  },
+
+  dasherize: function() {
+    return this.gsub(/_/,'-');
+  },
+
+  inspect: function(useDoubleQuotes) {
+    var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
+      var character = String.specialChar[match[0]];
+      return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
+    });
+    if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
+    return "'" + escapedString.replace(/'/g, '\\\'') + "'";
+  },
+
+  toJSON: function() {
+    return this.inspect(true);
+  },
+
+  unfilterJSON: function(filter) {
+    return this.sub(filter || Prototype.JSONFilter, '#{1}');
+  },
+
+  isJSON: function() {
+    var str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
+    return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
+  },
+
+  evalJSON: function(sanitize) {
+    var json = this.unfilterJSON();
+    try {
+      if (!sanitize || json.isJSON()) return eval('(' + json + ')');
+    } catch (e) { }
+    throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
+  },
+
+  include: function(pattern) {
+    return this.indexOf(pattern) > -1;
+  },
+
+  startsWith: function(pattern) {
+    return this.indexOf(pattern) === 0;
+  },
+
+  endsWith: function(pattern) {
+    var d = this.length - pattern.length;
+    return d >= 0 && this.lastIndexOf(pattern) === d;
+  },
+
+  empty: function() {
+    return this == '';
+  },
+
+  blank: function() {
+    return /^\s*$/.test(this);
+  },
+
+  interpolate: function(object, pattern) {
+    return new Template(this, pattern).evaluate(object);
+  }
+});
+
+if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {
+  escapeHTML: function() {
+    return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
+  },
+  unescapeHTML: function() {
+    return this.replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');
+  }
+});
+
+String.prototype.gsub.prepareReplacement = function(replacement) {
+  if (Object.isFunction(replacement)) return replacement;
+  var template = new Template(replacement);
+  return function(match) { return template.evaluate(match) };
+};
+
+String.prototype.parseQuery = String.prototype.toQueryParams;
+
+Object.extend(String.prototype.escapeHTML, {
+  div:  document.createElement('div'),
+  text: document.createTextNode('')
+});
+
+with (String.prototype.escapeHTML) div.appendChild(text);
+
+var Template = Class.create({
+  initialize: function(template, pattern) {
+    this.template = template.toString();
+    this.pattern = pattern || Template.Pattern;
+  },
+
+  evaluate: function(object) {
+    if (Object.isFunction(object.toTemplateReplacements))
+      object = object.toTemplateReplacements();
+
+    return this.template.gsub(this.pattern, function(match) {
+      if (object == null) return '';
+
+      var before = match[1] || '';
+      if (before == '\\') return match[2];
+
+      var ctx = object, expr = match[3];
+      var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/, match = pattern.exec(expr);
+      if (match == null) return before;
+
+      while (match != null) {
+        var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1];
+        ctx = ctx[comp];
+        if (null == ctx || '' == match[3]) break;
+        expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
+        match = pattern.exec(expr);
+      }
+
+      return before + String.interpret(ctx);
+    }.bind(this));
+  }
+});
+Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
+
+var $break = { };
+
+var Enumerable = {
+  each: function(iterator, context) {
+    var index = 0;
+    iterator = iterator.bind(context);
+    try {
+      this._each(function(value) {
+        iterator(value, index++);
+      });
+    } catch (e) {
+      if (e != $break) throw e;
+    }
+    return this;
+  },
+
+  eachSlice: function(number, iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var index = -number, slices = [], array = this.toArray();
+    while ((index += number) < array.length)
+      slices.push(array.slice(index, index+number));
+    return slices.collect(iterator, context);
+  },
+
+  all: function(iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var result = true;
+    this.each(function(value, index) {
+      result = result && !!iterator(value, index);
+      if (!result) throw $break;
+    });
+    return result;
+  },
+
+  any: function(iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var result = false;
+    this.each(function(value, index) {
+      if (result = !!iterator(value, index))
+        throw $break;
+    });
+    return result;
+  },
+
+  collect: function(iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var results = [];
+    this.each(function(value, index) {
+      results.push(iterator(value, index));
+    });
+    return results;
+  },
+
+  detect: function(iterator, context) {
+    iterator = iterator.bind(context);
+    var result;
+    this.each(function(value, index) {
+      if (iterator(value, index)) {
+        result = value;
+        throw $break;
+      }
+    });
+    return result;
+  },
+
+  findAll: function(iterator, context) {
+    iterator = iterator.bind(context);
+    var results = [];
+    this.each(function(value, index) {
+      if (iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  grep: function(filter, iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var results = [];
+
+    if (Object.isString(filter))
+      filter = new RegExp(filter);
+
+    this.each(function(value, index) {
+      if (filter.match(value))
+        results.push(iterator(value, index));
+    });
+    return results;
+  },
+
+  include: function(object) {
+    if (Object.isFunction(this.indexOf))
+      if (this.indexOf(object) != -1) return true;
+
+    var found = false;
+    this.each(function(value) {
+      if (value == object) {
+        found = true;
+        throw $break;
+      }
+    });
+    return found;
+  },
+
+  inGroupsOf: function(number, fillWith) {
+    fillWith = fillWith === undefined ? null : fillWith;
+    return this.eachSlice(number, function(slice) {
+      while(slice.length < number) slice.push(fillWith);
+      return slice;
+    });
+  },
+
+  inject: function(memo, iterator, context) {
+    iterator = iterator.bind(context);
+    this.each(function(value, index) {
+      memo = iterator(memo, value, index);
+    });
+    return memo;
+  },
+
+  invoke: function(method) {
+    var args = $A(arguments).slice(1);
+    return this.map(function(value) {
+      return value[method].apply(value, args);
+    });
+  },
+
+  max: function(iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var result;
+    this.each(function(value, index) {
+      value = iterator(value, index);
+      if (result == undefined || value >= result)
+        result = value;
+    });
+    return result;
+  },
+
+  min: function(iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var result;
+    this.each(function(value, index) {
+      value = iterator(value, index);
+      if (result == undefined || value < result)
+        result = value;
+    });
+    return result;
+  },
+
+  partition: function(iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var trues = [], falses = [];
+    this.each(function(value, index) {
+      (iterator(value, index) ?
+        trues : falses).push(value);
+    });
+    return [trues, falses];
+  },
+
+  pluck: function(property) {
+    var results = [];
+    this.each(function(value) {
+      results.push(value[property]);
+    });
+    return results;
+  },
+
+  reject: function(iterator, context) {
+    iterator = iterator.bind(context);
+    var results = [];
+    this.each(function(value, index) {
+      if (!iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  sortBy: function(iterator, context) {
+    iterator = iterator.bind(context);
+    return this.map(function(value, index) {
+      return {value: value, criteria: iterator(value, index)};
+    }).sort(function(left, right) {
+      var a = left.criteria, b = right.criteria;
+      return a < b ? -1 : a > b ? 1 : 0;
+    }).pluck('value');
+  },
+
+  toArray: function() {
+    return this.map();
+  },
+
+  zip: function() {
+    var iterator = Prototype.K, args = $A(arguments);
+    if (Object.isFunction(args.last()))
+      iterator = args.pop();
+
+    var collections = [this].concat(args).map($A);
+    return this.map(function(value, index) {
+      return iterator(collections.pluck(index));
+    });
+  },
+
+  size: function() {
+    return this.toArray().length;
+  },
+
+  inspect: function() {
+    return '#<Enumerable:' + this.toArray().inspect() + '>';
+  }
+};
+
+Object.extend(Enumerable, {
+  map:     Enumerable.collect,
+  find:    Enumerable.detect,
+  select:  Enumerable.findAll,
+  filter:  Enumerable.findAll,
+  member:  Enumerable.include,
+  entries: Enumerable.toArray,
+  every:   Enumerable.all,
+  some:    Enumerable.any
+});
+function $A(iterable) {
+  if (!iterable) return [];
+  if (iterable.toArray) return iterable.toArray();
+  var length = iterable.length, results = new Array(length);
+  while (length--) results[length] = iterable[length];
+  return results;
+}
+
+if (Prototype.Browser.WebKit) {
+  function $A(iterable) {
+    if (!iterable) return [];
+    if (!(Object.isFunction(iterable) && iterable == '[object NodeList]') &&
+        iterable.toArray) return iterable.toArray();
+    var length = iterable.length, results = new Array(length);
+    while (length--) results[length] = iterable[length];
+    return results;
+  }
+}
+
+Array.from = $A;
+
+Object.extend(Array.prototype, Enumerable);
+
+if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse;
+
+Object.extend(Array.prototype, {
+  _each: function(iterator) {
+    for (var i = 0, length = this.length; i < length; i++)
+      iterator(this[i]);
+  },
+
+  clear: function() {
+    this.length = 0;
+    return this;
+  },
+
+  first: function() {
+    return this[0];
+  },
+
+  last: function() {
+    return this[this.length - 1];
+  },
+
+  compact: function() {
+    return this.select(function(value) {
+      return value != null;
+    });
+  },
+
+  flatten: function() {
+    return this.inject([], function(array, value) {
+      return array.concat(Object.isArray(value) ?
+        value.flatten() : [value]);
+    });
+  },
+
+  without: function() {
+    var values = $A(arguments);
+    return this.select(function(value) {
+      return !values.include(value);
+    });
+  },
+
+  reverse: function(inline) {
+    return (inline !== false ? this : this.toArray())._reverse();
+  },
+
+  reduce: function() {
+    return this.length > 1 ? this : this[0];
+  },
+
+  uniq: function(sorted) {
+    return this.inject([], function(array, value, index) {
+      if (0 == index || (sorted ? array.last() != value : !array.include(value)))
+        array.push(value);
+      return array;
+    });
+  },
+
+  intersect: function(array) {
+    return this.uniq().findAll(function(item) {
+      return array.detect(function(value) { return item === value });
+    });
+  },
+
+  clone: function() {
+    return [].concat(this);
+  },
+
+  size: function() {
+    return this.length;
+  },
+
+  inspect: function() {
+    return '[' + this.map(Object.inspect).join(', ') + ']';
+  },
+
+  toJSON: function() {
+    var results = [];
+    this.each(function(object) {
+      var value = Object.toJSON(object);
+      if (value !== undefined) results.push(value);
+    });
+    return '[' + results.join(', ') + ']';
+  }
+});
+
+// use native browser JS 1.6 implementation if available
+if (Object.isFunction(Array.prototype.forEach))
+  Array.prototype._each = Array.prototype.forEach;
+
+if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
+  i || (i = 0);
+  var length = this.length;
+  if (i < 0) i = length + i;
+  for (; i < length; i++)
+    if (this[i] === item) return i;
+  return -1;
+};
+
+if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
+  i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
+  var n = this.slice(0, i).reverse().indexOf(item);
+  return (n < 0) ? n : i - n - 1;
+};
+
+Array.prototype.toArray = Array.prototype.clone;
+
+function $w(string) {
+  if (!Object.isString(string)) return [];
+  string = string.strip();
+  return string ? string.split(/\s+/) : [];
+}
+
+if (Prototype.Browser.Opera){
+  Array.prototype.concat = function() {
+    var array = [];
+    for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
+    for (var i = 0, length = arguments.length; i < length; i++) {
+      if (Object.isArray(arguments[i])) {
+        for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
+          array.push(arguments[i][j]);
+      } else {
+        array.push(arguments[i]);
+      }
+    }
+    return array;
+  };
+}
+Object.extend(Number.prototype, {
+  toColorPart: function() {
+    return this.toPaddedString(2, 16);
+  },
+
+  succ: function() {
+    return this + 1;
+  },
+
+  times: function(iterator) {
+    $R(0, this, true).each(iterator);
+    return this;
+  },
+
+  toPaddedString: function(length, radix) {
+    var string = this.toString(radix || 10);
+    return '0'.times(length - string.length) + string;
+  },
+
+  toJSON: function() {
+    return isFinite(this) ? this.toString() : 'null';
+  }
+});
+
+$w('abs round ceil floor').each(function(method){
+  Number.prototype[method] = Math[method].methodize();
+});
+function $H(object) {
+  return new Hash(object);
+};
+
+var Hash = Class.create(Enumerable, (function() {
+  if (function() {
+    var i = 0, Test = function(value) { this.key = value };
+    Test.prototype.key = 'foo';
+    for (var property in new Test('bar')) i++;
+    return i > 1;
+  }()) {
+    function each(iterator) {
+      var cache = [];
+      for (var key in this._object) {
+        var value = this._object[key];
+        if (cache.include(key)) continue;
+        cache.push(key);
+        var pair = [key, value];
+        pair.key = key;
+        pair.value = value;
+        iterator(pair);
+      }
+    }
+  } else {
+    function each(iterator) {
+      for (var key in this._object) {
+        var value = this._object[key], pair = [key, value];
+        pair.key = key;
+        pair.value = value;
+        iterator(pair);
+      }
+    }
+  }
+
+  function toQueryPair(key, value) {
+    if (Object.isUndefined(value)) return key;
+    return key + '=' + encodeURIComponent(String.interpret(value));
+  }
+
+  return {
+    initialize: function(object) {
+      this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
+    },
+
+    _each: each,
+
+    set: function(key, value) {
+      return this._object[key] = value;
+    },
+
+    get: function(key) {
+      return this._object[key];
+    },
+
+    unset: function(key) {
+      var value = this._object[key];
+      delete this._object[key];
+      return value;
+    },
+
+    toObject: function() {
+      return Object.clone(this._object);
+    },
+
+    keys: function() {
+      return this.pluck('key');
+    },
+
+    values: function() {
+      return this.pluck('value');
+    },
+
+    index: function(value) {
+      var match = this.detect(function(pair) {
+        return pair.value === value;
+      });
+      return match && match.key;
+    },
+
+    merge: function(object) {
+      return this.clone().update(object);
+    },
+
+    update: function(object) {
+      return new Hash(object).inject(this, function(result, pair) {
+        result.set(pair.key, pair.value);
+        return result;
+      });
+    },
+
+    toQueryString: function() {
+      return this.map(function(pair) {
+        var key = encodeURIComponent(pair.key), values = pair.value;
+
+        if (values && typeof values == 'object') {
+          if (Object.isArray(values))
+            return values.map(toQueryPair.curry(key)).join('&');
+        }
+        return toQueryPair(key, values);
+      }).join('&');
+    },
+
+    inspect: function() {
+      return '#<Hash:{' + this.map(function(pair) {
+        return pair.map(Object.inspect).join(': ');
+      }).join(', ') + '}>';
+    },
+
+    toJSON: function() {
+      return Object.toJSON(this.toObject());
+    },
+
+    clone: function() {
+      return new Hash(this);
+    }
+  }
+})());
+
+Hash.prototype.toTemplateReplacements = Hash.prototype.toObject;
+Hash.from = $H;
+var ObjectRange = Class.create(Enumerable, {
+  initialize: function(start, end, exclusive) {
+    this.start = start;
+    this.end = end;
+    this.exclusive = exclusive;
+  },
+
+  _each: function(iterator) {
+    var value = this.start;
+    while (this.include(value)) {
+      iterator(value);
+      value = value.succ();
+    }
+  },
+
+  include: function(value) {
+    if (value < this.start)
+      return false;
+    if (this.exclusive)
+      return value < this.end;
+    return value <= this.end;
+  }
+});
+
+var $R = function(start, end, exclusive) {
+  return new ObjectRange(start, end, exclusive);
+};
+
+var Ajax = {
+  getTransport: function() {
+    return Try.these(
+      function() {return new XMLHttpRequest()},
+      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+      function() {return new ActiveXObject('Microsoft.XMLHTTP')}
+    ) || false;
+  },
+
+  activeRequestCount: 0
+};
+
+Ajax.Responders = {
+  responders: [],
+
+  _each: function(iterator) {
+    this.responders._each(iterator);
+  },
+
+  register: function(responder) {
+    if (!this.include(responder))
+      this.responders.push(responder);
+  },
+
+  unregister: function(responder) {
+    this.responders = this.responders.without(responder);
+  },
+
+  dispatch: function(callback, request, transport, json) {
+    this.each(function(responder) {
+      if (Object.isFunction(responder[callback])) {
+        try {
+          responder[callback].apply(responder, [request, transport, json]);
+        } catch (e) { }
+      }
+    });
+  }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+  onCreate:   function() { Ajax.activeRequestCount++ },
+  onComplete: function() { Ajax.activeRequestCount-- }
+});
+
+Ajax.Base = Class.create({
+  initialize: function(options) {
+    this.options = {
+      method:       'post',
+      asynchronous: true,
+      contentType:  'application/x-www-form-urlencoded',
+      encoding:     'UTF-8',
+      parameters:   '',
+      evalJSON:     true,
+      evalJS:       true
+    };
+    Object.extend(this.options, options || { });
+
+    this.options.method = this.options.method.toLowerCase();
+    if (Object.isString(this.options.parameters))
+      this.options.parameters = this.options.parameters.toQueryParams();
+  }
+});
+
+Ajax.Request = Class.create(Ajax.Base, {
+  _complete: false,
+
+  initialize: function($super, url, options) {
+    $super(options);
+    this.transport = Ajax.getTransport();
+    this.request(url);
+  },
+
+  request: function(url) {
+    this.url = url;
+    this.method = this.options.method;
+    var params = Object.clone(this.options.parameters);
+
+    if (!['get', 'post'].include(this.method)) {
+      // simulate other verbs over post
+      params['_method'] = this.method;
+      this.method = 'post';
+    }
+
+    this.parameters = params;
+
+    if (params = Object.toQueryString(params)) {
+      // when GET, append parameters to URL
+      if (this.method == 'get')
+        this.url += (this.url.include('?') ? '&' : '?') + params;
+      else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
+        params += '&_=';
+    }
+
+    try {
+      var response = new Ajax.Response(this);
+      if (this.options.onCreate) this.options.onCreate(response);
+      Ajax.Responders.dispatch('onCreate', this, response);
+
+      this.transport.open(this.method.toUpperCase(), this.url,
+        this.options.asynchronous);
+
+      if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
+
+      this.transport.onreadystatechange = this.onStateChange.bind(this);
+      this.setRequestHeaders();
+
+      this.body = this.method == 'post' ? (this.options.postBody || params) : null;
+      this.transport.send(this.body);
+
+      /* Force Firefox to handle ready state 4 for synchronous requests */
+      if (!this.options.asynchronous && this.transport.overrideMimeType)
+        this.onStateChange();
+
+    }
+    catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  onStateChange: function() {
+    var readyState = this.transport.readyState;
+    if (readyState > 1 && !((readyState == 4) && this._complete))
+      this.respondToReadyState(this.transport.readyState);
+  },
+
+  setRequestHeaders: function() {
+    var headers = {
+      'X-Requested-With': 'XMLHttpRequest',
+      'X-Prototype-Version': Prototype.Version,
+      'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
+    };
+
+    if (this.method == 'post') {
+      headers['Content-type'] = this.options.contentType +
+        (this.options.encoding ? '; charset=' + this.options.encoding : '');
+
+      /* Force "Connection: close" for older Mozilla browsers to work
+       * around a bug where XMLHttpRequest sends an incorrect
+       * Content-length header. See Mozilla Bugzilla #246651.
+       */
+      if (this.transport.overrideMimeType &&
+          (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
+            headers['Connection'] = 'close';
+    }
+
+    // user-defined headers
+    if (typeof this.options.requestHeaders == 'object') {
+      var extras = this.options.requestHeaders;
+
+      if (Object.isFunction(extras.push))
+        for (var i = 0, length = extras.length; i < length; i += 2)
+          headers[extras[i]] = extras[i+1];
+      else
+        $H(extras).each(function(pair) { headers[pair.key] = pair.value });
+    }
+
+    for (var name in headers)
+      this.transport.setRequestHeader(name, headers[name]);
+  },
+
+  success: function() {
+    var status = this.getStatus();
+    return !status || (status >= 200 && status < 300);
+  },
+
+  getStatus: function() {
+    try {
+      return this.transport.status || 0;
+    } catch (e) { return 0 }
+  },
+
+  respondToReadyState: function(readyState) {
+    var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
+
+    if (state == 'Complete') {
+      try {
+        this._complete = true;
+        (this.options['on' + response.status]
+         || this.options['on' + (this.success() ? 'Success' : 'Failure')]
+         || Prototype.emptyFunction)(response, response.headerJSON);
+      } catch (e) {
+        this.dispatchException(e);
+      }
+
+      var contentType = response.getHeader('Content-type');
+      if (this.options.evalJS == 'force'
+          || (this.options.evalJS && contentType
+          && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
+        this.evalResponse();
+    }
+
+    try {
+      (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
+      Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+
+    if (state == 'Complete') {
+      // avoid memory leak in MSIE: clean up
+      this.transport.onreadystatechange = Prototype.emptyFunction;
+    }
+  },
+
+  getHeader: function(name) {
+    try {
+      return this.transport.getResponseHeader(name);
+    } catch (e) { return null }
+  },
+
+  evalResponse: function() {
+    try {
+      return eval((this.transport.responseText || '').unfilterJSON());
+    } catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  dispatchException: function(exception) {
+    (this.options.onException || Prototype.emptyFunction)(this, exception);
+    Ajax.Responders.dispatch('onException', this, exception);
+  }
+});
+
+Ajax.Request.Events =
+  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+Ajax.Response = Class.create({
+  initialize: function(request){
+    this.request = request;
+    var transport  = this.transport  = request.transport,
+        readyState = this.readyState = transport.readyState;
+
+    if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
+      this.status       = this.getStatus();
+      this.statusText   = this.getStatusText();
+      this.responseText = String.interpret(transport.responseText);
+      this.headerJSON   = this._getHeaderJSON();
+    }
+
+    if(readyState == 4) {
+      var xml = transport.responseXML;
+      this.responseXML  = xml === undefined ? null : xml;
+      this.responseJSON = this._getResponseJSON();
+    }
+  },
+
+  status:      0,
+  statusText: '',
+
+  getStatus: Ajax.Request.prototype.getStatus,
+
+  getStatusText: function() {
+    try {
+      return this.transport.statusText || '';
+    } catch (e) { return '' }
+  },
+
+  getHeader: Ajax.Request.prototype.getHeader,
+
+  getAllHeaders: function() {
+    try {
+      return this.getAllResponseHeaders();
+    } catch (e) { return null }
+  },
+
+  getResponseHeader: function(name) {
+    return this.transport.getResponseHeader(name);
+  },
+
+  getAllResponseHeaders: function() {
+    return this.transport.getAllResponseHeaders();
+  },
+
+  _getHeaderJSON: function() {
+    var json = this.getHeader('X-JSON');
+    if (!json) return null;
+    json = decodeURIComponent(escape(json));
+    try {
+      return json.evalJSON(this.request.options.sanitizeJSON);
+    } catch (e) {
+      this.request.dispatchException(e);
+    }
+  },
+
+  _getResponseJSON: function() {
+    var options = this.request.options;
+    if (!options.evalJSON || (options.evalJSON != 'force' &&
+      !(this.getHeader('Content-type') || '').include('application/json')))
+        return null;
+    try {
+      return this.transport.responseText.evalJSON(options.sanitizeJSON);
+    } catch (e) {
+      this.request.dispatchException(e);
+    }
+  }
+});
+
+Ajax.Updater = Class.create(Ajax.Request, {
+  initialize: function($super, container, url, options) {
+    this.container = {
+      success: (container.success || container),
+      failure: (container.failure || (container.success ? null : container))
+    };
+
+    options = options || { };
+    var onComplete = options.onComplete;
+    options.onComplete = (function(response, param) {
+      this.updateContent(response.responseText);
+      if (Object.isFunction(onComplete)) onComplete(response, param);
+    }).bind(this);
+
+    $super(url, options);
+  },
+
+  updateContent: function(responseText) {
+    var receiver = this.container[this.success() ? 'success' : 'failure'],
+        options = this.options;
+
+    if (!options.evalScripts) responseText = responseText.stripScripts();
+
+    if (receiver = $(receiver)) {
+      if (options.insertion) {
+        if (Object.isString(options.insertion)) {
+          var insertion = { }; insertion[options.insertion] = responseText;
+          receiver.insert(insertion);
+        }
+        else options.insertion(receiver, responseText);
+      }
+      else receiver.update(responseText);
+    }
+
+    if (this.success()) {
+      if (this.onComplete) this.onComplete.bind(this).defer();
+    }
+  }
+});
+
+Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
+  initialize: function($super, container, url, options) {
+    $super(options);
+    this.onComplete = this.options.onComplete;
+
+    this.frequency = (this.options.frequency || 2);
+    this.decay = (this.options.decay || 1);
+
+    this.updater = { };
+    this.container = container;
+    this.url = url;
+
+    this.start();
+  },
+
+  start: function() {
+    this.options.onComplete = this.updateComplete.bind(this);
+    this.onTimerEvent();
+  },
+
+  stop: function() {
+    this.updater.options.onComplete = undefined;
+    clearTimeout(this.timer);
+    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+  },
+
+  updateComplete: function(response) {
+    if (this.options.decay) {
+      this.decay = (response.responseText == this.lastText ?
+        this.decay * this.options.decay : 1);
+
+      this.lastText = response.responseText;
+    }
+    this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
+  },
+
+  onTimerEvent: function() {
+    this.updater = new Ajax.Updater(this.container, this.url, this.options);
+  }
+});
+function $(element) {
+  if (arguments.length > 1) {
+    for (var i = 0, elements = [], length = arguments.length; i < length; i++)
+      elements.push($(arguments[i]));
+    return elements;
+  }
+  if (Object.isString(element))
+    element = document.getElementById(element);
+  return Element.extend(element);
+}
+
+if (Prototype.BrowserFeatures.XPath) {
+  document._getElementsByXPath = function(expression, parentElement) {
+    var results = [];
+    var query = document.evaluate(expression, $(parentElement) || document,
+      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    for (var i = 0, length = query.snapshotLength; i < length; i++)
+      results.push(Element.extend(query.snapshotItem(i)));
+    return results;
+  };
+}
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Node) var Node = { };
+
+if (!Node.ELEMENT_NODE) {
+  // DOM level 2 ECMAScript Language Binding
+  Object.extend(Node, {
+    ELEMENT_NODE: 1,
+    ATTRIBUTE_NODE: 2,
+    TEXT_NODE: 3,
+    CDATA_SECTION_NODE: 4,
+    ENTITY_REFERENCE_NODE: 5,
+    ENTITY_NODE: 6,
+    PROCESSING_INSTRUCTION_NODE: 7,
+    COMMENT_NODE: 8,
+    DOCUMENT_NODE: 9,
+    DOCUMENT_TYPE_NODE: 10,
+    DOCUMENT_FRAGMENT_NODE: 11,
+    NOTATION_NODE: 12
+  });
+}
+
+(function() {
+  var element = this.Element;
+  this.Element = function(tagName, attributes) {
+    attributes = attributes || { };
+    tagName = tagName.toLowerCase();
+    var cache = Element.cache;
+    if (Prototype.Browser.IE && attributes.name) {
+      tagName = '<' + tagName + ' name="' + attributes.name + '">';
+      delete attributes.name;
+      return Element.writeAttribute(document.createElement(tagName), attributes);
+    }
+    if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
+    return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
+  };
+  Object.extend(this.Element, element || { });
+}).call(window);
+
+Element.cache = { };
+
+Element.Methods = {
+  visible: function(element) {
+    return $(element).style.display != 'none';
+  },
+
+  toggle: function(element) {
+    element = $(element);
+    Element[Element.visible(element) ? 'hide' : 'show'](element);
+    return element;
+  },
+
+  hide: function(element) {
+    $(element).style.display = 'none';
+    return element;
+  },
+
+  show: function(element) {
+    $(element).style.display = '';
+    return element;
+  },
+
+  remove: function(element) {
+    element = $(element);
+    element.parentNode.removeChild(element);
+    return element;
+  },
+
+  update: function(element, content) {
+    element = $(element);
+    if (content && content.toElement) content = content.toElement();
+    if (Object.isElement(content)) return element.update().insert(content);
+    content = Object.toHTML(content);
+    element.innerHTML = content.stripScripts();
+    content.evalScripts.bind(content).defer();
+    return element;
+  },
+
+  replace: function(element, content) {
+    element = $(element);
+    if (content && content.toElement) content = content.toElement();
+    else if (!Object.isElement(content)) {
+      content = Object.toHTML(content);
+      var range = element.ownerDocument.createRange();
+      range.selectNode(element);
+      content.evalScripts.bind(content).defer();
+      content = range.createContextualFragment(content.stripScripts());
+    }
+    element.parentNode.replaceChild(content, element);
+    return element;
+  },
+
+  insert: function(element, insertions) {
+    element = $(element);
+
+    if (Object.isString(insertions) || Object.isNumber(insertions) ||
+        Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
+          insertions = {bottom:insertions};
+
+    var content, t, range;
+
+    for (position in insertions) {
+      content  = insertions[position];
+      position = position.toLowerCase();
+      t = Element._insertionTranslations[position];
+
+      if (content && content.toElement) content = content.toElement();
+      if (Object.isElement(content)) {
+        t.insert(element, content);
+        continue;
+      }
+
+      content = Object.toHTML(content);
+
+      range = element.ownerDocument.createRange();
+      t.initializeRange(element, range);
+      t.insert(element, range.createContextualFragment(content.stripScripts()));
+
+      content.evalScripts.bind(content).defer();
+    }
+
+    return element;
+  },
+
+  wrap: function(element, wrapper, attributes) {
+    element = $(element);
+    if (Object.isElement(wrapper))
+      $(wrapper).writeAttribute(attributes || { });
+    else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
+    else wrapper = new Element('div', wrapper);
+    if (element.parentNode)
+      element.parentNode.replaceChild(wrapper, element);
+    wrapper.appendChild(element);
+    return wrapper;
+  },
+
+  inspect: function(element) {
+    element = $(element);
+    var result = '<' + element.tagName.toLowerCase();
+    $H({'id': 'id', 'className': 'class'}).each(function(pair) {
+      var property = pair.first(), attribute = pair.last();
+      var value = (element[property] || '').toString();
+      if (value) result += ' ' + attribute + '=' + value.inspect(true);
+    });
+    return result + '>';
+  },
+
+  recursivelyCollect: function(element, property) {
+    element = $(element);
+    var elements = [];
+    while (element = element[property])
+      if (element.nodeType == 1)
+        elements.push(Element.extend(element));
+    return elements;
+  },
+
+  ancestors: function(element) {
+    return $(element).recursivelyCollect('parentNode');
+  },
+
+  descendants: function(element) {
+    return $A($(element).getElementsByTagName('*')).each(Element.extend);
+  },
+
+  firstDescendant: function(element) {
+    element = $(element).firstChild;
+    while (element && element.nodeType != 1) element = element.nextSibling;
+    return $(element);
+  },
+
+  immediateDescendants: function(element) {
+    if (!(element = $(element).firstChild)) return [];
+    while (element && element.nodeType != 1) element = element.nextSibling;
+    if (element) return [element].concat($(element).nextSiblings());
+    return [];
+  },
+
+  previousSiblings: function(element) {
+    return $(element).recursivelyCollect('previousSibling');
+  },
+
+  nextSiblings: function(element) {
+    return $(element).recursivelyCollect('nextSibling');
+  },
+
+  siblings: function(element) {
+    element = $(element);
+    return element.previousSiblings().reverse().concat(element.nextSiblings());
+  },
+
+  match: function(element, selector) {
+    if (Object.isString(selector))
+      selector = new Selector(selector);
+    return selector.match($(element));
+  },
+
+  up: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return $(element.parentNode);
+    var ancestors = element.ancestors();
+    return expression ? Selector.findElement(ancestors, expression, index) :
+      ancestors[index || 0];
+  },
+
+  down: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return element.firstDescendant();
+    var descendants = element.descendants();
+    return expression ? Selector.findElement(descendants, expression, index) :
+      descendants[index || 0];
+  },
+
+  previous: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
+    var previousSiblings = element.previousSiblings();
+    return expression ? Selector.findElement(previousSiblings, expression, index) :
+      previousSiblings[index || 0];
+  },
+
+  next: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
+    var nextSiblings = element.nextSiblings();
+    return expression ? Selector.findElement(nextSiblings, expression, index) :
+      nextSiblings[index || 0];
+  },
+
+  select: function() {
+    var args = $A(arguments), element = $(args.shift());
+    return Selector.findChildElements(element, args);
+  },
+
+  adjacent: function() {
+    var args = $A(arguments), element = $(args.shift());
+    return Selector.findChildElements(element.parentNode, args).without(element);
+  },
+
+  identify: function(element) {
+    element = $(element);
+    var id = element.readAttribute('id'), self = arguments.callee;
+    if (id) return id;
+    do { id = 'anonymous_element_' + self.counter++ } while ($(id));
+    element.writeAttribute('id', id);
+    return id;
+  },
+
+  readAttribute: function(element, name) {
+    element = $(element);
+    if (Prototype.Browser.IE) {
+      var t = Element._attributeTranslations.read;
+      if (t.values[name]) return t.values[name](element, name);
+      if (t.names[name]) name = t.names[name];
+      if (name.include(':')) {
+        return (!element.attributes || !element.attributes[name]) ? null :
+         element.attributes[name].value;
+      }
+    }
+    return element.getAttribute(name);
+  },
+
+  writeAttribute: function(element, name, value) {
+    element = $(element);
+    var attributes = { }, t = Element._attributeTranslations.write;
+
+    if (typeof name == 'object') attributes = name;
+    else attributes[name] = value === undefined ? true : value;
+
+    for (var attr in attributes) {
+      var name = t.names[attr] || attr, value = attributes[attr];
+      if (t.values[attr]) name = t.values[attr](element, value);
+      if (value === false || value === null)
+        element.removeAttribute(name);
+      else if (value === true)
+        element.setAttribute(name, name);
+      else element.setAttribute(name, value);
+    }
+    return element;
+  },
+
+  getHeight: function(element) {
+    return $(element).getDimensions().height;
+  },
+
+  getWidth: function(element) {
+    return $(element).getDimensions().width;
+  },
+
+  classNames: function(element) {
+    return new Element.ClassNames(element);
+  },
+
+  hasClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    var elementClassName = element.className;
+    return (elementClassName.length > 0 && (elementClassName == className ||
+      new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
+  },
+
+  addClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    if (!element.hasClassName(className))
+      element.className += (element.className ? ' ' : '') + className;
+    return element;
+  },
+
+  removeClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    element.className = element.className.replace(
+      new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
+    return element;
+  },
+
+  toggleClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    return element[element.hasClassName(className) ?
+      'removeClassName' : 'addClassName'](className);
+  },
+
+  // removes whitespace-only text node children
+  cleanWhitespace: function(element) {
+    element = $(element);
+    var node = element.firstChild;
+    while (node) {
+      var nextNode = node.nextSibling;
+      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+        element.removeChild(node);
+      node = nextNode;
+    }
+    return element;
+  },
+
+  empty: function(element) {
+    return $(element).innerHTML.blank();
+  },
+
+  descendantOf: function(element, ancestor) {
+    element = $(element), ancestor = $(ancestor);
+
+    if (element.compareDocumentPosition)
+      return (element.compareDocumentPosition(ancestor) & 8) === 8;
+
+    if (element.sourceIndex && !Prototype.Browser.Opera) {
+      var e = element.sourceIndex, a = ancestor.sourceIndex,
+       nextAncestor = ancestor.nextSibling;
+      if (!nextAncestor) {
+        do { ancestor = ancestor.parentNode; }
+        while (!(nextAncestor = ancestor.nextSibling) && ancestor.parentNode);
+      }
+      if (nextAncestor) return (e > a && e < nextAncestor.sourceIndex);
+    }
+
+    while (element = element.parentNode)
+      if (element == ancestor) return true;
+    return false;
+  },
+
+  scrollTo: function(element) {
+    element = $(element);
+    var pos = element.cumulativeOffset();
+    window.scrollTo(pos[0], pos[1]);
+    return element;
+  },
+
+  getStyle: function(element, style) {
+    element = $(element);
+    style = style == 'float' ? 'cssFloat' : style.camelize();
+    var value = element.style[style];
+    if (!value) {
+      var css = document.defaultView.getComputedStyle(element, null);
+      value = css ? css[style] : null;
+    }
+    if (style == 'opacity') return value ? parseFloat(value) : 1.0;
+    return value == 'auto' ? null : value;
+  },
+
+  getOpacity: function(element) {
+    return $(element).getStyle('opacity');
+  },
+
+  setStyle: function(element, styles) {
+    element = $(element);
+    var elementStyle = element.style, match;
+    if (Object.isString(styles)) {
+      element.style.cssText += ';' + styles;
+      return styles.include('opacity') ?
+        element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
+    }
+    for (var property in styles)
+      if (property == 'opacity') element.setOpacity(styles[property]);
+      else
+        elementStyle[(property == 'float' || property == 'cssFloat') ?
+          (elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') :
+            property] = styles[property];
+
+    return element;
+  },
+
+  setOpacity: function(element, value) {
+    element = $(element);
+    element.style.opacity = (value == 1 || value === '') ? '' :
+      (value < 0.00001) ? 0 : value;
+    return element;
+  },
+
+  getDimensions: function(element) {
+    element = $(element);
+    var display = $(element).getStyle('display');
+    if (display != 'none' && display != null) // Safari bug
+      return {width: element.offsetWidth, height: element.offsetHeight};
+
+    // All *Width and *Height properties give 0 on elements with display none,
+    // so enable the element temporarily
+    var els = element.style;
+    var originalVisibility = els.visibility;
+    var originalPosition = els.position;
+    var originalDisplay = els.display;
+    els.visibility = 'hidden';
+    els.position = 'absolute';
+    els.display = 'block';
+    var originalWidth = element.clientWidth;
+    var originalHeight = element.clientHeight;
+    els.display = originalDisplay;
+    els.position = originalPosition;
+    els.visibility = originalVisibility;
+    return {width: originalWidth, height: originalHeight};
+  },
+
+  makePositioned: function(element) {
+    element = $(element);
+    var pos = Element.getStyle(element, 'position');
+    if (pos == 'static' || !pos) {
+      element._madePositioned = true;
+      element.style.position = 'relative';
+      // Opera returns the offset relative to the positioning context, when an
+      // element is position relative but top and left have not been defined
+      if (window.opera) {
+        element.style.top = 0;
+        element.style.left = 0;
+      }
+    }
+    return element;
+  },
+
+  undoPositioned: function(element) {
+    element = $(element);
+    if (element._madePositioned) {
+      element._madePositioned = undefined;
+      element.style.position =
+        element.style.top =
+        element.style.left =
+        element.style.bottom =
+        element.style.right = '';
+    }
+    return element;
+  },
+
+  makeClipping: function(element) {
+    element = $(element);
+    if (element._overflow) return element;
+    element._overflow = Element.getStyle(element, 'overflow') || 'auto';
+    if (element._overflow !== 'hidden')
+      element.style.overflow = 'hidden';
+    return element;
+  },
+
+  undoClipping: function(element) {
+    element = $(element);
+    if (!element._overflow) return element;
+    element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
+    element._overflow = null;
+    return element;
+  },
+
+  cumulativeOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+    } while (element);
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  positionedOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+      if (element) {
+        if (element.tagName == 'BODY') break;
+        var p = Element.getStyle(element, 'position');
+        if (p == 'relative' || p == 'absolute') break;
+      }
+    } while (element);
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  absolutize: function(element) {
+    element = $(element);
+    if (element.getStyle('position') == 'absolute') return;
+    // Position.prepare(); // To be done manually by Scripty when it needs it.
+
+    var offsets = element.positionedOffset();
+    var top     = offsets[1];
+    var left    = offsets[0];
+    var width   = element.clientWidth;
+    var height  = element.clientHeight;
+
+    element._originalLeft   = left - parseFloat(element.style.left  || 0);
+    element._originalTop    = top  - parseFloat(element.style.top || 0);
+    element._originalWidth  = element.style.width;
+    element._originalHeight = element.style.height;
+
+    element.style.position = 'absolute';
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.width  = width + 'px';
+    element.style.height = height + 'px';
+    return element;
+  },
+
+  relativize: function(element) {
+    element = $(element);
+    if (element.getStyle('position') == 'relative') return;
+    // Position.prepare(); // To be done manually by Scripty when it needs it.
+
+    element.style.position = 'relative';
+    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
+    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.height = element._originalHeight;
+    element.style.width  = element._originalWidth;
+    return element;
+  },
+
+  cumulativeScrollOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.scrollTop  || 0;
+      valueL += element.scrollLeft || 0;
+      element = element.parentNode;
+    } while (element);
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  getOffsetParent: function(element) {
+    if (element.offsetParent) return $(element.offsetParent);
+    if (element == document.body) return $(element);
+
+    while ((element = element.parentNode) && element != document.body)
+      if (Element.getStyle(element, 'position') != 'static')
+        return $(element);
+
+    return $(document.body);
+  },
+
+  viewportOffset: function(forElement) {
+    var valueT = 0, valueL = 0;
+
+    var element = forElement;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+
+      // Safari fix
+      if (element.offsetParent == document.body &&
+        Element.getStyle(element, 'position') == 'absolute') break;
+
+    } while (element = element.offsetParent);
+
+    element = forElement;
+    do {
+      if (!Prototype.Browser.Opera || element.tagName == 'BODY') {
+        valueT -= element.scrollTop  || 0;
+        valueL -= element.scrollLeft || 0;
+      }
+    } while (element = element.parentNode);
+
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  clonePosition: function(element, source) {
+    var options = Object.extend({
+      setLeft:    true,
+      setTop:     true,
+      setWidth:   true,
+      setHeight:  true,
+      offsetTop:  0,
+      offsetLeft: 0
+    }, arguments[2] || { });
+
+    // find page position of source
+    source = $(source);
+    var p = source.viewportOffset();
+
+    // find coordinate system to use
+    element = $(element);
+    var delta = [0, 0];
+    var parent = null;
+    // delta [0,0] will do fine with position: fixed elements,
+    // position:absolute needs offsetParent deltas
+    if (Element.getStyle(element, 'position') == 'absolute') {
+      parent = element.getOffsetParent();
+      delta = parent.viewportOffset();
+    }
+
+    // correct by body offsets (fixes Safari)
+    if (parent == document.body) {
+      delta[0] -= document.body.offsetLeft;
+      delta[1] -= document.body.offsetTop;
+    }
+
+    // set position
+    if (options.setLeft)   element.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
+    if (options.setTop)    element.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
+    if (options.setWidth)  element.style.width = source.offsetWidth + 'px';
+    if (options.setHeight) element.style.height = source.offsetHeight + 'px';
+    return element;
+  }
+};
+
+Element.Methods.identify.counter = 1;
+
+Object.extend(Element.Methods, {
+  getElementsBySelector: Element.Methods.select,
+  childElements: Element.Methods.immediateDescendants
+});
+
+Element._attributeTranslations = {
+  write: {
+    names: {
+      className: 'class',
+      htmlFor:   'for'
+    },
+    values: { }
+  }
+};
+
+
+if (!document.createRange || Prototype.Browser.Opera) {
+  Element.Methods.insert = function(element, insertions) {
+    element = $(element);
+
+    if (Object.isString(insertions) || Object.isNumber(insertions) ||
+        Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
+          insertions = { bottom: insertions };
+
+    var t = Element._insertionTranslations, content, position, pos, tagName;
+
+    for (position in insertions) {
+      content  = insertions[position];
+      position = position.toLowerCase();
+      pos      = t[position];
+
+      if (content && content.toElement) content = content.toElement();
+      if (Object.isElement(content)) {
+        pos.insert(element, content);
+        continue;
+      }
+
+      content = Object.toHTML(content);
+      tagName = ((position == 'before' || position == 'after')
+        ? element.parentNode : element).tagName.toUpperCase();
+
+      if (t.tags[tagName]) {
+        var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+        if (position == 'top' || position == 'after') fragments.reverse();
+        fragments.each(pos.insert.curry(element));
+      }
+      else element.insertAdjacentHTML(pos.adjacency, content.stripScripts());
+
+      content.evalScripts.bind(content).defer();
+    }
+
+    return element;
+  };
+}
+
+if (Prototype.Browser.Opera) {
+  Element.Methods._getStyle = Element.Methods.getStyle;
+  Element.Methods.getStyle = function(element, style) {
+    switch(style) {
+      case 'left':
+      case 'top':
+      case 'right':
+      case 'bottom':
+        if (Element._getStyle(element, 'position') == 'static') return null;
+      default: return Element._getStyle(element, style);
+    }
+  };
+  Element.Methods._readAttribute = Element.Methods.readAttribute;
+  Element.Methods.readAttribute = function(element, attribute) {
+    if (attribute == 'title') return element.title;
+    return Element._readAttribute(element, attribute);
+  };
+}
+
+else if (Prototype.Browser.IE) {
+  $w('positionedOffset getOffsetParent viewportOffset').each(function(method) {
+    Element.Methods[method] = Element.Methods[method].wrap(
+      function(proceed, element) {
+        element = $(element);
+        var position = element.getStyle('position');
+        if (position != 'static') return proceed(element);
+        element.setStyle({ position: 'relative' });
+        var value = proceed(element);
+        element.setStyle({ position: position });
+        return value;
+      }
+    );
+  });
+
+  Element.Methods.getStyle = function(element, style) {
+    element = $(element);
+    style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
+    var value = element.style[style];
+    if (!value && element.currentStyle) value = element.currentStyle[style];
+
+    if (style == 'opacity') {
+      if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
+        if (value[1]) return parseFloat(value[1]) / 100;
+      return 1.0;
+    }
+
+    if (value == 'auto') {
+      if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
+        return element['offset' + style.capitalize()] + 'px';
+      return null;
+    }
+    return value;
+  };
+
+  Element.Methods.setOpacity = function(element, value) {
+    function stripAlpha(filter){
+      return filter.replace(/alpha\([^\)]*\)/gi,'');
+    }
+    element = $(element);
+    var currentStyle = element.currentStyle;
+    if ((currentStyle && !currentStyle.hasLayout) ||
+      (!currentStyle && element.style.zoom == 'normal'))
+        element.style.zoom = 1;
+
+    var filter = element.getStyle('filter'), style = element.style;
+    if (value == 1 || value === '') {
+      (filter = stripAlpha(filter)) ?
+        style.filter = filter : style.removeAttribute('filter');
+      return element;
+    } else if (value < 0.00001) value = 0;
+    style.filter = stripAlpha(filter) +
+      'alpha(opacity=' + (value * 100) + ')';
+    return element;
+  };
+
+  Element._attributeTranslations = {
+    read: {
+      names: {
+        'class': 'className',
+        'for':   'htmlFor'
+      },
+      values: {
+        _getAttr: function(element, attribute) {
+          return element.getAttribute(attribute, 2);
+        },
+        _getAttrNode: function(element, attribute) {
+          var node = element.getAttributeNode(attribute);
+          return node ? node.value : "";
+        },
+        _getEv: function(element, attribute) {
+          var attribute = element.getAttribute(attribute);
+          return attribute ? attribute.toString().slice(23, -2) : null;
+        },
+        _flag: function(element, attribute) {
+          return $(element).hasAttribute(attribute) ? attribute : null;
+        },
+        style: function(element) {
+          return element.style.cssText.toLowerCase();
+        },
+        title: function(element) {
+          return element.title;
+        }
+      }
+    }
+  };
+
+  Element._attributeTranslations.write = {
+    names: Object.clone(Element._attributeTranslations.read.names),
+    values: {
+      checked: function(element, value) {
+        element.checked = !!value;
+      },
+
+      style: function(element, value) {
+        element.style.cssText = value ? value : '';
+      }
+    }
+  };
+
+  Element._attributeTranslations.has = {};
+
+  $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
+      'encType maxLength readOnly longDesc').each(function(attr) {
+    Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
+    Element._attributeTranslations.has[attr.toLowerCase()] = attr;
+  });
+
+  (function(v) {
+    Object.extend(v, {
+      href:        v._getAttr,
+      src:         v._getAttr,
+      type:        v._getAttr,
+      action:      v._getAttrNode,
+      disabled:    v._flag,
+      checked:     v._flag,
+      readonly:    v._flag,
+      multiple:    v._flag,
+      onload:      v._getEv,
+      onunload:    v._getEv,
+      onclick:     v._getEv,
+      ondblclick:  v._getEv,
+      onmousedown: v._getEv,
+      onmouseup:   v._getEv,
+      onmouseover: v._getEv,
+      onmousemove: v._getEv,
+      onmouseout:  v._getEv,
+      onfocus:     v._getEv,
+      onblur:      v._getEv,
+      onkeypress:  v._getEv,
+      onkeydown:   v._getEv,
+      onkeyup:     v._getEv,
+      onsubmit:    v._getEv,
+      onreset:     v._getEv,
+      onselect:    v._getEv,
+      onchange:    v._getEv
+    });
+  })(Element._attributeTranslations.read.values);
+}
+
+else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
+  Element.Methods.setOpacity = function(element, value) {
+    element = $(element);
+    element.style.opacity = (value == 1) ? 0.999999 :
+      (value === '') ? '' : (value < 0.00001) ? 0 : value;
+    return element;
+  };
+}
+
+else if (Prototype.Browser.WebKit) {
+  Element.Methods.setOpacity = function(element, value) {
+    element = $(element);
+    element.style.opacity = (value == 1 || value === '') ? '' :
+      (value < 0.00001) ? 0 : value;
+
+    if (value == 1)
+      if(element.tagName == 'IMG' && element.width) {
+        element.width++; element.width--;
+      } else try {
+        var n = document.createTextNode(' ');
+        element.appendChild(n);
+        element.removeChild(n);
+      } catch (e) { }
+
+    return element;
+  };
+
+  // Safari returns margins on body which is incorrect if the child is absolutely
+  // positioned.  For performance reasons, redefine Position.cumulativeOffset for
+  // KHTML/WebKit only.
+  Element.Methods.cumulativeOffset = function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      if (element.offsetParent == document.body)
+        if (Element.getStyle(element, 'position') == 'absolute') break;
+
+      element = element.offsetParent;
+    } while (element);
+
+    return Element._returnOffset(valueL, valueT);
+  };
+}
+
+if (Prototype.Browser.IE || Prototype.Browser.Opera) {
+  // IE and Opera are missing .innerHTML support for TABLE-related and SELECT elements
+  Element.Methods.update = function(element, content) {
+    element = $(element);
+
+    if (content && content.toElement) content = content.toElement();
+    if (Object.isElement(content)) return element.update().insert(content);
+
+    content = Object.toHTML(content);
+    var tagName = element.tagName.toUpperCase();
+
+    if (tagName in Element._insertionTranslations.tags) {
+      $A(element.childNodes).each(function(node) { element.removeChild(node) });
+      Element._getContentFromAnonymousElement(tagName, content.stripScripts())
+        .each(function(node) { element.appendChild(node) });
+    }
+    else element.innerHTML = content.stripScripts();
+
+    content.evalScripts.bind(content).defer();
+    return element;
+  };
+}
+
+if (document.createElement('div').outerHTML) {
+  Element.Methods.replace = function(element, content) {
+    element = $(element);
+
+    if (content && content.toElement) content = content.toElement();
+    if (Object.isElement(content)) {
+      element.parentNode.replaceChild(content, element);
+      return element;
+    }
+
+    content = Object.toHTML(content);
+    var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
+
+    if (Element._insertionTranslations.tags[tagName]) {
+      var nextSibling = element.next();
+      var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+      parent.removeChild(element);
+      if (nextSibling)
+        fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
+      else
+        fragments.each(function(node) { parent.appendChild(node) });
+    }
+    else element.outerHTML = content.stripScripts();
+
+    content.evalScripts.bind(content).defer();
+    return element;
+  };
+}
+
+Element._returnOffset = function(l, t) {
+  var result = [l, t];
+  result.left = l;
+  result.top = t;
+  return result;
+};
+
+Element._getContentFromAnonymousElement = function(tagName, html) {
+  var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
+  div.innerHTML = t[0] + html + t[1];
+  t[2].times(function() { div = div.firstChild });
+  return $A(div.childNodes);
+};
+
+Element._insertionTranslations = {
+  before: {
+    adjacency: 'beforeBegin',
+    insert: function(element, node) {
+      element.parentNode.insertBefore(node, element);
+    },
+    initializeRange: function(element, range) {
+      range.setStartBefore(element);
+    }
+  },
+  top: {
+    adjacency: 'afterBegin',
+    insert: function(element, node) {
+      element.insertBefore(node, element.firstChild);
+    },
+    initializeRange: function(element, range) {
+      range.selectNodeContents(element);
+      range.collapse(true);
+    }
+  },
+  bottom: {
+    adjacency: 'beforeEnd',
+    insert: function(element, node) {
+      element.appendChild(node);
+    }
+  },
+  after: {
+    adjacency: 'afterEnd',
+    insert: function(element, node) {
+      element.parentNode.insertBefore(node, element.nextSibling);
+    },
+    initializeRange: function(element, range) {
+      range.setStartAfter(element);
+    }
+  },
+  tags: {
+    TABLE:  ['<table>',                '</table>',                   1],
+    TBODY:  ['<table><tbody>',         '</tbody></table>',           2],
+    TR:     ['<table><tbody><tr>',     '</tr></tbody></table>',      3],
+    TD:     ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
+    SELECT: ['<select>',               '</select>',                  1]
+  }
+};
+
+(function() {
+  this.bottom.initializeRange = this.top.initializeRange;
+  Object.extend(this.tags, {
+    THEAD: this.tags.TBODY,
+    TFOOT: this.tags.TBODY,
+    TH:    this.tags.TD
+  });
+}).call(Element._insertionTranslations);
+
+Element.Methods.Simulated = {
+  hasAttribute: function(element, attribute) {
+    attribute = Element._attributeTranslations.has[attribute] || attribute;
+    var node = $(element).getAttributeNode(attribute);
+    return node && node.specified;
+  }
+};
+
+Element.Methods.ByTag = { };
+
+Object.extend(Element, Element.Methods);
+
+if (!Prototype.BrowserFeatures.ElementExtensions &&
+    document.createElement('div').__proto__) {
+  window.HTMLElement = { };
+  window.HTMLElement.prototype = document.createElement('div').__proto__;
+  Prototype.BrowserFeatures.ElementExtensions = true;
+}
+
+Element.extend = (function() {
+  if (Prototype.BrowserFeatures.SpecificElementExtensions)
+    return Prototype.K;
+
+  var Methods = { }, ByTag = Element.Methods.ByTag;
+
+  var extend = Object.extend(function(element) {
+    if (!element || element._extendedByPrototype ||
+        element.nodeType != 1 || element == window) return element;
+
+    var methods = Object.clone(Methods),
+      tagName = element.tagName, property, value;
+
+    // extend methods for specific tags
+    if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
+
+    for (property in methods) {
+      value = methods[property];
+      if (Object.isFunction(value) && !(property in element))
+        element[property] = value.methodize();
+    }
+
+    element._extendedByPrototype = Prototype.emptyFunction;
+    return element;
+
+  }, {
+    refresh: function() {
+      // extend methods for all tags (Safari doesn't need this)
+      if (!Prototype.BrowserFeatures.ElementExtensions) {
+        Object.extend(Methods, Element.Methods);
+        Object.extend(Methods, Element.Methods.Simulated);
+      }
+    }
+  });
+
+  extend.refresh();
+  return extend;
+})();
+
+Element.hasAttribute = function(element, attribute) {
+  if (element.hasAttribute) return element.hasAttribute(attribute);
+  return Element.Methods.Simulated.hasAttribute(element, attribute);
+};
+
+Element.addMethods = function(methods) {
+  var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
+
+  if (!methods) {
+    Object.extend(Form, Form.Methods);
+    Object.extend(Form.Element, Form.Element.Methods);
+    Object.extend(Element.Methods.ByTag, {
+      "FORM":     Object.clone(Form.Methods),
+      "INPUT":    Object.clone(Form.Element.Methods),
+      "SELECT":   Object.clone(Form.Element.Methods),
+      "TEXTAREA": Object.clone(Form.Element.Methods)
+    });
+  }
+
+  if (arguments.length == 2) {
+    var tagName = methods;
+    methods = arguments[1];
+  }
+
+  if (!tagName) Object.extend(Element.Methods, methods || { });
+  else {
+    if (Object.isArray(tagName)) tagName.each(extend);
+    else extend(tagName);
+  }
+
+  function extend(tagName) {
+    tagName = tagName.toUpperCase();
+    if (!Element.Methods.ByTag[tagName])
+      Element.Methods.ByTag[tagName] = { };
+    Object.extend(Element.Methods.ByTag[tagName], methods);
+  }
+
+  function copy(methods, destination, onlyIfAbsent) {
+    onlyIfAbsent = onlyIfAbsent || false;
+    for (var property in methods) {
+      var value = methods[property];
+      if (!Object.isFunction(value)) continue;
+      if (!onlyIfAbsent || !(property in destination))
+        destination[property] = value.methodize();
+    }
+  }
+
+  function findDOMClass(tagName) {
+    var klass;
+    var trans = {
+      "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
+      "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
+      "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
+      "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
+      "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
+      "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
+      "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
+      "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
+      "FrameSet", "IFRAME": "IFrame"
+    };
+    if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
+    if (window[klass]) return window[klass];
+    klass = 'HTML' + tagName + 'Element';
+    if (window[klass]) return window[klass];
+    klass = 'HTML' + tagName.capitalize() + 'Element';
+    if (window[klass]) return window[klass];
+
+    window[klass] = { };
+    window[klass].prototype = document.createElement(tagName).__proto__;
+    return window[klass];
+  }
+
+  if (F.ElementExtensions) {
+    copy(Element.Methods, HTMLElement.prototype);
+    copy(Element.Methods.Simulated, HTMLElement.prototype, true);
+  }
+
+  if (F.SpecificElementExtensions) {
+    for (var tag in Element.Methods.ByTag) {
+      var klass = findDOMClass(tag);
+      if (Object.isUndefined(klass)) continue;
+      copy(T[tag], klass.prototype);
+    }
+  }
+
+  Object.extend(Element, Element.Methods);
+  delete Element.ByTag;
+
+  if (Element.extend.refresh) Element.extend.refresh();
+  Element.cache = { };
+};
+
+document.viewport = {
+  getDimensions: function() {
+    var dimensions = { };
+    $w('width height').each(function(d) {
+      var D = d.capitalize();
+      dimensions[d] = self['inner' + D] ||
+       (document.documentElement['client' + D] || document.body['client' + D]);
+    });
+    return dimensions;
+  },
+
+  getWidth: function() {
+    return this.getDimensions().width;
+  },
+
+  getHeight: function() {
+    return this.getDimensions().height;
+  },
+
+  getScrollOffsets: function() {
+    return Element._returnOffset(
+      window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
+      window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
+  }
+};
+/* Portions of the Selector class are derived from Jack Slocum’s DomQuery,
+ * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
+ * license.  Please see http://www.yui-ext.com/ for more information. */
+
+var Selector = Class.create({
+  initialize: function(expression) {
+    this.expression = expression.strip();
+    this.compileMatcher();
+  },
+
+  compileMatcher: function() {
+    // Selectors with namespaced attributes can't use the XPath version
+    if (Prototype.BrowserFeatures.XPath && !(/(\[[\w-]*?:|:checked)/).test(this.expression))
+      return this.compileXPathMatcher();
+
+    var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
+        c = Selector.criteria, le, p, m;
+
+    if (Selector._cache[e]) {
+      this.matcher = Selector._cache[e];
+      return;
+    }
+
+    this.matcher = ["this.matcher = function(root) {",
+                    "var r = root, h = Selector.handlers, c = false, n;"];
+
+    while (e && le != e && (/\S/).test(e)) {
+      le = e;
+      for (var i in ps) {
+        p = ps[i];
+        if (m = e.match(p)) {
+          this.matcher.push(Object.isFunction(c[i]) ? c[i](m) :
+    	      new Template(c[i]).evaluate(m));
+          e = e.replace(m[0], '');
+          break;
+        }
+      }
+    }
+
+    this.matcher.push("return h.unique(n);\n}");
+    eval(this.matcher.join('\n'));
+    Selector._cache[this.expression] = this.matcher;
+  },
+
+  compileXPathMatcher: function() {
+    var e = this.expression, ps = Selector.patterns,
+        x = Selector.xpath, le, m;
+
+    if (Selector._cache[e]) {
+      this.xpath = Selector._cache[e]; return;
+    }
+
+    this.matcher = ['.//*'];
+    while (e && le != e && (/\S/).test(e)) {
+      le = e;
+      for (var i in ps) {
+        if (m = e.match(ps[i])) {
+          this.matcher.push(Object.isFunction(x[i]) ? x[i](m) :
+            new Template(x[i]).evaluate(m));
+          e = e.replace(m[0], '');
+          break;
+        }
+      }
+    }
+
+    this.xpath = this.matcher.join('');
+    Selector._cache[this.expression] = this.xpath;
+  },
+
+  findElements: function(root) {
+    root = root || document;
+    if (this.xpath) return document._getElementsByXPath(this.xpath, root);
+    return this.matcher(root);
+  },
+
+  match: function(element) {
+    this.tokens = [];
+
+    var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
+    var le, p, m;
+
+    while (e && le !== e && (/\S/).test(e)) {
+      le = e;
+      for (var i in ps) {
+        p = ps[i];
+        if (m = e.match(p)) {
+          // use the Selector.assertions methods unless the selector
+          // is too complex.
+          if (as[i]) {
+            this.tokens.push([i, Object.clone(m)]);
+            e = e.replace(m[0], '');
+          } else {
+            // reluctantly do a document-wide search
+            // and look for a match in the array
+            return this.findElements(document).include(element);
+          }
+        }
+      }
+    }
+
+    var match = true, name, matches;
+    for (var i = 0, token; token = this.tokens[i]; i++) {
+      name = token[0], matches = token[1];
+      if (!Selector.assertions[name](element, matches)) {
+        match = false; break;
+      }
+    }
+
+    return match;
+  },
+
+  toString: function() {
+    return this.expression;
+  },
+
+  inspect: function() {
+    return "#<Selector:" + this.expression.inspect() + ">";
+  }
+});
+
+Object.extend(Selector, {
+  _cache: { },
+
+  xpath: {
+    descendant:   "//*",
+    child:        "/*",
+    adjacent:     "/following-sibling::*[1]",
+    laterSibling: '/following-sibling::*',
+    tagName:      function(m) {
+      if (m[1] == '*') return '';
+      return "[local-name()='" + m[1].toLowerCase() +
+             "' or local-name()='" + m[1].toUpperCase() + "']";
+    },
+    className:    "[contains(concat(' ', @class, ' '), ' #{1} ')]",
+    id:           "[@id='#{1}']",
+    attrPresence: "[@#{1}]",
+    attr: function(m) {
+      m[3] = m[5] || m[6];
+      return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
+    },
+    pseudo: function(m) {
+      var h = Selector.xpath.pseudos[m[1]];
+      if (!h) return '';
+      if (Object.isFunction(h)) return h(m);
+      return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
+    },
+    operators: {
+      '=':  "[@#{1}='#{3}']",
+      '!=': "[@#{1}!='#{3}']",
+      '^=': "[starts-with(@#{1}, '#{3}')]",
+      '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
+      '*=': "[contains(@#{1}, '#{3}')]",
+      '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
+      '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
+    },
+    pseudos: {
+      'first-child': '[not(preceding-sibling::*)]',
+      'last-child':  '[not(following-sibling::*)]',
+      'only-child':  '[not(preceding-sibling::* or following-sibling::*)]',
+      'empty':       "[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",
+      'checked':     "[@checked]",
+      'disabled':    "[@disabled]",
+      'enabled':     "[not(@disabled)]",
+      'not': function(m) {
+        var e = m[6], p = Selector.patterns,
+            x = Selector.xpath, le, m, v;
+
+        var exclusion = [];
+        while (e && le != e && (/\S/).test(e)) {
+          le = e;
+          for (var i in p) {
+            if (m = e.match(p[i])) {
+              v = Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m);
+              exclusion.push("(" + v.substring(1, v.length - 1) + ")");
+              e = e.replace(m[0], '');
+              break;
+            }
+          }
+        }
+        return "[not(" + exclusion.join(" and ") + ")]";
+      },
+      'nth-child':      function(m) {
+        return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
+      },
+      'nth-last-child': function(m) {
+        return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
+      },
+      'nth-of-type':    function(m) {
+        return Selector.xpath.pseudos.nth("position() ", m);
+      },
+      'nth-last-of-type': function(m) {
+        return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
+      },
+      'first-of-type':  function(m) {
+        m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
+      },
+      'last-of-type':   function(m) {
+        m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
+      },
+      'only-of-type':   function(m) {
+        var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
+      },
+      nth: function(fragment, m) {
+        var mm, formula = m[6], predicate;
+        if (formula == 'even') formula = '2n+0';
+        if (formula == 'odd')  formula = '2n+1';
+        if (mm = formula.match(/^(\d+)$/)) // digit only
+          return '[' + fragment + "= " + mm[1] + ']';
+        if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
+          if (mm[1] == "-") mm[1] = -1;
+          var a = mm[1] ? Number(mm[1]) : 1;
+          var b = mm[2] ? Number(mm[2]) : 0;
+          predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
+          "((#{fragment} - #{b}) div #{a} >= 0)]";
+          return new Template(predicate).evaluate({
+            fragment: fragment, a: a, b: b });
+        }
+      }
+    }
+  },
+
+  criteria: {
+    tagName:      'n = h.tagName(n, r, "#{1}", c);   c = false;',
+    className:    'n = h.className(n, r, "#{1}", c); c = false;',
+    id:           'n = h.id(n, r, "#{1}", c);        c = false;',
+    attrPresence: 'n = h.attrPresence(n, r, "#{1}"); c = false;',
+    attr: function(m) {
+      m[3] = (m[5] || m[6]);
+      return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m);
+    },
+ 

<TRUNCATED>

[31/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/main.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/main.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/main.js
new file mode 100644
index 0000000..14e332d
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/main.js
@@ -0,0 +1,1818 @@
+/*
+ * Copyright 2005,2007 WSO2, Inc. http://wso2.com
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var serviceGroupId;
+var userNameString;
+var numDaysToKeepCookie = 2;
+var locationString = self.location.href;
+
+
+/*
+ * two variables to hold the width and the height of the message box
+ */
+var messageBoxWidth = 300;
+var messageBoxHeight = 90;
+var warningMessageImage = 'images/oops.gif';
+var informationMessageImage = 'images/information.gif';
+var warningnMessagebackColor = '#FFC';
+var informationMessagebackColor = '#BBF';
+var runPoleHash = false;
+
+/* constants for Message types */
+var INFORMATION_MESSAGE = 1;
+var WARNING_MESSAGE = 2;
+
+/* == URL and Host. Injected the values using AdminUIServletFilter == */
+var URL;
+var GURL;
+var serverURL;
+var HTTP_PORT;
+var HTTPS_PORT;
+var HTTP_URL;
+var HOST;
+var SERVICE_PATH;
+var ROOT_CONTEXT;
+/* ================== */
+
+var lastHash;
+
+var userName;
+
+var isServerRestarting = false;
+
+var tabcount = 0;
+
+var tabCharactors = " ";
+
+var requestFromServerPending = false;
+
+/*
+ * mainMenuObject will be used to hold the <a/> objects, that's been used
+ * clicked in main menu items.
+ */
+var mainMenuObjectId = null;
+var mainMenuObjectIndex = -1;
+
+var sessionCookieValue;
+
+/*
+ * Everything will be related to wso2 namespace. If wso2 object dosenot present
+ * create it first
+ */
+if (typeof(wso2) == "undefined") {
+    var wso2 = {};
+}
+
+/*
+Create the objects with associative style
+*/
+wso2.namespace = function() {
+    var a = arguments, o = null, i, j, d;
+    for (i = 0; i < a.length; i = i + 1) {
+        d = a[i].split(".");
+        o = wso2;
+
+        // wso2 is implied, so it is ignored if it is included
+        for (j = (d[0] == "wso2") ? 1 : 0; j < d.length; j = j + 1) {
+            o[d[j]] = o[d[j]] || {};
+            o = o[d[j]];
+        }
+    }
+
+    return o;
+};
+
+wso2.init = function() {
+    this.namespace("wsf");
+}
+/*Create only wso2.wsf namespace */
+wso2.init();
+
+/* Usage of native WSRequest object */
+wso2.wsf.READY_STATE_UNINITIALIZED = 0;
+wso2.wsf.READY_STATE_LOADING = 1;
+wso2.wsf.READY_STATE_LOADED = 2;
+wso2.wsf.READY_STATE_INTERACTIVE = 3;
+wso2.wsf.READY_STATE_COMPLETE = 4;
+
+/**
+ * wso2.wsf.WSRequest is the stub that wraps the native WSRequest to invoke a
+ * web service. If the onLoad method is given, this will communicate with the
+ * web service async. Sync invocation is not burned into this stub.
+ * 
+ * If onError method is undefined, default onError will come into play. onError
+ * will be invoked if SOAP fault is received.
+ * 
+ * Usage of onLoad : new
+ * wso2.wsf.WSRequest("http://my.web.service","urn:myAction","<foo/>",callback);
+ * 
+ * callback = function(){ // to get the response xml call this.req.responseXML
+ * //to get the response text call this.req.responseText //if an object needs
+ * the values of this.req call bar.call(this,x,y,z); this.params;
+ *  }
+ * 
+ * @url : Endpoint referece (EPR)
+ * @action : WSA Action for the EPR
+ * @payLoad : Pay load to be send
+ * @onLoad : Function that should be called when onreadystate has been called
+ * @params : Will allow to pass parameters to the callback and later can be used
+ * @onError : Function that should be called when an error or SOAP fault has
+ *          been received.
+ */
+wso2.wsf.WSRequest = function(url, action, payLoad, onLoad, params, onError, proxyAddress, accessibleDomain) {
+    this.url = url;
+    this.payLoad = payLoad;
+    this.params = params;
+    this.onLoad = (onLoad) ? onLoad : this.defaultOnLoad;
+    this.onError = (onError) ? onError : this.defaultError;
+    this.req = null;
+    this.options = new Array();
+    this.options["useBindng"] = "SOAP 1.1";
+    this.options["action"] = this._parseAction(action);
+    this.options["accessibleDomain"] = accessibleDomain;
+    this.proxyAddress = proxyAddress;
+    this.loadXMLDoc();
+}
+
+wso2.wsf.WSRequest.prototype = {
+    /**
+     * Action should be a valid URI
+     */
+    _parseAction : function(action) {
+        if (!action) {
+            return '""';
+        }
+
+        if (action.indexOf("urn:") > -1 ||
+            action.indexOf("URN:") > -1 ||
+            action.indexOf("http://") > -1) {
+            return action;
+        }
+        return "urn:" + action;
+
+    },
+    defaultError : function() {
+        var error = this.req.error;
+        if (!error) {
+            var reason = "";
+            var a = arguments;
+            if (a.length > 0) {
+                reason = a[0];
+            }
+            // This is to fix problems encountered in Windows browsers.
+            var status = this.req._xmlhttp.status;
+            if (status && status == 500) {
+                return;
+            } else {
+                CARBON.showErrorDialog("Console has received an error. Please refer" +
+                                           " to system admin for more details. " +
+                                           reason.toString());
+            }
+
+            if (typeof(stoppingRefreshingMethodsHook) != "undefined" &&
+                typeof(logoutVisual) != "undefined") {
+                stoppingRefreshingMethodsHook();
+                logoutVisual();
+            }
+            return;
+        }
+
+        if (error.reason != null) {
+            if (typeof (error.reason.indexOf) != "undefined") {
+                if (error.reason.indexOf("Access Denied. Please login first") > -1) {
+                    if (typeof(stoppingRefreshingMethodsHook) != "undefined" &&
+                        typeof(logoutVisual) != "undefined") {
+                        stoppingRefreshingMethodsHook();
+                        logoutVisual();
+                    }
+                }
+            }
+        }
+
+        if (error.detail != null) {
+            if (typeof (error.detail.indexOf) != "undefined") {
+                if (error.detail.indexOf("NS_ERROR_NOT_AVAILABLE") > -1) {
+                    if (typeof(stoppingRefreshingMethodsHook) != "undefined" &&
+                        typeof(logoutVisual) != "undefined") {
+                        stoppingRefreshingMethodsHook();
+                        logoutVisual();
+                    }
+                }
+            }
+        }
+
+        CARBON.showErrorDialog(error.reason);
+
+    },
+
+    defaultOnLoad : function() {
+        /*default onLoad is reached and do not do anything.*/
+    },
+
+    loadXMLDoc : function() {
+        try {
+            stopWaitAnimation(); /*
+									 * This will stop the wait animation if
+									 * consecutive requests are made.
+									 */
+            this.req = new WSRequest();
+            this.req.proxyAddress = this.proxyAddress;
+            var loader = this;
+            if (this.req) {
+                executeWaitAnimation();
+                this.req.onreadystatechange = function() {
+                    loader.onReadyState.call(loader);
+                }
+                this.req.open(this.options, this.url, true);
+                this.req.send(this.payLoad);
+            } else {
+                stopWaitAnimation()
+                wso2.wsf.Util.alertWarning("Native XMLHttpRequest can not be found.")
+            }
+        } catch(e) {
+            stopWaitAnimation();
+            wso2.wsf.Util.alertWarning("Erro occured while communicating with the server " +
+                                       e.toString());
+        }
+
+    },
+
+    onReadyState : function() {
+        try {
+            var ready = this.req.readyState;
+            if (ready == wso2.wsf.READY_STATE_COMPLETE) {
+                wso2.wsf.Util.cursorClear();
+                stopWaitAnimation();
+                var httpStatus;
+                if (this.req.sentRequestUsingProxy) {
+                    httpStatus = this.req.httpStatus;
+                } else {
+                    httpStatus = this.req._xmlhttp.status;
+                }
+                if (httpStatus == 200 || httpStatus == 202) {
+                    this.onLoad.call(this);
+                } else if (httpStatus >= 400) {
+                    this.onError.call(this);
+                }
+            }
+        } catch(e) {
+            wso2.wsf.Util.cursorClear();
+            stopWaitAnimation();
+            this.onError.call(this,e);
+        }
+    }
+};
+
+
+/*
+ * Utility class
+ */
+wso2.wsf.Util = {
+    _msxml : [
+            'MSXML2.XMLHTTP.3.0',
+            'MSXML2.XMLHTTP',
+            'Microsoft.XMLHTTP'
+            ],
+
+    getBrowser : function() {
+        var ua = navigator.userAgent.toLowerCase();
+        if (ua.indexOf('opera') != -1) { // Opera (check first in case of spoof)
+            return 'opera';
+        } else if (ua.indexOf('msie 7') != -1) { // IE7
+            return 'ie7';
+        } else if (ua.indexOf('msie') != -1) { // IE
+            return 'ie';
+        } else if (ua.indexOf('safari') !=
+                   -1) { // Safari (check before Gecko because it includes "like Gecko")
+            return 'safari';
+        } else if (ua.indexOf('gecko') != -1) { // Gecko
+            return 'gecko';
+        } else {
+            return false;
+        }
+    },
+    createXMLHttpRequest : function() {
+        var xhrObject;
+
+        try {
+            xhrObject = new XMLHttpRequest();
+        } catch(e) {
+            for (var i = 0; i < this._msxml.length; ++i) {
+                try
+                {
+                    // Instantiates XMLHttpRequest for IE and assign to http.
+                    xhrObject = new ActiveXObject(this._msxml[i]);
+                    break;
+                }
+                catch(e) {
+                    // do nothing
+                }
+            }
+        } finally {
+            return xhrObject;
+        }
+    },
+
+    isIESupported : function() {
+        var browser = this.getBrowser();
+        if (this.isIEXMLSupported() && (browser == "ie" || browser == "ie7")) {
+            return true;
+        }
+
+        return false;
+
+    },
+
+    isIEXMLSupported: function() {
+        if (!window.ActiveXObject) {
+            return false;
+        }
+        try {
+            new ActiveXObject("Microsoft.XMLDOM");
+            return true;
+
+        } catch(e) {
+            return false;
+        }
+    },
+
+/*
+This function will be used as an xml to html
+transformation helper in callback objects. Works only with wso2.wsf.WSRequest.
+@param xml : XML document
+@param xsltFile : XSLT file
+@param objDiv  : Div that trasformation should be applied
+@param doNotLoadDiv : flag that store the div in browser history
+@param isAbsPath : If xsltFile is absolute, then isAbsPath should be true
+*/
+    callbackhelper : function(xml, xsltFile, objDiv, doNotLoadDiv, isAbsPath) {
+        this.processXML(xml, xsltFile, objDiv, isAbsPath);
+        if (!doNotLoadDiv) {
+            this.showOnlyOneMain(objDiv);
+        }
+
+    },
+
+/*
+@parm xml : DOM document that needed to be transformed
+@param xslFileName : XSLT file name. This could be foo.xsl, which is reside in /extensions/core/js
+                     or bar/car/foo.xsl. If the later version is used, the isAbstPath should be true.
+@param objDiv : Div object, the transformed fragment will be append to it.
+@param isAbsPath : Used to indicate whether the usr provided is a absolute path.
+
+*/
+    processXML : function (xml, xslFileName, objDiv, isAbsPath) {
+        var xsltHelperObj = new wso2.wsf.XSLTHelper();
+        xsltHelperObj.transform(objDiv, xml, xslFileName, isAbsPath);
+    },
+
+/*
+Login method
+*/
+    login :function(userName, password, callbackFunction) {
+
+        if (typeof(callbackFunction) != "function") {
+            this.alertWarning("Login can not be continued due to technical errors.");
+            return;
+        }
+
+        var bodyXML = ' <ns1:login  xmlns:ns1="http://org.apache.axis2/xsd">\n' +
+                      ' <arg0>' + userName + '</arg0>\n' +
+                      ' <arg1>' + password + '</arg1>\n' +
+                      ' </ns1:login>\n';
+        var callURL = serverURL + "/" + GLOBAL_SERVICE_STRING + "/" + "login";
+
+        new wso2.wsf.WSRequest(callURL, "urn:login", bodyXML, callbackFunction);
+
+    },
+/*
+Logout method
+*/
+    logout : function(callbackFunction) {
+        // stopping all refressing methods
+        stoppingRefreshingMethodsHook();
+        historyStorage.reset();
+        var bodyXML = ' <ns1:logout  xmlns:ns1="http://org.apache.axis2/xsd"/>\n';
+
+        var callURL = serverURL + "/" + GLOBAL_SERVICE_STRING + "/" + "logout";
+        new wso2.wsf.WSRequest(callURL, "urn:logout", bodyXML, callbackFunction);
+    },
+/*
+This method will store the given the div in the browser history
+@param objDiv : Div that needed to be stored.
+@param isReloadDiv : div is restored.
+*/
+    showOnlyOneMain : function(objDiv, isReloadDiv) {
+        if (objDiv == null)
+            return;
+
+        var par = objDiv.parentNode;
+
+        var len = par.childNodes.length;
+        var count;
+        for (count = 0; count < len; count++) {
+            if (par.childNodes[count].nodeName == "DIV") {
+                par.childNodes[count].style.display = 'none';
+            }
+        }
+        objDiv.style.display = 'inline';
+        var output = objDiv.attributes;
+        var attLen = output.length;
+        var c;
+        var divNameStr;
+        for (c = 0; c < attLen; c++) {
+            if (output[c].name == 'id') {
+                divNameStr = output[c].value;
+            }
+        }
+        //alert(divNameStr);
+        this.setDivTabsToMinus(objDiv);
+        this._storeDiv(divNameStr, isReloadDiv)
+    },
+
+    _storeDiv : function(divName, isReloadDiv) {
+        if (lastHash != "___" + divName) {
+            if (!isReloadDiv) {
+                lastHash = "___" + divName;
+                // alert("Storing div " + lastHash);
+                if (mainMenuObjectId != null && mainMenuObjectIndex != -1) {
+                    dhtmlHistory.add(lastHash,
+                    {menuObj:mainMenuObjectId + ':' + mainMenuObjectIndex});
+
+                } else {
+                    dhtmlHistory.add(lastHash, true);
+                }
+            }
+        }
+    },
+
+/*
+This will set all the tabindexes in all the child divs to -1.
+This way no div will get focus  when some one is tabbing around.
+@parm objDiv : parent div
+*/
+    setDivTabsToMinus : function (objDiv) {
+        var divs = objDiv.getElementsByTagName("div");
+        for (var index = 0; index < divs.length; index++) {
+            divs[index].setAttribute("tabindex", "-1");
+        }
+    },
+
+/*
+ Set a cookie.
+ @param name : Cookie name
+ @param value : Cookie value
+ @param expires : Date of expire
+ @param secure: If the given cookie should be secure.
+
+*/
+    setCookie : function(name, value, expires, secure) {
+        document.cookie = name + "=" + escape(value) +
+                          ((expires) ? "; expires=" + expires.toGMTString() : "") +
+                          ((secure) ? "; secure" : "");
+    },
+
+/*
+Get Cookie value.
+@param name : Cookie name
+*/
+    getCookie : function (name) {
+        var dc = document.cookie;
+        var prefix = name + "=";
+        var begin = dc.indexOf("; " + prefix);
+        if (begin == -1) {
+            begin = dc.indexOf(prefix);
+            if (begin != 0) return null;
+        } else {
+            begin += 2;
+        }
+        var end = document.cookie.indexOf(";", begin);
+        if (end == -1) {
+            end = dc.length;
+        }
+        return unescape(dc.substring(begin + prefix.length, end));
+    },
+
+/*
+Delete a Cookie.
+@param name : Cookie name
+*/
+    deleteCookie : function(name) {
+        document.cookie = name + "=" + "; EXPIRES=Thu, 01-Jan-70 00:00:01 GMT";
+
+    },
+/*
+Given DOM document will be serialized into a String.
+@param paylod : DOM payload.
+*/
+    xmlSerializerToString : function (payload) {
+        var browser = this.getBrowser();
+
+        switch (browser) {
+            case "gecko":
+                var serializer = new XMLSerializer();
+                return serializer.serializeToString(payload);
+                break;
+            case "ie":
+                return payload.xml;
+                break;
+            case "ie7":
+                return payload.xml;
+                break;
+            case "opera":
+                var xmlSerializer = document.implementation.createLSSerializer();
+                return xmlSerializer.writeToString(payload);
+                break;
+            case "safari":
+            // use the safari method
+                throw new Error("Not implemented");
+            case "undefined":
+                throw new Error("XMLHttp object could not be created");
+        }
+    },
+
+/*
+Check if the give the brower is IE
+*/
+    isIE : function() {
+        return this.isIESupported();
+    },
+
+/*
+   This method will restart the server.
+*/
+    restartServer : function (callbackFunction) {
+        var msgStat = confirm("Do you want to restart the server?");
+        if(!msgStat){
+            return;
+        }
+
+        var bodyXML = '<req:restartRequest xmlns:req="http://org.apache.axis2/xsd"/>\n';
+
+        var callURL = serverURL + "/" + ADMIN_SERVER_URL ;
+        if (callbackFunction && (typeof(callbackFunction) == "function")) {
+            new wso2.wsf.WSRequest(callURL, "urn:restart", bodyXML, callbackFunction);
+        } else {
+            new wso2.wsf.WSRequest(callURL, "urn:restart", bodyXML, wso2.wsf.Util.restartServer["callback"]);
+        }
+    },
+
+/*
+   This method will restart the server gracefully.
+*/
+    restartServerGracefully : function (callbackFunction) {
+        var msgStat = confirm("Do you want to gracefully restart the server?");
+        if(!msgStat){
+            return;
+        }
+        var bodyXML = '<req:restartGracefullyRequest xmlns:req="http://org.apache.axis2/xsd"/>\n';
+
+        var callURL = serverURL + "/" + ADMIN_SERVER_URL ;
+        if (callbackFunction && (typeof(callbackFunction) == "function")) {
+            new wso2.wsf.WSRequest(callURL, "urn:restartGracefully", bodyXML, callbackFunction);
+        } else {
+            new wso2.wsf.WSRequest(callURL, "urn:restartGracefully", bodyXML, wso2.wsf.Util.restartServerGracefully["callback"]);
+        }
+    },
+
+/*
+   This method will shutdown the server gracefully.
+*/
+    shutdownServerGracefully : function (callbackFunction) {
+        var msgStat = confirm("Do you want to gracefully shutdown the server?");
+        if(!msgStat){
+            return;
+        }
+        var bodyXML = '<req:shutdownGracefullyRequest xmlns:req="http://org.apache.axis2/xsd"/>\n';
+
+        var callURL = serverURL + "/" + ADMIN_SERVER_URL ;
+        if (callbackFunction && (typeof(callbackFunction) == "function")) {
+            new wso2.wsf.WSRequest(callURL, "urn:shutdownGracefully", bodyXML, callbackFunction);
+        } else {
+            new wso2.wsf.WSRequest(callURL, "urn:shutdownGracefully", bodyXML, wso2.wsf.Util.shutdownServerGracefully["callback"]);
+        }
+    },
+
+/*
+   This method will shutdown the server immediately.
+*/
+    shutdownServer : function (callbackFunction) {
+        var msgStat = confirm("Do you want to shutdown the server?");
+        if(!msgStat){
+            return;
+        }
+        var bodyXML = '<req:shutdownRequest xmlns:req="http://org.apache.axis2/xsd"/>\n';
+
+        var callURL = serverURL + "/" + ADMIN_SERVER_URL ;
+        if (callbackFunction && (typeof(callbackFunction) == "function")) {
+            new wso2.wsf.WSRequest(callURL, "urn:shutdown", bodyXML, callbackFunction);
+        } else {
+            new wso2.wsf.WSRequest(callURL, "urn:shutdown", bodyXML, wso2.wsf.Util.shutdownServer["callback"]);
+        }
+    },
+
+/*
+Trim the give string
+*/
+    trim: function (strToTrim) {
+        return(strToTrim.replace(/^\s+|\s+$/g, ''));
+    },
+
+/*
+Busy cursor
+*/
+    cursorWait : function () {
+        document.body.style.cursor = 'wait';
+    },
+
+/*
+Normal cursor
+*/
+    cursorClear : function() {
+        document.body.style.cursor = 'default';
+    },
+
+/*
+Open a new window and show the results
+*/
+    openWindow : function(value) {
+        // This will return a String of foo/bar/ OR foo/bar/Foo
+        window.open(serviceURL + '/' + value);
+    },
+
+/*
+Propmpt a prompt box
+*/
+    getUserInput : function() {
+        return this.getUserInputCustum("Please enter the parameter name", "Please enter the parameter value for ", true);
+    },
+
+/*
+Will use the promt provided by the user prompting for parameters. If the
+useParamNameInPrompt is true then the param value prompt will be appended
+the paramName to the back of the paramValuePrompt value.
+*/
+
+    getUserInputCustum : function (paramNamePrompt, paramValuePrompt, useParamNameInPrompt) {
+        var returnArray = new Array();
+        var tempValue = window.prompt(paramNamePrompt);
+        if (tempValue == '' || tempValue == null) {
+            return null;
+        }
+        returnArray[0] = tempValue;
+        if (useParamNameInPrompt) {
+            tempValue = window.prompt(paramValuePrompt + returnArray[0]);
+        } else {
+            tempValue = window.prompt(paramValuePrompt);
+        }
+        if (tempValue == '' || tempValue == null) {
+            return null;
+        }
+        returnArray[1] = tempValue;
+        return returnArray;
+    },
+
+/*
+Show Response
+*/
+    showResponseMessage : function (response) {
+        var returnStore = response.getElementsByTagName("return")[0];
+        this.alertMessage(returnStore.firstChild.nodeValue);
+    },
+
+/*shows the a custom alert box public*/
+    alertInternal : function (message, style) {
+
+        var messageBox = document.getElementById('alertMessageBox');
+        var messageBoxTextArea = document.getElementById('alertMessageBoxMessageArea');
+        // var messageBoxImage =
+		// document.getElementById('alertMessageBoxImg');alertMessageBox
+        // set the left and top positions
+
+        var theWidth;
+        if (window.innerWidth)
+        {
+            theWidth = window.innerWidth
+        }
+        else if (document.documentElement && document.documentElement.clientWidth)
+        {
+            theWidth = document.documentElement.clientWidth
+        }
+        else if (document.body)
+        {
+            theWidth = document.body.clientWidth
+        }
+
+        var theHeight;
+        if (window.innerHeight)
+        {
+            theHeight = window.innerHeight
+        }
+        else if (document.documentElement && document.documentElement.clientHeight)
+        {
+            theHeight = document.documentElement.clientHeight
+        }
+        else if (document.body)
+        {
+            theHeight = document.body.clientHeight
+        }
+
+        var leftPosition = theWidth / 2 - messageBoxWidth / 2 ;
+        var topPosition = theHeight / 2 - messageBoxHeight / 2;
+        var bkgr;
+        messageBox.style.left = leftPosition + 'px';
+        messageBox.style.top = topPosition + 'px';
+        // set the width and height
+        messageBox.style.width = messageBoxWidth + 'px';
+        // messageBox.style.height = messageBoxHeight+ 'px';
+
+        // set the pictures depending on the style
+        if (style == WARNING_MESSAGE) {
+            bkgr =
+            "url(" + warningMessageImage + ") " + warningnMessagebackColor + " no-repeat 15px 17px";
+        } else if (style == INFORMATION_MESSAGE) {
+            bkgr = "url(" + informationMessageImage + ") " + informationMessagebackColor +
+                   " no-repeat 15px 17px";
+        }
+        messageBox.style.background = bkgr;
+        // set the message
+        messageBoxTextArea.innerHTML = message;
+        messageBox.style.display = 'inline';
+        document.getElementById('alertBoxButton').focus();
+        return false;
+    },
+
+/*
+Convenience methods that call the alertInternal
+show a information message
+*/
+    alertMessage : function (message) {
+        this.alertInternal(message, INFORMATION_MESSAGE);
+    },
+
+/*
+Show a warning message
+*/
+    alertWarning : function (message) {
+        var indexOfExceptionMsg = message.indexOf('; nested exception is: ');
+        if (indexOfExceptionMsg != -1) {
+            message = message.substring(0, indexOfExceptionMsg);
+        }
+        this.alertInternal(message, WARNING_MESSAGE);
+    },
+
+/*
+Find the host and assingend it to HOST
+*/
+    initURLs : function() {
+        var locationHref = self.location.href;
+
+        var tmp1 = locationHref.indexOf("://");
+	var tmp2 = locationHref.substring(tmp1 + 3, locationHref.indexOf("?"));
+        var tmp3 = tmp2.indexOf(":");
+        if (tmp3 > -1) {
+            HOST = tmp2.substring(0, tmp3);
+        } else {
+            tmp3 = tmp2.indexOf("/");
+            HOST = tmp2.substring(0, tmp3);
+        }
+
+        URL = "https://" + HOST +
+              (HTTPS_PORT != 443 ? (":" + HTTPS_PORT + ROOT_CONTEXT)  : ROOT_CONTEXT);
+        GURL = "http://" + HOST +
+              (HTTP_PORT != 80 ? (":" + HTTP_PORT + ROOT_CONTEXT)  : ROOT_CONTEXT);
+
+        HTTP_URL = "http://" + HOST +
+                   (HTTP_PORT != 80 ? (":" + HTTP_PORT + ROOT_CONTEXT)  : ROOT_CONTEXT) +
+                   "/" + SERVICE_PATH;
+        serverURL = "https://" + HOST +
+                    (HTTPS_PORT != 443 ? (":" + HTTPS_PORT + ROOT_CONTEXT)  : ROOT_CONTEXT) +
+                    "/" + SERVICE_PATH;
+
+    },
+
+    getProtocol : function() {
+        var _tmpURL = locationString.substring(0, locationString.lastIndexOf('/'));
+        if (_tmpURL.indexOf('https') > -1) {
+            return 'https';
+        } else if (_tmpURL.indexOf('http') > -1) {
+            return 'http';
+        } else {
+            return null;
+        }
+    },
+
+    getServerURL : function() {
+        var _tmpURL = locationString.substring(0, locationString.lastIndexOf('/'));
+        if (_tmpURL.indexOf('https') == -1) {
+            return HTTP_URL;
+        }
+        return serverURL;
+    },
+
+    getBackendServerURL : function(frontendURL, backendURL) {
+        if (backendURL.indexOf("localhost") >= 0 || backendURL.indexOf("127.0.0.1") >= 0) {
+            return frontendURL;
+        } else {
+            return backendURL;
+        }
+    }
+};
+
+
+/*
+ * XSLT helper will be used to communicate with a server and aquire XSLT
+ * resource. The communication will be sync. This will quire the resource with
+ * reference to the brower it will be injected.
+ * 
+ * XSLT helper caches the loaded XSLT documents. In order to initiate, Used has
+ * to first call the, wso2.wsf.XSLTHelper.init() method in window.onLoad.
+ * 
+ */
+wso2.wsf.XSLTHelper = function() {
+    this.req = null;
+}
+/*
+ xslName is add to the array
+*/
+wso2.wsf.XSLTHelper.xsltCache = null;
+
+wso2.wsf.XSLTHelper.init = function() {
+    wso2.wsf.XSLTHelper.xsltCache = new Array();
+}
+
+wso2.wsf.XSLTHelper.add = function(xslName, xslObj) {
+    wso2.wsf.XSLTHelper.xsltCache[xslName] = xslObj;
+}
+wso2.wsf.XSLTHelper.get = function(xslName) {
+    return wso2.wsf.XSLTHelper.xsltCache[xslName];
+}
+
+wso2.wsf.XSLTHelper.prototype = {
+    load : function(url, fileName, params) {
+        try {
+            if (window.XMLHttpRequest && window.XSLTProcessor) {
+                this.req = new XMLHttpRequest();
+                this.req.open("GET", url, false);
+                // Sync call
+                this.req.send(null);
+                var httpStatus = this.req.status;
+                if (httpStatus == 200) {
+                    wso2.wsf.XSLTHelper.add(fileName, this.req.responseXML);
+                } else {
+                    this.defaultError.call(this);
+                }
+
+            } else if (window.ActiveXObject) {
+                try {
+                    this.req = new ActiveXObject("Microsoft.XMLDOM");
+                    this.req.async = false;
+                    this.req.load(url);
+                    wso2.wsf.XSLTHelper.add(fileName, this.req);
+                } catch(e) {
+                    wso2.wsf.Util.alertWarning("Encounterd an error  : " + e);
+                }
+            }
+
+        } catch(e) {
+            this.defaultError.call(this);
+        }
+
+    },
+
+    defaultError : function() {
+        CARBON.showWarningDialog("Error Fetching XSLT file.")
+    },
+
+    transformMozilla : function(container, xmlDoc, fileName, isAbsPath, xslExtension, params) {
+        var xslStyleSheet = wso2.wsf.XSLTHelper.get(fileName);
+        if (xslStyleSheet == undefined) {
+            var url = this.calculateURL(fileName, isAbsPath, xslExtension);
+            this.load(url, fileName, params);
+        }
+        xslStyleSheet = wso2.wsf.XSLTHelper.get(fileName);
+        if (xslStyleSheet == undefined || xslStyleSheet == null) {
+            wso2.wsf.Util.alertWarning("XSL Style Sheet is not available");
+            return;
+        }
+
+        try {
+            var xsltProcessor = new XSLTProcessor();
+
+            if (params) {
+                var len = params.length;
+                for (var i = 0; i < len; i++) {
+                    xsltProcessor.setParameter(null, params[i][0], params[i][1]);
+                }
+
+            }
+            xsltProcessor.importStylesheet(xslStyleSheet);
+            var fragment = xsltProcessor.transformToFragment(xmlDoc, document);
+
+            container.innerHTML = "";
+            container.appendChild(fragment);
+        } catch(e) {
+          //  wso2.wsf.Util.alertWarning("Encounterd an error  : " + e.toString());
+        }
+    },
+
+    transformIE : function(container, xmlDoc, fileName, isAbsPath, xslExtension, params) {
+        try {
+            if (params) {
+                var url = this.calculateURL(fileName, isAbsPath, xslExtension);
+                // declare the local variables
+                var xslDoc, docProcessor, docCache, docFragment;
+                // instantiate and load the xsl document
+                xslDoc = new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
+                xslDoc.async = false;
+                xslDoc.load(url);
+
+                // prepare the xsl document for transformation
+                docCache = new ActiveXObject("MSXML2.XSLTemplate");
+                docCache.stylesheet = xslDoc;
+                // instantiate the document processor and submit the xml
+				// document
+                docProcessor = docCache.createProcessor();
+                docProcessor.input = xmlDoc;
+                // add parameters to the xsl document
+                var len = params.length;
+                for (var i = 0; i < len; i++) {
+                    docProcessor.addParameter(params[i][0], params[i][1], "");
+                }
+                // process the documents into html and submit to the passed div to the HMTL page
+                docProcessor.transform();
+                // divID.innerHTML = docProcessor.output;
+                container.innerHTML = "<div>" + docProcessor.output + "</div>";
+
+            } else {
+                var xslStyleSheet = wso2.wsf.XSLTHelper.get(fileName);
+                if (xslStyleSheet == undefined) {
+                    var url = this.calculateURL(fileName, isAbsPath, xslExtension);
+                    this.load(url, fileName);
+                }
+                xslStyleSheet = wso2.wsf.XSLTHelper.get(fileName);
+                if (xslStyleSheet == undefined || xslStyleSheet == null) {
+                    wso2.wsf.Util.alertWarning("XSL Style Sheet is not available");
+                    return;
+                }
+                var fragment = xmlDoc.transformNode(xslStyleSheet);
+                container.innerHTML = "<div>" + fragment + "</div>";
+            }
+        } catch(e) {
+            wso2.wsf.Util.alertWarning("Encounterd an error  : " + e.toString());
+        }
+
+    },
+
+    calculateURL : function (fileName, isAbsPath, xslExtension) {
+        var fullPath;
+
+        if (!xslExtension) {
+            xslExtension = 'core';
+        }
+
+        if (isAbsPath) {
+            fullPath = fileName;
+            return fullPath;
+        }
+
+        //        fullPath = URL + "/extensions/" + xslExtension + "/xslt/" + fileName;
+        /* Using the relative paths to obtain XSLT */
+        fullPath = "extensions/" + xslExtension + "/xslt/" + fileName;
+
+        return fullPath;
+
+    },
+
+/**
+ * @param container : DIV object. After transformation generated HTML will be injected to this location.
+ * @param xmlDoc    : XML DOM Document.
+ * @param fileName  : XSL file name. Make sure this being unique
+ * @param isAbsPath : Used to indicate whether the usr provided is a absolute path. This is needed to reuse this
+ method from outside the admin service.
+ * @param xslExtension : Extension location
+ * @param params : An array containing params that needed to be injected when doing transformation.
+ ex: var param = new Array(["fooKey","fooValue"]);
+ thus, "fooKey" will be used for find the parameter name and fooValue will be set
+ as the parameter value.
+ */
+    transform : function(container, xmlDoc, fileName, isAbsPath, xslExtension, params) {
+        if (!this.isXSLTSupported()) {
+            wso2.wsf.Util.alertWarning("This browser does not support XSLT");
+            return;
+        }
+
+        if (window.XMLHttpRequest && window.XSLTProcessor) {
+            this.transformMozilla(container, xmlDoc, fileName, isAbsPath, xslExtension, params);
+
+        } else if (window.ActiveXObject) {
+            this.transformIE(container, xmlDoc, fileName, isAbsPath, xslExtension, params);
+        }
+
+
+    },
+    isXSLTSupported : function() {
+        return (window.XMLHttpRequest && window.XSLTProcessor) || wso2.wsf.Util.isIEXMLSupported();
+
+    }
+
+};
+
+
+// /////////////////////////////////////////////////////////////////////////////////////////////////
+// /////////////////////////////////////////////////////////////////////////////////////////////////
+/*
+ * All the inline function found after this point onwards are titly bound with
+ * the index.html template and users are not encourage to use them. If users
+ * want to use them, they should do it with their own risk.
+ */
+
+
+/* public */
+function finishLogin() {
+    //new one;
+    userNameString = "<nobr>Signed in as <strong>" + userName +
+                     "</strong>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='about.html' target='_blank'>About</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='docs/index_docs.html' target='_blank'>Docs</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a id='logOutA' href='#' onclick='javascript:wso2.wsf.Util.logout(wso2.wsf.Util.logout[\"callback\"]); return false;'>Sign Out</a></nobr>";
+    document.getElementById("meta").innerHTML = userNameString;
+    document.getElementById("navigation_general").style.display = "none";
+    document.getElementById("navigation_logged_in").style.display = "inline";
+    document.getElementById("content").style.display = "inline";
+    updateRegisterLink();
+}
+
+/*private*/
+function updateRegisterLink() {
+
+
+    var bodyXML = ' <ns1:isServerRegistered xmlns:ns1="http://org.apache.axis2/xsd"/>';
+    var callURL = serverURL + "/" + GLOBAL_SERVICE_STRING ;
+    new wso2.wsf.WSRequest(callURL, "urn:isServerRegistered", bodyXML, updateRegisterLink["callback"]);
+}
+
+updateRegisterLink["callback"] = function() {
+    if (this.req.responseXML.getElementsByTagName("return")[0].firstChild.nodeValue != "true") {
+        document.getElementById("meta").innerHTML +=
+        "&nbsp;&nbsp;|&nbsp;&nbsp;<a href='#' onclick='javascript:registerProduct(); return false;'>Register</a>";
+    }
+    runPoleHash = true;
+// initialize();
+    showHomeMenu();
+
+}
+
+/*private*/
+function loginFail() {
+    wso2.wsf.Util.alertWarning("Login failed. Please recheck the user name and password and try again.");
+}
+
+/*public*/
+function registerProduct() {
+    var bodyXML = ' <ns1:getServerData xmlns:ns1="http://org.apache.axis2/xsd"/>';
+
+    var callURL = serverURL + "/" + SERVER_ADMIN_STRING ;
+    new wso2.wsf.WSRequest(callURL, "urn:getServerData", bodyXML, registerProductCallback);
+}
+
+
+wso2.wsf.Util.login["callback"] = function() {
+    var isLogInDone = this.req.responseXML.getElementsByTagName("return")[0].firstChild.nodeValue;
+    if (isLogInDone != "true") {
+        loginFail();
+        return;
+    }
+    userName = document.formLogin.txtUserName.value;
+    if (userName) {
+        wso2.wsf.Util.setCookie("userName", userName);
+    }
+    finishLogin();
+}
+
+
+/*private*/
+wso2.wsf.Util.logout["callback"] = function() {
+    runPoleHash = false;
+    logoutVisual();
+
+}
+
+wso2.wsf.Util.restartServer["callback"] = function() {
+    logoutVisual();
+    stopWaitAnimation();
+    wso2.wsf.Util.alertMessage("The server is being restarted. <br/> This will take a few seconds. ");
+    // stopping all refressing methods
+// stoppingRefreshingMethodsHook();
+
+}
+
+wso2.wsf.Util.restartServerGracefully["callback"] = function() {
+    logoutVisual();
+    stopWaitAnimation();
+    wso2.wsf.Util.alertMessage("The server is being gracefully restarted. <br/> This will take a few seconds. ");
+    // stopping all refressing methods
+// stoppingRefreshingMethodsHook();
+
+}
+
+wso2.wsf.Util.shutdownServerGracefully["callback"] = function() {
+    logoutVisual();
+    stopWaitAnimation();
+    wso2.wsf.Util.alertMessage("The server is being gracefully shutdown. <br/> This will take a few seconds. ");
+    // stopping all refressing methods
+// stoppingRefreshingMethodsHook();
+
+}
+
+wso2.wsf.Util.shutdownServer["callback"] = function() {
+    logoutVisual();
+    stopWaitAnimation();
+    wso2.wsf.Util.alertMessage("The server is being shutdown.");
+    // stopping all refressing methods
+// stoppingRefreshingMethodsHook();
+
+}
+
+/*private*/
+function logoutVisual() {
+    serviceGroupId = "";
+    // deleteCookie("serviceGroupId");
+    // deleteCookie("userName");
+
+    wso2.wsf.Util.deleteCookie("JSESSIONID");
+
+// document.formLogin.txtUserName.value = "";
+// document.formLogin.txtPassword.value = "";
+    // document.getElementById("container").style.display = "none";
+    // document.getElementById("userGreeting").style.display = "none";
+// document.getElementById("navigation_general").style.display = "inline";
+// document.getElementById("navigation_logged_in").style.display = "none";
+// document.getElementById("meta").innerHTML = "<nobr><a href='about.html'
+// target='_blank'>About</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a
+// href='docs/index_docs.html'
+// target='_blank'>Docs</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a id='logInA' href='#'
+// onclick='javascript:wsasLogin(); return false;'>Sign In</a></nobr>";
+    if (typeof(showGeneralHome) != "undefined" && typeof(showGeneralHome) == "function") {
+        CARBON.showInfoDialog("logoutVisual");
+        showLoginPage();
+        historyStorage.reset();
+    }
+}
+
+
+var waitAnimationInterval;
+var waitCount = 0;
+/* private */
+function executeWaitAnimation() {
+    waitAnimationInterval = setInterval(function() {
+        updateWaitAnimation();
+    }, 200);
+
+}
+/*private*/
+function stopWaitAnimation() {
+    clearInterval(waitAnimationInterval);
+    waitCount = 4;
+    // document.getElementById("waitAnimationDiv").style.display = "none";
+    var divObj = document.getElementById("waitAnimationDiv");
+    if (divObj) {
+        divObj.style.background = "url(images/orange_circles.gif) transparent no-repeat left top;";
+        divObj.style.padding = "0;";
+    }
+}
+
+/*private*/
+function startWaitAnimation() {
+    var divToUpdate = document.getElementById("waitAnimationDiv");
+    // alert("startWaitAnimation" + divToUpdate);
+    if (divToUpdate != null) {
+        divToUpdate.style.display = "inline";
+        waitAnimationTimeout();
+    }
+}
+
+/*private */
+function updateWaitAnimation() {
+    var divToUpdate = document.getElementById("waitAnimationDiv");
+    if (divToUpdate != null) {
+        if (waitCount == 8) {
+            waitCount = 1;
+        } else {
+            waitCount++;
+        }
+        divToUpdate.style.background =
+        "url(images/waiting_ani_" + waitCount + ".gif) transparent no-repeat left top;";
+        document.getElementById("waitAnimationDiv").style.padding = "0;";
+    }
+}
+/* History tracking code
+   Underline project has to implement handleHistoryChange function.
+*/
+/* private */
+function initialize() {
+    // initialize our DHTML history
+    dhtmlHistory.initialize();
+    historyStorage.reset();
+    // subscribe to DHTML history change
+    // events
+    dhtmlHistory.addListener(
+            handleHistoryChange);
+}
+
+/*public*/
+function openExtraWindow(firstValue, lastValue) {
+    window.open(firstValue + serviceURL + "/" + lastValue);
+}
+
+/*
+	All functions of this nature will return the first value it finds. So do now use when you know that
+	there can be more than one item that match (elementName + attName + attValue).
+*/
+/* public */
+function getElementWithAttribute(elementName, attName, attValue, parentObj) {
+    var objList = parentObj.getElementsByTagName(elementName);
+    if (objList.length > 0) {
+        for (var d = 0; d < objList.length; d++) {
+            if (attValue == getAttbute(attName, objList[d])) {
+                return objList[d];
+            }
+        }
+    } else {
+        return null;
+    }
+}
+/*
+ * Will return the attribute values of the named attribute from the
+ * object that is passed in.
+ */
+/* public */
+function getAttbute(attrName, objRef) {
+    var attObj = getAttbuteObject(attrName, objRef);
+    if (attObj != null) {
+        return attObj.value;
+    } else {
+        return null;
+    }
+}
+
+/*
+ * Will return the attribute object of the named attribute from the
+ * object[objRef] that is passed in.
+ */
+/* publc */
+function getAttbuteObject(attrName, objRef) {
+    var output = objRef.attributes;
+
+    if (output == null) return null;
+    var attLen = output.length;
+    var c;
+    var divNameStr;
+    for (c = 0; c < attLen; c++) {
+        if (output[c].name == attrName) {
+            return output[c];
+        }
+    }
+}
+
+/*
+ * Will return a string with all the attributes in a name="value" format
+ * seperated with a space.
+ */
+/* public */
+function getAttributeText(node) {
+    var text_attributes = "";
+    var output = node.attributes;
+    if (output == null) return "";
+    var attLen = output.length;
+    var c;
+    var divNameStr;
+    for (c = 0; c < attLen; c++) {
+        // Skiping the special attribute set by us.
+        if (output[c].name != "truedomnodename") {
+            text_attributes += " " + output[c].name + '="' + output[c].value + '"';
+        }
+    }
+    return text_attributes;
+}
+
+/*
+ * Will print out the DOM node that is passed into the method.
+ * It will also add tabs.
+ * If convertToLower is true all tagnames will be converted to lower case.
+ */
+/* public */
+function prettyPrintDOMNode(domNode, nonFirst, tabToUse, convertToLower) {
+    if (!nonFirst) {
+        tabcount = 0;
+        if (tabToUse == null) {
+            tabCharactors = "\t";
+        } else {
+            tabCharactors = tabToUse;
+        }
+    }
+    if (domNode == null) {
+        return "";
+    }
+    var dom_text = "";
+    var dom_node_value = "";
+    var len = domNode.childNodes.length;
+    if (len > 0) {
+        if (domNode.nodeName != "#document") {
+            if (nonFirst) {
+                dom_text += "\n";
+            }
+            dom_text += getCurTabs();
+            dom_text +=
+            "<" + getTrueDOMNodeNameFromNode(domNode, convertToLower) + getAttributeText(domNode) +
+            ">";
+            tabcount++;
+        }
+        for (var i = 0; i < len; i++) {
+            if (i == 0) {
+                dom_text += prettyPrintDOMNode(domNode.childNodes[i], true, "", convertToLower);
+            } else {
+                dom_text += prettyPrintDOMNode(domNode.childNodes[i], true, "", convertToLower);
+            }
+        }
+        if (domNode.nodeName != "#document") {
+            tabcount--;
+            if (!(domNode.childNodes.length == 1 && domNode.childNodes[0].nodeName == "#text")) {
+                dom_text += "\n" + getCurTabs();
+            }
+            dom_text += "</" + getTrueDOMNodeNameFromNode(domNode, convertToLower) + ">";
+        }
+
+    } else {
+        if (domNode.nodeName == "#text") {
+            dom_text += domNode.nodeValue;
+        }else if (domNode.nodeName == "#comment") {
+            dom_text += "\n" + getCurTabs() + "<!--" + domNode.nodeValue + "-->";
+        }else {
+            dom_text += "\n" +
+                        getCurTabs() + "<" + getTrueDOMNodeNameFromNode(domNode, convertToLower) +
+                        getAttributeText(domNode) +
+                        "/>";
+        }
+    }
+    return dom_text;
+}
+// This will serialize the first node only.
+/* public */
+function nodeStartToText(domNode) {
+    if (domNode == null) {
+        return "";
+    }
+    var dom_text = "";
+    var len = domNode.childNodes.length;
+    if (len > 0) {
+        if (domNode.nodeName != "#document") {
+            dom_text +=
+            "<" + getTrueDOMNodeNameFromNode(domNode) + getAttributeText(domNode) + ">\n";
+        }
+    } else {
+        if (domNode.nodeName == "#text") {
+            dom_text += domNode.nodeValue;
+        } else {
+            dom_text +=
+            "<" + getTrueDOMNodeNameFromNode(domNode) + getAttributeText(domNode) + "/>\n";
+        }
+    }
+    return dom_text;
+}
+
+/*
+ * When creating a new node using document.createElement the new node that
+ * is created will have a all capital value when you get the nodeName
+ * so to get the correct serialization we set a new attribute named "trueDOMNodeName" on the
+ * new elements that are created. This method will check whether there is an attribute set
+ * and will return the nodeName accordingly.
+ * If convertToLower is true then the node name will be converted into lower case and returned.
+ */
+/* public */
+function getTrueDOMNodeNameFromNode(objNode, convertToLower) {
+    var trueNodeName = getAttbute("truedomnodename", objNode);
+    if (trueNodeName == null) {
+        trueNodeName = objNode.nodeName;
+    }
+    if (convertToLower) {
+        return trueNodeName.toLowerCase();
+    } else {
+        return trueNodeName;
+    }
+}
+
+/*
+ * Will return the number of tabs to print for the current node being passed.
+ */
+/* public */
+function getCurTabs() {
+    var tabs_text = "";
+    for (var a = 0; a < tabcount; a++) {
+        tabs_text += tabCharactors;
+    }
+    return tabs_text;
+}
+
+/*
+ * Use to get a node from within an object hierarchy where there are objects
+ * with the same name at different levels.
+ */
+/* public */
+function getNodeFromPath(pathString, domParent) {
+    var items = pathString.split("/");
+    var restOfThem = "";
+    var lastStep = (items.length == 1);
+
+    if (!lastStep) {
+        for (var r = 1; r < items.length; r++) {
+            restOfThem += items[r] + "/";
+        }
+        restOfThem = restOfThem.substring(0, restOfThem.length - 1);
+    }
+    var temp = domParent.getElementsByTagName(items[0]);
+    if (temp == null) {
+        return null;
+    }
+    if (temp.length < 1) {
+        return null;
+    }
+    for (var u = 0; u < temp.length; u++) {
+        var retEle;
+        if (!lastStep) {
+            retEle = getNodeFromPath(restOfThem, temp[u]);
+        } else {
+            retEle = temp[u];
+        }
+        if (retEle != null) {
+            return retEle;
+        }
+    }
+    return null;
+}
+
+/*
+ * Changes the location of the window to service listing page.
+ * This function can used when a seperate upload servlet takes control
+ * and we do not have any control over the return location. 
+ * See org.wso2.carbon.ui.transport.fileupload.ServiceFileUploadExecutor ->execute()
+ * for a usage scenario.
+ */
+/* public */
+function loadServiceListingPage() {
+    window.location ='../service-mgt/service_mgt.jsp';
+}
+
+
+function showHelp() {
+    var myWindow = window.open("userguide.html", "tinyWindow", 'scrollbars=yes,menubar=no,height=600,width=600,resizable=yes,toolbar=no,location=no,status=no')
+    myWindow.focus()
+}
+
+
+function showForgotPassword(serverName, home){
+
+	 var tableHTML = '<div tabindex="-1">' +
+                            '<h4><a onclick="javascript:showSignIn(\'' + serverName + '\', \'' + home + '\'); return false;" href="#">Sign In</a>&nbsp;&gt;&nbsp;Forgot Password</h4><h2>Forgot WSO2 Data Services Management Console password</h2>' +
+                             ' <dl style="margin: 1em;"><dt><strong>Non Admin User</strong></dt>' +
+                                '<dd>Please contact the system Admin. The system administrator can reset the password of any non admin account.<br><br></dd>';
+// '<dt><strong>Admin User</strong></dt><dd>Due to security concerns, you cannot
+// retrieve your password using this Admin Console. You may change your password
+// by running the <b>chpasswd</b>' +
+// ' script on the machine which is hosting the ' + serverName + '.<br>' +
+// 'This script is located at <i>' + home + '/bin</i><br><b>IMPORTANT:</b>
+// Before executing this script, you should shutdown the WSO2 Server.
+// <br></dd></dl></div>' ;
+
+      document.getElementById("middle").innerHTML = tableHTML;
+
+}
+function showSignInHelp(serverName, home){
+
+        var tableHTML = '<div tabindex="-1" style="display: inline;" id="noMenuContainer"><h4><a onclick="javascript:showSignIn(\'' + serverName + '\', \'' + home + '\'); return false;" href="#">Sign In</a>&nbsp;&gt;&nbsp;Sign In Help</h4>' +
+                        '<h2>Help on Signing In</h2>' +
+                        '<p>Following is a list of issues that you may face when Signing In and the reasons and solutions to them. </p>' +
+                        '<ol style="margin: 1em;"><li><b>ERROR :: Could not connect to the server. Please try again in a moment</b>' +
+                        '<p>You can get this message when the ' + serverName + ' server is down or when it can not be reached on the network.</p></li>' +
+                        '<li><b>ERROR :: Login failed. Please recheck the user name and password and try again</b>' +
+                        '<p>You can get this error even when you have spelt the user name and password correctly, because both user name and password are case sensitive, or due to the page being in an' +
+                        'inconsistent state.Check whether the caps lock is on and whether you have spelt the user name and the password correctly. If the correct user name and the password is still failing then refresh the page and try again.' +
+                        '</p></li><li><b>Forgot Password</b><p>Have a look at the <a onclick="javascript:showForgotPassword(\'' + serverName + '\', \'' + home + '\'); return false;" href="#">Forgot Password</a> page.</p></li></ol></div>';
+
+         document.getElementById("middle").innerHTML = tableHTML;
+      
+}
+
+function showSignIn(serverName, home) {
+
+    var signInHTML = '<div id="loginbox"><div><h2>Sign-in to ' + serverName + ' Management Console</h2></div><div id="formset">' +
+                     '<form action="login.action" method="POST" target="_self"><fieldset><legend>Enter login credentials</legend><div>' +
+                     '<label for="txtUserName">Username:</label><input type="text" id="txtUserName" name="username" size="30"/>' +
+                     '</div><div><label for="txtPassword">Password:</label><input type="password" id="txtPassword" name="password" size="30"/>' +
+                     '</div><div class="buttonrow"><input type="submit" value="Log In"/><p><a href="#" onclick="javascript:showForgotPassword(\'' + serverName + '\', \'' + home + '\'); return false;">Forgot Password</a>&#160;&#160;&#160;&#160;&#160;' +
+                     '<a href="#" onclick="javascript:showSignInHelp(\'' + serverName + '\', \'' + home + '\'); return false;">Sign-in Help</a>&#160;&#160;&#160;&#160;&#160;</p>' +
+                     '</div></fieldset></form></div></div><div id="alertMessageBox" style="display:none;position:absolute;z-index: 600;">' +
+                     '<!--the message area--><p id="alertMessageBoxMessageArea"></p><!-- the button area--><p id="alertButton" align="right">' +
+                     '<input id="alertBoxButton" type="button" value="  OK  " onclick="document.getElementById("alertMessageBox").style.display="none";return false;"/>' +
+                     '</p></div>';
+
+    document.getElementById("middle").innerHTML = signInHTML;
+
+}
+
+
+function addLibraryFileuplod(objDiv) {
+        var blankLabelElem = document.createElement('label');
+        blankLabelElem.innerHTML = "&nbsp;";
+        var elem = document.createElement('input');
+        var brElem = document.createElement('br');
+        var nameAttr = document.createAttribute('name');
+        nameAttr.value = "jarResourceWSDLView";
+        var idAttr = document.createAttribute('id');
+        idAttr.value = "jarResourceWSDLView";
+        var sizeAttr = document.createAttribute('size');
+        sizeAttr.value = "50";
+        var typeAttr = document.createAttribute('type');
+        typeAttr.value = "file";
+        elem.attributes.setNamedItem(nameAttr);
+        elem.attributes.setNamedItem(idAttr);
+        elem.attributes.setNamedItem(sizeAttr);
+        elem.attributes.setNamedItem(typeAttr);
+        objDiv.appendChild(brElem);
+        objDiv.appendChild(blankLabelElem);
+        objDiv.appendChild(elem);
+    }
+
+/*Object that's used to execute second run of the '*' file upload method*/
+function FileExcutor() {
+}
+
+/*
+FileExcutor.execute = foo; is the method that should be called with extraStoreDirUUID(uuid);
+*/
+new FileExcutor();
+
+/*
+ * This is the method that's going to be invoked by
+ * CertificateFileUploadExecutor for WS Call
+ */
+function extraStoreDirUUID(uuid) {
+    FileExcutor.execute(uuid);
+}
+
+function completeServiceFileUpload(msg) {
+    wso2.wsf.Util.cursorWait();
+    if (msg) {
+        showAARGenerationCompleteMsg(msg);
+    } else {
+        showAARGenerationCompleteMsg("Archive was successfully uploaded.\n" +
+                                     "This page will be auto refreshed shortly.");
+    }
+}
+
+function showAARGenerationCompleteMsg(msg) {
+    wso2.wsf.Util.cursorClear();
+    wso2.wsf.Util.alertMessage(msg);
+    showServiceInitializer();
+}
+
+function alternateTableRows(id, evenStyle, oddStyle) {
+    if (document.getElementsByTagName) {
+        if (document.getElementById(id)) {
+            var table = document.getElementById(id);
+            var rows = table.getElementsByTagName("tr");
+            for (var i = 0; i < rows.length; i++) {
+                //manipulate rows
+                if (i % 2 == 0) {
+                    rows[i].className = evenStyle;
+                } else {
+                    rows[i].className = oddStyle;
+                }
+            }
+        }
+    }
+}
+
+function getProxyAddress() {
+        return "../admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp";
+}
+
+function validatePasswordOnCreation(fld1name, fld2name, regString) {
+    var error = "";
+    var pw1 = document.getElementsByName(fld1name)[0].value;
+    var pw2 = document.getElementsByName(fld2name)[0].value;
+    
+    var regEx = new RegExp(regString);
+
+     // check for a value in both fields.
+    if (pw1 == '' || pw2 == '') {
+            error = "Empty Password";
+            return error;
+    }
+
+    if (!pw1.match(regEx)) {
+    	error = "No conformance";
+    	return error;
+    }
+
+    //check the typed passwords mismatch
+    if (pw1 != pw2) {
+        error = "Password Mismatch";
+        return error;
+    }
+
+    return error;
+}
+
+
+function validateEmpty(fldname) {
+    var fld = document.getElementsByName(fldname)[0];
+    var error = "";
+    var value = fld.value;
+    if (value.length == 0) {
+        error = fld.name + " ";
+        return error;
+    }
+
+    value = value.replace(/^\s+/, "");
+    if (value.length == 0) {
+        error = fld.name + "(contains only spaces) ";
+        return error;
+    }
+
+    return error;
+}
+
+function isEmpty(fldname) {
+    var fld = document.getElementsByName(fldname)[0];
+    if (fld.value.length == 0) {
+        return true;
+    }
+    fld.value = fld.value.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+    if (fld.value.length == 0) {
+        return true;
+    }
+
+    return false;
+}
+
+function validateText(e) {
+    var key = String.fromCharCode(getkey(e));
+    if (key == null) {
+        return true;
+    }
+
+    var regEx = /[~!@#$%^&*()\\\/+=\-:;<>'"?[\]{}|\s,]/;
+    if (regEx.test(key)) {
+        CARBON.showWarningDialog("Invalid character");
+        return false;
+    }
+    return true;
+}
+
+function validateName(name) {
+    var key = String.fromCharCode(getkey(name));
+    if (key == null) {
+        return false;
+    }
+
+    //var regEx = new RegExp("^[a-zA-Z_0-9\\-=,]{3,30}$");
+    var regEx = new RegExp("^[^~!@#$;%^*'+={}\\|\\\\<>]{3,30}$");
+    if (!name.match(regEx)) {
+        CARBON.showWarningDialog("Invalid name entered. Please make sure the entered" +
+        		" name does not contain special characters and it's length is between 3 and 30");
+        return false;
+    }
+    return true;
+}
+
+function getkey(e) {
+    if (window.event) {
+        return window.event.keyCode;
+    } else if (e) {
+        return e.which;
+    } else {
+        return null;
+    }
+}
+
+function sessionAwareFunction(success, message, failure) {
+    var random = Math.floor(Math.random() * 2000);
+    var errorMessage = "Session timed out. Please login again.";
+    if (message && typeof message != "function") {
+        errorMessage = message;
+    } else if (success && typeof success != "function") {
+        errorMessage = success;
+    }
+    if (!failure && typeof message == "function") {
+        failure = message;
+    }
+    if(typeof(Ajax) != "undefined"){
+	    new Ajax.Request('../admin/jsp/session-validate.jsp',
+	    {
+	        method:'post',
+	        asynchronous:false,
+	        onSuccess: function(transport) {
+	            var returnValue = transport.responseText;
+	            if(returnValue.search(/----valid----/) == -1){
+	                if (failure && typeof failure == "function") {
+	                    failure();
+	                } else {
+	                    CARBON.showErrorDialog(errorMessage,function(){
+	                        location.href="../admin/logout_action.jsp";
+	                    }, function(){
+	                        location.href="../admin/logout_action.jsp";
+	                    });
+	                }
+	            } else {
+	                if (success && typeof success == "function") {
+	                    success();
+	                }
+	            }
+	        },
+	        onFailure: function() {
+	
+	        }
+	    });
+    }else{
+        jQuery.ajax({
+        type:"POST",
+        url:'../admin/jsp/session-validate.jsp',
+        data: 'random='+random,
+        success:
+                function(data, status)
+                {
+                    var returnValue = data;
+	            if(returnValue.search(/----valid----/) == -1){
+	                if (failure && typeof failure == "function") {
+	                    failure();
+	                } else {
+	                    CARBON.showErrorDialog(errorMessage,function(){
+	                        location.href="../admin/logout_action.jsp";
+	                    }, function(){
+	                        location.href="../admin/logout_action.jsp";
+	                    });
+	                }
+	            } else {
+	                if (success && typeof success == "function") {
+	                    success();
+	                }
+	            }
+
+                }
+    	});
+    }
+}
+function spaces(len)
+{
+	var s = '';
+	var indent = len*4;
+	for (i=0;i<indent;i++) {s += " ";}
+
+	return s;
+}
+function format_xml(str)
+{ 
+	var xml = '';
+
+	// add newlines
+	str = str.replace(/(>)(<)(\/*)/g,"$1\r$2$3");
+
+	// add indents
+	var pad = 0;
+	var indent;
+	var node;
+
+	// split the string
+	var strArr = str.split("\r");
+
+	// check the various tag states
+	for (var i = 0; i < strArr.length; i++) {
+		indent = 0;
+		node = strArr[i];
+
+		if(node.match(/.+<\/\w[^>]*>$/)){ //open and closing in the same line
+			indent = 0;
+		} else if(node.match(/^<\/\w/)){ // closing tag
+			if (pad > 0){pad -= 1;}
+		} else if (node.match(/^<\w[^>]*[^\/]>.*$/)){ //opening tag
+			indent = 1;
+		} else
+			indent = 0;
+		//}
+
+		xml += spaces(pad) + node + "\r";
+		pad += indent;
+	}
+
+	return xml;
+}


[11/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/zh.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/zh.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/zh.js
new file mode 100644
index 0000000..612fa03
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/zh.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["zh"]={
+new_document: "新建空白文档",
+search_button: "查找与替换",
+search_command: "查找下一个 / 打开查找框",
+search: "查找",
+replace: "替换",
+replace_command: "替换 / 打开查找框",
+find_next: "查找下一个",
+replace_all: "全部替换",
+reg_exp: "正则表达式",
+match_case: "匹配大小写",
+not_found: "未找到.",
+occurrence_replaced: "处被替换.",
+search_field_empty: "查找框没有内容",
+restart_search_at_begin: "已到到文档末尾. 从头重新查找.",
+move_popup: "移动查找对话框",
+font_size: "--字体大小--",
+go_to_line: "转到行",
+go_to_line_prompt: "转到行:",
+undo: "恢复",
+redo: "重做",
+change_smooth_selection: "启用/禁止一些显示特性(更好看但更耗费资源)",
+highlight: "启用/禁止语法高亮",
+reset_highlight: "重置语法高亮(当文本显示不同步时)",
+word_wrap: "toggle word wrapping mode",
+help: "关于",
+save: "保存",
+load: "加载",
+line_abbr: "行",
+char_abbr: "字符",
+position: "位置",
+total: "总计",
+close_popup: "关闭对话框",
+shortcuts: "快捷键",
+add_tab: "添加制表符(Tab)",
+remove_tab: "移除制表符(Tab)",
+about_notice: "注意:语法高亮功能仅用于较少内容的文本(文件内容太大会导致浏览器反应慢)",
+toggle: "切换编辑器",
+accesskey: "快捷键",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "正在处理中...",
+fullscreen: "全屏编辑",
+syntax_selection: "--语法--",
+close_tab: "关闭文件"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/license_apache.txt
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/license_apache.txt b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/license_apache.txt
new file mode 100644
index 0000000..c7ef5e6
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/license_apache.txt
@@ -0,0 +1,7 @@
+Copyright 2008 Christophe Dolivet
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+	http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/license_bsd.txt
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/license_bsd.txt b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/license_bsd.txt
new file mode 100644
index 0000000..f36bbe4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/license_bsd.txt
@@ -0,0 +1,10 @@
+Copyright (c) 2008, Christophe Dolivet
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+    * Neither the name of EditArea nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/license_lgpl.txt
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/license_lgpl.txt b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/license_lgpl.txt
new file mode 100644
index 0000000..8c177f8
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/license_lgpl.txt
@@ -0,0 +1,458 @@
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/manage_area.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/manage_area.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/manage_area.js
new file mode 100644
index 0000000..e10c5e9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/manage_area.js
@@ -0,0 +1,623 @@
+	EditArea.prototype.focus = function() {
+		this.textarea.focus();
+		this.textareaFocused=true;
+	};
+
+
+	EditArea.prototype.check_line_selection= function(timer_checkup){
+		var changes, infos, new_top, new_width,i;
+		
+		var t1=t2=t2_1=t3=tLines=tend= new Date().getTime();
+		// l'editeur n'existe plus => on quitte
+		if(!editAreas[this.id])
+			return false;
+		
+		if(!this.smooth_selection && !this.do_highlight)
+		{
+			//do nothing
+		}
+		else if(this.textareaFocused && editAreas[this.id]["displayed"]==true && this.isResizing==false)
+		{
+			infos	= this.get_selection_infos();
+			changes	= this.checkTextEvolution( typeof( this.last_selection['full_text'] ) == 'undefined' ? '' : this.last_selection['full_text'], infos['full_text'] );
+		
+			t2= new Date().getTime();
+			
+			// if selection change
+			if(this.last_selection["line_start"] != infos["line_start"] || this.last_selection["line_nb"] != infos["line_nb"] || infos["full_text"] != this.last_selection["full_text"] || this.reload_highlight || this.last_selection["selectionStart"] != infos["selectionStart"] || this.last_selection["selectionEnd"] != infos["selectionEnd"] || !timer_checkup )
+			{
+				// move and adjust text selection elements
+				new_top		= this.getLinePosTop( infos["line_start"] );
+				new_width	= Math.max(this.textarea.scrollWidth, this.container.clientWidth -50);
+				this.selection_field.style.top=this.selection_field_text.style.top=new_top+"px";
+				if(!this.settings['word_wrap']){	
+					this.selection_field.style.width=this.selection_field_text.style.width=this.test_font_size.style.width=new_width+"px";
+				}
+				
+				// usefull? => _$("cursor_pos").style.top=new_top+"px";	
+		
+				if(this.do_highlight==true)
+				{
+					// fill selection elements
+					var curr_text	= infos["full_text"].split("\n");
+					var content		= "";
+					//alert("length: "+curr_text.length+ " i: "+ Math.max(0,infos["line_start"]-1)+ " end: "+Math.min(curr_text.length, infos["line_start"]+infos["line_nb"]-1)+ " line: "+infos["line_start"]+" [0]: "+curr_text[0]+" [1]: "+curr_text[1]);
+					var start		= Math.max(0,infos["line_start"]-1);
+					var end			= Math.min(curr_text.length, infos["line_start"]+infos["line_nb"]-1);
+					
+					//curr_text[start]= curr_text[start].substr(0,infos["curr_pos"]-1) +"¤_overline_¤"+ curr_text[start].substr(infos["curr_pos"]-1);
+					for(i=start; i< end; i++){
+						content+= curr_text[i]+"\n";	
+					}
+					
+					// add special chars arround selected characters
+					selLength	= infos['selectionEnd'] - infos['selectionStart'];
+					content		= content.substr( 0, infos["curr_pos"] - 1 ) + "\r\r" + content.substr( infos["curr_pos"] - 1, selLength ) + "\r\r" + content.substr( infos["curr_pos"] - 1 + selLength );
+					content		= '<span>'+ content.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace("\r\r", '</span><strong>').replace("\r\r", '</strong><span>') +'</span>';
+					
+					if( this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {
+						this.selection_field.innerHTML= "<pre>" + content.replace(/^\r?\n/, "<br>") + "</pre>";
+					} else {
+						this.selection_field.innerHTML= content;
+					}
+					this.selection_field_text.innerHTML = this.selection_field.innerHTML;
+					t2_1 = new Date().getTime();
+					// check if we need to update the highlighted background 
+					if(this.reload_highlight || (infos["full_text"] != this.last_text_to_highlight && (this.last_selection["line_start"]!=infos["line_start"] || this.show_line_colors || this.settings['word_wrap'] || this.last_selection["line_nb"]!=infos["line_nb"] || this.last_selection["nb_line"]!=infos["nb_line"]) ) )
+					{
+						this.maj_highlight(infos);
+					}
+				}		
+			}
+			t3= new Date().getTime();
+			
+			// manage line heights
+			if( this.settings['word_wrap'] && infos["full_text"] != this.last_selection["full_text"])
+			{
+				// refresh only 1 line if text change concern only one line and that the total line number has not changed
+				if( changes.newText.split("\n").length == 1 && this.last_selection['nb_line'] && infos['nb_line'] == this.last_selection['nb_line'] )
+				{
+					this.fixLinesHeight( infos['full_text'], changes.lineStart, changes.lineStart );
+				}
+				else
+				{
+					this.fixLinesHeight( infos['full_text'], changes.lineStart, -1 );
+				}
+			}
+		
+			tLines= new Date().getTime();
+			// manage bracket finding
+			if( infos["line_start"] != this.last_selection["line_start"] || infos["curr_pos"] != this.last_selection["curr_pos"] || infos["full_text"].length!=this.last_selection["full_text"].length || this.reload_highlight || !timer_checkup )
+			{
+				// move _cursor_pos
+				var selec_char= infos["curr_line"].charAt(infos["curr_pos"]-1);
+				var no_real_move=true;
+				if(infos["line_nb"]==1 && (this.assocBracket[selec_char] || this.revertAssocBracket[selec_char]) ){
+					
+					no_real_move=false;					
+					//findEndBracket(infos["line_start"], infos["curr_pos"], selec_char);
+					if(this.findEndBracket(infos, selec_char) === true){
+						_$("end_bracket").style.visibility	="visible";
+						_$("cursor_pos").style.visibility	="visible";
+						_$("cursor_pos").innerHTML			= selec_char;
+						_$("end_bracket").innerHTML			= (this.assocBracket[selec_char] || this.revertAssocBracket[selec_char]);
+					}else{
+						_$("end_bracket").style.visibility	="hidden";
+						_$("cursor_pos").style.visibility	="hidden";
+					}
+				}else{
+					_$("cursor_pos").style.visibility	="hidden";
+					_$("end_bracket").style.visibility	="hidden";
+				}
+				//alert("move cursor");
+				this.displayToCursorPosition("cursor_pos", infos["line_start"], infos["curr_pos"]-1, infos["curr_line"], no_real_move);
+				if(infos["line_nb"]==1 && infos["line_start"]!=this.last_selection["line_start"])
+					this.scroll_to_view();
+			}
+			this.last_selection=infos;
+		}
+		
+		tend= new Date().getTime();
+		//if( (tend-t1) > 7 )
+		//	console.log( "tps total: "+ (tend-t1) + " tps get_infos: "+ (t2-t1)+ " tps selec: "+ (t2_1-t2)+ " tps highlight: "+ (t3-t2_1) +" tps lines: "+ (tLines-t3) +" tps cursor+lines: "+ (tend-tLines)+" \n" );
+		
+		
+		if(timer_checkup){
+			setTimeout("editArea.check_line_selection(true)", this.check_line_selection_timer);
+		}
+	};
+
+
+	EditArea.prototype.get_selection_infos= function(){
+		var sel={}, start, end, len, str;
+	
+		this.getIESelection();
+		start	= this.textarea.selectionStart;
+		end		= this.textarea.selectionEnd;		
+		
+		if( this.last_selection["selectionStart"] == start && this.last_selection["selectionEnd"] == end && this.last_selection["full_text"] == this.textarea.value )
+		{	
+			return this.last_selection;
+		}
+			
+		if(this.tabulation!="\t" && this.textarea.value.indexOf("\t")!=-1) 
+		{	// can append only after copy/paste 
+			len		= this.textarea.value.length;
+			this.textarea.value	= this.replace_tab(this.textarea.value);
+			start	= end	= start+(this.textarea.value.length-len);
+			this.area_select( start, 0 );
+		}
+		
+		sel["selectionStart"]	= start;
+		sel["selectionEnd"]		= end;		
+		sel["full_text"]		= this.textarea.value;
+		sel["line_start"]		= 1;
+		sel["line_nb"]			= 1;
+		sel["curr_pos"]			= 0;
+		sel["curr_line"]		= "";
+		sel["indexOfCursor"]	= 0;
+		sel["selec_direction"]	= this.last_selection["selec_direction"];
+
+		//return sel;	
+		var splitTab= sel["full_text"].split("\n");
+		var nbLine	= Math.max(0, splitTab.length);		
+		var nbChar	= Math.max(0, sel["full_text"].length - (nbLine - 1));	// (remove \n caracters from the count)
+		if( sel["full_text"].indexOf("\r") != -1 )
+			nbChar	= nbChar - ( nbLine - 1 );		// (remove \r caracters from the count)
+		sel["nb_line"]	= nbLine;		
+		sel["nb_char"]	= nbChar;
+	
+		if(start>0){
+			str					= sel["full_text"].substr(0,start);
+			sel["curr_pos"]		= start - str.lastIndexOf("\n");
+			sel["line_start"]	= Math.max(1, str.split("\n").length);
+		}else{
+			sel["curr_pos"]=1;
+		}
+		if(end>start){
+			sel["line_nb"]=sel["full_text"].substring(start,end).split("\n").length;
+		}
+		sel["indexOfCursor"]=start;		
+		sel["curr_line"]=splitTab[Math.max(0,sel["line_start"]-1)];
+	
+		// determine in which direction the selection grow
+		if(sel["selectionStart"] == this.last_selection["selectionStart"]){
+			if(sel["selectionEnd"]>this.last_selection["selectionEnd"])
+				sel["selec_direction"]= "down";
+			else if(sel["selectionEnd"] == this.last_selection["selectionStart"])
+				sel["selec_direction"]= this.last_selection["selec_direction"];
+		}else if(sel["selectionStart"] == this.last_selection["selectionEnd"] && sel["selectionEnd"]>this.last_selection["selectionEnd"]){
+			sel["selec_direction"]= "down";
+		}else{
+			sel["selec_direction"]= "up";
+		}
+		
+		_$("nbLine").innerHTML	= nbLine;		
+		_$("nbChar").innerHTML	= nbChar;		
+		_$("linePos").innerHTML	= sel["line_start"];
+		_$("currPos").innerHTML	= sel["curr_pos"];
+
+		return sel;		
+	};
+	
+	// set IE position in Firefox mode (textarea.selectionStart and textarea.selectionEnd)
+	EditArea.prototype.getIESelection= function(){
+		var selectionStart, selectionEnd, range, stored_range;
+		
+		if( !this.isIE )
+			return false;
+			
+		// make it work as nowrap mode (easier for range manipulation with lineHeight)
+		if( this.settings['word_wrap'] )
+			this.textarea.wrap='off';
+			
+		try{
+			range			= document.selection.createRange();
+			stored_range	= range.duplicate();
+			stored_range.moveToElementText( this.textarea );
+			stored_range.setEndPoint( 'EndToEnd', range );
+			if( stored_range.parentElement() != this.textarea )
+				throw "invalid focus";
+				
+			// the range don't take care of empty lines in the end of the selection
+			var scrollTop	= this.result.scrollTop + document.body.scrollTop;
+			var relative_top= range.offsetTop - parent.calculeOffsetTop(this.textarea) + scrollTop;
+			var line_start	= Math.round((relative_top / this.lineHeight) +1);
+			var line_nb		= Math.round( range.boundingHeight / this.lineHeight );
+						
+			selectionStart	= stored_range.text.length - range.text.length;		
+			selectionStart	+= ( line_start - this.textarea.value.substr(0, selectionStart).split("\n").length)*2;		// count missing empty \r to the selection
+			selectionStart	-= ( line_start - this.textarea.value.substr(0, selectionStart).split("\n").length ) * 2;
+			
+			selectionEnd	= selectionStart + range.text.length;		
+			selectionEnd	+= (line_start + line_nb - 1 - this.textarea.value.substr(0, selectionEnd ).split("\n").length)*2;			
+		
+			this.textarea.selectionStart	= selectionStart;
+			this.textarea.selectionEnd		= selectionEnd;
+		}
+		catch(e){}
+		
+		// restore wrap mode
+		if( this.settings['word_wrap'] )
+			this.textarea.wrap='soft';
+	};
+	
+	// select the text for IE (and take care of \r caracters)
+	EditArea.prototype.setIESelection= function(){
+		var a = this.textarea, nbLineStart, nbLineEnd, range;
+		
+		if( !this.isIE )
+			return false;
+		
+		nbLineStart	= a.value.substr(0, a.selectionStart).split("\n").length - 1;
+		nbLineEnd 	= a.value.substr(0, a.selectionEnd).split("\n").length - 1;
+		range		= document.selection.createRange();
+		range.moveToElementText( a );
+		range.setEndPoint( 'EndToStart', range );
+		
+		range.moveStart('character', a.selectionStart - nbLineStart);
+		range.moveEnd('character', a.selectionEnd - nbLineEnd - (a.selectionStart - nbLineStart)  );
+		range.select();
+	};
+	
+	
+	
+	EditArea.prototype.checkTextEvolution=function(lastText,newText){
+		// ch will contain changes datas
+		var ch={},baseStep=200, cpt=0, end, step,tStart=new Date().getTime();
+	
+		end		= Math.min(newText.length, lastText.length);
+        step	= baseStep;
+        // find how many chars are similar at the begin of the text						
+		while( cpt<end && step>=1 ){
+            if(lastText.substr(cpt, step) == newText.substr(cpt, step)){
+                cpt+= step;
+            }else{
+                step= Math.floor(step/2);
+            }
+		}
+		
+		ch.posStart	= cpt;
+		ch.lineStart= newText.substr(0, ch.posStart).split("\n").length -1;						
+		
+		cpt_last	= lastText.length;
+        cpt			= newText.length;
+        step		= baseStep;			
+        // find how many chars are similar at the end of the text						
+		while( cpt>=0 && cpt_last>=0 && step>=1 ){
+            if(lastText.substr(cpt_last-step, step) == newText.substr(cpt-step, step)){
+                cpt-= step;
+                cpt_last-= step;
+            }else{
+                step= Math.floor(step/2);
+            }
+		}
+		
+		ch.posNewEnd	= cpt;
+		ch.posLastEnd	= cpt_last;
+		if(ch.posNewEnd<=ch.posStart){
+			if(lastText.length < newText.length){
+				ch.posNewEnd= ch.posStart + newText.length - lastText.length;
+				ch.posLastEnd= ch.posStart;
+			}else{
+				ch.posLastEnd= ch.posStart + lastText.length - newText.length;
+				ch.posNewEnd= ch.posStart;
+			}
+		} 
+		ch.newText		= newText.substring(ch.posStart, ch.posNewEnd);
+		ch.lastText		= lastText.substring(ch.posStart, ch.posLastEnd);			            
+		
+		ch.lineNewEnd	= newText.substr(0, ch.posNewEnd).split("\n").length -1;
+		ch.lineLastEnd	= lastText.substr(0, ch.posLastEnd).split("\n").length -1;
+		
+		ch.newTextLine	= newText.split("\n").slice(ch.lineStart, ch.lineNewEnd+1).join("\n");
+		ch.lastTextLine	= lastText.split("\n").slice(ch.lineStart, ch.lineLastEnd+1).join("\n");
+		//console.log( ch );
+		return ch;	
+	};
+	
+	EditArea.prototype.tab_selection= function(){
+		if(this.is_tabbing)
+			return;
+		this.is_tabbing=true;
+		//infos=getSelectionInfos();
+		//if( document.selection ){
+		this.getIESelection();
+		/* Insertion du code de formatage */
+		var start = this.textarea.selectionStart;
+		var end = this.textarea.selectionEnd;
+		var insText = this.textarea.value.substring(start, end);
+		
+		/* Insert tabulation and ajust cursor position */
+		var pos_start=start;
+		var pos_end=end;
+		if (insText.length == 0) {
+			// if only one line selected
+			this.textarea.value = this.textarea.value.substr(0, start) + this.tabulation + this.textarea.value.substr(end);
+			pos_start = start + this.tabulation.length;
+			pos_end=pos_start;
+		} else {
+			start= Math.max(0, this.textarea.value.substr(0, start).lastIndexOf("\n")+1);
+			endText=this.textarea.value.substr(end);
+			startText=this.textarea.value.substr(0, start);
+			tmp= this.textarea.value.substring(start, end).split("\n");
+			insText= this.tabulation+tmp.join("\n"+this.tabulation);
+			this.textarea.value = startText + insText + endText;
+			pos_start = start;
+			pos_end= this.textarea.value.indexOf("\n", startText.length + insText.length);
+			if(pos_end==-1)
+				pos_end=this.textarea.value.length;
+			//pos = start + repdeb.length + insText.length + ;
+		}
+		this.textarea.selectionStart = pos_start;
+		this.textarea.selectionEnd = pos_end;
+		
+		//if( document.selection ){
+		if(this.isIE)
+		{
+			this.setIESelection();
+			setTimeout("editArea.is_tabbing=false;", 100);	// IE can't accept to make 2 tabulation without a little break between both
+		}
+		else
+		{ 
+			this.is_tabbing=false;
+		}	
+		
+  	};
+	
+	EditArea.prototype.invert_tab_selection= function(){
+		var t=this, a=this.textarea;
+		if(t.is_tabbing)
+			return;
+		t.is_tabbing=true;
+		//infos=getSelectionInfos();
+		//if( document.selection ){
+		t.getIESelection();
+		
+		var start	= a.selectionStart;
+		var end		= a.selectionEnd;
+		var insText	= a.value.substring(start, end);
+		
+		/* Tab remove and cursor seleciton adjust */
+		var pos_start=start;
+		var pos_end=end;
+		if (insText.length == 0) {
+			if(a.value.substring(start-t.tabulation.length, start)==t.tabulation)
+			{
+				a.value		= a.value.substr(0, start-t.tabulation.length) + a.value.substr(end);
+				pos_start	= Math.max(0, start-t.tabulation.length);
+				pos_end		= pos_start;
+			}	
+			/*
+			a.value = a.value.substr(0, start) + t.tabulation + insText + a.value.substr(end);
+			pos_start = start + t.tabulation.length;
+			pos_end=pos_start;*/
+		} else {
+			start		= a.value.substr(0, start).lastIndexOf("\n")+1;
+			endText		= a.value.substr(end);
+			startText	= a.value.substr(0, start);
+			tmp			= a.value.substring(start, end).split("\n");
+			insText		= "";
+			for(i=0; i<tmp.length; i++){				
+				for(j=0; j<t.tab_nb_char; j++){
+					if(tmp[i].charAt(0)=="\t"){
+						tmp[i]=tmp[i].substr(1);
+						j=t.tab_nb_char;
+					}else if(tmp[i].charAt(0)==" ")
+						tmp[i]=tmp[i].substr(1);
+				}		
+				insText+=tmp[i];
+				if(i<tmp.length-1)
+					insText+="\n";
+			}
+			//insText+="_";
+			a.value		= startText + insText + endText;
+			pos_start	= start;
+			pos_end		= a.value.indexOf("\n", startText.length + insText.length);
+			if(pos_end==-1)
+				pos_end=a.value.length;
+			//pos = start + repdeb.length + insText.length + ;
+		}
+		a.selectionStart = pos_start;
+		a.selectionEnd = pos_end;
+		
+		//if( document.selection ){
+		if(t.isIE){
+			// select the text for IE
+			t.setIESelection();
+			setTimeout("editArea.is_tabbing=false;", 100);	// IE can accept to make 2 tabulation without a little break between both
+		}else
+			t.is_tabbing=false;
+  	};
+	
+	EditArea.prototype.press_enter= function(){		
+		if(!this.smooth_selection)
+			return false;
+		this.getIESelection();
+		var scrollTop= this.result.scrollTop;
+		var scrollLeft= this.result.scrollLeft;
+		var start=this.textarea.selectionStart;
+		var end= this.textarea.selectionEnd;
+		var start_last_line= Math.max(0 , this.textarea.value.substring(0, start).lastIndexOf("\n") + 1 );
+		var begin_line= this.textarea.value.substring(start_last_line, start).replace(/^([ \t]*).*/gm, "$1");
+		var lineStart = this.textarea.value.substring(0, start).split("\n").length;
+		if(begin_line=="\n" || begin_line=="\r" || begin_line.length==0)
+		{
+			return false;
+		}
+			
+		if(this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ){
+			begin_line="\r\n"+ begin_line;
+		}else{
+			begin_line="\n"+ begin_line;
+		}	
+		//alert(start_last_line+" strat: "+start +"\n"+this.textarea.value.substring(start_last_line, start)+"\n_"+begin_line+"_")
+		this.textarea.value= this.textarea.value.substring(0, start) + begin_line + this.textarea.value.substring(end);
+		
+		this.area_select(start+ begin_line.length ,0);
+		// during this process IE scroll back to the top of the textarea
+		if(this.isIE){
+			this.result.scrollTop	= scrollTop;
+			this.result.scrollLeft	= scrollLeft;
+		}
+		return true;
+		
+	};
+	
+	EditArea.prototype.findEndBracket= function(infos, bracket){
+			
+		var start=infos["indexOfCursor"];
+		var normal_order=true;
+		//curr_text=infos["full_text"].split("\n");
+		if(this.assocBracket[bracket])
+			endBracket=this.assocBracket[bracket];
+		else if(this.revertAssocBracket[bracket]){
+			endBracket=this.revertAssocBracket[bracket];
+			normal_order=false;
+		}	
+		var end=-1;
+		var nbBracketOpen=0;
+		
+		for(var i=start; i<infos["full_text"].length && i>=0; ){
+			if(infos["full_text"].charAt(i)==endBracket){				
+				nbBracketOpen--;
+				if(nbBracketOpen<=0){
+					//i=infos["full_text"].length;
+					end=i;
+					break;
+				}
+			}else if(infos["full_text"].charAt(i)==bracket)
+				nbBracketOpen++;
+			if(normal_order)
+				i++;
+			else
+				i--;
+		}
+		
+		//end=infos["full_text"].indexOf("}", start);
+		if(end==-1)
+			return false;	
+		var endLastLine=infos["full_text"].substr(0, end).lastIndexOf("\n");			
+		if(endLastLine==-1)
+			line=1;
+		else
+			line= infos["full_text"].substr(0, endLastLine).split("\n").length + 1;
+					
+		var curPos= end - endLastLine - 1;
+		var endLineLength	= infos["full_text"].substring(end).split("\n")[0].length;
+		this.displayToCursorPosition("end_bracket", line, curPos, infos["full_text"].substring(endLastLine +1, end + endLineLength));
+		return true;
+	};
+	
+	EditArea.prototype.displayToCursorPosition= function(id, start_line, cur_pos, lineContent, no_real_move){
+		var elem,dest,content,posLeft=0,posTop,fixPadding,topOffset,endElem;	
+
+		elem		= this.test_font_size;
+		dest		= _$(id);
+		content		= "<span id='test_font_size_inner'>"+lineContent.substr(0, cur_pos).replace(/&/g,"&amp;").replace(/</g,"&lt;")+"</span><span id='endTestFont'>"+lineContent.substr(cur_pos).replace(/&/g,"&amp;").replace(/</g,"&lt;")+"</span>";
+		if( this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {
+			elem.innerHTML= "<pre>" + content.replace(/^\r?\n/, "<br>") + "</pre>";
+		} else {
+			elem.innerHTML= content;
+		}
+		
+
+		endElem		= _$('endTestFont');
+		topOffset	= endElem.offsetTop;
+		fixPadding	= parseInt( this.content_highlight.style.paddingLeft.replace("px", "") );
+		posLeft 	= 45 + endElem.offsetLeft + ( !isNaN( fixPadding ) && topOffset > 0 ? fixPadding : 0 );
+		posTop		= this.getLinePosTop( start_line ) + topOffset;// + Math.floor( ( endElem.offsetHeight - 1 ) / this.lineHeight ) * this.lineHeight;
+	
+		// detect the case where the span start on a line but has no display on it
+		if( this.isIE && cur_pos > 0 && endElem.offsetLeft == 0 )
+		{
+			posTop	+=	this.lineHeight;
+		}
+		if(no_real_move!=true){	// when the cursor is hidden no need to move him
+			dest.style.top=posTop+"px";
+			dest.style.left=posLeft+"px";	
+		}
+		// usefull for smarter scroll
+		dest.cursor_top=posTop;
+		dest.cursor_left=posLeft;	
+	//	_$(id).style.marginLeft=posLeft+"px";
+	};
+	
+	EditArea.prototype.getLinePosTop= function(start_line){
+		var elem= _$('line_'+ start_line), posTop=0;
+		if( elem )
+			posTop	= elem.offsetTop;
+		else
+			posTop	= this.lineHeight * (start_line-1);
+		return posTop;
+	};
+	
+	
+	// return the dislpayed height of a text (take word-wrap into account)
+	EditArea.prototype.getTextHeight= function(text){
+		var t=this,elem,height;
+		elem		= t.test_font_size;
+		content		= text.replace(/&/g,"&amp;").replace(/</g,"&lt;");
+		if( t.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {
+			elem.innerHTML= "<pre>" + content.replace(/^\r?\n/, "<br>") + "</pre>";
+		} else {
+			elem.innerHTML= content;
+		}
+		height	= elem.offsetHeight;
+		height	= Math.max( 1, Math.floor( elem.offsetHeight / this.lineHeight ) ) * this.lineHeight;
+		return height;
+	};
+
+	/**
+	 * Fix line height for the given lines
+	 * @param Integer linestart
+	 * @param Integer lineEnd End line or -1 to cover all lines
+	 */
+	EditArea.prototype.fixLinesHeight= function( textValue, lineStart,lineEnd ){
+		var aText = textValue.split("\n");
+		if( lineEnd == -1 )
+			lineEnd	= aText.length-1;
+		for( var i = Math.max(0, lineStart); i <= lineEnd; i++ )
+		{
+			if( elem = _$('line_'+ ( i+1 ) ) )
+			{
+				elem.style.height= typeof( aText[i] ) != "undefined" ? this.getTextHeight( aText[i] )+"px" : this.lineHeight;
+			}
+		}
+	};
+	
+	EditArea.prototype.area_select= function(start, length){
+		this.textarea.focus();
+		
+		start	= Math.max(0, Math.min(this.textarea.value.length, start));
+		end		= Math.max(start, Math.min(this.textarea.value.length, start+length));
+
+		if(this.isIE)
+		{
+			this.textarea.selectionStart	= start;
+			this.textarea.selectionEnd		= end;		
+			this.setIESelection();
+		}
+		else
+		{
+			// Opera bug when moving selection start and selection end
+			if(this.isOpera && this.isOpera < 9.6 )
+			{	
+				this.textarea.setSelectionRange(0, 0);
+			}
+			this.textarea.setSelectionRange(start, end);
+		}
+		this.check_line_selection();
+	};
+	
+	
+	EditArea.prototype.area_get_selection= function(){
+		var text="";
+		if( document.selection ){
+			var range = document.selection.createRange();
+			text=range.text;
+		}else{
+			text= this.textarea.value.substring(this.textarea.selectionStart, this.textarea.selectionEnd);
+		}
+		return text;			
+	};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/charmap.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/charmap.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/charmap.js
new file mode 100644
index 0000000..df42822
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/charmap.js
@@ -0,0 +1,90 @@
+/**
+ * Charmap plugin
+ * by Christophe Dolivet
+ * v0.1 (2006/09/22)
+ * 
+ *    
+ * This plugin allow to use a visual keyboard allowing to insert any UTF-8 characters in the text.
+ * 
+ * - plugin name to add to the plugin list: "charmap"
+ * - plugin name to add to the toolbar list: "charmap" 
+ * - possible parameters to add to EditAreaLoader.init(): 
+ * 		"charmap_default": (String) define the name of the default character range displayed on popup display
+ * 							(default: "arrows")
+ * 
+ * 
+ */
+   
+var EditArea_charmap= {
+	/**
+	 * Get called once this file is loaded (editArea still not initialized)
+	 *
+	 * @return nothing	 
+	 */	 	 	
+	init: function(){	
+		this.default_language="Arrows";
+	}
+	
+	/**
+	 * Returns the HTML code for a specific control string or false if this plugin doesn't have that control.
+	 * A control can be a button, select list or any other HTML item to present in the EditArea user interface.
+	 * Language variables such as {$lang_somekey} will also be replaced with contents from
+	 * the language packs.
+	 * 
+	 * @param {string} ctrl_name: the name of the control to add	  
+	 * @return HTML code for a specific control or false.
+	 * @type string	or boolean
+	 */	
+	,get_control_html: function(ctrl_name){
+		switch(ctrl_name){
+			case "charmap":
+				// Control id, button img, command
+				return parent.editAreaLoader.get_button_html('charmap_but', 'charmap.gif', 'charmap_press', false, this.baseURL);
+		}
+		return false;
+	}
+	/**
+	 * Get called once EditArea is fully loaded and initialised
+	 *	 
+	 * @return nothing
+	 */	 	 	
+	,onload: function(){ 
+		if(editArea.settings["charmap_default"] && editArea.settings["charmap_default"].length>0)
+			this.default_language= editArea.settings["charmap_default"];
+	}
+	
+	/**
+	 * Is called each time the user touch a keyboard key.
+	 *	 
+	 * @param (event) e: the keydown event
+	 * @return true - pass to next handler in chain, false - stop chain execution
+	 * @type boolean	 
+	 */
+	,onkeydown: function(e){
+		
+	}
+	
+	/**
+	 * Executes a specific command, this function handles plugin commands.
+	 *
+	 * @param {string} cmd: the name of the command being executed
+	 * @param {unknown} param: the parameter of the command	 
+	 * @return true - pass to next handler in chain, false - stop chain execution
+	 * @type boolean	
+	 */
+	,execCommand: function(cmd, param){
+		// Handle commands
+		switch(cmd){
+			case "charmap_press":
+				win= window.open(this.baseURL+"popup.html", "charmap", "width=500,height=270,scrollbars=yes,resizable=yes");
+				win.focus();
+				return false;
+		}
+		// Pass to next handler in chain
+		return true;
+	}
+	
+};
+
+// Adds the plugin class to the list of available EditArea plugins
+editArea.add_plugin("charmap", EditArea_charmap);

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/css/charmap.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/css/charmap.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/css/charmap.css
new file mode 100644
index 0000000..fc8d666
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/css/charmap.css
@@ -0,0 +1,64 @@
+body{
+	background-color: #F0F0EE; 
+	font: 12px monospace, sans-serif;
+}
+
+select{
+	background-color: #F9F9F9;
+	border: solid 1px #888888;
+}
+
+h1, h2, h3, h4, h5, h6{
+	margin: 0;
+	padding: 0;
+	color: #2B6FB6;
+}
+
+h1{
+	font-size: 1.5em;
+}
+
+div#char_list{
+	height: 200px;
+	overflow: auto;
+	padding: 1px;
+	border: 1px solid #0A246A;
+	background-color: #F9F9F9;
+	clear: both;
+	margin-top: 5px;
+}
+
+a.char{
+	display: block;
+	float: left;
+	width: 20px;
+	height: 20px;
+	line-height: 20px;
+	margin: 1px;
+	border: solid 1px #888888;
+	text-align: center;
+	cursor: pointer;
+}
+
+a.char:hover{
+	background-color: #CCCCCC;
+}
+
+.preview{
+	border: solid 1px #888888;
+	width: 50px;
+	padding: 2px 5px;
+	height: 35px;
+	line-height: 35px;
+	text-align:center;	 
+	background-color: #CCCCCC;
+	font-size: 2em;
+	float: right;
+	font-weight: bold;
+	margin: 0 0 5px 5px;
+}
+
+#preview_code{
+	font-size: 1.1em;
+	width: 70px;
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/images/charmap.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/images/charmap.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/images/charmap.gif
new file mode 100644
index 0000000..3cdc4ac
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/images/charmap.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/jscripts/map.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/jscripts/map.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/jscripts/map.js
new file mode 100644
index 0000000..6c194a4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/jscripts/map.js
@@ -0,0 +1,373 @@
+var editArea;
+
+
+/**
+ *  UTF-8 list taken from http://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=dec 
+ */  
+ 
+
+/*
+var char_range_list={
+"Basic Latin":"0021,007F",
+"Latin-1 Supplement":"0080,00FF",
+"Latin Extended-A":"0100,017F",
+"Latin Extended-B":"0180,024F",
+"IPA Extensions":"0250,02AF",
+"Spacing Modifier Letters":"02B0,02FF",
+
+"Combining Diacritical Marks":"0300,036F",
+"Greek and Coptic":"0370,03FF",
+"Cyrillic":"0400,04FF",
+"Cyrillic Supplement":"0500,052F",
+"Armenian":"0530,058F",
+"Hebrew":"0590,05FF",
+"Arabic":"0600,06FF",
+"Syriac":"0700,074F",
+"Arabic Supplement":"0750,077F",
+
+"Thaana":"0780,07BF",
+"Devanagari":"0900,097F",
+"Bengali":"0980,09FF",
+"Gurmukhi":"0A00,0A7F",
+"Gujarati":"0A80,0AFF",
+"Oriya":"0B00,0B7F",
+"Tamil":"0B80,0BFF",
+"Telugu":"0C00,0C7F",
+"Kannada":"0C80,0CFF",
+
+"Malayalam":"0D00,0D7F",
+"Sinhala":"0D80,0DFF",
+"Thai":"0E00,0E7F",
+"Lao":"0E80,0EFF",
+"Tibetan":"0F00,0FFF",
+"Myanmar":"1000,109F",
+"Georgian":"10A0,10FF",
+"Hangul Jamo":"1100,11FF",
+"Ethiopic":"1200,137F",
+
+"Ethiopic Supplement":"1380,139F",
+"Cherokee":"13A0,13FF",
+"Unified Canadian Aboriginal Syllabics":"1400,167F",
+"Ogham":"1680,169F",
+"Runic":"16A0,16FF",
+"Tagalog":"1700,171F",
+"Hanunoo":"1720,173F",
+"Buhid":"1740,175F",
+"Tagbanwa":"1760,177F",
+
+"Khmer":"1780,17FF",
+"Mongolian":"1800,18AF",
+"Limbu":"1900,194F",
+"Tai Le":"1950,197F",
+"New Tai Lue":"1980,19DF",
+"Khmer Symbols":"19E0,19FF",
+"Buginese":"1A00,1A1F",
+"Phonetic Extensions":"1D00,1D7F",
+"Phonetic Extensions Supplement":"1D80,1DBF",
+
+"Combining Diacritical Marks Supplement":"1DC0,1DFF",
+"Latin Extended Additional":"1E00,1EFF",
+"Greek Extended":"1F00,1FFF",
+"General Punctuation":"2000,206F",
+"Superscripts and Subscripts":"2070,209F",
+"Currency Symbols":"20A0,20CF",
+"Combining Diacritical Marks for Symbols":"20D0,20FF",
+"Letterlike Symbols":"2100,214F",
+"Number Forms":"2150,218F",
+
+"Arrows":"2190,21FF",
+"Mathematical Operators":"2200,22FF",
+"Miscellaneous Technical":"2300,23FF",
+"Control Pictures":"2400,243F",
+"Optical Character Recognition":"2440,245F",
+"Enclosed Alphanumerics":"2460,24FF",
+"Box Drawing":"2500,257F",
+"Block Elements":"2580,259F",
+"Geometric Shapes":"25A0,25FF",
+
+"Miscellaneous Symbols":"2600,26FF",
+"Dingbats":"2700,27BF",
+"Miscellaneous Mathematical Symbols-A":"27C0,27EF",
+"Supplemental Arrows-A":"27F0,27FF",
+"Braille Patterns":"2800,28FF",
+"Supplemental Arrows-B":"2900,297F",
+"Miscellaneous Mathematical Symbols-B":"2980,29FF",
+"Supplemental Mathematical Operators":"2A00,2AFF",
+"Miscellaneous Symbols and Arrows":"2B00,2BFF",
+
+"Glagolitic":"2C00,2C5F",
+"Coptic":"2C80,2CFF",
+"Georgian Supplement":"2D00,2D2F",
+"Tifinagh":"2D30,2D7F",
+"Ethiopic Extended":"2D80,2DDF",
+"Supplemental Punctuation":"2E00,2E7F",
+"CJK Radicals Supplement":"2E80,2EFF",
+"Kangxi Radicals":"2F00,2FDF",
+"Ideographic Description Characters":"2FF0,2FFF",
+
+"CJK Symbols and Punctuation":"3000,303F",
+"Hiragana":"3040,309F",
+"Katakana":"30A0,30FF",
+"Bopomofo":"3100,312F",
+"Hangul Compatibility Jamo":"3130,318F",
+"Kanbun":"3190,319F",
+"Bopomofo Extended":"31A0,31BF",
+"CJK Strokes":"31C0,31EF",
+"Katakana Phonetic Extensions":"31F0,31FF",
+
+"Enclosed CJK Letters and Months":"3200,32FF",
+"CJK Compatibility":"3300,33FF",
+"CJK Unified Ideographs Extension A":"3400,4DBF",
+"Yijing Hexagram Symbols":"4DC0,4DFF",
+"CJK Unified Ideographs":"4E00,9FFF",
+"Yi Syllables":"A000,A48F",
+"Yi Radicals":"A490,A4CF",
+"Modifier Tone Letters":"A700,A71F",
+"Syloti Nagri":"A800,A82F",
+
+"Hangul Syllables":"AC00,D7AF",
+"High Surrogates":"D800,DB7F",
+"High Private Use Surrogates":"DB80,DBFF",
+"Low Surrogates":"DC00,DFFF",
+"Private Use Area":"E000,F8FF",
+"CJK Compatibility Ideographs":"F900,FAFF",
+"Alphabetic Presentation Forms":"FB00,FB4F",
+"Arabic Presentation Forms-A":"FB50,FDFF",
+"Variation Selectors":"FE00,FE0F",
+
+"Vertical Forms":"FE10,FE1F",
+"Combining Half Marks":"FE20,FE2F",
+"CJK Compatibility Forms":"FE30,FE4F",
+"Small Form Variants":"FE50,FE6F",
+"Arabic Presentation Forms-B":"FE70,FEFF",
+"Halfwidth and Fullwidth Forms":"FF00,FFEF",
+"Specials":"FFF0,FFFF",
+"Linear B Syllabary":"10000,1007F",
+"Linear B Ideograms":"10080,100FF",
+
+"Aegean Numbers":"10100,1013F",
+"Ancient Greek Numbers":"10140,1018F",
+"Old Italic":"10300,1032F",
+"Gothic":"10330,1034F",
+"Ugaritic":"10380,1039F",
+"Old Persian":"103A0,103DF",
+"Deseret":"10400,1044F",
+"Shavian":"10450,1047F",
+"Osmanya":"10480,104AF",
+
+"Cypriot Syllabary":"10800,1083F",
+"Kharoshthi":"10A00,10A5F",
+"Byzantine Musical Symbols":"1D000,1D0FF",
+"Musical Symbols":"1D100,1D1FF",
+"Ancient Greek Musical Notation":"1D200,1D24F",
+"Tai Xuan Jing Symbols":"1D300,1D35F",
+"Mathematical Alphanumeric Symbols":"1D400,1D7FF",
+"CJK Unified Ideographs Extension B":"20000,2A6DF",
+"CJK Compatibility Ideographs Supplement":"2F800,2FA1F",
+"Tags":"E0000,E007F",
+"Variation Selectors Supplement":"E0100,E01EF"
+};
+*/
+var char_range_list={
+"Aegean Numbers":"10100,1013F",
+"Alphabetic Presentation Forms":"FB00,FB4F",
+"Ancient Greek Musical Notation":"1D200,1D24F",
+"Ancient Greek Numbers":"10140,1018F",
+"Arabic":"0600,06FF",
+"Arabic Presentation Forms-A":"FB50,FDFF",
+"Arabic Presentation Forms-B":"FE70,FEFF",
+"Arabic Supplement":"0750,077F",
+"Armenian":"0530,058F",
+"Arrows":"2190,21FF",
+"Basic Latin":"0020,007F",
+"Bengali":"0980,09FF",
+"Block Elements":"2580,259F",
+"Bopomofo Extended":"31A0,31BF",
+"Bopomofo":"3100,312F",
+"Box Drawing":"2500,257F",
+"Braille Patterns":"2800,28FF",
+"Buginese":"1A00,1A1F",
+"Buhid":"1740,175F",
+"Byzantine Musical Symbols":"1D000,1D0FF",
+"CJK Compatibility Forms":"FE30,FE4F",
+"CJK Compatibility Ideographs Supplement":"2F800,2FA1F",
+"CJK Compatibility Ideographs":"F900,FAFF",
+"CJK Compatibility":"3300,33FF",
+"CJK Radicals Supplement":"2E80,2EFF",
+"CJK Strokes":"31C0,31EF",
+"CJK Symbols and Punctuation":"3000,303F",
+"CJK Unified Ideographs Extension A":"3400,4DBF",
+"CJK Unified Ideographs Extension B":"20000,2A6DF",
+"CJK Unified Ideographs":"4E00,9FFF",
+"Cherokee":"13A0,13FF",
+"Combining Diacritical Marks Supplement":"1DC0,1DFF",
+"Combining Diacritical Marks for Symbols":"20D0,20FF",
+"Combining Diacritical Marks":"0300,036F",
+"Combining Half Marks":"FE20,FE2F",
+"Control Pictures":"2400,243F",
+"Coptic":"2C80,2CFF",
+"Currency Symbols":"20A0,20CF",
+"Cypriot Syllabary":"10800,1083F",
+"Cyrillic Supplement":"0500,052F",
+"Cyrillic":"0400,04FF",
+"Deseret":"10400,1044F",
+"Devanagari":"0900,097F",
+"Dingbats":"2700,27BF",
+"Enclosed Alphanumerics":"2460,24FF",
+"Enclosed CJK Letters and Months":"3200,32FF",
+"Ethiopic Extended":"2D80,2DDF",
+"Ethiopic Supplement":"1380,139F",
+"Ethiopic":"1200,137F",
+"General Punctuation":"2000,206F",
+"Geometric Shapes":"25A0,25FF",
+"Georgian Supplement":"2D00,2D2F",
+"Georgian":"10A0,10FF",
+"Glagolitic":"2C00,2C5F",
+"Gothic":"10330,1034F",
+"Greek Extended":"1F00,1FFF",
+"Greek and Coptic":"0370,03FF",
+"Gujarati":"0A80,0AFF",
+"Gurmukhi":"0A00,0A7F",
+"Halfwidth and Fullwidth Forms":"FF00,FFEF",
+"Hangul Compatibility Jamo":"3130,318F",
+"Hangul Jamo":"1100,11FF",
+"Hangul Syllables":"AC00,D7AF",
+"Hanunoo":"1720,173F",
+"Hebrew":"0590,05FF",
+"High Private Use Surrogates":"DB80,DBFF",
+"High Surrogates":"D800,DB7F",
+"Hiragana":"3040,309F",
+"IPA Extensions":"0250,02AF",
+"Ideographic Description Characters":"2FF0,2FFF",
+"Kanbun":"3190,319F",
+"Kangxi Radicals":"2F00,2FDF",
+"Kannada":"0C80,0CFF",
+"Katakana Phonetic Extensions":"31F0,31FF",
+"Katakana":"30A0,30FF",
+"Kharoshthi":"10A00,10A5F",
+"Khmer Symbols":"19E0,19FF",
+"Khmer":"1780,17FF",
+"Lao":"0E80,0EFF",
+"Latin Extended Additional":"1E00,1EFF",
+"Latin Extended-A":"0100,017F",
+"Latin Extended-B":"0180,024F",
+"Latin-1 Supplement":"0080,00FF",
+"Letterlike Symbols":"2100,214F",
+"Limbu":"1900,194F",
+"Linear B Ideograms":"10080,100FF",
+"Linear B Syllabary":"10000,1007F",
+"Low Surrogates":"DC00,DFFF",
+"Malayalam":"0D00,0D7F",
+"Mathematical Alphanumeric Symbols":"1D400,1D7FF",
+"Mathematical Operators":"2200,22FF",
+"Miscellaneous Mathematical Symbols-A":"27C0,27EF",
+"Miscellaneous Mathematical Symbols-B":"2980,29FF",
+"Miscellaneous Symbols and Arrows":"2B00,2BFF",
+"Miscellaneous Symbols":"2600,26FF",
+"Miscellaneous Technical":"2300,23FF",
+"Modifier Tone Letters":"A700,A71F",
+"Mongolian":"1800,18AF",
+"Musical Symbols":"1D100,1D1FF",
+"Myanmar":"1000,109F",
+"New Tai Lue":"1980,19DF",
+"Number Forms":"2150,218F",
+"Ogham":"1680,169F",
+"Old Italic":"10300,1032F",
+"Old Persian":"103A0,103DF",
+"Optical Character Recognition":"2440,245F",
+"Oriya":"0B00,0B7F",
+"Osmanya":"10480,104AF",
+"Phonetic Extensions Supplement":"1D80,1DBF",
+"Phonetic Extensions":"1D00,1D7F",
+"Private Use Area":"E000,F8FF",
+"Runic":"16A0,16FF",
+"Shavian":"10450,1047F",
+"Sinhala":"0D80,0DFF",
+"Small Form Variants":"FE50,FE6F",
+"Spacing Modifier Letters":"02B0,02FF",
+"Specials":"FFF0,FFFF",
+"Superscripts and Subscripts":"2070,209F",
+"Supplemental Arrows-A":"27F0,27FF",
+"Supplemental Arrows-B":"2900,297F",
+"Supplemental Mathematical Operators":"2A00,2AFF",
+"Supplemental Punctuation":"2E00,2E7F",
+"Syloti Nagri":"A800,A82F",
+"Syriac":"0700,074F",
+"Tagalog":"1700,171F",
+"Tagbanwa":"1760,177F",
+"Tags":"E0000,E007F",
+"Tai Le":"1950,197F",
+"Tai Xuan Jing Symbols":"1D300,1D35F",
+"Tamil":"0B80,0BFF",
+"Telugu":"0C00,0C7F",
+"Thaana":"0780,07BF",
+"Thai":"0E00,0E7F",
+"Tibetan":"0F00,0FFF",
+"Tifinagh":"2D30,2D7F",
+"Ugaritic":"10380,1039F",
+"Unified Canadian Aboriginal Syllabics":"1400,167F",
+"Variation Selectors Supplement":"E0100,E01EF",
+"Variation Selectors":"FE00,FE0F",
+"Vertical Forms":"FE10,FE1F",
+"Yi Radicals":"A490,A4CF",
+"Yi Syllables":"A000,A48F",
+"Yijing Hexagram Symbols":"4DC0,4DFF"
+};
+
+var insert="charmap_insert";
+
+function map_load(){
+	editArea=opener.editArea;
+	// translate the document
+	insert= editArea.get_translation(insert, "word");
+	//alert(document.title);
+	document.title= editArea.get_translation(document.title, "template");
+	document.body.innerHTML= editArea.get_translation(document.body.innerHTML, "template");
+	//document.title= editArea.get_translation(document.getElementBytitle, "template");
+	
+	var selected_lang=opener.EditArea_charmap.default_language.toLowerCase();
+	var selected=0;
+	
+	var select= document.getElementById("select_range")
+	for(var i in char_range_list){
+		if(i.toLowerCase()==selected_lang)
+			selected=select.options.length;
+		select.options[select.options.length]=new Option(i, char_range_list[i]);
+	}
+	select.options[selected].selected=true;
+/*	start=0;
+	end=127;
+	content="";
+	for(var i=start; i<end; i++){
+		content+="&#"+i+"; ";
+	}
+	document.getElementById("char_list").innerHTML=content;*/
+	renderCharMapHTML();
+}
+
+
+function renderCharMapHTML() {
+	range= document.getElementById("select_range").value.split(",");
+
+	start= parseInt(range[0],16);
+	end= parseInt(range[1],16);
+	var charsPerRow = 20, tdWidth=20, tdHeight=20;
+	html="";
+	for (var i=start; i<end; i++) {
+		html+="<a class='char' onmouseover='previewChar(\""+ i + "\");' onclick='insertChar(\""+ i + "\");' title='"+ insert +"'>"+ String.fromCharCode(i) +"</a>";
+	}
+	document.getElementById("char_list").innerHTML= html;
+	document.getElementById("preview_char").innerHTML="";
+}
+
+function previewChar(i){
+	document.getElementById("preview_char").innerHTML= String.fromCharCode(i);
+	document.getElementById("preview_code").innerHTML= "&amp;#"+ i +";";
+}
+
+function insertChar(i){
+	opener.parent.editAreaLoader.setSelectedText(editArea.id, String.fromCharCode( i));
+	range= opener.parent.editAreaLoader.getSelectionRange(editArea.id);
+	opener.parent.editAreaLoader.setSelectionRange(editArea.id, range["end"], range["end"]);
+	window.focus();
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/bg.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/bg.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/bg.js
new file mode 100644
index 0000000..eaba0f9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/bg.js
@@ -0,0 +1,12 @@
+/*
+ *	Bulgarian translation
+ *	Author:		Valentin Hristov
+ *	Company:	SOFTKIT Bulgarian
+ *	Site:		http://www.softkit-bg.com
+ */
+editArea.add_lang("bg",{
+charmap_but: "Виртуална клавиатура",
+charmap_title: "Виртуална клавиатура",
+charmap_choose_block: "избери езиков блок",
+charmap_insert:"постави този символ"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/cs.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/cs.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/cs.js
new file mode 100644
index 0000000..6b1c907
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/cs.js
@@ -0,0 +1,6 @@
+editArea.add_lang("cs",{
+charmap_but: "Visual keyboard",
+charmap_title: "Visual keyboard",
+charmap_choose_block: "select language block",
+charmap_insert:"insert this character"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/de.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/de.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/de.js
new file mode 100644
index 0000000..6dfe69c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/de.js
@@ -0,0 +1,6 @@
+editArea.add_lang("de",{
+charmap_but: "Sonderzeichen",
+charmap_title: "Sonderzeichen",
+charmap_choose_block: "Bereich ausw&auml;hlen",
+charmap_insert: "dieses Zeichen einf&uuml;gen"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/dk.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/dk.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/dk.js
new file mode 100644
index 0000000..ebcde25
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/dk.js
@@ -0,0 +1,6 @@
+editArea.add_lang("dk",{
+charmap_but: "Visual keyboard",
+charmap_title: "Visual keyboard",
+charmap_choose_block: "select language block",
+charmap_insert:"insert this character"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/en.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/en.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/en.js
new file mode 100644
index 0000000..335ec28
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/en.js
@@ -0,0 +1,6 @@
+editArea.add_lang("en",{
+charmap_but: "Visual keyboard",
+charmap_title: "Visual keyboard",
+charmap_choose_block: "select language block",
+charmap_insert:"insert this character"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/eo.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/eo.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/eo.js
new file mode 100644
index 0000000..9a30841
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/eo.js
@@ -0,0 +1,6 @@
+editArea.add_lang("eo",{
+charmap_but: "Ekranklavaro",
+charmap_title: "Ekranklavaro",
+charmap_choose_block: "Elekto de lingvo",
+charmap_insert:"enmeti tiun signaron"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/es.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/es.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/es.js
new file mode 100644
index 0000000..be04b4b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/es.js
@@ -0,0 +1,6 @@
+editArea.add_lang("es",{
+charmap_but: "Visual keyboard",
+charmap_title: "Visual keyboard",
+charmap_choose_block: "select language block",
+charmap_insert:"insert this character"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/fr.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/fr.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/fr.js
new file mode 100644
index 0000000..8131e30
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/fr.js
@@ -0,0 +1,6 @@
+editArea.add_lang("fr",{
+charmap_but: "Clavier visuel",
+charmap_title: "Clavier visuel",
+charmap_choose_block: "choix du language",
+charmap_insert:"ins&eacute;rer ce caract&egrave;re"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/hr.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/hr.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/hr.js
new file mode 100644
index 0000000..4d74354
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/hr.js
@@ -0,0 +1,6 @@
+editArea.add_lang("hr",{
+charmap_but: "Virtualna tipkovnica",
+charmap_title: "Virtualna tipkovnica",
+charmap_choose_block: "Odaberi blok s jezikom",
+charmap_insert:"Ubaci taj znak"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/it.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/it.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/it.js
new file mode 100644
index 0000000..b05abb9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/it.js
@@ -0,0 +1,6 @@
+editArea.add_lang("it",{
+charmap_but: "Tastiera visuale",
+charmap_title: "Tastiera visuale",
+charmap_choose_block: "seleziona blocco",
+charmap_insert:"inserisci questo carattere"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/ja.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/ja.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/ja.js
new file mode 100644
index 0000000..efe060e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/ja.js
@@ -0,0 +1,6 @@
+editArea.add_lang("ja",{
+charmap_but: "Visual keyboard",
+charmap_title: "Visual keyboard",
+charmap_choose_block: "select language block",
+charmap_insert:"insert this character"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/mk.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/mk.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/mk.js
new file mode 100644
index 0000000..f533116
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/mk.js
@@ -0,0 +1,6 @@
+editArea.add_lang("mkn",{
+charmap_but: "Visual keyboard",
+charmap_title: "Visual keyboard",
+charmap_choose_block: "select language block",
+charmap_insert:"insert this character"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/nl.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/nl.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/nl.js
new file mode 100644
index 0000000..70d7968
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/nl.js
@@ -0,0 +1,6 @@
+editArea.add_lang("nl",{
+charmap_but: "Visueel toetsenbord",
+charmap_title: "Visueel toetsenbord",
+charmap_choose_block: "Kies een taal blok",
+charmap_insert:"Voeg dit symbool in"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/pl.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/pl.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/pl.js
new file mode 100644
index 0000000..9feabbb
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/pl.js
@@ -0,0 +1,6 @@
+editArea.add_lang("pl",{
+charmap_but: "Klawiatura ekranowa",
+charmap_title: "Klawiatura ekranowa",
+charmap_choose_block: "wybierz grupę znaków",
+charmap_insert:"wstaw ten znak"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/pt.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/pt.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/pt.js
new file mode 100644
index 0000000..5d3eaa3
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/pt.js
@@ -0,0 +1,6 @@
+editArea.add_lang("pt",{
+charmap_but: "Visual keyboard",
+charmap_title: "Visual keyboard",
+charmap_choose_block: "select language block",
+charmap_insert:"insert this character"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/ru.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/ru.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/ru.js
new file mode 100644
index 0000000..3163f36
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/ru.js
@@ -0,0 +1,6 @@
+editArea.add_lang("ru",{
+charmap_but: "Визуальная клавиатура",
+charmap_title: "Визуальная клавиатура",
+charmap_choose_block: "выбрать языковой блок",
+charmap_insert:"вставить этот символ"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/sk.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/sk.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/sk.js
new file mode 100644
index 0000000..8513641
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/sk.js
@@ -0,0 +1,6 @@
+editArea.add_lang("sk",{
+charmap_but: "Vizuálna klávesnica",
+charmap_title: "Vizuálna klávesnica",
+charmap_choose_block: "vyber jazykový blok",
+charmap_insert: "vlož tento znak"
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/zh.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/zh.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/zh.js
new file mode 100644
index 0000000..2a20233
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/plugins/charmap/langs/zh.js
@@ -0,0 +1,6 @@
+editArea.add_lang("zh",{
+charmap_but: "软键盘",
+charmap_title: "软键盘",
+charmap_choose_block: "选择一个语言块",
+charmap_insert:"插入此字符"
+});


[05/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/skin.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/skin.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/skin.css
new file mode 100644
index 0000000..d1ac6d7
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/skin.css
@@ -0,0 +1,26 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;}
+.yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;_margin:0;_position:static;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:1.875;*padding-bottom:1px;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20p
 x;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam 
 .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-active button,.yui-skin-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sa
 m .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);}
+.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar .calnavright{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none;}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top
 :0;display:none;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:none;background-color:transparent;cursor:pointer;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{pa
 dding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;padding:0;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdayrow th{
 padding:0;border:none;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:none;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.
 yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#ccff99;}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1;}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(sprite.png) r
 epeat-x 0 0;border-color:#A0A0A0;cursor:pointer;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:0.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2;}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em;}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#EDF5FF;border-top:1px solid black;display:none;}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold;}.yui-skin-sam .yui-ca
 lcontainer .yui-cal-nav-mc{width:100%;_width:auto;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#FFEE69;border:1px solid #000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(sprite.png) repeat-x 0 -1400px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff;}
+.yui-carousel{visibility:hidden;overflow:hidden;position:relative;}.yui-carousel.yui-carousel-visible{visibility:visible;}.yui-carousel-content{overflow:hidden;position:relative;}.yui-carousel-element{margin:5px 0;overflow:hidden;padding:0;position:relative;width:32000px;z-index:1;}.yui-carousel-vertical .yui-carousel-element{margin:0 5px;}.yui-carousel-element li{border:1px solid #ccc;float:left;list-style:none;margin:1px;overflow:hidden;padding:0;text-align:center;*float:none;*display:inline-block;*zoom:1;*display:inline;}.yui-carousel .yui-carousel-item-selected{border:1px dashed #000;margin:1px;}.yui-carousel-vertical{height:32000px;margin:0 5px;width:auto;}.yui-carousel-vertical .yui-carousel-element li{display:block;float:none;}.yui-log .carousel{background:#f2e886;}.yui-carousel-nav{zoom:1;}.yui-carousel-nav:after{clear:both;content:"";display:block;}.yui-carousel-button-focus{outline:1px dotted #000;}.yui-skin-sam .yui-carousel,.yui-skin-sam .yui-carousel-vertical{border:1px
  solid #808080;}.yui-skin-sam .yui-carousel-nav{background:url(sprite.png) repeat-x 0 0;padding:3px;text-align:right;}.yui-skin-sam .yui-carousel-button{background:url(sprite.png) no-repeat 0 -600px;float:right;height:19px;margin:5px;overflow:hidden;width:40px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button{background-position:0 -800px;}.yui-skin-sam .yui-carousel-button-disabled{background-position:0 -2000px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button-disabled{background-position:0 -2100px;}.yui-skin-sam .yui-carousel-button input{background-color:transparent;border:0;cursor:pointer;display:block;height:44px;margin:-2px 0 0 -2px;padding:0 0 0 50px;}.yui-skin-sam span.yui-carousel-first-button{background-position:0px -550px;margin-left:-100px;margin-right:50px;*margin:5px 5px 5px -90px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button{background-position:0px -750px;}.yui-skin-sam span.yui-carousel-first-button-disabled{background-position
 :0 -1950px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button-disabled{background-position:0 -2050px;}.yui-skin-sam .yui-carousel-nav ul{float:right;margin:0;margin-left:-220px;margin-right:100px;*margin-left:-160px;*margin-right:0;padding:0;}.yui-skin-sam .yui-carousel-nav select{position:relative;*right:50px;top:4px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav ul,.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{float:none;margin:0;*zoom:1;}.yui-skin-sam .yui-carousel-nav ul li{float:left;height:19px;list-style:none;}.yui-skin-sam .yui-carousel-nav ul:after{clear:both;content:"";display:block;}.yui-skin-sam .yui-carousel-nav ul li a{background:url(sprite.png) no-repeat 0 -650px;display:block;height:9px;margin:10px 0 0 5px;overflow:hidden;width:9px;}.yui-skin-sam .yui-carousel-nav ul li a em{left:-10000px;position:absolute;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-selected a{background-position:0 -700px;}
+.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0px none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0px none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yui-picker-
 mask{position:absolute;z-index:1;top:0px;left:0px;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0px !important;}.yui-picker-controls .bd{height:100px;border-width:0px !important;}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;list-style:none;margin:0}.yui-picker-controls input{font-size:0.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000;}
+.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;}.mask.block-scrollbars{overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px;}.yui-effect-fade .underlay{display:none;}.yui-tt-shadow{position:absolute;}.yui-override-padding{padding:0 !important;}.yui-panel-container .container-close{overflow:hidden;text-indent:-10000em;text-decoration:none;}.yui-skin-sam .mask{background-color:#000;opacity:.25
 ;*filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px;}.yui-skin-sam .yui-panel{position:relative;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;*border-width:1px;*zoom:1;_zoom:normal;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;*margin:0;*border:0;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .yui-panel-container.focused .yui-panel .hd{}.yui-skin-sam .container-close{position:absolute;top:5px;right
 :6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 4px 0 2px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;left:-3px;right:-3px;bottom:-3px;*top:4px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_left:0;_right:0;_bottom:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold;}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369;}.yui-skin
 -sam .yui-dialog .ft span.default button{color:#fff;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled{background-position:0pt -1500px;border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled button{color:#a6a6a6;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative
 ;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;*filter:alpha(opacity=12);}
+.yui-skin-sam .yui-dt-mask{position:absolute;z-index:9500;}.yui-dt-tmp{position:absolute;left:-9000px;}.yui-dt-scrollable .yui-dt-bd{overflow:auto;}.yui-dt-scrollable .yui-dt-hd{overflow:hidden;position:relative;}.yui-dt-scrollable .yui-dt-bd thead tr,.yui-dt-scrollable .yui-dt-bd thead th{position:absolute;left:-1500px;}.yui-dt-scrollable tbody{-moz-outline:none;}.yui-dt-draggable{cursor:move;}.yui-dt-coltarget{position:absolute;z-index:999;}.yui-dt-hd{zoom:1;}th.yui-dt-resizeable .yui-dt-resizerliner{position:relative;}.yui-dt-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;background-color:#CCC;opacity:0;filter:alpha(opacity=0);}.yui-dt-resizerproxy{visibility:hidden;position:absolute;z-index:9000;}th.yui-dt-hidden .yui-dt-liner,td.yui-dt-hidden .yui-dt-liner,th.yui-dt-hidden .yui-dt-resizer{display:none;}.yui-dt-editor{position:absolute;z-index:9000;}.yui-skin-sam .yui-dt table{margin:0;padding:0;font-family:arial;font-size:inherit;border
 -collapse:separate;*border-collapse:collapse;border-spacing:0;border:1px solid #7F7F7F;}.yui-skin-sam .yui-dt thead{border-spacing:0;}.yui-skin-sam .yui-dt caption{color:#000000;font-size:85%;font-weight:normal;font-style:italic;line-height:1;padding:1em 0pt;text-align:center;}.yui-skin-sam .yui-dt th{background:#D8D8DA url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yui-dt th,.yui-skin-sam .yui-dt th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom;}.yui-skin-sam .yui-dt th{margin:0;padding:0;border:none;border-right:1px solid #CBCBCB;}.yui-skin-sam .yui-dt tr.yui-dt-first td{border-top:1px solid #7F7F7F;}.yui-skin-sam .yui-dt th .yui-dt-liner{white-space:nowrap;}.yui-skin-sam .yui-dt-liner{margin:0;padding:0;padding:4px 10px 4px 10px;}.yui-skin-sam .yui-dt-coltarget{width:5px;background-color:red;}.yui-skin-sam .yui-dt td{margin:0;padding:0;border:none;border-right:1px solid #CBCBCB;text-align:left;}.yui-skin-sam .yui-dt-list td{border-right:none;}.yui-skin-
 sam .yui-dt-resizer{width:6px;}.yui-skin-sam .yui-dt-mask{background-color:#000;opacity:.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-dt-message{background-color:#FFF;}.yui-skin-sam .yui-dt-scrollable table{border:none;}.yui-skin-sam .yui-dt-scrollable .yui-dt-hd{border-left:1px solid #7F7F7F;border-top:1px solid #7F7F7F;border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-scrollable .yui-dt-bd{border-left:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;border-right:1px solid #7F7F7F;background-color:#FFF;}.yui-skin-sam .yui-dt-scrollable .yui-dt-data tr.yui-dt-last td{border-bottom:1px solid #7F7F7F;}.yui-skin-sam thead .yui-dt-sortable{cursor:pointer;}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(sprite.png) repeat-x 0 -100px;}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:10px;}.yui-skin-sam th.yui-dt-asc .yui-dt-liner{background:url(dt-arrow-up.png) no-repeat right;}.yui-skin-sam th.yui-dt-desc .yui-dt-liner{background:url(dt-arrow-d
 n.png) no-repeat right;}tbody .yui-dt-editable{cursor:pointer;}.yui-dt-editor{text-align:left;background-color:#F2F2F2;border:1px solid #808080;padding:6px;}.yui-dt-editor label{padding-left:4px;padding-right:6px;}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right;}.yui-dt-editor .yui-dt-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px;}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584E0;border:1px solid #304369;color:#FFF}.yui-dt-editor .yui-dt-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000;}.yui-dt-editor .yui-dt-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000;}.yui-skin-sam tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam tr.yui-dt-odd{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;
 }.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#DBEAFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam th.yui-dt-highlighted,.yui-skin-sam th.yui-dt-highlighted a{background-color:#B2D2FF;}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list th.yui-dt-highlighted,.yui-skin-sam .yui-dt-list th.yui-dt-highlighted a{b
 ackground-color:#B2D2FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam th.yui-dt-selected,.yui-skin-sam th.yui-dt-selected a{background-color:#446CD7;}.yui-skin-sam tr.yui-dt-selected td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-list th.yui-dt-selected,.yui-skin-sam .yui-dt-list th.yui-dt-selected a{background-color:#446CD7;}.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-
 skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-dt-paginator .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px;}.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none;}.yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none;}.yui-skin-sam a.yui-dt-page{border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;background-color:#fff}.yui-skin-sam .yui-dt-selected{border:1px solid #fff;background-color:#fff;}
+.yui-busy{cursor:wait !important;}.yui-toolbar-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container .yui-toolbar-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-conta
 iner.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-co
 ntainer .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;font-size:0px;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-f
 amily:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-pane
 l .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd .gecko form{overflow:auto;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group{margin-bottom:0.75em;}.yui-editor-panel
  .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;_top:-5px;width:24px;text-indent:52px;font-size:0%;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted bla
 ck;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;text-indent:0px;font-size:75%;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-men
 u .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-tool
 bar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}
 .yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-toolbar-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#
 808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:0.25em;}.yui-sk
 in-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;_font-size:0;margin:0;border-color:#808080;color:#f2f2f2;border-style:solid;border-width:1px 0;zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:0px;line-height:2;display:block;color:#000;overflow:hidden;white-space:nowrap;}.yui-skin-sam .yui-toolbar-container .yui-t
 oolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-di
 sabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;t
 op:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam .yui-toolbar-container .yui-button-menu .yui-menu-body-scrolled{position:relative;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-strikethrough span.yui-toolbar-icon{background-position:0 -108px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-tool
 bar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-undo span.yui-toolbar-icon{background-position:0 -1326px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-redo span.yui-toolbar-icon{background-position:0 -1355px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{ba
 ckground-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972p
 x;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px
 ;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:
 5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;position:absolute;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-sk
 in-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel .createlink_target,.yui-skin-sam .yui-editor-panel .insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color
 :#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;_width:198px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.cl
 ose{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-contain
 er{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;}
+.yui-crop{position:relative;}.yui-crop .yui-crop-mask{position:absolute;top:0;left:0;height:100%;width:100%;}.yui-crop .yui-resize{position:absolute;top:10px;left:10px;border:0;}.yui-crop .yui-crop-resize-mask{position:absolute;top:0;left:0;height:100%;width:100%;background-position:-10px -10px;overflow:hidden;}.yui-skin-sam .yui-crop .yui-crop-mask{background-color:#000;opacity:.5;filter:alpha(opacity=50);}.yui-skin-sam .yui-crop .yui-resize{border:1px dashed #fff;}
+.yui-layout-loading{visibility:hidden;}body.yui-layout{overflow:hidden;position:relative;padding:0;margin:0;}.yui-layout-doc{position:relative;overflow:hidden;padding:0;margin:0;}.yui-layout-unit{height:50px;width:50px;padding:0;margin:0;float:none;z-index:0;}.yui-layout-unit-top{position:absolute;top:0;left:0;width:100%;}.yui-layout-unit-left{position:absolute;top:0;left:0;}.yui-layout-unit-right{position:absolute;top:0;right:0;}.yui-layout-unit-bottom{position:absolute;bottom:0;left:0;width:100%;}.yui-layout-unit-center{position:absolute;top:0;left:0;width:100%;}.yui-layout div.yui-layout-hd{position:absolute;top:0;left:0;zoom:1;width:100%;}.yui-layout div.yui-layout-bd{position:absolute;top:0;left:0;zoom:1;width:100%;}.yui-layout .yui-layout-noscroll div.yui-layout-bd{overflow:hidden;}.yui-layout .yui-layout-scroll div.yui-layout-bd{overflow:auto;}.yui-layout div.yui-layout-ft{position:absolute;bottom:0;left:0;width:100%;zoom:1;}.yui-layout .yui-layout-unit div.yui-layout-hd h2{t
 ext-align:left;}.yui-layout .yui-layout-unit div.yui-layout-hd .collapse{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-unit div.yui-layout-hd .close{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-unit div.yui-layout-hd .collapse-close{right:25px;}.yui-layout .yui-layout-clip{position:absolute;height:20px;background-color:#c0c0c0;display:none;}.yui-layout .yui-layout-clip .collapse{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0px;}.yui-layout .yui-layout-wrap{height:100%;width:100%;position:absolute;left:0;}.yui-skin-sam .yui-layout .yui-resize-proxy{border:none;font-size:0;margin:0;padding:0;}.yui-skin-sam .yui-layout .yui-resize-resizing .yui-resize-handle{visibility:hidden;}.yui-skin-sam .yui-layout .yui-resize-proxy div{position:absolute;border:1px solid #808080;background-color:#EDF5FF;}.yui-skin-sam .yui-layout .
 yui-resize .yui-resize-handle-active{}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-l{width:5px;height:100%;top:0;left:0;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-r{width:5px;top:0;right:0;height:100%;position:absolute;zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-b{width:100%;bottom:0;left:0;height:5px;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-t{width:100%;top:0;left:0;height:5px;}.yui-skin-sam .yui-layout .yui-layout-unit-left div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -160px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-left .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -140px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-right div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -200px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui
 -layout-clip-right .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -120px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-top div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -220px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-top .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -240px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-bottom div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -260px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-bottom .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -180px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd .close{background:transparent url(layout_sprite.png) no-repeat -20px -100px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-hd{background:url(spri
 te.png) repeat-x 0 -1400px;border:1px solid #808080;}.yui-skin-sam .yui-layout{background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd h2{font-weight:bold;color:#fff;padding:3px;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd{border:1px solid #808080;border-bottom:none;border-top:none;*border-bottom-width:0;*border-top-width:0;background-color:#f2f2f2;text-align:left;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-noft{border-bottom:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-nohd{border-top:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip{position:absolute;height:20px;background-color:#EDF5FF;display:none;border:1px solid #808080;}.yui-skin-sam .yui-layout div.yui-layout-ft{border:1px solid #808080;border-top:none;*border-top-width:0;background-color:#f2f2f2;}.yui-skin-sam .yui-layout-unit .yui-resize-handle{background-color:transparent;}.yui-skin-sam .yui-layout-unit .yui-re
 size-handle-r{right:0;top:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-l{left:0;top:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-b{right:0;bottom:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-t{right:0;top:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r .yui-layout-resize-knob,.yui-skin-sam .yui-layout-unit .yui-resize-handle-l .yui-layout-resize-knob{position:absolute;height:16px;width:6px;top:45%;left:0px;background:transparent url(layout_sprite.png) no-repeat 0 -5px;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-t .yui-layout-resize-knob,.yui-skin-sam .yui-layout-unit .yui-resize-handle-b .yui-layout-resize-knob{position:absolute;height:6px;width:16px;left:45%;background:transparent url(layout_sprite.png) no-repeat -20px 0;}
+.yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000;}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em;}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal;}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em;}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757;}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF;}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}.yui-skin-sam .yui-log p{margin:1px;padding:.1em;}.yui-skin-sam .yui-log pre{margin:0;padding:0;}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;}.yui
 -skin-sam .yui-log .yui-log-ft{margin-top:.5em;}.yui-skin-sam .yui-log .yui-log-ft .yui-log-categoryfilters{}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em;}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em;}.yui-skin-sam .yui-log .info{background-color:#A7CC25;}.yui-skin-sam .yui-log .warn{background-color:#F58516;}.yui-skin-sam .yui-log .error{background-color:#E32F0B;}.yui-skin-sam .yui-log .time{background-color:#A6C9D7;}.yui-skin-sam .yui-log .window{background-color:#F2E886;}
+.yuimenu{top:-999em;left:-999em;}.yuimenubar{position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .
 yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-selected{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenub
 aritemlabel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{*zoom:1;_zoom:normal;border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu .yuimenu .bd{*zoom:normal;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .y
 ui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-check
 ed{background-image:url(menuitem_checkbox.png);background-position:left center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-shadow-visible{background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);}
+.yui-skin-sam .yui-pg-container{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous,.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last,.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-pages,.yui-skin-sam .yui-pg-page{display:inline-block;font-family:arial,helvetica,clean,sans-serif;padding:3px 6px;zoom:1;}.yui-skin-sam .yui-pg-pages{padding:0;}.yui-skin-sam .yui-pg-current{padding:3px 0;}.yui-skin-sam a.yui-pg-first:link,.yui-skin-sam a.yui-pg-first:visited,.yui-skin-sam a.yui-pg-first:active,.yui-skin-sam a.yui-pg-first:hover,.yui-skin-sam a.yui-pg-previous:link,.yui-skin-sam a.yui-pg-previous:visited,.yui-skin-sam a.yui-pg-previous:active,.yui-skin-sam a.yui-pg-previous:hover,.yui-skin-sam a.yui-pg-next:link,.yui-skin-sam a.yui-pg-next:visited,.yui-skin-sam a.yui-pg-next:active,.yui-skin-sam a.yui-pg-next:hover,.yui-skin-sam a.yui-pg-last:link,.yui-skin-sam a.yui-pg-last:visited,.yui-skin-sam a.yui-pg-last:active,.yui-ski
 n-sam a.yui-pg-last:hover,.yui-skin-sam a.yui-pg-page:link,.yui-skin-sam a.yui-pg-page:visited,.yui-skin-sam a.yui-pg-page:active,.yui-skin-sam a.yui-pg-page:hover{color:#06c;text-decoration:underline;outline:0;}.yui-skin-sam span.yui-pg-first,.yui-skin-sam span.yui-pg-previous,.yui-skin-sam span.yui-pg-next,.yui-skin-sam span.yui-pg-last{color:#a6a6a6;}.yui-skin-sam .yui-pg-page{background-color:#fff;border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;}.yui-skin-sam .yui-pg-current-page{background-color:transparent;border:none;font-weight:bold;padding:3px 6px;}.yui-skin-sam .yui-pg-page{margin-left:1px;margin-right:1px;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous{padding-left:0;}.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last{padding-right:0;}.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-rpp-options{margin-left:1em;margin-right:1em;}
+.yui-skin-sam .yui-pv{background-color:#4a4a4a;font:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(header_background.png) repeat-x;min-height:30px;overflow:hidden;zoom:1;padding:2px 0;}.yui-skin-sam .yui-pv .hd h4{padding:8px 10px;margin:0;font:bold 14px arial;color:#fff;}.yui-skin-sam .yui-pv .hd a{background:#3f6bc3;font:bold 11px arial;color:#fff;padding:4px;margin:3px 10px 0 0;border:1px solid #3f567d;cursor:pointer;display:block;float:right;}.yui-skin-sam .yui-pv .hd span{display:none;}.yui-skin-sam .yui-pv .hd span.yui-pv-busy{height:18px;width:18px;background:url(wait.gif) no-repeat;overflow:hidden;display:block;float:right;margin:4px 10px 0 0;}.yui-skin-sam .yui-pv .hd:after,.yui-pv .bd:after,.yui-skin-sam .yui-pv-chartlegend dl:after{content:'.';visibility:hidden;clear:left;height:0;display:block;}.yui-skin-sam .yui-pv .bd{position:relative;zoom:1;overflow-x:auto;overflow-y:hidden;}.yui-skin-sam .yu
 i-pv .yui-pv-table{padding:0 10px;margin:5px 0 10px 0;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td{color:#eeee5c;font:12px arial;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd{background:#929292;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even{background:#58637a;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc{background:#384970;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc{background:#6F6E6E;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th{background-image:none;background:#2E2D2D;}.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner{background:transparent url(asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(desc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a{color:#fff;font:bold 12px arial;}.yui-sk
 in-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc{background:#333;}.yui-skin-sam .yui-pv-chartcontainer{padding:0 10px;}.yui-skin-sam .yui-pv-chart{height:250px;clear:right;margin:5px 0 0 0;color:#fff;}.yui-skin-sam .yui-pv-chartlegend div{float:right;margin:0 0 0 10px;_width:250px;}.yui-skin-sam .yui-pv-chartlegend dl{border:1px solid #999;padding:.2em 0 .2em .5em;zoom:1;margin:5px 0;}.yui-skin-sam .yui-pv-chartlegend dt{float:left;display:block;height:.7em;width:.7em;padding:0;}.yui-skin-sam .yui-pv-chartlegend dd{float:left;display:block;color:#fff;margin:0 1em 0 .5em;padding:0;font:11px arial;}.yui-skin-sam .yui-pv-minimized{height:35px;}.yui-skin-sam .yui-pv-minimized .bd{top:-3000px;}.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh{display:none;}
+.yui-resize{position:relative;zoom:1;z-index:0;}.yui-resize-wrap{zoom:1;}.yui-draggable{cursor:move;}.yui-resize .yui-resize-handle{position:absolute;z-index:1;font-size:0;margin:0;padding:0;zoom:1;height:1px;width:1px;}.yui-resize .yui-resize-handle-br{height:5px;width:5px;bottom:0;right:0;cursor:se-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-bl{height:5px;width:5px;bottom:0;left:0;cursor:sw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tl{height:5px;width:5px;top:0;left:0;cursor:nw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tr{height:5px;width:5px;top:0;right:0;cursor:ne-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-r{width:5px;height:100%;top:0;right:0;cursor:e-resize;zoom:1;}.yui-resize .yui-resize-handle-l{height:100%;width:5px;top:0;left:0;cursor:w-resize;zoom:1;}.yui-resize .yui-resize-handle-b{width:100%;height:5px;bottom:0;right:0;cursor:s-resize;zoom:1;}.yui-resize .yui-resize-handle-t{width:100%;height:5px;top:0;right:0;cursor:
 n-resize;zoom:1;}.yui-resize-proxy{position:absolute;border:1px dashed #000;visibility:hidden;z-index:1000;}.yui-resize-hover .yui-resize-handle,.yui-resize-hidden .yui-resize-handle{opacity:0;filter:alpha(opacity=0);}.yui-resize-ghost{opacity:.5;filter:alpha(opacity=50);}.yui-resize-knob .yui-resize-handle{height:6px;width:6px;}.yui-resize-knob .yui-resize-handle-tr{right:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-tl{left:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-bl{left:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-br{right:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-t{left:45%;top:-3px;}.yui-resize-knob .yui-resize-handle-r{right:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-l{left:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-b{left:45%;bottom:-3px;}.yui-resize-status{position:absolute;top:-999px;left:-999px;padding:2px;font-size:80%;display:none;zoom:1;z-index:9999;}.yui-resize-status strong,.yui-resize-status em{font-weight:normal;fon
 t-style:normal;padding:1px;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle{background-color:#F2F2F2;}.yui-skin-sam .yui-resize .yui-resize-handle-active{background-color:#7D98B8;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-l,.yui-skin-sam .yui-resize .yui-resize-handle-r,.yui-skin-sam .yui-resize .yui-resize-handle-l-active,.yui-skin-sam .yui-resize .yui-resize-handle-r-active{height:100%;}.yui-skin-sam .yui-resize-knob .yui-resize-handle{border:1px solid #808080;}.yui-skin-sam .yui-resize-hover .yui-resize-handle-active{opacity:1;filter:alpha(opacity=100);}.yui-skin-sam .yui-resize-proxy{border:1px dashed #426FD9;}.yui-skin-sam .yui-resize-status{border:1px solid #A6982B;border-top:1px solid #D4C237;background-color:#FFEE69;color:#000;}.yui-skin-sam .yui-resize-status strong,.yui-skin-sam .yui-resize-status em{float:left;display:block;clear:both;padding:1px;text-align:center;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize .yui-resize-han
 dle-inner-l{background:transparent url( layout_sprite.png) no-repeat 0 -5px;height:16px;width:5px;position:absolute;top:45%;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize .yui-resize-handle-inner-b{background:transparent url(layout_sprite.png) no-repeat -20px 0;height:5px;width:16px;position:absolute;left:50%;}.yui-skin-sam .yui-resize .yui-resize-handle-br{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -62px;}.yui-skin-sam .yui-resize .yui-resize-handle-tr{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -42px;}.yui-skin-sam .yui-resize .yui-resize-handle-tl{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -82px;}.yui-skin-sam .yui-resize .yui-resize-handle-bl{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -23px;}.yui-skin-sam .yui-resize-knob .yui-resize-handl
 e-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-br,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-br{background-image:none;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob
  .yui-resize-handle-l-active,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r-active{height:6px;width:6px;}
+.yui-busy{cursor:wait !important;}.yui-toolbar-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container .yui-toolbar-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-conta
 iner.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-co
 ntainer .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;font-size:0px;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-f
 amily:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-pane
 l .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd .gecko form{overflow:auto;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group{margin-bottom:0.75em;}.yui-editor-panel
  .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;_top:-5px;width:24px;text-indent:52px;font-size:0%;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted bla
 ck;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;text-indent:0px;font-size:75%;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-men
 u .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-tool
 bar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}
 .yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-toolbar-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#
 808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:0.25em;}.yui-sk
 in-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;_font-size:0;margin:0;border-color:#808080;color:#f2f2f2;border-style:solid;border-width:1px 0;zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:0px;line-height:2;display:block;color:#000;overflow:hidden;white-space:nowrap;}.yui-skin-sam .yui-toolbar-container .yui-t
 oolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-di
 sabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;t
 op:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam .yui-toolbar-container .yui-button-menu .yui-menu-body-scrolled{position:relative;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-strikethrough span.yui-toolbar-icon{background-position:0 -108px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-tool
 bar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-undo span.yui-toolbar-icon{background-position:0 -1326px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-redo span.yui-toolbar-icon{background-position:0 -1355px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{ba
 ckground-position:0 -324px;left:5px;}

<TRUNCATED>

[15/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/autocompletion.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/autocompletion.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/autocompletion.js
new file mode 100644
index 0000000..c5d646a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/autocompletion.js
@@ -0,0 +1,491 @@
+/**
+ * Autocompletion class
+ * 
+ * An auto completion box appear while you're writing. It's possible to force it to appear with Ctrl+Space short cut
+ * 
+ * Loaded as a plugin inside editArea (everything made here could have been made in the plugin directory)
+ * But is definitly linked to syntax selection (no need to do 2 different files for color and auto complete for each syntax language)
+ * and add a too important feature that many people would miss if included as a plugin
+ * 
+ * - init param: autocompletion_start
+ * - Button name: "autocompletion"
+ */  
+
+var EditArea_autocompletion= {
+	
+	/**
+	 * Get called once this file is loaded (editArea still not initialized)
+	 *
+	 * @return nothing	 
+	 */	 	 	
+	init: function(){	
+		//	alert("test init: "+ this._someInternalFunction(2, 3));
+		
+		if(editArea.settings["autocompletion"])
+			this.enabled= true;
+		else
+			this.enabled= false;
+		this.current_word		= false;
+		this.shown				= false;
+		this.selectIndex		= -1;
+		this.forceDisplay		= false;
+		this.isInMiddleWord		= false;
+		this.autoSelectIfOneResult	= false;
+		this.delayBeforeDisplay	= 100;
+		this.checkDelayTimer	= false;
+		this.curr_syntax_str	= '';
+		
+		this.file_syntax_datas	= {};
+	}
+	/**
+	 * Returns the HTML code for a specific control string or false if this plugin doesn't have that control.
+	 * A control can be a button, select list or any other HTML item to present in the EditArea user interface.
+	 * Language variables such as {$lang_somekey} will also be replaced with contents from
+	 * the language packs.
+	 * 
+	 * @param {string} ctrl_name: the name of the control to add	  
+	 * @return HTML code for a specific control or false.
+	 * @type string	or boolean
+	 */	
+	/*,get_control_html: function(ctrl_name){
+		switch( ctrl_name ){
+			case 'autocompletion':
+				// Control id, button img, command
+				return parent.editAreaLoader.get_button_html('autocompletion_but', 'autocompletion.gif', 'toggle_autocompletion', false, this.baseURL);
+				break;
+		}
+		return false;
+	}*/
+	/**
+	 * Get called once EditArea is fully loaded and initialised
+	 *	 
+	 * @return nothing
+	 */	 	 	
+	,onload: function(){ 
+		if(this.enabled)
+		{
+			var icon= document.getElementById("autocompletion");
+			if(icon)
+				editArea.switchClassSticky(icon, 'editAreaButtonSelected', true);
+		}
+		
+		this.container	= document.createElement('div');
+		this.container.id	= "auto_completion_area";
+		editArea.container.insertBefore( this.container, editArea.container.firstChild );
+		
+		// add event detection for hiding suggestion box
+		parent.editAreaLoader.add_event( document, "click", function(){ editArea.plugins['autocompletion']._hide();} );
+		parent.editAreaLoader.add_event( editArea.textarea, "blur", function(){ editArea.plugins['autocompletion']._hide();} );
+		
+	}
+	
+	/**
+	 * Is called each time the user touch a keyboard key.
+	 *	 
+	 * @param (event) e: the keydown event
+	 * @return true - pass to next handler in chain, false - stop chain execution
+	 * @type boolean	 
+	 */
+	,onkeydown: function(e){
+		if(!this.enabled)
+			return true;
+			
+		if (EA_keys[e.keyCode])
+			letter=EA_keys[e.keyCode];
+		else
+			letter=String.fromCharCode(e.keyCode);	
+		// shown
+		if( this._isShown() )
+		{	
+			// if escape, hide the box
+			if(letter=="Esc")
+			{
+				this._hide();
+				return false;
+			}
+			// Enter
+			else if( letter=="Entrer")
+			{
+				var as	= this.container.getElementsByTagName('A');
+				// select a suggested entry
+				if( this.selectIndex >= 0 && this.selectIndex < as.length )
+				{
+					as[ this.selectIndex ].onmousedown();
+					return false
+				}
+				// simply add an enter in the code
+				else
+				{
+					this._hide();
+					return true;
+				}
+			}
+			else if( letter=="Tab" || letter=="Down")
+			{
+				this._selectNext();
+				return false;
+			}
+			else if( letter=="Up")
+			{
+				this._selectBefore();
+				return false;
+			}
+		}
+		// hidden
+		else
+		{
+			
+		}
+		
+		// show current suggestion list and do autoSelect if possible (no matter it's shown or hidden)
+		if( letter=="Space" && CtrlPressed(e) )
+		{
+			//parent.console.log('SHOW SUGGEST');
+			this.forceDisplay 			= true;
+			this.autoSelectIfOneResult	= true;
+			this._checkLetter();
+			return false;
+		}
+		
+		// wait a short period for check that the cursor isn't moving
+		setTimeout("editArea.plugins['autocompletion']._checkDelayAndCursorBeforeDisplay();", editArea.check_line_selection_timer +5 );
+		this.checkDelayTimer = false;
+		return true;
+	}	
+	/**
+	 * Executes a specific command, this function handles plugin commands.
+	 *
+	 * @param {string} cmd: the name of the command being executed
+	 * @param {unknown} param: the parameter of the command	 
+	 * @return true - pass to next handler in chain, false - stop chain execution
+	 * @type boolean	
+	 */
+	,execCommand: function(cmd, param){
+		switch( cmd ){
+			case 'toggle_autocompletion':
+				var icon= document.getElementById("autocompletion");
+				if(!this.enabled)
+				{
+					if(icon != null){
+						editArea.restoreClass(icon);
+						editArea.switchClassSticky(icon, 'editAreaButtonSelected', true);
+					}
+					this.enabled= true;
+				}
+				else
+				{
+					this.enabled= false;
+					if(icon != null)
+						editArea.switchClassSticky(icon, 'editAreaButtonNormal', false);
+				}
+				return true;
+		}
+		return true;
+	}
+	,_checkDelayAndCursorBeforeDisplay: function()
+	{
+		this.checkDelayTimer = setTimeout("if(editArea.textarea.selectionStart == "+ editArea.textarea.selectionStart +") EditArea_autocompletion._checkLetter();",  this.delayBeforeDisplay - editArea.check_line_selection_timer - 5 );
+	}
+	// hide the suggested box
+	,_hide: function(){
+		this.container.style.display="none";
+		this.selectIndex	= -1;
+		this.shown	= false;
+		this.forceDisplay	= false;
+		this.autoSelectIfOneResult = false;
+	}
+	// display the suggested box
+	,_show: function(){
+		if( !this._isShown() )
+		{
+			this.container.style.display="block";
+			this.selectIndex	= -1;
+			this.shown	= true;
+		}
+	}
+	// is the suggested box displayed?
+	,_isShown: function(){
+		return this.shown;
+	}
+	// setter and getter
+	,_isInMiddleWord: function( new_value ){
+		if( typeof( new_value ) == "undefined" )
+			return this.isInMiddleWord;
+		else
+			this.isInMiddleWord	= new_value;
+	}
+	// select the next element in the suggested box
+	,_selectNext: function()
+	{
+		var as	= this.container.getElementsByTagName('A');
+		
+		// clean existing elements
+		for( var i=0; i<as.length; i++ )
+		{
+			if( as[i].className )
+				as[i].className	= as[i].className.replace(/ focus/g, '');
+		}
+		
+		this.selectIndex++;	
+		this.selectIndex	= ( this.selectIndex >= as.length || this.selectIndex < 0 ) ? 0 : this.selectIndex;
+		as[ this.selectIndex ].className	+= " focus";
+	}
+	// select the previous element in the suggested box
+	,_selectBefore: function()
+	{
+		var as	= this.container.getElementsByTagName('A');
+		
+		// clean existing elements
+		for( var i=0; i<as.length; i++ )
+		{
+			if( as[i].className )
+				as[i].className	= as[ i ].className.replace(/ focus/g, '');
+		}
+		
+		this.selectIndex--;
+		
+		this.selectIndex	= ( this.selectIndex >= as.length || this.selectIndex < 0 ) ? as.length-1 : this.selectIndex;
+		as[ this.selectIndex ].className	+= " focus";
+	}
+	,_select: function( content )
+	{
+		cursor_forced_position	= content.indexOf( '{@}' );
+		content	= content.replace(/{@}/g, '' );
+		editArea.getIESelection();
+		
+		// retrive the number of matching characters
+		var start_index	= Math.max( 0, editArea.textarea.selectionEnd - content.length );
+		
+		line_string	= 	editArea.textarea.value.substring( start_index, editArea.textarea.selectionEnd + 1);
+		limit	= line_string.length -1;
+		nbMatch	= 0;
+		for( i =0; i<limit ; i++ )
+		{
+			if( line_string.substring( limit - i - 1, limit ) == content.substring( 0, i + 1 ) )
+				nbMatch = i + 1;
+		}
+		// if characters match, we should include them in the selection that will be replaced
+		if( nbMatch > 0 )
+			parent.editAreaLoader.setSelectionRange(editArea.id, editArea.textarea.selectionStart - nbMatch , editArea.textarea.selectionEnd);
+		
+		parent.editAreaLoader.setSelectedText(editArea.id, content );
+		range= parent.editAreaLoader.getSelectionRange(editArea.id);
+		
+		if( cursor_forced_position != -1 )
+			new_pos	= range["end"] - ( content.length-cursor_forced_position );
+		else
+			new_pos	= range["end"];	
+		parent.editAreaLoader.setSelectionRange(editArea.id, new_pos, new_pos);
+		this._hide();
+	}
+	
+	
+	/**
+	 * Parse the AUTO_COMPLETION part of syntax definition files
+	 */
+	,_parseSyntaxAutoCompletionDatas: function(){
+		//foreach syntax loaded
+		for(var lang in parent.editAreaLoader.load_syntax)
+		{
+			if(!parent.editAreaLoader.syntax[lang]['autocompletion'])	// init the regexp if not already initialized
+			{
+				parent.editAreaLoader.syntax[lang]['autocompletion']= {};
+				// the file has auto completion datas
+				if(parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'])
+				{
+					// parse them
+					for(var i in parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'])
+					{
+						datas	= parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'][i];
+						tmp	= {};
+						if(datas["CASE_SENSITIVE"]!="undefined" && datas["CASE_SENSITIVE"]==false)
+							tmp["modifiers"]="i";
+						else
+							tmp["modifiers"]="";
+						tmp["prefix_separator"]= datas["REGEXP"]["prefix_separator"];
+						tmp["match_prefix_separator"]= new RegExp( datas["REGEXP"]["prefix_separator"] +"$", tmp["modifiers"]);
+						tmp["match_word"]= new RegExp("(?:"+ datas["REGEXP"]["before_word"] +")("+ datas["REGEXP"]["possible_words_letters"] +")$", tmp["modifiers"]);
+						tmp["match_next_letter"]= new RegExp("^("+ datas["REGEXP"]["letter_after_word_must_match"] +")$", tmp["modifiers"]);
+						tmp["keywords"]= {};
+						//console.log( datas["KEYWORDS"] );
+						for( var prefix in datas["KEYWORDS"] )
+						{
+							tmp["keywords"][prefix]= {
+								prefix: prefix,
+								prefix_name: prefix,
+								prefix_reg: new RegExp("(?:"+ parent.editAreaLoader.get_escaped_regexp( prefix ) +")(?:"+ tmp["prefix_separator"] +")$", tmp["modifiers"] ),
+								datas: []
+							};
+							for( var j=0; j<datas["KEYWORDS"][prefix].length; j++ )
+							{
+								tmp["keywords"][prefix]['datas'][j]= {
+									is_typing: datas["KEYWORDS"][prefix][j][0],
+									// if replace with is empty, replace with the is_typing value
+									replace_with: datas["KEYWORDS"][prefix][j][1] ? datas["KEYWORDS"][prefix][j][1].replace('�', datas["KEYWORDS"][prefix][j][0] ) : '',
+									comment: datas["KEYWORDS"][prefix][j][2] ? datas["KEYWORDS"][prefix][j][2] : '' 
+								};
+								
+								// the replace with shouldn't be empty
+								if( tmp["keywords"][prefix]['datas'][j]['replace_with'].length == 0 )
+									tmp["keywords"][prefix]['datas'][j]['replace_with'] = tmp["keywords"][prefix]['datas'][j]['is_typing'];
+								
+								// if the comment is empty, display the replace_with value
+								if( tmp["keywords"][prefix]['datas'][j]['comment'].length == 0 )
+									 tmp["keywords"][prefix]['datas'][j]['comment'] = tmp["keywords"][prefix]['datas'][j]['replace_with'].replace(/{@}/g, '' );
+							}
+								
+						}
+						tmp["max_text_length"]= datas["MAX_TEXT_LENGTH"];
+						parent.editAreaLoader.syntax[lang]['autocompletion'][i]	= tmp;
+					}
+				}
+			}
+		}
+	}
+	
+	,_checkLetter: function(){
+		// check that syntax hasn't changed
+		if( this.curr_syntax_str != editArea.settings['syntax'] )
+		{
+			if( !parent.editAreaLoader.syntax[editArea.settings['syntax']]['autocompletion'] )
+				this._parseSyntaxAutoCompletionDatas();
+			this.curr_syntax= parent.editAreaLoader.syntax[editArea.settings['syntax']]['autocompletion'];
+			this.curr_syntax_str = editArea.settings['syntax'];
+			//console.log( this.curr_syntax );
+		}
+		
+		if( editArea.is_editable )
+		{
+			time=new Date;
+			t1= time.getTime();
+			editArea.getIESelection();
+			this.selectIndex	= -1;
+			start=editArea.textarea.selectionStart;
+			var str	= editArea.textarea.value;
+			var results= [];
+			
+			
+			for(var i in this.curr_syntax)
+			{
+				var last_chars	= str.substring(Math.max(0, start-this.curr_syntax[i]["max_text_length"]), start);
+				var matchNextletter	= str.substring(start, start+1).match( this.curr_syntax[i]["match_next_letter"]);
+				// if not writting in the middle of a word or if forcing display
+				if( matchNextletter || this.forceDisplay )
+				{
+					// check if the last chars match a separator
+					var match_prefix_separator = last_chars.match(this.curr_syntax[i]["match_prefix_separator"]);
+			
+					// check if it match a possible word
+					var match_word= last_chars.match(this.curr_syntax[i]["match_word"]);
+					
+					//console.log( match_word );
+					if( match_word )
+					{
+						var begin_word= match_word[1];
+						var match_curr_word= new RegExp("^"+ parent.editAreaLoader.get_escaped_regexp( begin_word ), this.curr_syntax[i]["modifiers"]);
+						//console.log( match_curr_word );
+						for(var prefix in this.curr_syntax[i]["keywords"])
+						{
+						//	parent.console.log( this.curr_syntax[i]["keywords"][prefix] );
+							for(var j=0; j<this.curr_syntax[i]["keywords"][prefix]['datas'].length; j++)
+							{
+						//		parent.console.log( this.curr_syntax[i]["keywords"][prefix]['datas'][j]['is_typing'] );
+								// the key word match or force display 
+								if( this.curr_syntax[i]["keywords"][prefix]['datas'][j]['is_typing'].match(match_curr_word) )
+								{
+							//		parent.console.log('match');
+									hasMatch = false;
+									var before = last_chars.substr( 0, last_chars.length - begin_word.length );
+									
+									// no prefix to match => it's valid
+									if( !match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length == 0 )
+									{
+										if( ! before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
+											hasMatch = true;
+									}
+									// we still need to check the prefix if there is one
+									else if( this.curr_syntax[i]["keywords"][prefix]['prefix'].length > 0 )
+									{
+										if( before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
+											hasMatch = true;
+									}
+									
+									if( hasMatch )
+										results[results.length]= [ this.curr_syntax[i]["keywords"][prefix], this.curr_syntax[i]["keywords"][prefix]['datas'][j] ];
+								}	
+							}
+						}
+					}
+					// it doesn't match any possible word but we want to display something
+					// we'll display to list of all available words
+					else if( this.forceDisplay || match_prefix_separator )
+					{
+						for(var prefix in this.curr_syntax[i]["keywords"])
+						{
+							for(var j=0; j<this.curr_syntax[i]["keywords"][prefix]['datas'].length; j++)
+							{
+								hasMatch = false;
+								// no prefix to match => it's valid
+								if( !match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length == 0 )
+								{
+									hasMatch	= true;
+								}
+								// we still need to check the prefix if there is one
+								else if( match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length > 0 )
+								{
+									var before = last_chars; //.substr( 0, last_chars.length );
+									if( before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
+										hasMatch = true;
+								}	
+									
+								if( hasMatch )
+									results[results.length]= [ this.curr_syntax[i]["keywords"][prefix], this.curr_syntax[i]["keywords"][prefix]['datas'][j] ];	
+							}
+						}
+					}
+				}
+			}
+			
+			// there is only one result, and we can select it automatically
+			if( results.length == 1 && this.autoSelectIfOneResult )
+			{
+			//	console.log( results );
+				this._select( results[0][1]['replace_with'] );
+			}
+			else if( results.length == 0 )
+			{
+				this._hide();
+			}
+			else
+			{
+				// build the suggestion box content
+				var lines=[];
+				for(var i=0; i<results.length; i++)
+				{
+					var line= "<li><a href=\"#\" class=\"entry\" onmousedown=\"EditArea_autocompletion._select('"+ results[i][1]['replace_with'].replace(new RegExp('"', "g"), "&quot;") +"');return false;\">"+ results[i][1]['comment'];
+					if(results[i][0]['prefix_name'].length>0)
+						line+='<span class="prefix">'+ results[i][0]['prefix_name'] +'</span>';
+					line+='</a></li>';
+					lines[lines.length]=line;
+				}
+				// sort results
+				this.container.innerHTML		= '<ul>'+ lines.sort().join('') +'</ul>';
+				
+				var cursor	= _$("cursor_pos");
+				this.container.style.top		= ( cursor.cursor_top + editArea.lineHeight ) +"px";
+				this.container.style.left		= ( cursor.cursor_left + 8 ) +"px";
+				this._show();
+			}
+				
+			this.autoSelectIfOneResult = false;
+			time=new Date;
+			t2= time.getTime();
+		
+			//parent.console.log( begin_word +"\n"+ (t2-t1) +"\n"+ html );
+		}
+	}
+};
+
+// Load as a plugin
+editArea.settings['plugins'][ editArea.settings['plugins'].length ] = 'autocompletion';
+editArea.add_plugin('autocompletion', EditArea_autocompletion);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area.css
new file mode 100644
index 0000000..172b366
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area.css
@@ -0,0 +1,530 @@
+body, html{
+	margin: 0; 
+	padding: 0;
+	height: 100%;
+	border: none;
+	overflow: hidden;
+	background-color: #FFF;
+}
+
+body, html, table, form, textarea{
+	font: 12px monospace, sans-serif;
+}
+
+#editor{
+	border: solid #888 1px;
+	overflow: hidden;
+}
+
+#result{
+	z-index: 4; 
+	overflow-x: auto;
+	overflow-y: scroll;
+	border-top: solid #888 1px;
+	border-bottom: solid #888 1px;
+	position: relative;
+	clear: both;
+}
+
+#result.empty{
+	overflow: hidden;
+}
+
+#container{
+	overflow: hidden;
+	border: solid blue 0;
+	position: relative; 
+	z-index: 10;
+	padding: 0 5px 0 45px;
+	/*padding-right: 5px;*/ 
+}
+
+#textarea{
+	position: relative; 
+	top: 0; 
+	left: 0;
+	margin: 0;
+	padding: 0;
+	width: 100%;
+	height: 100%; 
+	overflow: hidden;  
+	z-index: 7; 
+	border-width: 0;
+	background-color: transparent;
+	resize: none;
+}
+
+#textarea, #textarea:hover{
+	outline: none;	/* safari outline fix */
+}
+
+#content_highlight{
+	white-space: pre;
+	margin: 0;
+	padding: 0;
+	position : absolute; 
+	z-index: 4; 
+	overflow: visible;
+}
+
+
+#selection_field, #selection_field_text{
+	margin: 0; 
+	background-color: #E1F2F9; 
+/*	height: 1px; */  
+	position: absolute;
+	z-index: 5;
+	top: -100px;
+	padding: 0;
+	white-space: pre;
+	overflow: hidden;
+}
+
+#selection_field.show_colors {
+	z-index: 3;
+	background-color:#EDF9FC;
+	
+}
+
+#selection_field strong{
+	font-weight:normal;
+}
+
+#selection_field.show_colors *, #selection_field_text * {
+	visibility: hidden;
+}
+
+#selection_field_text{
+	background-color:transparent;
+}
+
+#selection_field_text strong{
+	font-weight:normal;
+	background-color:#3399FE;
+	color: #FFF;
+	visibility:visible;
+}
+
+#container.word_wrap #content_highlight,
+#container.word_wrap #selection_field,
+#container.word_wrap #selection_field_text,
+#container.word_wrap #test_font_size{
+	white-space: pre-wrap;       /* css-3 */
+	white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
+	white-space: -pre-wrap;      /* Opera 4-6 */
+	white-space: -o-pre-wrap;    /* Opera 7 */
+	word-wrap: break-word;       /* Internet Explorer 5.5+ */
+	width: 99%;
+}
+
+#line_number{
+	position: absolute;
+	overflow: hidden;
+	border-right: solid black 1px;
+	z-index:8;
+	width: 38px;
+	padding: 0 5px 0 0;
+	margin: 0 0 0 -45px;
+	text-align: right;
+	color: #AAAAAA;
+}
+
+#test_font_size{
+	padding: 0; 
+	margin: 0; 
+	visibility: hidden;
+	position: absolute;
+	white-space: pre;
+}
+
+pre{
+	margin: 0;
+	padding: 0;
+}
+
+.hidden{
+	opacity: 0.2; 
+	filter:alpha(opacity=20);
+}
+
+#result .edit_area_cursor{
+	position: absolute; 
+	z-index:6; 
+	background-color: #FF6633;
+	top: -100px;
+	margin: 0;
+}
+
+#result .edit_area_selection_field .overline{
+	background-color: #996600;
+}
+
+
+/* area popup */
+.editarea_popup{
+	border: solid 1px #888888;
+	background-color: #ECE9D8; 
+	width: 250px; 
+	padding: 4px; 
+	position: absolute;
+	visibility: hidden; 
+	z-index: 15;
+	top: -500px;
+}
+
+.editarea_popup, .editarea_popup table{
+	font-family: sans-serif;
+	font-size: 10pt;
+}
+
+.editarea_popup img{
+	border: 0;
+}
+
+.editarea_popup .close_popup{
+	float: right; 
+	line-height: 16px; 
+	border: 0; 
+	padding: 0;
+}
+
+.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{
+	margin: 0;
+	padding: 0;
+}
+
+.editarea_popup .copyright{
+	text-align: right;
+}	
+
+/* Area_search */
+div#area_search_replace{
+	/*width: 250px;*/
+}
+
+div#area_search_replace img{
+	border: 0;
+}
+
+div#area_search_replace div.button{
+	text-align: center;
+	line-height: 1.7em;
+}
+
+div#area_search_replace .button a{
+	cursor: pointer;
+	border: solid 1px #888888;
+	background-color: #DEDEDE;
+	text-decoration: none;
+	padding: 0 2px;
+	color: #000000;	
+	white-space: nowrap;
+}
+
+div#area_search_replace a:hover{	
+	/*border: solid 1px #888888;*/
+	background-color: #EDEDED;
+}
+
+div#area_search_replace  #move_area_search_replace{
+	cursor: move; 
+	border: solid 1px #888;
+}
+
+div#area_search_replace  #close_area_search_replace{
+	text-align: right; 
+	vertical-align: top; 
+	white-space: nowrap;
+}
+
+div#area_search_replace  #area_search_msg{
+	height: 18px; 
+	overflow: hidden; 
+	border-top: solid 1px #888; 
+	margin-top: 3px;
+}
+
+/* area help */
+#edit_area_help{
+	width: 350px;
+}
+
+#edit_area_help div.close_popup{
+	float: right;
+}
+
+/* area_toolbar */
+.area_toolbar{
+	/*font: 11px sans-serif;*/
+	width: 100%; 
+	/*height: 21px; */
+	margin: 0; 
+	padding: 0;
+	background-color: #ECE9D8;
+	text-align: center;
+}
+
+.area_toolbar, .area_toolbar table{
+	font: 11px sans-serif;
+}
+
+.area_toolbar img{
+	border: 0;
+	vertical-align: middle;
+}
+
+.area_toolbar input{
+	margin: 0;
+	padding: 0;
+}
+
+.area_toolbar select{
+    font-family: 'MS Sans Serif',sans-serif,Verdana,Arial;
+    font-size: 7pt;
+    font-weight: normal;
+    margin: 2px 0 0 0 ;
+    padding: 0;
+    vertical-align: top;
+    background-color: #F0F0EE;
+}
+
+table.statusbar{
+	width: 100%;
+}
+
+.area_toolbar td.infos{
+	text-align: center;
+	width: 130px;
+	border-right: solid 1px #888;
+	border-width: 0 1px 0 0;
+	padding: 0;
+}
+
+.area_toolbar td.total{
+	text-align: right;
+	width: 50px;
+	padding: 0;
+}
+
+.area_toolbar td.resize{
+	text-align: right;
+}
+/*
+.area_toolbar span{
+	line-height: 1px;
+	padding: 0;
+	margin: 0;
+}*/
+
+.area_toolbar span#resize_area{
+	cursor: nw-resize;
+	visibility: hidden;
+}
+
+/* toolbar buttons */
+.editAreaButtonNormal, .editAreaButtonOver, .editAreaButtonDown, .editAreaSeparator, .editAreaSeparatorLine, .editAreaButtonDisabled, .editAreaButtonSelected {
+	border: 0; margin: 0; padding: 0; background: transparent;
+	margin-top: 0;
+	margin-left: 1px;
+	padding: 0;
+}
+
+.editAreaButtonNormal {
+	border: 1px solid #ECE9D8 !important;
+	cursor: pointer;
+}
+
+.editAreaButtonOver {
+	border: 1px solid #0A246A !important;
+	cursor: pointer;
+	background-color: #B6BDD2;
+}
+
+.editAreaButtonDown {
+	cursor: pointer;
+	border: 1px solid #0A246A !important;
+	background-color: #8592B5;
+}
+
+.editAreaButtonSelected {
+	border: 1px solid #C0C0BB !important;
+	cursor: pointer;
+	background-color: #F4F2E8;
+}
+
+.editAreaButtonDisabled {
+	filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
+	-moz-opacity:0.3;
+	opacity: 0.3;
+	border: 1px solid #F0F0EE !important;
+	cursor: pointer;
+}
+
+.editAreaSeparatorLine {
+	margin: 1px 2px;
+	background-color: #C0C0BB;
+	width: 2px;
+	height: 18px;
+}
+
+/* waiting screen */
+#processing{
+	display: none; 
+	background-color:#ECE9D8; 
+	border: solid #888 1px;
+	position: absolute; 
+	top: 0; 
+	left: 0;
+	width: 100%; 
+	height: 100%; 
+	z-index: 100; 
+	text-align: center;
+}
+
+#processing_text{
+	position:absolute;
+	left: 50%;
+	top: 50%;
+	width: 200px;
+	height: 20px; 
+	margin-left: -100px;
+	margin-top: -10px;
+	text-align: center;
+}
+/* end */
+
+
+/**** tab browsing area ****/
+#tab_browsing_area{
+	display: none;
+	background-color: #CCC9A8;
+	border-top: 1px solid #888;
+	text-align: left;
+	margin: 0;
+}
+
+#tab_browsing_list {
+	padding: 0; 
+	margin: 0; 
+	list-style-type: none;
+	white-space: nowrap;
+}
+#tab_browsing_list li {
+	float: left;
+	margin: -1px;
+}
+#tab_browsing_list a {
+	position: relative;
+	display: block; 
+	text-decoration: none; 
+	float: left; 
+	cursor: pointer;
+	line-height:14px;
+}
+
+#tab_browsing_list a span {
+	display: block; 
+	color: #000; 
+	background: #ECE9D8; 
+	border:	1px solid #888; 
+	border-width: 1px 1px 0; 
+	text-align: center; 
+	padding: 2px 2px 1px 4px; 
+	position: relative;	/*IE 6 hack */
+}
+
+#tab_browsing_list a b {
+	display: block; 
+	border-bottom: 2px solid #617994;
+}
+
+#tab_browsing_list a .edited {
+	display: none;
+}
+
+#tab_browsing_list a.edited .edited {
+	display: inline;
+}
+
+#tab_browsing_list a img{
+	margin-left: 7px;
+}
+
+#tab_browsing_list a.edited img{
+	margin-left: 3px;
+}
+
+#tab_browsing_list a:hover span {
+	background: #F4F2E8;
+	border-color: #0A246A;
+}
+
+#tab_browsing_list .selected a span{
+	background: #046380;
+	color: #FFF;
+}
+
+
+#no_file_selected{
+	height: 100%;
+	width: 150%; /* Opera need more than 100% */
+	background: #CCC;
+	display: none;
+	z-index: 20;
+	position: absolute;
+}
+
+
+/*** Non-editable mode ***/
+.non_editable #editor
+{
+	border-width: 0 1px;
+}
+
+.non_editable .area_toolbar
+{
+	display: none;
+}
+
+/*** Auto completion ***/
+#auto_completion_area
+{
+	background:	#FFF;
+	border:		solid 1px #888;
+	position:	absolute;
+	z-index:	15;
+	width:	280px;
+	height:	180px;
+	overflow: auto;
+	display:none;
+}
+
+#auto_completion_area a, #auto_completion_area a:visited
+{
+	display:	block;
+	padding:	0 2px 1px;
+	color:		#000;
+	text-decoration:none;
+}
+
+#auto_completion_area a:hover, #auto_completion_area a:focus, #auto_completion_area a.focus
+{
+	background:	#D6E1FE;
+	text-decoration:none;
+}
+
+#auto_completion_area ul
+{
+	margin:	0;
+	padding: 0;
+	list-style: none inside;
+}
+#auto_completion_area li
+{
+	padding:	0;
+}
+#auto_completion_area .prefix
+{
+	font-style: italic;
+	padding: 0 3px;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area.js
new file mode 100644
index 0000000..35ea553
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area.js
@@ -0,0 +1,529 @@
+/******
+ *
+ *	EditArea 
+ * 	Developped by Christophe Dolivet
+ *	Released under LGPL, Apache and BSD licenses (use the one you want)
+ *
+******/
+
+	function EditArea(){
+		var t=this;
+		t.error= false;	// to know if load is interrrupt
+		
+		t.inlinePopup= [{popup_id: "area_search_replace", icon_id: "search"},
+									{popup_id: "edit_area_help", icon_id: "help"}];
+		t.plugins= {};
+	
+		t.line_number=0;
+		
+		parent.editAreaLoader.set_browser_infos(t); 	// navigator identification
+		// fix IE8 detection as we run in IE7 emulate mode through X-UA <meta> tag
+		if( t.isIE == 8 )
+			t.isIE	= 7;
+		if( t.isIE == 9 )
+			t.isIE = false;
+		
+		t.last_selection={};		
+		t.last_text_to_highlight="";
+		t.last_hightlighted_text= "";
+		t.syntax_list= [];
+		t.allready_used_syntax= {};
+		t.check_line_selection_timer= 50;	// the timer delay for modification and/or selection change detection
+		
+		t.textareaFocused= false;
+		t.highlight_selection_line= null;
+		t.previous= [];
+		t.next= [];
+		t.last_undo="";
+		t.files= {};
+		t.filesIdAssoc= {};
+		t.curr_file= '';
+		//t.loaded= false;
+		t.assocBracket={};
+		t.revertAssocBracket= {};		
+		// bracket selection init 
+		t.assocBracket["("]=")";
+		t.assocBracket["{"]="}";
+		t.assocBracket["["]="]";		
+		for(var index in t.assocBracket){
+			t.revertAssocBracket[t.assocBracket[index]]=index;
+		}
+		t.is_editable= true;
+		
+		
+		/*t.textarea="";	
+		
+		t.state="declare";
+		t.code = []; // store highlight syntax for languagues*/
+		// font datas
+		t.lineHeight= 16;
+		/*t.default_font_family= "monospace";
+		t.default_font_size= 10;*/
+		t.tab_nb_char= 8;	//nb of white spaces corresponding to a tabulation
+		if(t.isOpera)
+			t.tab_nb_char= 6;
+
+		t.is_tabbing= false;
+		
+		t.fullscreen= {'isFull': false};
+		
+		t.isResizing=false;	// resize var
+		
+		// init with settings and ID (area_id is a global var defined by editAreaLoader on iframe creation
+		t.id= area_id;
+		t.settings= editAreas[t.id]["settings"];
+		
+		if((""+t.settings['replace_tab_by_spaces']).match(/^[0-9]+$/))
+		{
+			t.tab_nb_char= t.settings['replace_tab_by_spaces'];
+			t.tabulation="";
+			for(var i=0; i<t.tab_nb_char; i++)
+				t.tabulation+=" ";
+		}else{
+			t.tabulation="\t";
+		}
+			
+		// retrieve the init parameter for syntax
+		if(t.settings["syntax_selection_allow"] && t.settings["syntax_selection_allow"].length>0)
+			t.syntax_list= t.settings["syntax_selection_allow"].replace(/ /g,"").split(",");
+		
+		if(t.settings['syntax'])
+			t.allready_used_syntax[t.settings['syntax']]=true;
+		
+		
+	};
+	EditArea.prototype.init= function(){
+		var t=this, a, s=t.settings;
+		t.textarea			= _$("textarea");
+		t.container			= _$("container");
+		t.result			= _$("result");
+		t.content_highlight	= _$("content_highlight");
+		t.selection_field	= _$("selection_field");
+		t.selection_field_text= _$("selection_field_text");
+		t.processing_screen	= _$("processing");
+		t.editor_area		= _$("editor");
+		t.tab_browsing_area	= _$("tab_browsing_area");
+		t.test_font_size	= _$("test_font_size");
+		a = t.textarea;
+		
+		if(!s['is_editable'])
+			t.set_editable(false);
+		
+		t.set_show_line_colors( s['show_line_colors'] );
+		
+		if(syntax_selec= _$("syntax_selection"))
+		{
+			// set up syntax selection lsit in the toolbar
+			for(var i=0; i<t.syntax_list.length; i++) {
+				var syntax= t.syntax_list[i];
+				var option= document.createElement("option");
+				option.value= syntax;
+				if(syntax==s['syntax'])
+					option.selected= "selected";
+				dispSyntax	= parent.editAreaLoader.syntax_display_name[ syntax ];
+				option.innerHTML= typeof( dispSyntax ) == 'undefined' ? syntax.substring( 0, 1 ).toUpperCase() + syntax.substring( 1 ) : dispSyntax;//t.get_translation("syntax_" + syntax, "word");
+				syntax_selec.appendChild(option);
+			}
+		}
+		
+		// add plugins buttons in the toolbar
+		spans= parent.getChildren(_$("toolbar_1"), "span", "", "", "all", -1);
+		
+		for(var i=0; i<spans.length; i++){
+		
+			id=spans[i].id.replace(/tmp_tool_(.*)/, "$1");
+			if(id!= spans[i].id){
+				for(var j in t.plugins){
+					if(typeof(t.plugins[j].get_control_html)=="function" ){
+						html=t.plugins[j].get_control_html(id);
+						if(html!=false){
+							html= t.get_translation(html, "template");
+							var new_span= document.createElement("span");
+							new_span.innerHTML= html;				
+							var father= spans[i].parentNode;
+							spans[i].parentNode.replaceChild(new_span, spans[i]);	
+							break; // exit the for loop					
+						}
+					}
+				}
+			}
+		}
+		
+		// init datas
+		//a.value	= 'a';//editAreas[t.id]["textarea"].value;
+	
+		if(s["debug"])
+		{
+			t.debug=parent.document.getElementById("edit_area_debug_"+t.id);
+		}
+		// init size		
+		//this.update_size();
+		
+		if(_$("redo") != null)
+			t.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);
+		
+		// insert css rules for highlight mode		
+		if(typeof(parent.editAreaLoader.syntax[s["syntax"]])!="undefined"){
+			for(var i in parent.editAreaLoader.syntax){
+				if (typeof(parent.editAreaLoader.syntax[i]["styles"]) != "undefined"){
+					t.add_style(parent.editAreaLoader.syntax[i]["styles"]);
+				}
+			}
+		}
+	
+		// init key events
+		if(t.isOpera)
+			_$("editor").onkeypress	= keyDown;
+		else
+			_$("editor").onkeydown	= keyDown;
+
+		for(var i=0; i<t.inlinePopup.length; i++){
+			if(t.isOpera)
+				_$(t.inlinePopup[i]["popup_id"]).onkeypress	= keyDown;
+			else
+				_$(t.inlinePopup[i]["popup_id"]).onkeydown	= keyDown;
+		}
+		
+		if(s["allow_resize"]=="both" || s["allow_resize"]=="x" || s["allow_resize"]=="y")
+			t.allow_resize(true);
+		
+		parent.editAreaLoader.toggle(t.id, "on");
+		//a.focus();
+		// line selection init
+		t.change_smooth_selection_mode(editArea.smooth_selection);
+		// highlight
+		t.execCommand("change_highlight", s["start_highlight"]);
+	
+		// get font size datas		
+		t.set_font(editArea.settings["font_family"], editArea.settings["font_size"]);
+		
+		// set unselectable text
+		children= parent.getChildren(document.body, "", "selec", "none", "all", -1);
+		for(var i=0; i<children.length; i++){
+			if(t.isIE)
+				children[i].unselectable = true; // IE
+			else
+				children[i].onmousedown= function(){return false};
+		/*	children[i].style.MozUserSelect = "none"; // Moz
+			children[i].style.KhtmlUserSelect = "none";  // Konqueror/Safari*/
+		}
+		
+		a.spellcheck= s["gecko_spellcheck"];
+	
+		/** Browser specific style fixes **/
+		
+		// fix rendering bug for highlighted lines beginning with no tabs
+		if( t.isFirefox >= '3' ) {
+			t.content_highlight.style.paddingLeft= "1px";
+			t.selection_field.style.paddingLeft= "1px";
+			t.selection_field_text.style.paddingLeft= "1px";
+		}
+		
+		if(t.isIE && t.isIE < 8 ){
+			a.style.marginTop= "-1px";
+		}
+		/*
+		if(t.isOpera){
+			t.editor_area.style.position= "absolute";
+		}*/
+		
+		if( t.isSafari && t.isSafari < 4.1 ){
+			t.editor_area.style.position	= "absolute";
+			a.style.marginLeft		="-3px";
+			if( t.isSafari < 3.2 ) // Safari 3.0 (3.1?)
+				a.style.marginTop	="1px";
+		}
+		
+		// si le textarea n'est pas grand, un click sous le textarea doit provoquer un focus sur le textarea
+		parent.editAreaLoader.add_event(t.result, "click", function(e){ if((e.target || e.srcElement)==editArea.result) { editArea.area_select(editArea.textarea.value.length, 0);}  });
+		
+		if(s['is_multi_files']!=false)
+			t.open_file({'id': t.curr_file, 'text': ''});
+	
+		t.set_word_wrap( s['word_wrap'] );
+		
+		setTimeout("editArea.focus();editArea.manage_size();editArea.execCommand('EA_load');", 10);		
+		//start checkup routine
+		t.check_undo();
+		t.check_line_selection(true);
+		t.scroll_to_view();
+		
+		for(var i in t.plugins){
+			if(typeof(t.plugins[i].onload)=="function")
+				t.plugins[i].onload();
+		}
+		if(s['fullscreen']==true)
+			t.toggle_full_screen(true);
+	
+		parent.editAreaLoader.add_event(window, "resize", editArea.update_size);
+		parent.editAreaLoader.add_event(parent.window, "resize", editArea.update_size);
+		parent.editAreaLoader.add_event(top.window, "resize", editArea.update_size);
+		parent.editAreaLoader.add_event(window, "unload", function(){
+			// in case where editAreaLoader have been already cleaned
+			if( parent.editAreaLoader )
+			{
+				parent.editAreaLoader.remove_event(parent.window, "resize", editArea.update_size);
+		  		parent.editAreaLoader.remove_event(top.window, "resize", editArea.update_size);
+			}
+			if(editAreas[editArea.id] && editAreas[editArea.id]["displayed"]){
+				editArea.execCommand("EA_unload");
+			}
+		});
+		
+		
+		/*date= new Date();
+		alert(date.getTime()- parent.editAreaLoader.start_time);*/
+	};
+	
+	
+	
+	//called by the toggle_on
+	EditArea.prototype.update_size= function(){
+		var d=document,pd=parent.document,height,width,popup,maxLeft,maxTop;
+		
+		if( typeof editAreas != 'undefined' && editAreas[editArea.id] && editAreas[editArea.id]["displayed"]==true){
+			if(editArea.fullscreen['isFull']){	
+				pd.getElementById("frame_"+editArea.id).style.width		= pd.getElementsByTagName("html")[0].clientWidth + "px";
+				pd.getElementById("frame_"+editArea.id).style.height	= pd.getElementsByTagName("html")[0].clientHeight + "px";
+			}
+			
+			if(editArea.tab_browsing_area.style.display=='block' && ( !editArea.isIE || editArea.isIE >= 8 ) )
+			{
+				editArea.tab_browsing_area.style.height	= "0px";
+				editArea.tab_browsing_area.style.height	= (editArea.result.offsetTop - editArea.tab_browsing_area.offsetTop -1)+"px";
+			}
+			
+			height	= d.body.offsetHeight - editArea.get_all_toolbar_height() - 4;
+			editArea.result.style.height	= height +"px";
+			
+			width	= d.body.offsetWidth -2;
+			editArea.result.style.width		= width+"px";
+			//alert("result h: "+ height+" w: "+width+"\ntoolbar h: "+this.get_all_toolbar_height()+"\nbody_h: "+document.body.offsetHeight);
+			
+			// check that the popups don't get out of the screen
+			for( i=0; i < editArea.inlinePopup.length; i++ )
+			{
+				popup	= _$(editArea.inlinePopup[i]["popup_id"]);
+				maxLeft	= d.body.offsetWidth - popup.offsetWidth;
+				maxTop	= d.body.offsetHeight - popup.offsetHeight;
+				if( popup.offsetTop > maxTop )
+					popup.style.top		= maxTop+"px";
+				if( popup.offsetLeft > maxLeft )
+					popup.style.left	= maxLeft+"px";
+			}
+			
+			editArea.manage_size( true );
+			editArea.fixLinesHeight( editArea.textarea.value, 0,-1);
+		}		
+	};
+	
+	
+	EditArea.prototype.manage_size= function(onlyOneTime){
+		if(!editAreas[this.id])
+			return false;
+			
+		if(editAreas[this.id]["displayed"]==true && this.textareaFocused)
+		{
+			var area_height,resized= false;
+			
+			//1) Manage display width
+			//1.1) Calc the new width to use for display
+			if( !this.settings['word_wrap'] )
+			{
+				var area_width= this.textarea.scrollWidth;
+				area_height= this.textarea.scrollHeight;
+				// bug on old opera versions
+				if(this.isOpera && this.isOpera < 9.6 ){
+					area_width=10000; 								
+				}
+				//1.2) the width is not the same, we must resize elements
+				if(this.textarea.previous_scrollWidth!=area_width)
+				{	
+					this.container.style.width= area_width+"px";
+					this.textarea.style.width= area_width+"px";
+					this.content_highlight.style.width= area_width+"px";	
+					this.textarea.previous_scrollWidth=area_width;
+					resized=true;
+				}
+			}
+			// manage wrap width
+			if( this.settings['word_wrap'] )
+			{
+				newW=this.textarea.offsetWidth;
+				if( this.isFirefox || this.isIE )
+					newW-=2;
+				if( this.isSafari )
+					newW-=6;
+				this.content_highlight.style.width=this.selection_field_text.style.width=this.selection_field.style.width=this.test_font_size.style.width=newW+"px";
+			}
+			
+			//2) Manage display height
+			//2.1) Calc the new height to use for display
+			if( this.isOpera || this.isFirefox || this.isSafari ) { 
+				area_height= this.getLinePosTop( this.last_selection["nb_line"] + 1 );
+			} else {
+				area_height = this.textarea.scrollHeight;
+			}	
+			//2.2) the width is not the same, we must resize elements 
+			if(this.textarea.previous_scrollHeight!=area_height)	
+			{	
+				this.container.style.height= (area_height+2)+"px";
+				this.textarea.style.height= area_height+"px";
+				this.content_highlight.style.height= area_height+"px";	
+				this.textarea.previous_scrollHeight= area_height;
+				resized=true;
+			}
+		
+			//3) if there is new lines, we add new line numbers in the line numeration area
+			if(this.last_selection["nb_line"] >= this.line_number)
+			{
+				var newLines= '', destDiv=_$("line_number"), start=this.line_number, end=this.last_selection["nb_line"]+100;
+				for( i = start+1; i < end; i++ )
+				{
+					newLines+='<div id="line_'+ i +'">'+i+"</div>";
+					this.line_number++;
+				}
+				destDiv.innerHTML= destDiv.innerHTML + newLines;
+				if(this.settings['word_wrap']){
+					this.fixLinesHeight( this.textarea.value, start, -1 );
+				}
+			}
+		
+			//4) be sure the text is well displayed
+			this.textarea.scrollTop="0px";
+			this.textarea.scrollLeft="0px";
+			if(resized==true){
+				this.scroll_to_view();
+			}
+		}
+		
+		if(!onlyOneTime)
+			setTimeout("editArea.manage_size();", 100);
+	};
+	
+	EditArea.prototype.execCommand= function(cmd, param){
+		
+		for(var i in this.plugins){
+			if(typeof(this.plugins[i].execCommand)=="function"){
+				if(!this.plugins[i].execCommand(cmd, param))
+					return;
+			}
+		}
+		switch(cmd){
+			case "save":
+				if(this.settings["save_callback"].length>0)
+					eval("parent."+this.settings["save_callback"]+"('"+ this.id +"', editArea.textarea.value);");
+				break;
+			case "load":
+				if(this.settings["load_callback"].length>0)
+					eval("parent."+this.settings["load_callback"]+"('"+ this.id +"');");
+				break;
+			case "onchange":
+				if(this.settings["change_callback"].length>0)
+					eval("parent."+this.settings["change_callback"]+"('"+ this.id +"');");
+				break;		
+			case "EA_load":
+				if(this.settings["EA_load_callback"].length>0)
+					eval("parent."+this.settings["EA_load_callback"]+"('"+ this.id +"');");
+				break;
+			case "EA_unload":
+				if(this.settings["EA_unload_callback"].length>0)
+					eval("parent."+this.settings["EA_unload_callback"]+"('"+ this.id +"');");
+				break;
+			case "toggle_on":
+				if(this.settings["EA_toggle_on_callback"].length>0)
+					eval("parent."+this.settings["EA_toggle_on_callback"]+"('"+ this.id +"');");
+				break;
+			case "toggle_off":
+				if(this.settings["EA_toggle_off_callback"].length>0)
+					eval("parent."+this.settings["EA_toggle_off_callback"]+"('"+ this.id +"');");
+				break;
+			case "re_sync":
+				if(!this.do_highlight)
+					break;
+			case "file_switch_on":
+				if(this.settings["EA_file_switch_on_callback"].length>0)
+					eval("parent."+this.settings["EA_file_switch_on_callback"]+"(param);");
+				break;
+			case "file_switch_off":
+				if(this.settings["EA_file_switch_off_callback"].length>0)
+					eval("parent."+this.settings["EA_file_switch_off_callback"]+"(param);");
+				break;
+			case "file_close":
+				if(this.settings["EA_file_close_callback"].length>0)
+					return eval("parent."+this.settings["EA_file_close_callback"]+"(param);");
+				break;
+			
+			default:
+				if(typeof(eval("editArea."+cmd))=="function")
+				{
+					if(this.settings["debug"])
+						eval("editArea."+ cmd +"(param);");
+					else
+						try{eval("editArea."+ cmd +"(param);");}catch(e){};
+				}
+		}
+	};
+	
+	EditArea.prototype.get_translation= function(word, mode){
+		if(mode=="template")
+			return parent.editAreaLoader.translate(word, this.settings["language"], mode);
+		else
+			return parent.editAreaLoader.get_word_translation(word, this.settings["language"]);
+	};
+	
+	EditArea.prototype.add_plugin= function(plug_name, plug_obj){
+		for(var i=0; i<this.settings["plugins"].length; i++){
+			if(this.settings["plugins"][i]==plug_name){
+				this.plugins[plug_name]=plug_obj;
+				plug_obj.baseURL=parent.editAreaLoader.baseURL + "plugins/" + plug_name + "/";
+				if( typeof(plug_obj.init)=="function" )
+					plug_obj.init();
+			}
+		}
+	};
+	
+	EditArea.prototype.load_css= function(url){
+		try{
+			link = document.createElement("link");
+			link.type = "text/css";
+			link.rel= "stylesheet";
+			link.media="all";
+			link.href = url;
+			head = document.getElementsByTagName("head");
+			head[0].appendChild(link);
+		}catch(e){
+			document.write("<link href='"+ url +"' rel='stylesheet' type='text/css' />");
+		}
+	};
+	
+	EditArea.prototype.load_script= function(url){
+		try{
+			script = document.createElement("script");
+			script.type = "text/javascript";
+			script.src  = url;
+			script.charset= "UTF-8";
+			head = document.getElementsByTagName("head");
+			head[0].appendChild(script);
+		}catch(e){
+			document.write("<script type='text/javascript' src='" + url + "' charset=\"UTF-8\"><"+"/script>");
+		}
+	};
+	
+	// add plugin translation to language translation array
+	EditArea.prototype.add_lang= function(language, values){
+		if(!parent.editAreaLoader.lang[language])
+			parent.editAreaLoader.lang[language]={};
+		for(var i in values)
+			parent.editAreaLoader.lang[language][i]= values[i];
+	};
+	
+	// short cut for document.getElementById()
+	function _$(id){return document.getElementById( id );};
+
+	var editArea = new EditArea();	
+	parent.editAreaLoader.add_event(window, "load", init);
+	
+	function init(){		
+		setTimeout("editArea.init();  ", 10);
+	};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_compressor.php
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_compressor.php b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_compressor.php
new file mode 100644
index 0000000..518e1b7
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_compressor.php
@@ -0,0 +1,428 @@
+<?php
+	/******
+	 *
+	 *	EditArea PHP compressor
+	 * 	Developped by Christophe Dolivet
+	 *	Released under LGPL, Apache and BSD licenses
+	 *	v1.1.3 (2007/01/18)	 
+	 *
+	******/
+	
+	// CONFIG
+	$param['cache_duration']= 3600 * 24 * 10;		// 10 days util client cache expires
+	$param['compress'] = true;						// enable the code compression, should be activated but it can be usefull to desactivate it for easier error retrieving (true or false)
+	$param['debug'] = false;						// Enable this option if you need debuging info
+	$param['use_disk_cache']= true;					// If you enable this option gzip files will be cached on disk.
+	$param['use_gzip']= true;						// Enable gzip compression
+	// END CONFIG
+	
+	$compressor= new Compressor($param);
+	
+	class Compressor{
+	
+		
+		function compressor($param)
+		{
+			$this->__construct($param);
+		}
+		
+		function __construct($param)
+		{
+			$this->start_time= $this->get_microtime();
+			$this->file_loaded_size=0;
+			$this->param= $param;
+			$this->script_list="";
+			$this->path= dirname(__FILE__)."/";
+			if(isset($_GET['plugins'])){
+				$this->load_all_plugins= true;
+				$this->full_cache_file= $this->path."edit_area_full_with_plugins.js";
+				$this->gzip_cache_file= $this->path."edit_area_full_with_plugins.gz";
+			}else{
+				$this->load_all_plugins= false;
+				$this->full_cache_file= $this->path."edit_area_full.js";
+				$this->gzip_cache_file= $this->path."edit_area_full.gz";
+			}
+			
+			$this->check_gzip_use();
+			$this->send_headers();
+			$this->check_cache();
+			$this->load_files();
+			$this->send_datas();
+		}
+		
+		function send_headers()
+		{
+			header("Content-type: text/javascript; charset: UTF-8");
+			header("Vary: Accept-Encoding"); // Handle proxies
+			header(sprintf("Expires: %s GMT", gmdate("D, d M Y H:i:s", time() + $this->param['cache_duration'])) );
+			if($this->use_gzip)
+				header("Content-Encoding: ".$this->gzip_enc_header);
+		}
+		
+		function check_gzip_use()
+		{
+			$encodings = array();
+			$desactivate_gzip=false;
+					
+			if (isset($_SERVER['HTTP_ACCEPT_ENCODING']))
+				$encodings = explode(',', strtolower(preg_replace("/\s+/", "", $_SERVER['HTTP_ACCEPT_ENCODING'])));
+			
+			// desactivate gzip for IE version < 7
+			if(preg_match("/(?:msie )([0-9.]+)/i", $_SERVER['HTTP_USER_AGENT'], $ie))
+			{
+				if($ie[1]<7)
+					$desactivate_gzip=true;	
+			}
+			
+			// Check for gzip header or northon internet securities
+			if (!$desactivate_gzip && $this->param['use_gzip'] && (in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------'])) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')) {
+				$this->gzip_enc_header= in_array('x-gzip', $encodings) ? "x-gzip" : "gzip";
+				$this->use_gzip=true;
+				$this->cache_file=$this->gzip_cache_file;
+			}else{
+				$this->use_gzip=false;
+				$this->cache_file=$this->full_cache_file;
+			}
+		}
+		
+		function check_cache()
+		{
+			// Only gzip the contents if clients and server support it
+			if (file_exists($this->cache_file)) {
+				// check if cache file must be updated
+				$cache_date=0;				
+				if ($dir = opendir($this->path)) {
+					while (($file = readdir($dir)) !== false) {
+						if(is_file($this->path.$file) && $file!="." && $file!="..")
+							$cache_date= max($cache_date, filemtime($this->path.$file));
+					}
+					closedir($dir);
+				}
+				if($this->load_all_plugins){
+					$plug_path= $this->path."plugins/";
+					if (($dir = @opendir($plug_path)) !== false)
+					{
+						while (($file = readdir($dir)) !== false)
+						{
+							if ($file !== "." && $file !== "..")
+							{
+								if(is_dir($plug_path.$file) && file_exists($plug_path.$file."/".$file.".js"))
+									$cache_date= max($cache_date, filemtime("plugins/".$file."/".$file.".js"));
+							}
+						}
+						closedir($dir);
+					}
+				}
+
+				if(filemtime($this->cache_file) >= $cache_date){
+					// if cache file is up to date
+					$last_modified = gmdate("D, d M Y H:i:s",filemtime($this->cache_file))." GMT";
+					if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"]) && strcasecmp($_SERVER["HTTP_IF_MODIFIED_SINCE"], $last_modified) === 0)
+					{
+						header("HTTP/1.1 304 Not Modified");
+						header("Last-modified: ".$last_modified);
+						header("Cache-Control: Public"); // Tells HTTP 1.1 clients to cache
+						header("Pragma:"); // Tells HTTP 1.0 clients to cache
+					}
+					else
+					{
+						header("Last-modified: ".$last_modified);
+						header("Cache-Control: Public"); // Tells HTTP 1.1 clients to cache
+						header("Pragma:"); // Tells HTTP 1.0 clients to cache
+						header('Content-Length: '.filesize($this->cache_file));
+						echo file_get_contents($this->cache_file);
+					}				
+					die;
+				}
+			}
+			return false;
+		}
+		
+		function load_files()
+		{
+			$loader= $this->get_content("edit_area_loader.js")."\n";
+			
+			// get the list of other files to load
+	    	$loader= preg_replace("/(t\.scripts_to_load=\s*)\[([^\]]*)\];/e"
+						, "\$this->replace_scripts('script_list', '\\1', '\\2')"
+						, $loader);
+		
+			$loader= preg_replace("/(t\.sub_scripts_to_load=\s*)\[([^\]]*)\];/e"
+						, "\$this->replace_scripts('sub_script_list', '\\1', '\\2')"
+						, $loader);
+
+			// replace languages names
+			$reg_path= $this->path."reg_syntax/";
+			$a_displayName	= array();
+			if (($dir = @opendir($reg_path)) !== false)
+			{
+				while (($file = readdir($dir)) !== false)
+				{
+					if( $file !== "." && $file !== ".." && ( $pos = strpos( $file, '.js' ) ) !== false )
+					{
+						$jsContent	= $this->file_get_contents( $reg_path.$file );
+						if( preg_match( '@(\'|")DISPLAY_NAME\1\s*:\s*(\'|")(.*)\2@', $jsContent, $match ) )
+						{
+							$a_displayName[] = "'". substr( $file, 0, $pos ) ."':'". htmlspecialchars( $match[3], ENT_QUOTES ) ."'";
+						}
+					}
+				}
+				closedir($dir);
+			}
+			$loader	= str_replace( '/*syntax_display_name_AUTO-FILL-BY-COMPRESSOR*/', implode( ",", $a_displayName ), $loader );
+						
+			$this->datas= $loader;
+			$this->compress_javascript($this->datas);
+			
+			// load other scripts needed for the loader
+			preg_match_all('/"([^"]*)"/', $this->script_list, $match);
+			foreach($match[1] as $key => $value)
+			{
+				$content= $this->get_content(preg_replace("/\\|\//i", "", $value).".js");
+				$this->compress_javascript($content);
+				$this->datas.= $content."\n";
+			}
+			//$this->datas);
+			//$this->datas= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $this->datas);
+			
+			// improved compression step 1/2	
+			$this->datas= preg_replace(array("/(\b)EditAreaLoader(\b)/", "/(\b)editAreaLoader(\b)/", "/(\b)editAreas(\b)/"), array("EAL", "eAL", "eAs"), $this->datas);
+			//$this->datas= str_replace(array("EditAreaLoader", "editAreaLoader", "editAreas"), array("EAL", "eAL", "eAs"), $this->datas);
+			$this->datas.= "var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;";
+		
+			// load sub scripts
+			$sub_scripts="";
+			$sub_scripts_list= array();
+			preg_match_all('/"([^"]*)"/', $this->sub_script_list, $match);
+			foreach($match[1] as $value){
+				$sub_scripts_list[]= preg_replace("/\\|\//i", "", $value).".js";
+			}
+		
+			if($this->load_all_plugins){
+				// load plugins scripts
+				$plug_path= $this->path."plugins/";
+				if (($dir = @opendir($plug_path)) !== false)
+				{
+					while (($file = readdir($dir)) !== false)
+					{
+						if ($file !== "." && $file !== "..")
+						{
+							if(is_dir($plug_path.$file) && file_exists($plug_path.$file."/".$file.".js"))
+								$sub_scripts_list[]= "plugins/".$file."/".$file.".js";
+						}
+					}
+					closedir($dir);
+				}
+			}
+							
+			foreach($sub_scripts_list as $value){
+				$sub_scripts.= $this->get_javascript_content($value);
+			}
+			// improved compression step 2/2	
+			$sub_scripts= preg_replace(array("/(\b)editAreaLoader(\b)/", "/(\b)editAreas(\b)/", "/(\b)editArea(\b)/", "/(\b)EditArea(\b)/"), array("eAL", "eAs", "eA", "EA"), $sub_scripts);
+		//	$sub_scripts= str_replace(array("editAreaLoader", "editAreas", "editArea", "EditArea"), array("eAL", "eAs", "eA", "EA"), $sub_scripts);
+			$sub_scripts.= "var editArea= eA;EditArea=EA;";
+			
+			
+			// add the scripts
+		//	$this->datas.= sprintf("editAreaLoader.iframe_script= \"<script type='text/javascript'>%s</script>\";\n", $sub_scripts);
+		
+		
+			// add the script and use a last compression 
+			if( $this->param['compress'] )
+			{
+				$last_comp	= array( 'Á' => 'this',
+								 'Â' => 'textarea',
+								 'Ã' => 'function',
+								 'Ä' => 'prototype',
+								 'Å' => 'settings',
+								 'Æ' => 'length',
+								 'Ç' => 'style',
+								 'È' => 'parent',
+								 'É' => 'last_selection',
+								 'Ê' => 'value',
+								 'Ë' => 'true',
+								 'Ì' => 'false'
+								 /*,
+									'Î' => '"',
+								 'Ï' => "\n",
+								 'À' => "\r"*/);
+			}
+			else
+			{
+				$last_comp	= array();
+			}
+			
+			$js_replace= '';
+			foreach( $last_comp as $key => $val )
+				$js_replace .= ".replace(/". $key ."/g,'". str_replace( array("\n", "\r"), array('\n','\r'), $val ) ."')";
+			
+			$this->datas.= sprintf("editAreaLoader.iframe_script= \"<script type='text/javascript'>%s</script>\"%s;\n",
+								str_replace( array_values($last_comp), array_keys($last_comp), $sub_scripts ), 
+								$js_replace);
+			
+			if($this->load_all_plugins)
+				$this->datas.="editAreaLoader.all_plugins_loaded=true;\n";
+		
+			
+			// load the template
+			$this->datas.= sprintf("editAreaLoader.template= \"%s\";\n", $this->get_html_content("template.html"));
+			// load the css
+			$this->datas.= sprintf("editAreaLoader.iframe_css= \"<style>%s</style>\";\n", $this->get_css_content("edit_area.css"));
+					
+		//	$this->datas= "function editArea(){};editArea.prototype.loader= function(){alert('bouhbouh');} var a= new editArea();a.loader();";
+					
+		}
+		
+		function send_datas()
+		{
+			if($this->param['debug']){
+				$header=sprintf("/* USE PHP COMPRESSION\n");
+				$header.=sprintf("javascript size: based files: %s => PHP COMPRESSION => %s ", $this->file_loaded_size, strlen($this->datas));
+				if($this->use_gzip){
+					$gzip_datas=  gzencode($this->datas, 9, FORCE_GZIP);				
+					$header.=sprintf("=> GZIP COMPRESSION => %s", strlen($gzip_datas));
+					$ratio = round(100 - strlen($gzip_datas) / $this->file_loaded_size * 100.0);			
+				}else{
+					$ratio = round(100 - strlen($this->datas) / $this->file_loaded_size * 100.0);
+				}
+				$header.=sprintf(", reduced by %s%%\n", $ratio);
+				$header.=sprintf("compression time: %s\n", $this->get_microtime()-$this->start_time); 
+				$header.=sprintf("%s\n", implode("\n", $this->infos));
+				$header.=sprintf("*/\n");
+				$this->datas= $header.$this->datas;	
+			}
+			$mtime= time(); // ensure that the 2 disk files will have the same update time
+			// generate gzip file and cahce it if using disk cache
+			if($this->use_gzip){
+				$this->gzip_datas= gzencode($this->datas, 9, FORCE_GZIP);
+				if($this->param['use_disk_cache'])
+					$this->file_put_contents($this->gzip_cache_file, $this->gzip_datas, $mtime);
+			}
+			
+			// generate full js file and cache it if using disk cache			
+			if($this->param['use_disk_cache'])
+				$this->file_put_contents($this->full_cache_file, $this->datas, $mtime);
+			
+			// generate output
+			if($this->use_gzip)
+				echo $this->gzip_datas;
+			else
+				echo $this->datas;
+				
+//			die;
+		}
+				
+		
+		function get_content($end_uri)
+		{
+			$end_uri=preg_replace("/\.\./", "", $end_uri); // Remove any .. (security)
+			$file= $this->path.$end_uri;
+			if(file_exists($file)){
+				$this->infos[]=sprintf("'%s' loaded", $end_uri);
+				/*$fd = fopen($file, 'rb');
+				$content = fread($fd, filesize($file));
+				fclose($fd);
+				return $content;*/
+				return $this->file_get_contents($file);
+			}else{
+				$this->infos[]=sprintf("'%s' not loaded", $end_uri);
+				return "";
+			}
+		}
+		
+		function get_javascript_content($end_uri)
+		{
+			$val=$this->get_content($end_uri);
+	
+			$this->compress_javascript($val);
+			$this->prepare_string_for_quotes($val);
+			return $val;
+		}
+		
+		function compress_javascript(&$code)
+		{
+			if($this->param['compress'])
+			{
+				// remove all comments
+				//	(\"(?:[^\"\\]*(?:\\\\)*(?:\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\]*(?:\\\\)*(?:\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))
+				$code= preg_replace("/(\"(?:[^\"\\\\]*(?:\\\\\\\\)*(?:\\\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\\\]*(?:\\\\\\\\)*(?:\\\\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code);
+				// remove line return, empty line and tabulation
+				$code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code);
+				// add line break before "else" otherwise navigators can't manage to parse the file
+				$code= preg_replace('/(\b(else)\b)/', "\n$1", $code);
+				// remove unnecessary spaces
+				$code= preg_replace('/( |\t|\r)*(;|\{|\}|=|==|\-|\+|,|\(|\)|\|\||&\&|\:)( |\t|\r)*/', "$2", $code);
+			}
+		}
+		
+		function get_css_content($end_uri){
+			$code=$this->get_content($end_uri);
+			// remove comments
+			$code= preg_replace("/(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "", $code);
+			// remove spaces
+			$code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $code);
+			// remove spaces
+			$code= preg_replace('/( |\t|\r)?(\:|,|\{|\})( |\t|\r)+/', "$2", $code);
+		
+			$this->prepare_string_for_quotes($code);
+			return $code;
+		}
+		
+		function get_html_content($end_uri){
+			$code=$this->get_content($end_uri);
+			//$code= preg_replace('/(\"(?:\\\"|[^\"])*(?:\"|$))|' . "(\'(?:\\\'|[^\'])*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code);
+			$code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code);
+			$this->prepare_string_for_quotes($code);
+			return $code;
+		}
+		
+		function prepare_string_for_quotes(&$str){
+			// prepare the code to be putted into quotes 
+			/*$pattern= array("/(\\\\)?\"/", '/\\\n/'	, '/\\\r/'	, "/(\r?\n)/");
+			$replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r'	, '\\\n"$1+"');*/
+			$pattern= array("/(\\\\)?\"/", '/\\\n/'	, '/\\\r/'	, "/(\r?\n)/");
+			if($this->param['compress'])
+				$replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r'	, '\n');
+			else
+				$replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r'	, "\\n\"\n+\"");
+			$str= preg_replace($pattern, $replace, $str);
+		}
+		
+		function replace_scripts($var, $param1, $param2)
+		{
+			$this->$var=stripslashes($param2);
+	        return $param1."[];";
+		}
+
+		/* for php version that have not thoses functions */
+		function file_get_contents($file)
+		{
+			$fd = fopen($file, 'rb');
+			$content = fread($fd, filesize($file));
+			fclose($fd);
+			$this->file_loaded_size+= strlen($content);
+			return $content;				
+		}
+		
+		function file_put_contents($file, &$content, $mtime=-1)
+		{
+			if($mtime==-1)
+				$mtime=time();
+			$fp = @fopen($file, "wb");
+			if ($fp) {
+				fwrite($fp, $content);
+				fclose($fp);
+				touch($file, $mtime);
+				return true;
+			}
+			return false;
+		}
+		
+		function get_microtime()
+		{
+		   list($usec, $sec) = explode(" ", microtime());
+		   return ((float)$usec + (float)$sec);
+		}
+	}	
+?>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_full.gz
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_full.gz b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_full.gz
new file mode 100644
index 0000000..114a670
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/edit_area_full.gz differ


[16/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-de.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-de.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-de.js
new file mode 100644
index 0000000..862b04a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-de.js
@@ -0,0 +1,25 @@
+/* German initialisation for the jQuery UI date picker plugin. */
+/* Written by Milian Wolff (mail@milianw.de). */
+jQuery(function($){
+	$.datepicker.regional['de'] = {
+		clearText: 'löschen', clearStatus: 'aktuelles Datum löschen',
+		closeText: 'schließen', closeStatus: 'ohne Änderungen schließen',
+		prevText: '&#x3c;zurück', prevStatus: 'letzten Monat zeigen',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Vor&#x3e;', nextStatus: 'nächsten Monat zeigen',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'heute', currentStatus: '',
+		monthNames: ['Januar','Februar','März','April','Mai','Juni',
+		'Juli','August','September','Oktober','November','Dezember'],
+		monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
+		'Jul','Aug','Sep','Okt','Nov','Dez'],
+		monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen',
+		weekHeader: 'Wo', weekStatus: 'Woche des Monats',
+		dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
+		dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+		dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+		dayStatus: 'Setze DD als ersten Wochentag', dateStatus: 'Wähle D, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: 'Wähle ein Datum', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['de']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-eo.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-eo.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-eo.js
new file mode 100644
index 0000000..92009dc
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-eo.js
@@ -0,0 +1,25 @@
+/* Esperanto initialisation for the jQuery UI date picker plugin. */
+/* Written by Olivier M. (olivierweb@ifrance.com). */
+jQuery(function($){
+	$.datepicker.regional['eo'] = {
+		clearText: 'Vakigi', clearStatus: '',
+		closeText: 'Fermi', closeStatus: 'Fermi sen modifi',
+		prevText: '&lt;Anta', prevStatus: 'Vidi la antaŭan monaton',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Sekv&gt;', nextStatus: 'Vidi la sekvan monaton',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Nuna', currentStatus: 'Vidi la nunan monaton',
+		monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
+		'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
+		monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+		'Jul','Aŭg','Sep','Okt','Nov','Dec'],
+		monthStatus: 'Vidi alian monaton', yearStatus: 'Vidi alian jaron',
+		weekHeader: 'Sb', weekStatus: '',
+		dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
+		dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'],
+		dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'],
+		dayStatus: 'Uzi DD kiel unua tago de la semajno', dateStatus: 'Elekti DD, MM d',
+		dateFormat: 'dd/mm/yy', firstDay: 0,
+		initStatus: 'Elekti la daton', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['eo']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-es.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-es.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-es.js
new file mode 100644
index 0000000..db64549
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-es.js
@@ -0,0 +1,25 @@
+/* Inicializaci�n en espa�ol para la extensi�n 'UI date picker' para jQuery. */
+/* Traducido por Vester (xvester@gmail.com). */
+jQuery(function($){
+	$.datepicker.regional['es'] = {
+		clearText: 'Limpiar', clearStatus: '',
+		closeText: 'Cerrar', closeStatus: '',
+		prevText: '&#x3c;Ant', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Sig&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Hoy', currentStatus: '',
+		monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
+		'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
+		monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
+		'Jul','Ago','Sep','Oct','Nov','Dic'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Sm', weekStatus: '',
+		dayNames: ['Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','S&aacute;dabo'],
+		dayNamesShort: ['Dom','Lun','Mar','Mi&eacute;','Juv','Vie','S&aacute;b'],
+		dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','S&aacute;'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['es']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-fi.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-fi.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-fi.js
new file mode 100644
index 0000000..8dc39c5
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-fi.js
@@ -0,0 +1,25 @@
+/* Finnish initialisation for the jQuery UI date picker plugin. */
+/* Written by Harri Kilpi� (harrikilpio@gmail.com). */
+jQuery(function($){
+    $.datepicker.regional['fi'] = {
+		clearText: 'Tyhjenn&auml;', clearStatus: '',
+		closeText: 'Sulje', closeStatus: '',
+		prevText: '&laquo;Edellinen', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Seuraava&raquo;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'T&auml;n&auml;&auml;n', currentStatus: '',
+        monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kes&auml;kuu',
+        'Hein&auml;kuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
+        monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kes&auml;',
+        'Hein&auml;','Elo','Syys','Loka','Marras','Joulu'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Vk', weekStatus: '',
+		dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'],
+		dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
+		dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+        dateFormat: 'dd.mm.yy', firstDay: 1,
+		initStatus: '', isRTL: false};
+    $.datepicker.setDefaults($.datepicker.regional['fi']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-fr.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-fr.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-fr.js
new file mode 100644
index 0000000..33ce1e2
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-fr.js
@@ -0,0 +1,25 @@
+/* French initialisation for the jQuery UI date picker plugin. */
+/* Written by Keith Wood (kbwood@virginbroadband.com.au) and Stéphane Nahmani (sholby@sholby.net). */
+jQuery(function($){
+	$.datepicker.regional['fr'] = {
+		clearText: 'Effacer', clearStatus: '',
+		closeText: 'Fermer', closeStatus: 'Fermer sans modifier',
+		prevText: '&#x3c;Préc', prevStatus: 'Voir le mois précédent',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Suiv&#x3e;', nextStatus: 'Voir le mois suivant',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Courant', currentStatus: 'Voir le mois courant',
+		monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
+		'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
+		monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
+		'Jul','Aoû','Sep','Oct','Nov','Déc'],
+		monthStatus: 'Voir un autre mois', yearStatus: 'Voir un autre année',
+		weekHeader: 'Sm', weekStatus: '',
+		dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+		dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
+		dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
+		dayStatus: 'Utiliser DD comme premier jour de la semaine', dateStatus: 'Choisir le DD, MM d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: 'Choisir la date', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['fr']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-he.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-he.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-he.js
new file mode 100644
index 0000000..6574e5a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-he.js
@@ -0,0 +1,25 @@
+/* Hebrew initialisation for the UI Datepicker extension. */
+/* Written by Amir Hardon (ahardon at gmail dot com). */
+jQuery(function($){
+	$.datepicker.regional['he'] = {
+		clearText: 'נקה', clearStatus: '',
+		closeText: 'סגור', closeStatus: '',
+		prevText: '&#x3c;הקודם', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'הבא&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'היום', currentStatus: '',
+		monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
+		'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
+		monthNamesShort: ['1','2','3','4','5','6',
+		'7','8','9','10','11','12'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Sm', weekStatus: '',
+		dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
+		dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+		dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+		dayStatus: 'DD', dateStatus: 'DD, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: '', isRTL: true};
+	$.datepicker.setDefaults($.datepicker.regional['he']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-hr.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-hr.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-hr.js
new file mode 100644
index 0000000..be438ac
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-hr.js
@@ -0,0 +1,25 @@
+/* Croatian i18n for the jQuery UI date picker plugin. */
+/* Written by Vjekoslav Nesek. */
+jQuery(function($){
+	$.datepicker.regional['hr'] = {
+		clearText: 'izbriši', clearStatus: 'Izbriši trenutni datum',
+		closeText: 'Zatvori', closeStatus: 'Zatvori kalendar',
+		prevText: '&#x3c;', prevStatus: 'Prikaži prethodni mjesec',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: '&#x3e;', nextStatus: 'Prikaži slijedeći mjesec',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Danas', currentStatus: 'Današnji datum',
+		monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipani',
+		'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
+		monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
+		'Srp','Kol','Ruj','Lis','Stu','Pro'],
+		monthStatus: 'Prikaži mjesece', yearStatus: 'Prikaži godine',
+		weekHeader: 'Tje', weekStatus: 'Tjedan',
+		dayNames: ['Nedjalja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
+		dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
+		dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
+		dayStatus: 'Odaber DD za prvi dan tjedna', dateStatus: '\'Datum\' D, M d',
+		dateFormat: 'dd.mm.yy.', firstDay: 1,
+		initStatus: 'Odaberi datum', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['hr']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-hu.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-hu.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-hu.js
new file mode 100644
index 0000000..73eaa46
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-hu.js
@@ -0,0 +1,25 @@
+/* Hungarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Istvan Karaszi (jquerycalendar@spam.raszi.hu). */
+jQuery(function($){
+	$.datepicker.regional['hu'] = {
+		clearText: 'törlés', clearStatus: '',
+		closeText: 'bezárás', closeStatus: '',
+		prevText: '&laquo;&nbsp;vissza', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'előre&nbsp;&raquo;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'ma', currentStatus: '',
+		monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
+		'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
+		monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
+		'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Hé', weekStatus: '',
+		dayNames: ['Vasámap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
+		dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
+		dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'yy-mm-dd', firstDay: 1, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['hu']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-hy.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-hy.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-hy.js
new file mode 100644
index 0000000..4afb109
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-hy.js
@@ -0,0 +1,25 @@
+/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/
+jQuery(function($){
+	$.datepicker.regional['hy'] = {
+		clearText: 'Մաքրել', clearStatus: '',
+		closeText: 'Փակել', closeStatus: '',
+		prevText: '&#x3c;Նախ.',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Հաջ.&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Այսօր', currentStatus: '',
+		monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
+		'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
+		monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
+		'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'ՇԲՏ', weekStatus: '',
+		dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
+		dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+		dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['hy']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-id.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-id.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-id.js
new file mode 100644
index 0000000..e921dd7
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-id.js
@@ -0,0 +1,25 @@
+/* Indonesian initialisation for the jQuery UI date picker plugin. */
+/* Written by Deden Fathurahman (dedenf@gmail.com). */
+jQuery(function($){
+	$.datepicker.regional['id'] = {
+		clearText: 'kosongkan', clearStatus: 'bersihkan tanggal yang sekarang',
+		closeText: 'Tutup', closeStatus: 'Tutup tanpa mengubah',
+		prevText: '&#x3c;mundur', prevStatus: 'Tampilkan bulan sebelumnya',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'maju&#x3e;', nextStatus: 'Tampilkan bulan berikutnya',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'hari ini', currentStatus: 'Tampilkan bulan sekarang',
+		monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
+		'Juli','Agustus','September','Oktober','Nopember','Desember'],
+		monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
+		'Jul','Agus','Sep','Okt','Nop','Des'],
+		monthStatus: 'Tampilkan bulan yang berbeda', yearStatus: 'Tampilkan tahun yang berbeda',
+		weekHeader: 'Mg', weekStatus: 'Minggu dalam tahun',
+		dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
+		dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
+		dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
+		dayStatus: 'gunakan DD sebagai awal hari dalam minggu', dateStatus: 'pilih le DD, MM d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: 'Pilih Tanggal', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['id']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-is.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-is.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-is.js
new file mode 100644
index 0000000..fae78fc
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-is.js
@@ -0,0 +1,25 @@
+/* Icelandic initialisation for the jQuery UI date picker plugin. */
+/* Written by Haukur H. Thorsson (haukur@eskill.is). */
+jQuery(function($){
+	$.datepicker.regional['is'] = {
+		clearText: 'Hreinsa', clearStatus: '',
+		closeText: 'Loka', closeStatus: '',
+		prevText: '&#x3c; Fyrri', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'N&aelig;sti &#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: '&Iacute; dag', currentStatus: '',
+		monthNames: ['Jan&uacute;ar','Febr&uacute;ar','Mars','Apr&iacute;l','Ma&iacute','J&uacute;n&iacute;',
+		'J&uacute;l&iacute;','&Aacute;g&uacute;st','September','Okt&oacute;ber','N&oacute;vember','Desember'],
+		monthNamesShort: ['Jan','Feb','Mar','Apr','Ma&iacute;','J&uacute;n',
+		'J&uacute;l','&Aacute;g&uacute;','Sep','Okt','N&oacute;v','Des'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Vika', weekStatus: '',
+		dayNames: ['Sunnudagur','M&aacute;nudagur','&THORN;ri&eth;judagur','Mi&eth;vikudagur','Fimmtudagur','F&ouml;studagur','Laugardagur'],
+		dayNamesShort: ['Sun','M&aacute;n','&THORN;ri','Mi&eth;','Fim','F&ouml;s','Lau'],
+		dayNamesMin: ['Su','M&aacute;','&THORN;r','Mi','Fi','F&ouml;','La'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['is']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-it.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-it.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-it.js
new file mode 100644
index 0000000..398337e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-it.js
@@ -0,0 +1,25 @@
+/* Italian initialisation for the jQuery UI date picker plugin. */
+/* Written by Apaella (apaella@gmail.com). */
+jQuery(function($){
+	$.datepicker.regional['it'] = {
+		clearText: 'Svuota', clearStatus: 'Annulla',
+		closeText: 'Chiudi', closeStatus: 'Chiudere senza modificare',
+		prevText: '&#x3c;Prec', prevStatus: 'Mese precedente',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: 'Mostra l\'anno precedente',
+		nextText: 'Succ&#x3e;', nextStatus: 'Mese successivo',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: 'Mostra l\'anno successivo',
+		currentText: 'Oggi', currentStatus: 'Mese corrente',
+		monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
+		'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
+		monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
+		'Lug','Ago','Set','Ott','Nov','Dic'],
+		monthStatus: 'Seleziona un altro mese', yearStatus: 'Seleziona un altro anno',
+		weekHeader: 'Sm', weekStatus: 'Settimana dell\'anno',
+		dayNames: ['Domenica','Luned&#236','Marted&#236','Mercoled&#236','Gioved&#236','Venerd&#236','Sabato'],
+		dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
+		dayNamesMin: ['Do','Lu','Ma','Me','Gio','Ve','Sa'],
+		dayStatus: 'Usa DD come primo giorno della settimana', dateStatus: 'Seleziona D, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 1, 
+		initStatus: 'Scegliere una data', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['it']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ja.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ja.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ja.js
new file mode 100644
index 0000000..4fd07e3
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ja.js
@@ -0,0 +1,25 @@
+/* Japanese (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Milly. */
+jQuery(function($){
+	$.datepicker.regional['ja'] = {
+		clearText: '&#21066;&#38500;', clearStatus: '',
+		closeText: '&#38281;&#12376;&#12427;', closeStatus: '',
+		prevText: '&#x3c;&#21069;&#26376;', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: '&#27425;&#26376;&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: '&#20170;&#26085;', currentStatus: '',
+		monthNames: ['1&#26376;','2&#26376;','3&#26376;','4&#26376;','5&#26376;','6&#26376;',
+		'7&#26376;','8&#26376;','9&#26376;','10&#26376;','11&#26376;','12&#26376;'],
+		monthNamesShort: ['1&#26376;','2&#26376;','3&#26376;','4&#26376;','5&#26376;','6&#26376;',
+		'7&#26376;','8&#26376;','9&#26376;','10&#26376;','11&#26376;','12&#26376;'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Wk', weekStatus: '',
+		dayNames: ['&#26085;','&#26376;','&#28779;','&#27700;','&#26408;','&#37329;','&#22303;'],
+		dayNamesShort: ['&#26085;','&#26376;','&#28779;','&#27700;','&#26408;','&#37329;','&#22303;'],
+		dayNamesMin: ['&#26085;','&#26376;','&#28779;','&#27700;','&#26408;','&#37329;','&#22303;'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'yy/mm/dd', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['ja']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ko.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ko.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ko.js
new file mode 100644
index 0000000..afe7911
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ko.js
@@ -0,0 +1,25 @@
+/* Korean initialisation for the jQuery calendar extension. */
+/* Written by DaeKwon Kang (ncrash.dk@gmail.com). */
+jQuery(function($){
+	$.datepicker.regional['ko'] = {
+		clearText: '지우기', clearStatus: '',
+		closeText: '닫기', closeStatus: '',
+		prevText: '이전달', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: '다음달', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: '오늘', currentStatus: '',
+		monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
+		'7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
+		monthNamesShort: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
+		'7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Wk', weekStatus: '',
+		dayNames: ['일','월','화','수','목','금','토'],
+		dayNamesShort: ['일','월','화','수','목','금','토'],
+		dayNamesMin: ['일','월','화','수','목','금','토'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'yy-mm-dd', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['ko']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-lt.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-lt.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-lt.js
new file mode 100644
index 0000000..2afe15e
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-lt.js
@@ -0,0 +1,25 @@
+/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <ar...@avalon.lt> */
+jQuery(function($){
+	$.datepicker.regional['lt'] = {
+		clearText: 'Išvalyti', clearStatus: '',
+		closeText: 'Uždaryti', closeStatus: '',
+		prevText: '&#x3c;Atgal',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Pirmyn&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Šiandien', currentStatus: '',
+		monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
+		'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
+		monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
+		'Lie','Rugp','Rugs','Spa','Lap','Gru'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: '', weekStatus: '',
+		dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
+		dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
+		dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'yy-mm-dd', firstDay: 1, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['lt']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-lv.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-lv.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-lv.js
new file mode 100644
index 0000000..2531794
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-lv.js
@@ -0,0 +1,25 @@
+/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <ar...@metasite.net> */
+jQuery(function($){
+	$.datepicker.regional['lv'] = {
+		clearText: 'Notīrīt', clearStatus: '',
+		closeText: 'Aizvērt', closeStatus: '',
+		prevText: 'Iepr',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Nāka', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Šodien', currentStatus: '',
+		monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
+		'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
+		monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
+		'Jūl','Aug','Sep','Okt','Nov','Dec'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Nav', weekStatus: '',
+		dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
+		dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
+		dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd-mm-yy', firstDay: 1, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['lv']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-nl.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-nl.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-nl.js
new file mode 100644
index 0000000..80262da
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-nl.js
@@ -0,0 +1,25 @@
+/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by ??? */
+jQuery(function($){
+	$.datepicker.regional['nl'] = {
+		clearText: 'Wissen', clearStatus: 'Wis de huidige datum',
+		closeText: 'Sluiten', closeStatus: 'Sluit zonder verandering',
+		prevText: '&#x3c;Terug', prevStatus: 'Laat de voorgaande maand zien',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Volgende&#x3e;', nextStatus: 'Laat de volgende maand zien',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Vandaag', currentStatus: 'Laat de huidige maand zien',
+		monthNames: ['Januari','Februari','Maart','April','Mei','Juni',
+		'Juli','Augustus','September','Oktober','November','December'],
+		monthNamesShort: ['Jan','Feb','Mrt','Apr','Mei','Jun',
+		'Jul','Aug','Sep','Okt','Nov','Dec'],
+		monthStatus: 'Laat een andere maand zien', yearStatus: 'Laat een ander jaar zien',
+		weekHeader: 'Wk', weekStatus: 'Week van het jaar',
+		dayNames: ['Zondag','Maandag','Dinsdag','Woensdag','Donderdag','Vrijdag','Zaterdag'],
+		dayNamesShort: ['Zon','Maa','Din','Woe','Don','Vri','Zat'],
+		dayNamesMin: ['Zo','Ma','Di','Wo','Do','Vr','Za'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: 'Kies een datum', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['nl']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-no.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-no.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-no.js
new file mode 100644
index 0000000..c5c1d0c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-no.js
@@ -0,0 +1,25 @@
+/* Norwegian initialisation for the jQuery UI date picker plugin. */
+/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
+jQuery(function($){
+    $.datepicker.regional['no'] = {
+		clearText: 'Tøm', clearStatus: '',
+		closeText: 'Lukk', closeStatus: '',
+        prevText: '&laquo;Forrige',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Neste&raquo;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'I dag', currentStatus: '',
+        monthNames: ['Januar','Februar','Mars','April','Mai','Juni', 
+        'Juli','August','September','Oktober','November','Desember'],
+        monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun', 
+        'Jul','Aug','Sep','Okt','Nov','Des'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Uke', weekStatus: '',
+		dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
+		dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
+		dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+        dateFormat: 'yy-mm-dd', firstDay: 0, 
+		initStatus: '', isRTL: false};
+    $.datepicker.setDefaults($.datepicker.regional['no']); 
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-pl.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-pl.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-pl.js
new file mode 100644
index 0000000..4e8fc2a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-pl.js
@@ -0,0 +1,25 @@
+/* Polish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
+jQuery(function($){
+	$.datepicker.regional['pl'] = {
+		clearText: 'Wyczyść', clearStatus: 'Wyczyść obecną datę',
+		closeText: 'Zamknij', closeStatus: 'Zamknij bez zapisywania',
+		prevText: '&#x3c;Poprzedni', prevStatus: 'Pokaż poprzedni miesiąc',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Następny&#x3e;', nextStatus: 'Pokaż następny miesiąc',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Dziś', currentStatus: 'Pokaż aktualny miesiąc',
+		monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
+		'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
+		monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
+		'Lip','Sie','Wrz','Pa','Lis','Gru'],
+		monthStatus: 'Pokaż inny miesiąc', yearStatus: 'Pokaż inny rok',
+		weekHeader: 'Tydz', weekStatus: 'Tydzień roku',
+		dayNames: ['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
+		dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
+		dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
+		dayStatus: 'Ustaw DD jako pierwszy dzień tygodnia', dateStatus: 'Wybierz D, M d',
+		dateFormat: 'yy-mm-dd', firstDay: 1, 
+		initStatus: 'Wybierz datę', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['pl']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-pt-BR.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-pt-BR.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-pt-BR.js
new file mode 100644
index 0000000..0f3fca1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-pt-BR.js
@@ -0,0 +1,25 @@
+/* Brazilian initialisation for the jQuery UI date picker plugin. */
+/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
+jQuery(function($){
+	$.datepicker.regional['pt-BR'] = {
+		clearText: 'Limpar', clearStatus: '',
+		closeText: 'Fechar', closeStatus: '',
+		prevText: '&#x3c;Anterior', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Pr&oacute;ximo&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Hoje', currentStatus: '',
+		monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
+		'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+		monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
+		'Jul','Ago','Set','Out','Nov','Dez'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Sm', weekStatus: '',
+		dayNames: ['Domingo','Segunda-feira','Ter&ccedil;a-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado'],
+		dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
+		dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['pt-BR']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ro.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ro.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ro.js
new file mode 100644
index 0000000..9a0fab9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ro.js
@@ -0,0 +1,25 @@
+/* Romanian initialisation for the jQuery UI date picker plugin. */
+/* Written by Edmond L. (ll_edmond@walla.com). */
+jQuery(function($){
+	$.datepicker.regional['ro'] = {
+		clearText: 'Curat', clearStatus: 'Sterge data curenta',
+		closeText: 'Inchide', closeStatus: 'Inchide fara schimbare',
+		prevText: '&#x3c;Anterior', prevStatus: 'Arata luna trecuta',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Urmator&#x3e;', nextStatus: 'Arata luna urmatoare',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Azi', currentStatus: 'Arata luna curenta',
+		monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Junie',
+		'Julie','August','Septembrie','Octobrie','Noiembrie','Decembrie'],
+		monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun',
+		'Jul', 'Aug', 'Sep', 'Oct', 'Noi', 'Dec'],
+		monthStatus: 'Arata o luna diferita', yearStatus: 'Arat un an diferit',
+		weekHeader: 'Sapt', weekStatus: 'Saptamana anului',
+		dayNames: ['Duminica', 'Luni', 'Marti', 'Miercuri', 'Joi', 'Vineri', 'Sambata'],
+		dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sam'],
+		dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sa'],
+		dayStatus: 'Seteaza DD ca prima saptamana zi', dateStatus: 'Selecteaza D, M d',
+		dateFormat: 'mm/dd/yy', firstDay: 0, 
+		initStatus: 'Selecteaza o data', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['ro']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ru.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ru.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ru.js
new file mode 100644
index 0000000..55d6a35
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-ru.js
@@ -0,0 +1,25 @@
+/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Andrew Stromnov (stromnov@gmail.com). */
+jQuery(function($){
+	$.datepicker.regional['ru'] = {
+		clearText: 'Очистить', clearStatus: '',
+		closeText: 'Закрыть', closeStatus: '',
+		prevText: '&#x3c;Пред',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'След&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Сегодня', currentStatus: '',
+		monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
+		'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
+		monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
+		'Июл','Авг','Сен','Окт','Ноя','Дек'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Не', weekStatus: '',
+		dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
+		dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
+		dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['ru']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-sk.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-sk.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-sk.js
new file mode 100644
index 0000000..f29444a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-sk.js
@@ -0,0 +1,25 @@
+/* Slovak initialisation for the jQuery UI date picker plugin. */
+/* Written by Vojtech Rinik (vojto@hmm.sk). */
+jQuery(function($){
+	$.datepicker.regional['sk'] = {
+		clearText: 'Zmazať', clearStatus: '',
+		closeText: 'Zavrieť', closeStatus: '',
+		prevText: '&#x3c;Predchádzajúci',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Nasledujúci&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Dnes', currentStatus: '',
+		monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
+		'Júl','August','September','Október','November','December'],
+		monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
+		'Júl','Aug','Sep','Okt','Nov','Dec'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Ty', weekStatus: '',
+		dayNames: ['Nedel\'a','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
+		dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
+		dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['sk']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-sl.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-sl.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-sl.js
new file mode 100644
index 0000000..8fed7d7
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-sl.js
@@ -0,0 +1,23 @@
+/* Slovenian initialisation for the jQuery UI date picker plugin. */
+/* Written by Jaka Jancar (jaka@kubje.org). */
+/* c = &#x10D;, s = &#x161; z = &#x17E; C = &#x10C; S = &#x160; Z = &#x17D; */
+jQuery(function($){
+	$.datepicker.regional['sl'] = {clearText: 'Izbri&#x161;i', clearStatus: 'Izbri&#x161;i trenutni datum',
+		closeText: 'Zapri', closeStatus: 'Zapri brez spreminjanja',
+		prevText: '&lt;Prej&#x161;nji', prevStatus: 'Prika&#x17E;i prej&#x161;nji mesec',
+		nextText: 'Naslednji&gt;', nextStatus: 'Prika&#x17E;i naslednji mesec',
+		currentText: 'Trenutni', currentStatus: 'Prika&#x17E;i trenutni mesec',
+		monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
+		'Julij','Avgust','September','Oktober','November','December'],
+		monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+		'Jul','Avg','Sep','Okt','Nov','Dec'],
+		monthStatus: 'Prika&#x17E;i drug mesec', yearStatus: 'Prika&#x17E;i drugo leto',
+		weekHeader: 'Teden', weekStatus: 'Teden v letu',
+		dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','&#x10C;etrtek','Petek','Sobota'],
+		dayNamesShort: ['Ned','Pon','Tor','Sre','&#x10C;et','Pet','Sob'],
+		dayNamesMin: ['Ne','Po','To','Sr','&#x10C;e','Pe','So'],
+		dayStatus: 'Nastavi DD za prvi dan v tednu', dateStatus: 'Izberi DD, d MM yy',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: 'Izbira datuma', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['sl']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-sv.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-sv.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-sv.js
new file mode 100644
index 0000000..09ce835
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-sv.js
@@ -0,0 +1,25 @@
+/* Swedish initialisation for the jQuery UI date picker plugin. */
+/* Written by Anders Ekdahl ( anders@nomadiz.se). */
+jQuery(function($){
+    $.datepicker.regional['sv'] = {
+		clearText: 'Rensa', clearStatus: '',
+		closeText: 'Stäng', closeStatus: '',
+        prevText: '&laquo;Förra',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'Nästa&raquo;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Idag', currentStatus: '',
+        monthNames: ['Januari','Februari','Mars','April','Maj','Juni', 
+        'Juli','Augusti','September','Oktober','November','December'],
+        monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 
+        'Jul','Aug','Sep','Okt','Nov','Dec'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Ve', weekStatus: '',
+		dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
+		dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
+		dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+        dateFormat: 'yy-mm-dd', firstDay: 1, 
+		initStatus: '', isRTL: false};
+    $.datepicker.setDefaults($.datepicker.regional['sv']); 
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-th.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-th.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-th.js
new file mode 100644
index 0000000..6f28851
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-th.js
@@ -0,0 +1,25 @@
+/* Thai initialisation for the jQuery UI date picker plugin. */
+/* Written by pipo (pipo@sixhead.com). */
+jQuery(function($){
+	$.datepicker.regional['th'] = {
+		clearText: 'ลบ', clearStatus: '',
+		closeText: 'ปิด', closeStatus: '',
+		prevText: '&laquo;&nbsp;ย้อน', prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'ถัดไป&nbsp;&raquo;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'วันนี้', currentStatus: '',
+		monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
+		'กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
+		monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
+		'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Sm', weekStatus: '',
+		dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
+		dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+		dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd/mm/yy', firstDay: 0, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['th']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-tr.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-tr.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-tr.js
new file mode 100644
index 0000000..67a44f0
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-tr.js
@@ -0,0 +1,25 @@
+/* Turkish initialisation for the jQuery UI date picker plugin. */
+/* Written by Izzet Emre Erkan (kara@karalamalar.net). */
+jQuery(function($){
+	$.datepicker.regional['tr'] = {
+		clearText: 'temizle', clearStatus: 'geçerli tarihi temizler',
+		closeText: 'kapat', closeStatus: 'sadece göstergeyi kapat',
+		prevText: '&#x3c;geri', prevStatus: 'önceki ayı göster',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: 'ileri&#x3e', nextStatus: 'sonraki ayı göster',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'bugün', currentStatus: '',
+		monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
+		'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
+		monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
+		'Tem','Ağu','Eyl','Eki','Kas','Ara'],
+		monthStatus: 'başka ay', yearStatus: 'başka yıl',
+		weekHeader: 'Hf', weekStatus: 'Ayın haftaları',
+		dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
+		dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
+		dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
+		dayStatus: 'Haftanın ilk gününü belirleyin', dateStatus: 'D, M d seçiniz',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: 'Bir tarih seçiniz', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['tr']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-uk.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-uk.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-uk.js
new file mode 100644
index 0000000..c296c0c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-uk.js
@@ -0,0 +1,25 @@
+/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
+jQuery(function($){
+	$.datepicker.regional['uk'] = {
+		clearText: 'Очистити', clearStatus: '',
+		closeText: 'Закрити', closeStatus: '',
+		prevText: '&#x3c;',  prevStatus: '',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+		nextText: '&#x3e;', nextStatus: '',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+		currentText: 'Сьогодні', currentStatus: '',
+		monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
+		'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
+		monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
+		'Лип','Сер','Вер','Жов','Лис','Гру'],
+		monthStatus: '', yearStatus: '',
+		weekHeader: 'Не', weekStatus: '',
+		dayNames: ['неділя','понеділок','вівторок','середа','четвер','пятниця','суббота'],
+		dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
+		dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
+		dayStatus: 'DD', dateStatus: 'D, M d',
+		dateFormat: 'dd.mm.yy', firstDay: 1, 
+		initStatus: '', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['uk']);
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-zh-CN.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-zh-CN.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-zh-CN.js
new file mode 100644
index 0000000..5d14fc9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-zh-CN.js
@@ -0,0 +1,25 @@
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by Cloudream (cloudream@gmail.com). */
+jQuery(function($){
+	$.datepicker.regional['zh-CN'] = {
+		clearText: '清除', clearStatus: '清除已选日期',
+		closeText: '关闭', closeStatus: '不改变当前选择',
+		prevText: '&#x3c;上月', prevStatus: '显示上月',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '显示上一年',
+		nextText: '下月&#x3e;', nextStatus: '显示下月',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '显示下一年',
+		currentText: '今天', currentStatus: '显示本月',
+		monthNames: ['一月','二月','三月','四月','五月','六月',
+		'七月','八月','九月','十月','十一月','十二月'],
+		monthNamesShort: ['一','二','三','四','五','六',
+		'七','八','九','十','十一','十二'],
+		monthStatus: '选择月份', yearStatus: '选择年份',
+		weekHeader: '周', weekStatus: '年内周次',
+		dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+		dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+		dayNamesMin: ['日','一','二','三','四','五','六'],
+		dayStatus: '设置 DD 为一周起始', dateStatus: '选择 m月 d日, DD',
+		dateFormat: 'yy-mm-dd', firstDay: 1, 
+		initStatus: '请选择日期', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-zh-TW.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-zh-TW.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-zh-TW.js
new file mode 100644
index 0000000..1613b5d
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/ui/i18n/ui.datepicker-zh-TW.js
@@ -0,0 +1,25 @@
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by Ressol (ressol@gmail.com). */
+jQuery(function($){
+	$.datepicker.regional['zh-TW'] = {
+		clearText: '清除', clearStatus: '清除已選日期',
+		closeText: '關閉', closeStatus: '不改變目前的選擇',
+		prevText: '&#x3c;上月', prevStatus: '顯示上月',
+		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '顯示上一年',
+		nextText: '下月&#x3e;', nextStatus: '顯示下月',
+		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '顯示下一年',
+		currentText: '今天', currentStatus: '顯示本月',
+		monthNames: ['一月','二月','三月','四月','五月','六月',
+		'七月','八月','九月','十月','十一月','十二月'],
+		monthNamesShort: ['一','二','三','四','五','六',
+		'七','八','九','十','十一','十二'],
+		monthStatus: '選擇月份', yearStatus: '選擇年份',
+		weekHeader: '周', weekStatus: '年內周次',
+		dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+		dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+		dayNamesMin: ['日','一','二','三','四','五','六'],
+		dayStatus: '設定 DD 為一周起始', dateStatus: '選擇 m月 d日, DD',
+		dateFormat: 'yy/mm/dd', firstDay: 1, 
+		initStatus: '請選擇日期', isRTL: false};
+	$.datepicker.setDefaults($.datepicker.regional['zh-TW']);
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/docs/about.html
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/docs/about.html b/dependencies/org.wso2.carbon.ui/src/main/resources/web/docs/about.html
new file mode 100644
index 0000000..52a71b9
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/docs/about.html
@@ -0,0 +1,132 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!--
+ ~ Copyright (c) 2005-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~    http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied.  See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<html><head><title>WSO2 Carbon - About</title>
+
+<link href="../admin/css/documentation.css" rel="stylesheet" type="text/css" media="all"/>
+</head>
+<body>
+<h1>Version 4.2.0</h1>
+<h2>About WSO2 Carbon </h2>
+<p>WSO2 Carbon is a component based Enterprise SOA platform. The
+design of
+WSO2 Carbon focuses on separating the key functionality of the SOA
+platform
+into separate pluggable Carbon components that can be mixed and
+matched, like
+customizable building blocks. This allows you to add only the
+functionality
+you need to start up, and continue to add product capabilities
+as your
+requirements grow. This helps a business to quickly adapt to
+changes.</p>
+<p>OSGi is used as the underlying core modularization technology
+within the
+Carbon platform. The Carbon framework is shipped with Eclipse Equinox
+by
+default, but can be supported on Spring dm Server, Felix or Knoplerfish
+if
+required. The OSGi technology even allows you to write your business
+functionality as an OSGi component and deploy it in the existing Carbon
+platform. </p>
+<p> For a quick start on using the WSO2 Carbon
+platform, the Carbon components are pre-assembled into the following
+products: </p>
+<ul id="CarbonProducts">
+    <li><a href="http://wso2.com/products/api-manager/">WSO2
+        API Manager</a></li>
+    <li><a href="http://wso2.com/products/application-server/">WSO2
+        Application Server</a></li>
+    <li><a href="http://wso2.com/products/business-activity-monitor/">WSO2
+        Business Activity Monitor</a></li>
+    <li><a href="http://wso2.com/products/business-process-server/">WSO2
+        Business Process Server</a></li>
+    <li><a href="http://wso2.com/products/business-rules-server/">WSO2
+        Business Rules Server</a></li>
+    <li><a href="http://wso2.com/products/complex-event-processing-server/">WSO2
+        Complex Event Processing Server</a></li>
+    <li><a href="http://wso2.com/products/data-services-server">WSO2
+        Data Services Server</a></li>
+    <li><a href="http://wso2.com/products/elastic-load-balancer/">WSO2
+        Elastic Load Balancer</a></li>
+    <li><a href="http://wso2.com/products/enterprise-service-bus/">WSO2
+        Enterprise Service Bus</a></li>
+    <li><a href="http://wso2.com/products/gadget-server/">WSO2
+        Gadget Server</a></li>
+    <li><a href="http://wso2.com/products/governance-registry/">WSO2
+        Governance Registry</a></li>
+    <li><a href="http://wso2.com/products/identity-server/">WSO2
+        Identity Server</a></li>
+    <li><a href="http://wso2.com/products/message-broker/">WSO2
+        Message Broker</a></li>
+    <li><a href="http://wso2.com/products/storage-server/">WSO2
+        Storage Server</a></li>
+</ul>
+<p>You can assemble your own products by combining
+components and
+deploying them in a preferred architecture. WSO2 Carbon offers P2 based provisioning support as well. Please visit the <a href="http://wso2.com/products/carbon/">Carbon product page</a> for more information. </p>
+<p>The WSO2 Carbon platform gives maximum flexibility to adapt
+the middleware
+to your enterprise architecture, rather than adapt your architecture to
+the
+middleware. </p>
+
+<h2>About WSO2</h2>
+<p>WSO2 is a Open Source technology company building Open Source
+middleware
+platforms for Web services and SOA. WSO2 delivers integrated middleware
+stacks, offering industry leading
+performance and convenience for customers. </p>
+<p>Founded in August 2005 by pioneers in Web services and Open
+Source, WSO2
+engineers contribute heavily to many key Apache Web services and other open source projects. </p>
+
+<h3>Have you tried...</h3>
+<p><a href="http://wso2.com/products/api-manager/"><img src="../admin/images/am_logo_h23.gif" alt="API Manager"/></a></p>
+<p><a href="http://wso2.com/products/application-server/"><img src="../admin/images/appserver_logo_h23.gif" alt="Application Server"/></a></p>
+<p><a href="http://wso2.com/products/business-activity-monitor/"><img src="../admin/images/bam_logo_h23.gif" alt="Business Activity Monitor"/></a></p>
+<p><a href="http://wso2.com/products/business-process-server/"><img src="../admin/images/bps_logo_h23.gif" alt="Business Process Server"/></a></p>
+<p><a href="http://wso2.com/products/business-rules-server"><img src="../admin/images/brs_logo_h23.gif" alt="Business Rules Server"/></a></p>
+<p><a href="http://wso2.com/products/complex-event-processing-server/"><img src="../admin/images/cep_logo_h23.gif" alt="Complex Event Processing Server"/></a></p>
+<p><a href="http://wso2.com/products/data-services-server"><img src="../admin/images/ds_logo_h23.gif" alt="Data Services Server"/></a></p>
+<p><a href="http://wso2.com/products/elastic-load-balancer/"><img src="../admin/images/elb_logo_h23.gif" alt="Elastic Load Balancer"/></a></p>
+<p><a href="http://wso2.com/products/enterprise-service-bus/"><img src="../admin/images/esb_logo_h23.gif" alt="Enterprise Service Bus"/></a></p>
+<p><a href="http://wso2.com/products/gadget-server/"><img src="../admin/images/gadgetserver_logo_h23.gif" alt="Gadget Server"/></a></p>
+<p><a href="http://wso2.com/products/governance-registry/"><img src="../admin/images/registry_logo_h23.gif" alt="Governance Registry"/></a></p>
+<p><a href="http://wso2.com/products/identity-server/"><img src="../admin/images/identity_logo_h23.gif" alt="Identity Server"/></a></p>
+<p><a href="http://wso2.com/products/message-broker/"><img src="../admin/images/mb_logo_h23.gif" alt="Message Broker"/></a></p>
+<p><a href="http://wso2.com/products/storage-server/"><img src="../admin/images/ss_logo_h23.png" alt="Storage Server"/></a></p>
+<h3>Stay connected </h3>
+<p><a href="http://wso2.org/newsletter/subscriptions">Subscribe</a>
+to the WSO2 newsletter - project updates, events, articles, SOA news
+and much
+more.</p>
+<h3>Need more help?</h3>
+<ul>
+<li><a href="http://wso2.org/library">Read articles</a></li>
+<li><a href="http://wso2.com/support/">Get commercial
+support</a></li>
+</ul>
+<div id="footer-div">
+	<div class="footer-content">
+		<div class="copyright">
+		    &copy; 2005 - 2013 WSO2 Inc. All Rights Reserved.
+		</div>
+	</div>
+</div>
+</body></html>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/docs/images/login.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/docs/images/login.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/docs/images/login.png
new file mode 100644
index 0000000..62a853d
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/docs/images/login.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/docs/signin_userguide.html
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/docs/signin_userguide.html b/dependencies/org.wso2.carbon.ui/src/main/resources/web/docs/signin_userguide.html
new file mode 100644
index 0000000..e7b2ba8
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/docs/signin_userguide.html
@@ -0,0 +1,70 @@
+<!--
+ ~ Copyright (c) 2005-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~    http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied.  See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
+  <title>Sign-in</title>
+  <link href="../admin/css/documentation.css" rel="stylesheet" type="text/css" media="all" />
+</head>
+
+<body>
+<h1>Sign-In</h1>
+
+<p>In the Sign-In panel, provide the user name and the password of your
+account and the server you want to sign in. Your user name and password will be
+authenticated, and you will authorized to perform functions according to your
+role. </p>
+
+<p><img src="images/login.png" alt="Sign-In Panel"/> </p>
+
+<p>Figure 1: Sign-In Panel. </p>
+If you are sign in on for the first time after the installation, use the
+following credentials.<br/>
+<br/>
+Username: <strong>admin<br/>
+</strong>Password: <strong>admin <br/>
+</strong>
+
+<p>You can sign in to a remote server by specifying its URL in the 'Server URL' field.
+This field defaults to the value "https://localhost:9443/services/". </p>
+
+<p>Enabling 'Remember Me' option makes it possible to sign-in to the management console in subsequent
+    attempts without entering user credentials.</p>
+
+<p>Please note that due to the inherited behaviour of default user store - which is embedded-ldap, 
+user names are case insensitive in 3.2.0 based carbon products.</p>
+
+<p>Please make sure you change the password for the�admin account as the first
+task after you log on. You can change the password from the User management
+panel.</p>
+
+<p>Note that you cannot delete the�admin account.</p>
+
+<p>If you are not the administrator, please contact your administrator to
+create an account for you.</p>
+
+<p>User accounts and�user roles can be added and managed from the
+<em><strong>User Management</strong></em> page. Click <strong>Help</strong>
+on the <em><strong>User Management</strong></em> page for more information on
+adding and managing users.</p>
+
+<p>To access this page, in the navigator, under Configure, click <strong>Users
+and Roles</strong>. </p>
+</body>
+</html>


[35/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery-ui-1.8.11.custom.min.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery-ui-1.8.11.custom.min.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery-ui-1.8.11.custom.min.js
new file mode 100644
index 0000000..f8709e0
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/jquery-ui-1.8.11.custom.min.js
@@ -0,0 +1,783 @@
+/*!
+ * jQuery UI 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI
+ */
+(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.11",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
+NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
+"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");
+if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,
+"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,
+d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});
+c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&
+b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
+;/*!
+ * jQuery UI Widget 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
+a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
+e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
+this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
+widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
+enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
+;/*!
+ * jQuery UI Mouse 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Mouse
+ *
+ * Depends:
+ *	jquery.ui.widget.js
+ */
+(function(b){b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(c){return a._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(true===b.data(c.target,a.widgetName+".preventClickEvent")){b.removeData(c.target,a.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=
+a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var c=this,e=a.which==1,f=typeof this.options.cancel=="string"?b(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=
+this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}true===b.data(a.target,this.widgetName+".preventClickEvent")&&b.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(d){return c._mouseMove(d)};this._mouseUpDelegate=function(d){return c._mouseUp(d)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return a.originalEvent.mouseHandled=
+true}},_mouseMove:function(a){if(b.browser.msie&&!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
+if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
+;/*
+ * jQuery UI Position 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Position
+ */
+(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY,
+left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+=
+k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-=
+m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left=
+d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+=
+a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b),
+g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
+;/*
+ * jQuery UI Draggable 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.widget.js
+ */
+(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
+"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b=
+this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-
+this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();
+d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||
+this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&
+this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
+a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||
+0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
+this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-
+(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),
+height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?
+document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),
+10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),
+10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom]}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&
+d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
+this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=
+this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;e=this.originalPageX+Math.round((e-this.originalPageX)/b.grid[0])*b.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?
+e:!(e-this.offset.click.left<this.containment[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
+f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,
+offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.11"});d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var g=d.data(this,"sortable");if(g&&!g.options.disabled){c.sortables.push({instance:g,shouldRevert:g.options.revert});g.refreshPositions();g._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},
+b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=
+d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};
+a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&
+this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",
+{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","iframeFix",{start:function(){var a=d(this).data("draggable").options;d(a.iframeFix===true?"iframe":a.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+
+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})},stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",
+a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+
+c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-b.overflowOffset.left<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<
+c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+
+c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),
+f=c.options,e=f.snapTolerance,g=b.offset.left,n=g+c.helperProportions.width,m=b.offset.top,o=m+c.helperProportions.height,h=c.snapElements.length-1;h>=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e<g&&g<k+e&&j-e<m&&m<l+e||i-e<g&&g<k+e&&j-e<o&&o<l+e||i-e<n&&n<k+e&&j-e<m&&m<l+e||i-e<n&&n<k+e&&j-e<o&&o<l+e){if(f.snapMode!="inner"){var p=Math.abs(j-o)<=e,q=Math.abs(l-m)<=e,r=Math.abs(i-n)<=e,s=Math.abs(k-g)<=e;if(p)b.position.top=
+c._convertPositionTo("relative",{top:j-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k}).left-c.margins.left}var t=p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(j-m)<=e;q=Math.abs(l-o)<=e;r=Math.abs(i-g)<=e;s=Math.abs(k-n)<=e;if(p)b.position.top=
+c._convertPositionTo("relative",{top:j,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l-c.helperProportions.height,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[h].snapping&&(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),
+{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=p||q||r||s||t}else{c.snapElements[h].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=
+parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);
+;/*
+ * jQuery UI Droppable 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Droppables
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.widget.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.draggable.js
+ */
+(function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(c){return c.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this);
+a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b<a.length;b++)a[b]==this&&a.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(a,b){if(a=="accept")this.accept=d.isFunction(b)?b:function(c){return c.is(b)};d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&
+this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
+this._trigger("over",a,this.ui(b))}},_out:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",a,this.ui(b))}},_drop:function(a,b){var c=b||d.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=
+d.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
+a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.11"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height;
+switch(c){case "fit":return i<=e&&g<=k&&j<=f&&h<=l;case "intersect":return i<e+a.helperProportions.width/2&&g-a.helperProportions.width/2<k&&j<f+a.helperProportions.height/2&&h-a.helperProportions.height/2<l;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,j,i,b.proportions.height,b.proportions.width);case "touch":return(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l)&&(e>=
+i&&e<=k||g>=i&&g<=k||e<i&&g>k);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<c.length;f++)if(!(c[f].options.disabled||a&&!c[f].accept.call(c[f].element[0],a.currentItem||a.element))){for(var h=0;h<g.length;h++)if(g[h]==c[f].element[0]){c[f].proportions.height=0;continue a}c[f].visible=c[f].element.css("display")!=
+"none";if(c[f].visible){e=="mousedown"&&c[f]._activate.call(c[f],b);c[f].offset=c[f].element.offset();c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight}}}},drop:function(a,b){var c=false;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance))c=c||this._drop.call(this,b);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||
+a.element)){this.isout=1;this.isover=0;this._deactivate.call(this,b)}}});return c},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=d.ui.intersect(a,this,this.options.tolerance);if(c=!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){e=
+d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,b)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,b);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})}}})(jQuery);
+;/*
+ * jQuery UI Resizable 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.widget.js
+ */
+(function(e){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,
+_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&e.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
+top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
+this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
+nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e('<div class="ui-resizable-handle '+("ui-resizable-"+f)+'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor==
+String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();
+this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
+if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),
+d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=
+this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:
+this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",
+b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;
+f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");
+this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=
+null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=l(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=l(b.width)&&a.minWidth&&a.minWidth>b.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+
+this.size.height,k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=
+[c.css("borderTopWidth"),c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)||0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=
+this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,
+a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,
+c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,
+originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.11"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=
+b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width",
+"height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};
+if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-
+g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,
+height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=
+e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,
+d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?
+d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=
+a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&
+/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");
+b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/
+(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
+;/*
+ * jQuery UI Selectable 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.widget.js
+ */
+(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),
+selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX,
+c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting",
+c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d=
+this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.right<b||a.top>i||a.bottom<g);else if(d.tolerance=="fit")k=a.left>b&&a.right<h&&a.top>g&&a.bottom<i;if(k){if(a.selected){a.$element.removeClass("ui-selected");a.selected=false}if(a.unselecting){a.$element.removeClass("ui-unselecting");
+a.unselecting=false}if(!a.selecting){a.$element.addClass("ui-selecting");a.selecting=true;f._trigger("selecting",c,{selecting:a.element})}}else{if(a.selecting)if(c.metaKey&&a.startselected){a.$element.removeClass("ui-selecting");a.selecting=false;a.$element.addClass("ui-selected");a.selected=true}else{a.$element.removeClass("ui-selecting");a.selecting=false;if(a.startselected){a.$element.addClass("ui-unselecting");a.unselecting=true}f._trigger("unselecting",c,{unselecting:a.element})}if(a.selected)if(!c.metaKey&&
+!a.startselected){a.$element.removeClass("ui-selected");a.selected=false;a.$element.addClass("ui-unselecting");a.unselecting=true;f._trigger("unselecting",c,{unselecting:a.element})}}}});return false}},_mouseStop:function(c){var f=this;this.dragged=false;e(".ui-unselecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;d.startselected=false;f._trigger("unselected",c,{unselected:d.element})});e(".ui-selecting",this.element[0]).each(function(){var d=
+e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;f._trigger("selected",c,{selected:d.element})});this._trigger("stop",c);this.helper.remove();return false}});e.extend(e.ui.selectable,{version:"1.8.11"})})(jQuery);
+;/*
+ * jQuery UI Sortable 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Sortables
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.widget.js
+ */
+(function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");
+this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=
+b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;
+d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-
+this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};
+this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=
+document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);
+return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+b.scrollSpeed;else if(a.pageY-this.overflowOffset.top<
+b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-b.scrollSpeed;if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+b.scrollSpeed;else if(a.pageX-this.overflowOffset.left<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-b.scrollSpeed}else{if(a.pageY-d(document).scrollTop()<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()-
+b.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()+b.scrollSpeed);if(a.pageX-d(document).scrollLeft()<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed)}c!==false&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,
+a)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(b=this.items.length-1;b>=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],
+e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset();
+c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):
+this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null,
+dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")},
+toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+j<k&&b+l>g&&b+l<h;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||
+this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?j:g<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<h&&i<e+this.helperProportions.height/2&&f-this.helperProportions.height/2<k},_intersectsWithPointer:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width);b=b&&a;a=this._getDragVerticalDirection();
+var c=this._getDragHorizontalDirection();if(!b)return false;return this.floating?c&&c=="right"||a=="down"?2:1:a&&(a=="down"?2:1)},_intersectsWithSides:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width);var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?e=="right"&&a||e=="left"&&!a:c&&(c=="down"&&b||c=="up"&&!b)},
+_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith();
+if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),
+this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(a){this.items=[];this.containers=[this];var b=this.items,c=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,this.element),
+this]],e=this._connectWith();if(e)for(var f=e.length-1;f>=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h<g;h++){i=d(e[h]);i.data("sortable-item",a);b.push({item:i,instance:a,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&&
+this.helper)this.offset.parent=this._getParentOffset();for(var b=this.items.length-1;b>=0;b--){var c=this.items[b],e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=
+e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
+if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);
+c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===
+1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-f)<b){b=Math.abs(h-f);e=this.items[g]}}if(e||this.options.dropOnEmpty){this.currentContainer=
+this.containers[c];e?this._rearrange(a,e,null,true):this._rearrange(a,null,this.containers[c].element,true);this._trigger("change",a,this._uiHash());this.containers[c]._trigger("change",a,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}}},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a,this.currentItem])):
+b.helper=="clone"?this.currentItem.clone():this.currentItem;a.parents("body").length||d(b.appendTo!="parent"?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);if(a[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(a[0].style.width==""||b.forceHelperSize)a.width(this.currentItem.width());if(a[0].style.height==
+""||b.forceHelperSize)a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=
+this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),
+10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions=
+{width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||
+document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b=d(a.containment)[0];a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,
+b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=
+document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
+e?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var f=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-
+this.offset.click.left<this.containment[0])f=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<
+this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;f=this.originalPageX+Math.round((f-this.originalPageX)/b.grid[0])*b.grid[0];f=this.containment?!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:!(f-this.offset.click.left<this.containment[0])?f-b.grid[0]:f+b.grid[0]:f}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&
+this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:function(a,b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=
+this.counter?++this.counter:1;var f=this,g=this.counter;window.setTimeout(function(){g==f.counter&&f.refreshPositions(!e)},0)},_clear:function(a,b){this.reverting=false;var c=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();
+this.fromOutside&&!b&&c.push(function(f){this._trigger("receive",f,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!b)c.push(function(f){this._trigger("update",f,this._uiHash())});if(!d.ui.contains(this.element[0],this.currentItem[0])){b||c.push(function(f){this._trigger("remove",f,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(d.ui.contains(this.containers[e].element[0],
+this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",
+g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}return false}b||
+this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!b){for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){d.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,
+originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});d.extend(d.ui.sortable,{version:"1.8.11"})})(jQuery);
+;/*
+ * jQuery UI Accordion 1.8.11
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.widget.js
+ */
+(function(c){c.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
+a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
+if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion",
+function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a=
+this.options;if(a.icons){c("<span></span>").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");
+this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons();
+b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target);
+a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c

<TRUNCATED>

[44/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/FileUploadExecutorManager.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/FileUploadExecutorManager.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/FileUploadExecutorManager.java
new file mode 100644
index 0000000..5fb272c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/FileUploadExecutorManager.java
@@ -0,0 +1,401 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.carbon.ui.transports.fileupload;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.util.XMLUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.base.ServerConfiguration;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.utils.ServerConstants;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import javax.xml.namespace.QName;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * <p>
+ * This class is responsible for delegating the file upload requests to the different
+ * FileUploadExecutors.
+ * </p>
+ * <p>
+ * The FileUploadExecutors may be registered in the following manner:
+ *
+ * <ol>
+ *      <li>1. Using FileUploadConfig configuration section in the carbon.xml</li>
+ *      <li>2. Instances of {@link AbstractFileUploadExecutor } registered as OSGi services</li>
+ *      <li>3. Using component.xml file in UI components</li>
+ * </ol>
+ * </p>
+ * <p>
+ * If a FileUploadExecutor cannot be found in the above 3 collections, as a final resort,
+ * we will finally try to upload the file using an {@link AnyFileUploadExecutor}, if it has been
+ * registered in the carbon.xml file. Searching for an FileUploadExecutor in the above 3 types of
+ * items is done using the chain of execution pattern. As soon as a FileUploadExecutor which can
+ * handle the uploaded file type is found, execution of the chain is terminated.
+ * </p>
+ */
+public class FileUploadExecutorManager {
+
+    private static Log log = LogFactory.getLog(FileUploadExecutorManager.class);
+
+    private Map<String, AbstractFileUploadExecutor> executorMap =
+            new HashMap<String, AbstractFileUploadExecutor>();
+
+    private BundleContext bundleContext;
+
+    private ConfigurationContext configContext;
+
+    private String webContext;
+
+    public FileUploadExecutorManager(BundleContext bundleContext,
+                                     ConfigurationContext configCtx,
+                                     String webContext) throws CarbonException {
+        this.bundleContext = bundleContext;
+        this.configContext = configCtx;
+        this.webContext = webContext;
+        this.loadExecutorMap();
+    }
+
+    /**
+     * When a FileUpload request is received, this method will be called.
+     *
+     * @param request The HTTP Request
+     * @param response  The HTTP Response
+     * @return true - if the file uploading was successful, false - otherwise
+     * @throws IOException If an unrecoverable error occurs during file upload
+     */
+    public boolean execute(HttpServletRequest request,
+                           HttpServletResponse response) throws IOException {
+
+        HttpSession session = request.getSession();
+        String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+        request.setAttribute(CarbonConstants.ADMIN_SERVICE_COOKIE, cookie);
+        request.setAttribute(CarbonConstants.WEB_CONTEXT, webContext);
+        request.setAttribute(CarbonConstants.SERVER_URL,
+                             CarbonUIUtil.getServerURL(request.getSession().getServletContext(),
+                                                       request.getSession()));
+
+
+        String requestURI = request.getRequestURI();
+
+        //TODO - fileupload is hardcoded
+        int indexToSplit = requestURI.indexOf("fileupload/") + "fileupload/".length();
+        String actionString = requestURI.substring(indexToSplit);
+
+        // Register execution handlers
+        FileUploadExecutionHandlerManager execHandlerManager =
+                new FileUploadExecutionHandlerManager();
+        CarbonXmlFileUploadExecHandler carbonXmlExecHandler =
+                new CarbonXmlFileUploadExecHandler(request, response, actionString);
+        execHandlerManager.addExecHandler(carbonXmlExecHandler);
+        OSGiFileUploadExecHandler osgiExecHandler =
+                new OSGiFileUploadExecHandler(request, response);
+        execHandlerManager.addExecHandler(osgiExecHandler);
+        AnyFileUploadExecHandler anyFileExecHandler =
+                new AnyFileUploadExecHandler(request, response);
+        execHandlerManager.addExecHandler(anyFileExecHandler);
+        execHandlerManager.startExec();
+        return true;
+    }
+
+    private void loadExecutorMap() throws CarbonException {
+        ServerConfiguration serverConfiguration = ServerConfiguration.getInstance();
+        OMElement documentElement;
+        try {
+            documentElement = XMLUtils.toOM(serverConfiguration.getDocumentElement());
+        } catch (Exception e) {
+            String msg = "Unable to read Server Configuration.";
+            log.error(msg);
+            throw new CarbonException(msg, e);
+        }
+        OMElement fileUploadConfigElement =
+                documentElement.getFirstChildWithName(
+                        new QName(ServerConstants.CARBON_SERVER_XML_NAMESPACE, "FileUploadConfig"));
+        for (Iterator iterator = fileUploadConfigElement.getChildElements(); iterator.hasNext();) {
+            OMElement mapppingElement = (OMElement) iterator.next();
+            if (mapppingElement.getLocalName().equalsIgnoreCase("Mapping")) {
+                OMElement actionsElement =
+                        mapppingElement.getFirstChildWithName(
+                                new QName(ServerConstants.CARBON_SERVER_XML_NAMESPACE, "Actions"));
+
+                if (actionsElement == null) {
+                    String msg = "The mandatory FileUploadConfig/Actions entry " +
+                                 "does not exist or is empty in the CARBON_HOME/conf/carbon.xml " +
+                                 "file. Please fix this error in the  carbon.xml file and restart.";
+                    log.error(msg);
+                    throw new CarbonException(msg);
+                }
+                Iterator actionElementIterator =
+                        actionsElement.getChildrenWithName(
+                                new QName(ServerConstants.CARBON_SERVER_XML_NAMESPACE, "Action"));
+
+                if (!actionElementIterator.hasNext()) {
+                    String msg = "A FileUploadConfig/Mapping entry in the " +
+                                 "CARBON_HOME/conf/carbon.xml should have at least on Action " +
+                                 "defined. Please fix this error in the carbon.xml file and " +
+                                 "restart.";
+                    log.error(msg);
+                    throw new CarbonException(msg);
+                }
+
+                OMElement classElement = mapppingElement.getFirstChildWithName(
+                        new QName(ServerConstants.CARBON_SERVER_XML_NAMESPACE, "Class"));
+
+                if (classElement == null || classElement.getText() == null) {
+                    String msg = "The mandatory FileUploadConfig/Mapping/Class entry " +
+                                 "does not exist or is empty in the CARBON_HOME/conf/carbon.xml " +
+                                 "file. Please fix this error in the  carbon.xml file and restart.";
+                    log.error(msg);
+                    throw new CarbonException(msg);
+                }
+
+
+                AbstractFileUploadExecutor object;
+                String className = classElement.getText().trim();
+
+                try {
+                    Class clazz = bundleContext.getBundle().loadClass(className);
+                    Constructor constructor =
+                            clazz.getConstructor();
+                    object = (AbstractFileUploadExecutor) constructor
+                            .newInstance();
+
+                } catch (Exception e) {
+                    String msg = "Error occurred while trying to instantiate the " + className +
+                                 " class specified as a FileUploadConfig/Mapping/class element in " +
+                                 "the CARBON_HOME/conf/carbon.xml file. Please fix this error in " +
+                                 "the carbon.xml file and restart.";
+                    log.error(msg, e);
+                    throw new CarbonException(msg, e);
+                }
+
+                while (actionElementIterator.hasNext()) {
+                    OMElement actionElement = (OMElement) actionElementIterator.next();
+                    if (actionElement.getText() == null) {
+                        String msg = "A FileUploadConfig/Mapping/Actions/Action element in the " +
+                                     "CARBON_HOME/conf/carbon.xml file is empty. Please include " +
+                                     "the correct value in this file and restart.";
+                        log.error(msg);
+                        throw new CarbonException(msg);
+                    }
+                    executorMap.put(actionElement.getText().trim(), object);
+                }
+            }
+        }
+    }
+
+    public void addExecutor(String action, String executorClass) throws CarbonException {
+        if (action == null) {
+            String msg = "A FileUploadConfig/Mapping/Actions/Action element is null ";
+            log.error(msg);
+        }
+
+        if (executorClass == null || executorClass.equals("")) {
+            String msg = "Provided FileUploadExecutor object is invalid ";
+            log.error(msg);
+        }
+
+        AbstractFileUploadExecutor object;
+
+        try {
+            Class clazz = bundleContext.getBundle().loadClass(executorClass);
+            Constructor constructor = clazz.getConstructor();
+            object = (AbstractFileUploadExecutor) constructor.newInstance();
+            executorMap.put(action, object);
+        } catch (Exception e) {
+            String msg = "Error occurred while trying to instantiate the " + executorClass +
+                         " class specified as a FileUploadConfig/Mapping/class element";
+            log.error(msg, e);
+            throw new CarbonException(msg, e);
+        }
+    }
+
+    public void removeExecutor(String action) {
+        if (action == null) {
+            String msg = "A FileUploadConfig/Mapping/Actions/Action element is null ";
+            log.error(msg);
+        }
+
+        executorMap.remove(action);
+    }
+
+    /**
+     * This class manages registration of a chain of {@link FileUploadExecutionHandler}s. Uses
+     * chain of execution pattern.
+     */
+    private static class FileUploadExecutionHandlerManager {
+
+        /**
+         * First handler in the chain
+         */
+        private FileUploadExecutionHandler firstHandler;
+
+        /**
+         * Previous handler
+         */
+        private FileUploadExecutionHandler prevHandler;
+
+        public void addExecHandler(FileUploadExecutionHandler handler) {
+            if (prevHandler != null) {
+                prevHandler.setNext(handler);
+            } else {
+                firstHandler = handler;
+            }
+            prevHandler = handler;
+        }
+
+        public void startExec() throws IOException {
+            firstHandler.execute();
+        }
+    }
+
+    /**
+     * The base class of all FileUploadExecutionHandler. For each type of file upload execution
+     * chain, we will implement a subclass of this. Uses chain of execution pattern.
+     */
+    private abstract class FileUploadExecutionHandler {
+        private FileUploadExecutionHandler next;
+
+        public abstract void execute() throws IOException;
+
+        public final void next() throws IOException {
+            next.execute();
+        }
+
+        public final void setNext(FileUploadExecutionHandler next) {
+            this.next = next;
+        }
+    }
+
+    /**
+     * Represents upload execution chain of {@link AnyFileUploadExecutor}
+     */
+    private class AnyFileUploadExecHandler extends FileUploadExecutionHandler {
+        private HttpServletRequest request;
+        private HttpServletResponse response;
+
+        private AnyFileUploadExecHandler(HttpServletRequest request, HttpServletResponse response) {
+            this.request = request;
+            this.response = response;
+        }
+
+        @Override
+        public void execute() throws IOException {
+            Object obj = executorMap.get("*");
+            if (obj == null) {
+                log.warn("Reached 'All' section but Could not find the Implementation Class");
+                return;
+            }
+            AnyFileUploadExecutor executor = (AnyFileUploadExecutor) obj;
+            executor.executeGeneric(request, response, configContext);
+        }
+    }
+
+    /**
+     * Represents upload execution chain of UploadExecutors registered as OSGi services
+     */
+    private class OSGiFileUploadExecHandler extends FileUploadExecutionHandler {
+
+        private HttpServletRequest request;
+        private HttpServletResponse response;
+
+        private OSGiFileUploadExecHandler(HttpServletRequest request,
+                                          HttpServletResponse response) {
+            this.request = request;
+            this.response = response;
+        }
+
+        public void execute() throws IOException {
+
+            ServiceReference[] serviceReferences;
+            try {
+                serviceReferences =
+                        bundleContext.
+                                getServiceReferences(AbstractFileUploadExecutor.class.getName(),
+                                                     null);
+            } catch (InvalidSyntaxException e) {
+                throw new IllegalArgumentException("Service reference cannot be obtained", e);
+            }
+            boolean foundExecutor = false;
+            if (serviceReferences != null) {
+                String requestURI = request.getRequestURI();
+                for (ServiceReference reference : serviceReferences) {
+                    String action = (String) reference.getProperty("action");
+                    if (action != null && requestURI.indexOf(action) > -1) {
+                        foundExecutor = true;
+                        AbstractFileUploadExecutor uploadExecutor =
+                                (AbstractFileUploadExecutor) bundleContext.getService(reference);
+                        uploadExecutor.executeGeneric(request, response, configContext);
+                        break;
+                    }
+                }
+                if (!foundExecutor) {
+                    next();
+                }
+            }
+
+        }
+    }
+
+    /**
+     * Represents upload execution chain of UploadExecutors registered in carbon.xml, except for
+     * {@link AnyFileUploadExecutor}
+     */
+    private class CarbonXmlFileUploadExecHandler extends FileUploadExecutionHandler {
+
+        private HttpServletRequest request;
+        private HttpServletResponse response;
+        private String actionString;
+
+        private CarbonXmlFileUploadExecHandler(HttpServletRequest request,
+                                               HttpServletResponse response,
+                                               String actionString) {
+            this.request = request;
+            this.response = response;
+            this.actionString = actionString;
+        }
+
+        public void execute() throws IOException {
+            boolean foundExecutor = false;
+            for (String key : executorMap.keySet()) {
+                if (key.equals(actionString)) {
+                    AbstractFileUploadExecutor obj = executorMap.get(key);
+                    foundExecutor = true;
+                    obj.executeGeneric(request, response, configContext);
+                    break;
+                }
+            }
+            if (!foundExecutor) {
+                next();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/FileUploadFailedException.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/FileUploadFailedException.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/FileUploadFailedException.java
new file mode 100644
index 0000000..dc932d3
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/FileUploadFailedException.java
@@ -0,0 +1,22 @@
+package org.wso2.carbon.ui.transports.fileupload;
+
+/**
+ * This exception is thrown when file uploading fails
+ */
+public class FileUploadFailedException extends Exception {
+    public FileUploadFailedException() {
+        
+    }
+
+    public FileUploadFailedException(String s) {
+        super(s);    
+    }
+
+    public FileUploadFailedException(String s, Throwable throwable) {
+        super(s, throwable);    
+    }
+
+    public FileUploadFailedException(Throwable throwable) {
+        super(throwable);    
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/JarZipUploadExecutor.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/JarZipUploadExecutor.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/JarZipUploadExecutor.java
new file mode 100644
index 0000000..e3b25c2
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/JarZipUploadExecutor.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui.transports.fileupload;
+
+import org.apache.commons.collections.bidimap.TreeBidiMap;
+import org.apache.commons.fileupload.disk.DiskFileItem;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.fileupload.servlet.ServletRequestContext;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.utils.ServerConstants;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Handles Jar, Zip file upload and creating a service archive out of it
+ * This class is totally comply with add_new_jar_zip.xsl. Thus, should not use in general purpose
+ * activities.
+ */
+public class JarZipUploadExecutor extends org.wso2.carbon.ui.transports.fileupload.AbstractFileUploadExecutor {
+
+    public boolean execute(HttpServletRequest request, HttpServletResponse response)
+            throws CarbonException, IOException {
+        ServletRequestContext servletRequestContext = new ServletRequestContext(request);
+        boolean isMultipart =
+                ServletFileUpload.isMultipartContent(servletRequestContext);
+        PrintWriter out = response.getWriter();
+        response.setContentType("text/html; charset=utf-8");
+        try {
+            if (isMultipart) {
+                List items = parseRequest(servletRequestContext);
+                Map fileResourceMap =
+                        (Map) configurationContext
+                                .getProperty(ServerConstants.FILE_RESOURCE_MAP);
+                if (fileResourceMap == null) {
+                    fileResourceMap = new TreeBidiMap();
+                    configurationContext.setProperty(ServerConstants.FILE_RESOURCE_MAP,
+                                                     fileResourceMap);
+                }
+                List resourceUUID = new ArrayList();
+                String main = null;
+                for (Iterator iterator = items.iterator(); iterator.hasNext();) {
+                    DiskFileItem item = (DiskFileItem) iterator.next();
+                    if (!item.isFormField()) {
+                        String uuid = String.valueOf(System.currentTimeMillis() + Math.random());
+                        String extraFileLocation =
+                                configurationContext.getProperty(ServerConstants.WORK_DIR) +
+                                File.separator + "extra" +
+                                File.separator + uuid + File.separator;
+                        String fieldName = item.getFieldName();
+                        if (fieldName != null && fieldName.equals("jarZipFilename")) {
+                            File dirs = new File(extraFileLocation);
+                            dirs.mkdirs();
+                            String fileName = item.getName();
+                            String fileExtension = fileName;
+                            checkServiceFileExtensionValidity(fileExtension,
+                                                              new String[]{".jar", ".zip"});
+                            File uploadedFile = new File(extraFileLocation,
+                                                         getFileName(fileName));
+                            item.write(uploadedFile);
+                            main = uuid;
+                            resourceUUID.add(uuid);
+                            fileResourceMap.put(uuid, uploadedFile.getAbsolutePath());
+                        }
+
+                        if (fieldName != null && fieldName.equals("jarResource")) {
+                            String fileName = item.getName();
+                            if (fileName.toLowerCase().endsWith(".jar")) {
+                                File dirs = new File(extraFileLocation);
+                                dirs.mkdirs();
+                                File uploadedFile = new File(extraFileLocation,
+                                                             getFileName(fileName));
+                                item.write(uploadedFile);
+                                resourceUUID.add(uuid);
+                                fileResourceMap.put(uuid, uploadedFile.getAbsolutePath());
+                            }
+                        }
+                    }
+                }
+                if (main == null) {
+                    out.write("<script type=\"text/javascript\">" +
+                              "top.wso2.wsf.Util.alertWarning('Please upload a jar or a zip file.');" +
+                              "</script>");
+                }
+
+                String s = "var uObj = new Object();";
+                for (int i = 0; i < resourceUUID.size(); i++) {
+                    s += "uObj[" + i + "]=\"" + resourceUUID.get(i) + "\";\n";
+                }
+                out.write("<script type=\"text/javascript\">" +
+                          s +
+                          "top." + "jarZipFileUploadExecutor" + "(\"" + main + "\",uObj);" +
+                          "</script>");
+                out.flush();
+            }
+        } catch (Exception e) {
+            log.error("File upload FAILED", e);
+            out.write("<script type=\"text/javascript\">" +
+                      "top.wso2.wsf.Util.alertWarning('File upload FAILED. File may be non-existent or invalid.');" +
+                      "</script>");
+        } finally {
+            out.close();
+        }
+        return true;
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/KeyStoreFileUploadExecutor.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/KeyStoreFileUploadExecutor.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/KeyStoreFileUploadExecutor.java
new file mode 100644
index 0000000..da475b6
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/KeyStoreFileUploadExecutor.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.carbon.ui.transports.fileupload;
+
+import org.apache.commons.collections.bidimap.TreeBidiMap;
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.fileupload.servlet.ServletRequestContext;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.utils.ServerConstants;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+/*
+ * 
+ */
+
+public class KeyStoreFileUploadExecutor extends org.wso2.carbon.ui.transports.fileupload.AbstractFileUploadExecutor {
+
+    public boolean execute(HttpServletRequest request, HttpServletResponse response)
+            throws CarbonException, IOException {
+        ServletRequestContext servletRequestContext = new ServletRequestContext(request);
+        boolean isMultipart =
+                ServletFileUpload.isMultipartContent(servletRequestContext);
+        PrintWriter out = response.getWriter();
+        response.setContentType("text/html; charset=utf-8");
+        try {
+            if (isMultipart) {
+                List items = parseRequest(servletRequestContext);
+                // Process the uploaded items
+                for (Iterator iter = items.iterator(); iter.hasNext();) {
+                    FileItem item = (FileItem) iter.next();
+                    if (!item.isFormField()) {
+                        String uuid = String.valueOf(System.currentTimeMillis() + Math.random());
+                        String ksUploadDir =
+                                configurationContext.getProperty(ServerConstants.WORK_DIR) +
+                                File.separator + "keystores" +
+                                File.separator + uuid + File.separator;
+
+                        File dirs = new File(ksUploadDir);
+                        if (!dirs.exists()) {
+                            dirs.mkdirs();
+                        }
+                        File uploadedFile = new File(ksUploadDir,
+                                                     getFileName(item.getName()));
+                        item.write(uploadedFile);
+                        Map fileResourceMap =
+                                (Map) configurationContext.getProperty(ServerConstants.FILE_RESOURCE_MAP);
+                        if (fileResourceMap == null) {
+                            fileResourceMap = new TreeBidiMap();
+                            configurationContext.setProperty(ServerConstants.FILE_RESOURCE_MAP,
+                                                             fileResourceMap);
+                        }
+                        fileResourceMap.put(uuid, uploadedFile.getAbsolutePath());
+                        item.write(uploadedFile);
+
+                        // call the javascript which will in turn call the relevant web service
+                        out.write("<script type=\"text/javascript\">" +
+                                  "top.getKeystoreUUID('" + uuid + "');" +
+                                  "</script>");
+                    }
+                }
+                out.flush();
+            }
+        } catch (Exception e) {
+            log.error("KeyStore file upload failed", e);
+            out.write("<script type=\"text/javascript\">" +
+                      "top.wso2.wsf.Util.alertWarning('KeyStore file upload FAILED. Reason : " + e + "');" +
+                      "</script>");
+        } finally {
+            out.close();
+        }
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/ToolsAnyFileUploadExecutor.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/ToolsAnyFileUploadExecutor.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/ToolsAnyFileUploadExecutor.java
new file mode 100644
index 0000000..89b6b26
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/ToolsAnyFileUploadExecutor.java
@@ -0,0 +1,90 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui.transports.fileupload;
+
+import org.apache.commons.collections.bidimap.TreeBidiMap;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.utils.FileItemData;
+import org.wso2.carbon.utils.ServerConstants;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.List;
+import java.util.Map;
+
+public class ToolsAnyFileUploadExecutor extends AbstractFileUploadExecutor {
+
+	@Override
+	public boolean execute(HttpServletRequest request,
+			HttpServletResponse response) throws CarbonException, IOException {
+		PrintWriter out = response.getWriter();
+        try {
+        	Map fileResourceMap =
+                (Map) configurationContext
+                        .getProperty(ServerConstants.FILE_RESOURCE_MAP);
+        	if (fileResourceMap == null) {
+        		fileResourceMap = new TreeBidiMap();
+        		configurationContext.setProperty(ServerConstants.FILE_RESOURCE_MAP,
+                                             fileResourceMap);
+        	}
+            List<FileItemData> fileItems = getAllFileItems();
+            //String filePaths = "";
+
+            for (FileItemData fileItem : fileItems) {
+                String uuid = String.valueOf(
+                        System.currentTimeMillis() + Math.random());
+                String serviceUploadDir =
+                        configurationContext
+                                .getProperty(ServerConstants.WORK_DIR) +
+                                File.separator +
+                                "extra" + File
+                                .separator +
+                                uuid + File.separator;
+                File dir = new File(serviceUploadDir);
+                if (!dir.exists()) {
+                    dir.mkdirs();
+                }
+                File uploadedFile = new File(dir, fileItem.getFileItem().getFieldName());
+                FileOutputStream fileOutStream = new FileOutputStream(uploadedFile);
+                fileItem.getDataHandler().writeTo(fileOutStream);
+                fileOutStream.flush();
+                fileOutStream.close();
+                response.setContentType("text/plain; charset=utf-8");
+                //filePaths = filePaths + uploadedFile.getAbsolutePath() + ",";
+                fileResourceMap.put(uuid, uploadedFile.getAbsolutePath());
+                out.write(uuid);
+            }
+            //filePaths = filePaths.substring(0, filePaths.length() - 1);
+            //out.write(filePaths);
+            out.flush();
+        } catch (Exception e) {
+            log.error("File upload FAILED", e);
+            out.write("<script type=\"text/javascript\">" +
+                    "top.wso2.wsf.Util.alertWarning('File upload FAILED. File may be non-existent or invalid.');" +
+                    "</script>");
+        } finally {
+            out.close();
+        }
+        return true;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/ToolsFileUploadExecutor.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/ToolsFileUploadExecutor.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/ToolsFileUploadExecutor.java
new file mode 100644
index 0000000..2c2e40c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/transports/fileupload/ToolsFileUploadExecutor.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui.transports.fileupload;
+
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.utils.FileItemData;
+import org.wso2.carbon.utils.ServerConstants;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.List;
+
+public class ToolsFileUploadExecutor extends AbstractFileUploadExecutor {
+    public boolean execute(HttpServletRequest request, HttpServletResponse response)
+            throws CarbonException, IOException {
+        PrintWriter out = response.getWriter();
+        try {
+            List<FileItemData> fileItems = getAllFileItems();
+            
+            StringBuffer filePathsStrBuffer = new StringBuffer();
+            
+            for (FileItemData fileItem : fileItems) {
+                String uuid = String.valueOf(
+                        System.currentTimeMillis() + Math.random());
+                String serviceUploadDir =
+                        configurationContext
+                                .getProperty(ServerConstants.WORK_DIR) +
+                                File.separator +
+                                "extra" + File
+                                .separator +
+                                uuid + File.separator;
+                File dir = new File(serviceUploadDir);
+                if (!dir.exists()) {
+                    boolean dirCreated = dir.mkdirs();
+                    if (!dirCreated) {
+                    	log.error("Error creating dir " + dir.getPath());
+                    	return false;
+                    }
+                }
+                File uploadedFile = new File(dir, uuid);
+                FileOutputStream fileOutStream = new FileOutputStream(uploadedFile);
+                fileItem.getDataHandler().writeTo(fileOutStream);
+                fileOutStream.flush();
+                fileOutStream.close();
+                response.setContentType("text/plain; charset=utf-8");
+                filePathsStrBuffer.append(uploadedFile.getAbsolutePath());
+                filePathsStrBuffer.append(',');                
+            }
+
+            out.write(filePathsStrBuffer.substring(0, filePathsStrBuffer.length() - 1));
+            out.flush();
+        } catch (Exception e) {
+            log.error("File upload FAILED", e);
+            out.write("<script type=\"text/javascript\">" +
+                    "top.wso2.wsf.Util.alertWarning('File upload FAILED. File may be non-existent or invalid.');" +
+                    "</script>");
+        } finally {
+            out.close();
+        }
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/CarbonUIAuthenticationUtil.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/CarbonUIAuthenticationUtil.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/CarbonUIAuthenticationUtil.java
new file mode 100644
index 0000000..6e97055
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/CarbonUIAuthenticationUtil.java
@@ -0,0 +1,48 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.wso2.carbon.ui.util;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.Cookie;
+
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.commons.httpclient.Header;
+
+public class CarbonUIAuthenticationUtil {
+
+    /**
+     * Sets the cookie information, i.e. whether remember me cookie is enabled of disabled. If enabled
+     * we will send that information in a HTTP header.
+     * @param cookie  The remember me cookie.
+     * @param serviceClient The service client used in communication.
+     */
+    public static void setCookieHeaders(Cookie cookie, ServiceClient serviceClient) {
+
+        List<Header> headers = new ArrayList<Header>();
+        Header rememberMeHeader = new Header("RememberMeCookieData", cookie.getValue());
+        headers.add(rememberMeHeader);
+
+        serviceClient.getOptions().setProperty(HTTPConstants.HTTP_HEADERS, headers);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/CharacterEncoder.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/CharacterEncoder.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/CharacterEncoder.java
new file mode 100644
index 0000000..c2f15e0
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/CharacterEncoder.java
@@ -0,0 +1,38 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui.util;
+
+/*
+ * This class validates special characters to avoid any XSS vulnerabilities.
+ */
+public class CharacterEncoder {
+
+    public static String getSafeText(String text) {
+        if (text == null) {
+            return text;
+        }
+        text = text.trim();
+        if (text.indexOf('<') > -1) {
+            text = text.replace("<", "&lt;");
+        }
+        if (text.indexOf('>') > -1) {
+            text = text.replace(">", "&gt;");
+        }
+        return text;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/FileDownloadUtil.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/FileDownloadUtil.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/FileDownloadUtil.java
new file mode 100644
index 0000000..589547f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/FileDownloadUtil.java
@@ -0,0 +1,145 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.carbon.ui.util;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleContext;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.core.util.MIMEType2FileExtensionMap;
+import org.wso2.carbon.core.commons.stub.filedownload.FileDownloadServiceStub;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.utils.ConfigurationContextService;
+import org.wso2.carbon.utils.ServerConstants;
+import org.wso2.carbon.utils.CarbonUtils;
+
+
+import javax.activation.DataHandler;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.util.Map;
+
+/**
+ *
+ */
+public class FileDownloadUtil {
+    private static Log log = LogFactory.getLog(FileDownloadUtil.class);
+
+    private MIMEType2FileExtensionMap mimeMap;
+
+    public FileDownloadUtil(BundleContext context) {
+        mimeMap = new MIMEType2FileExtensionMap();
+        mimeMap.init(context);
+    }
+
+    public synchronized boolean acquireResource(ConfigurationContextService configCtxService,
+                                                HttpServletRequest request,
+                                                HttpServletResponse response)
+            throws CarbonException {
+
+        OutputStream out;
+        try {
+            out = response.getOutputStream();
+        } catch (IOException e) {
+            String msg = "Unable to retrieve file ";
+            log.error(msg, e);
+            throw new CarbonException(msg, e);
+        }
+        String fileID = request.getParameter("id");
+        String fileName = getFileName(configCtxService, request, fileID);
+
+        if (fileName == null) {
+            String serverURL = CarbonUIUtil.getServerURL(request.getSession().
+                    getServletContext(), request.getSession());
+
+            String serviceEPR = serverURL + "FileDownloadService";
+            try {
+
+                FileDownloadServiceStub stub;
+                if(CarbonUtils.isRunningOnLocalTransportMode()) {
+                    stub = new FileDownloadServiceStub(configCtxService.getServerConfigContext(), serviceEPR);
+                } else {
+                    stub = new FileDownloadServiceStub(configCtxService.getClientConfigContext(), serviceEPR);
+                }
+                DataHandler dataHandler = stub.downloadFile(fileID);
+                if (dataHandler != null) {
+                    response.setHeader("Content-Disposition", "filename=" + fileID);
+                    response.setContentType(dataHandler.getContentType());
+                    InputStream in = dataHandler.getDataSource().getInputStream();
+                    int nextChar;
+                    while ((nextChar = in.read()) != -1) {
+                        out.write((char) nextChar);
+                    }
+                    out.flush();
+                    out.close();
+                    in.close();
+                    return true;
+                }
+                out.write("The requested file was not found on the server".getBytes());
+                out.flush();
+                out.close();
+            } catch (IOException e) {
+                String msg = "Unable to write output to HttpServletResponse OutputStream ";
+                log.error(msg, e);
+                throw new CarbonException(msg, e);
+            }
+            return false;
+        }
+
+
+        try {
+            File file = new File(fileName);
+            FileInputStream in = new FileInputStream(file);
+            byte[] b = new byte[(int) file.length()];
+            response.setContentType(mimeMap.getMIMEType(file));
+            response.setContentLength((int) file.length());
+            response.setHeader("Content-Disposition", "filename=" + file.getName());
+            int lengthRead = in.read(b);
+            if (lengthRead != -1) {
+                out.write(b);
+            }
+            out.flush();
+            out.close();
+            in.close();
+            return true;
+        } catch (IOException e) {
+            String msg = "Unable to retrieve file ";
+            log.error(msg, e);
+            throw new CarbonException(msg, e);
+        }
+    }
+
+    private String getFileName(ConfigurationContextService configCtxService,
+                               HttpServletRequest request,
+                               String fileID) {
+        //Trying to get the fileName from the client-configuration context
+        Map fileResourcesMap =
+                (Map) configCtxService.getClientConfigContext().
+                        getProperty(ServerConstants.FILE_RESOURCE_MAP);
+        String fileName = (String) fileResourcesMap.get(fileID);
+
+        if (fileName == null) {
+            String requestURI = request.getRequestURI();
+            ConfigurationContext configContext = configCtxService.getServerConfigContext();
+            fileResourcesMap = (Map) configContext.getProperty(ServerConstants.FILE_RESOURCE_MAP);
+            fileName = (String) fileResourcesMap.get(fileID);
+        }
+        return fileName;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/UIAnnouncementDeployer.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/UIAnnouncementDeployer.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/UIAnnouncementDeployer.java
new file mode 100644
index 0000000..f8d4324
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/UIAnnouncementDeployer.java
@@ -0,0 +1,54 @@
+/*
+ *  Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ *
+ */
+package org.wso2.carbon.ui.util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.ui.UIAnnouncement;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.http.HttpSession;
+
+public class UIAnnouncementDeployer {
+
+    private static Log log = LogFactory.getLog(UIAnnouncementDeployer.class);
+    private static ServiceTracker uiAnnouncementTracker = null;
+
+    public static String getAnnouncementHtml(HttpSession session, ServletConfig config) {
+        UIAnnouncement uiAnnouncement = (UIAnnouncement) uiAnnouncementTracker.getService();
+        if (uiAnnouncement == null) {
+            return ""; // empty htmls
+        }
+        return uiAnnouncement.getAnnouncementHtml(session, config);
+    }
+
+    public static void deployNotificationSources() {
+        BundleContext bundleContext = CarbonUIUtil.getBundleContext();
+        uiAnnouncementTracker = new ServiceTracker(bundleContext,
+                UIAnnouncement.class.getName(), null);
+        uiAnnouncementTracker.open();
+    }
+
+    public static void undeployNotificationSources() {
+        uiAnnouncementTracker.close();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/UIResourceProvider.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/UIResourceProvider.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/UIResourceProvider.java
new file mode 100644
index 0000000..fafb081
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/UIResourceProvider.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2009-2010 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui.util;
+
+import java.net.URL;
+import java.util.Set;
+
+/**
+ * Defines a set of methos to load UI resources and resource paths from resource providers such as OSGi Bundles,
+ * registry, file system, etc.
+ */
+public interface UIResourceProvider {
+    
+    /**
+     * Returns a URL to the resource that is mapped to a specified path. The path must begin with a "/" and is
+     * interpreted as relative to the current context root.
+     *
+     * This method returns null  if no resource is mapped to the pathname.
+     *
+     * @param path a String specifying the path to the resource
+     * @return the resource located at the named path, or null if there is no resource at that path
+     */
+    URL getUIResource(String path);
+
+    /**
+     * Returns a directory-like listing of all the paths to resources within the web application whose longest sub-path
+     * matches the supplied path argument. Paths indicating subdirectory paths end with a '/'. The returned paths are
+     * all relative to the root of resource provider and have a leading '/'. For example, for a resource provider
+     * containing
+     *
+     * /welcome.html
+     * /WEB_INF
+     * /WEB-INF/web.xml
+     * /WEB-INF/tiles
+     * /WEB-INF/tiles/main_defs.xml
+     *
+     * getResourcePaths("/") returns {"/welcome.html", "/WEB_INF"}.
+     * getResourcePaths("/WEB_INF/") returns {"/WEB-INF/web.xml", "/WEB-INF/tiles/"}.
+     * getResourcePaths("/WEB-INF/tiles/") returns {"/WEB-INF/tiles/main_defs.xml"}.
+     * 
+     * @param path partial path used to match the resources, which must start with a /
+     * @return a Set containing the directory listing, or null if there are no resources whose path begins with the
+     *          supplied path.
+     */
+    Set<String> getUIResourcePaths(String path);
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/FileDownloadService.wsdl
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/FileDownloadService.wsdl b/dependencies/org.wso2.carbon.ui/src/main/resources/FileDownloadService.wsdl
new file mode 100644
index 0000000..cedfdb4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/FileDownloadService.wsdl
@@ -0,0 +1,138 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~    http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied.  See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+                  xmlns:ns1="http://org.apache.axis2/xsd"
+                  xmlns:ns="http://filedownload.services.core.carbon.wso2.org"
+                  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+                  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+                  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+                  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+                  targetNamespace="http://filedownload.services.core.carbon.wso2.org">
+    <wsdl:documentation>FileDownloadService</wsdl:documentation>
+    <wsdl:types>
+        <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified"
+                   targetNamespace="http://filedownload.services.core.carbon.wso2.org">
+            <xs:element name="downloadFile">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="downloadFileResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" nillable="true"
+                                    type="xs:base64Binary"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="downloadFileRequest">
+        <wsdl:part name="parameters" element="ns:downloadFile"/>
+    </wsdl:message>
+    <wsdl:message name="downloadFileResponse">
+        <wsdl:part name="parameters" element="ns:downloadFileResponse"/>
+    </wsdl:message>
+    <wsdl:portType name="FileDownloadServicePortType">
+
+        <wsdl:operation name="downloadFile">
+            <wsdl:input message="ns:downloadFileRequest" wsaw:Action="urn:downloadFile"/>
+            <wsdl:output message="ns:downloadFileResponse" wsaw:Action="urn:downloadFileResponse"/>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="FileDownloadServiceSoap11Binding" type="ns:FileDownloadServicePortType">
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="downloadFile">
+            <soap:operation soapAction="urn:downloadFile" style="document"/>
+
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="FileDownloadServiceSoap12Binding" type="ns:FileDownloadServicePortType">
+
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="downloadFile">
+            <soap12:operation soapAction="urn:downloadFile" style="document"/>
+            <wsdl:input>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap12:body use="literal"/>
+            </wsdl:output>
+
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="FileDownloadServiceHttpBinding" type="ns:FileDownloadServicePortType">
+        <http:binding verb="POST"/>
+        <wsdl:operation name="downloadFile">
+            <http:operation location="downloadFile"/>
+            <wsdl:input>
+                <mime:content type="text/xml" part="downloadFile"/>
+            </wsdl:input>
+
+            <wsdl:output>
+                <mime:content type="text/xml" part="downloadFile"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="FileDownloadService">
+        <wsdl:port name="FileDownloadServiceHttpSoap11Endpoint"
+                   binding="ns:FileDownloadServiceSoap11Binding">
+            <soap:address
+                    location="http://10.182.8.115:9763/services/FileDownloadService.FileDownloadServiceHttpSoap11Endpoint/"/>
+        </wsdl:port>
+
+        <wsdl:port name="FileDownloadServiceHttpsSoap11Endpoint"
+                   binding="ns:FileDownloadServiceSoap11Binding">
+            <soap:address
+                    location="https://10.182.8.115:9443/services/FileDownloadService.FileDownloadServiceHttpsSoap11Endpoint/"/>
+        </wsdl:port>
+        <wsdl:port name="FileDownloadServiceHttpSoap12Endpoint"
+                   binding="ns:FileDownloadServiceSoap12Binding">
+            <soap12:address
+                    location="http://10.182.8.115:9763/services/FileDownloadService.FileDownloadServiceHttpSoap12Endpoint/"/>
+        </wsdl:port>
+        <wsdl:port name="FileDownloadServiceHttpsSoap12Endpoint"
+                   binding="ns:FileDownloadServiceSoap12Binding">
+            <soap12:address
+                    location="https://10.182.8.115:9443/services/FileDownloadService.FileDownloadServiceHttpsSoap12Endpoint/"/>
+        </wsdl:port>
+
+        <wsdl:port name="FileDownloadServiceHttpEndpoint"
+                   binding="ns:FileDownloadServiceHttpBinding">
+            <http:address
+                    location="http://10.182.8.115:9763/services/FileDownloadService.FileDownloadServiceHttpEndpoint/"/>
+        </wsdl:port>
+        <wsdl:port name="FileDownloadServiceHttpsEndpoint"
+                   binding="ns:FileDownloadServiceHttpBinding">
+            <http:address
+                    location="https://10.182.8.115:9443/services/FileDownloadService.FileDownloadServiceHttpsEndpoint/"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/FileUploadService.wsdl
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/FileUploadService.wsdl b/dependencies/org.wso2.carbon.ui/src/main/resources/FileUploadService.wsdl
new file mode 100644
index 0000000..9dcaf94
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/FileUploadService.wsdl
@@ -0,0 +1,141 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~    http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied.  See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://fileupload.services.core.carbon.wso2.org" xmlns:ax28="http://common.core.carbon.wso2.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://fileupload.services.core.carbon.wso2.org">
+    <wsdl:documentation>FileUploadService</wsdl:documentation>
+    <wsdl:types>
+        <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.core.carbon.wso2.org/xsd">
+            <xs:complexType name="UploadedFileItem">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="dataHandler" nillable="true" type="xs:base64Binary" />
+                    <xs:element minOccurs="0" name="fileName" nillable="true" type="xs:string" />
+                    <xs:element minOccurs="0" name="fileType" nillable="true" type="xs:string" />
+
+                </xs:sequence>
+            </xs:complexType>
+        </xs:schema>
+        <xs:schema xmlns:ax29="http://common.core.carbon.wso2.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://fileupload.services.core.carbon.wso2.org">
+            <xs:import namespace="http://common.core.carbon.wso2.org/xsd" />
+            <xs:complexType name="Exception">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType" />
+                </xs:sequence>
+
+            </xs:complexType>
+            <xs:element name="Exception">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="Exception" nillable="true" type="ns:Exception" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="uploadFiles">
+
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="uploadedFileItems" nillable="true" type="ax28:UploadedFileItem" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="uploadFilesResponse">
+                <xs:complexType>
+                    <xs:sequence>
+
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="uploadFilesRequest">
+        <wsdl:part name="parameters" element="ns:uploadFiles" />
+    </wsdl:message>
+
+    <wsdl:message name="uploadFilesResponse">
+        <wsdl:part name="parameters" element="ns:uploadFilesResponse" />
+    </wsdl:message>
+    <wsdl:message name="Exception">
+        <wsdl:part name="parameters" element="ns:Exception" />
+    </wsdl:message>
+    <wsdl:portType name="FileUploadServicePortType">
+        <wsdl:operation name="uploadFiles">
+            <wsdl:input message="ns:uploadFilesRequest" wsaw:Action="urn:uploadFiles" />
+
+            <wsdl:output message="ns:uploadFilesResponse" wsaw:Action="urn:uploadFilesResponse" />
+            <wsdl:fault message="ns:Exception" name="Exception" wsaw:Action="urn:uploadFilesException" />
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="FileUploadServiceSoap11Binding" type="ns:FileUploadServicePortType">
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+        <wsdl:operation name="uploadFiles">
+            <soap:operation soapAction="urn:uploadFiles" style="document" />
+            <wsdl:input>
+
+                <soap:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+            </wsdl:output>
+            <wsdl:fault name="Exception">
+                <soap:fault use="literal" name="Exception" />
+            </wsdl:fault>
+        </wsdl:operation>
+
+    </wsdl:binding>
+    <wsdl:binding name="FileUploadServiceSoap12Binding" type="ns:FileUploadServicePortType">
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+        <wsdl:operation name="uploadFiles">
+            <soap12:operation soapAction="urn:uploadFiles" style="document" />
+            <wsdl:input>
+                <soap12:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+
+                <soap12:body use="literal" />
+            </wsdl:output>
+            <wsdl:fault name="Exception">
+                <soap12:fault use="literal" name="Exception" />
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="FileUploadServiceHttpBinding" type="ns:FileUploadServicePortType">
+        <http:binding verb="POST" />
+
+        <wsdl:operation name="uploadFiles">
+            <http:operation location="uploadFiles" />
+            <wsdl:input>
+                <mime:content type="text/xml" part="uploadFiles" />
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="uploadFiles" />
+            </wsdl:output>
+        </wsdl:operation>
+
+    </wsdl:binding>
+    <wsdl:service name="FileUploadService">
+        <wsdl:port name="FileUploadServiceHttpsSoap11Endpoint" binding="ns:FileUploadServiceSoap11Binding">
+            <soap:address location="https://10.182.8.115:9443/services/FileUploadService.FileUploadServiceHttpsSoap11Endpoint/" />
+        </wsdl:port>
+        <wsdl:port name="FileUploadServiceHttpsSoap12Endpoint" binding="ns:FileUploadServiceSoap12Binding">
+            <soap12:address location="https://10.182.8.115:9443/services/FileUploadService.FileUploadServiceHttpsSoap12Endpoint/" />
+        </wsdl:port>
+        <wsdl:port name="FileUploadServiceHttpsEndpoint" binding="ns:FileUploadServiceHttpBinding">
+
+            <http:address location="https://10.182.8.115:9443/services/FileUploadService.FileUploadServiceHttpsEndpoint/" />
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/LoggedUserInfoAdmin.wsdl
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/LoggedUserInfoAdmin.wsdl b/dependencies/org.wso2.carbon.ui/src/main/resources/LoggedUserInfoAdmin.wsdl
new file mode 100644
index 0000000..9436c39
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/LoggedUserInfoAdmin.wsdl
@@ -0,0 +1,120 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~    http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied.  See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax215="http://common.core.carbon.wso2.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://loggeduserinfo.services.core.carbon.wso2.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://loggeduserinfo.services.core.carbon.wso2.org">
+    <wsdl:documentation>LoggedUserInfoAdmin</wsdl:documentation>
+    <wsdl:types>
+        <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.core.carbon.wso2.org/xsd">
+            <xs:complexType name="LoggedUserInfo">
+                <xs:all>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="UIPermissionOfUser" nillable="true" type="xs:string" />
+                    <xs:element minOccurs="0" name="passwordExpiration" nillable="true" type="xs:string" />
+                    <xs:element minOccurs="0" name="userName" nillable="true" type="xs:string" />
+                </xs:all>
+            </xs:complexType>
+        </xs:schema>
+        <xs:schema xmlns:ax216="http://common.core.carbon.wso2.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://loggeduserinfo.services.core.carbon.wso2.org">
+            <xs:import namespace="http://common.core.carbon.wso2.org/xsd" />
+            <xs:complexType name="Exception">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType" />
+                </xs:sequence>
+            </xs:complexType>
+            <xs:element name="Exception">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="Exception" nillable="true" type="ns:Exception" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getUserInfoResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax216:LoggedUserInfo" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="getUserInfoRequest" />
+    <wsdl:message name="getUserInfoResponse">
+        <wsdl:part name="parameters" element="ns:getUserInfoResponse" />
+    </wsdl:message>
+    <wsdl:message name="Exception">
+        <wsdl:part name="parameters" element="ns:Exception" />
+    </wsdl:message>
+    <wsdl:portType name="LoggedUserInfoAdminPortType">
+        <wsdl:operation name="getUserInfo">
+            <wsdl:input message="ns:getUserInfoRequest" wsaw:Action="urn:getUserInfo" />
+            <wsdl:output message="ns:getUserInfoResponse" wsaw:Action="urn:getUserInfoResponse" />
+            <wsdl:fault message="ns:Exception" name="Exception" wsaw:Action="urn:getUserInfoException" />
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="LoggedUserInfoAdminSoap11Binding" type="ns:LoggedUserInfoAdminPortType">
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+        <wsdl:operation name="getUserInfo">
+            <soap:operation soapAction="urn:getUserInfo" style="document" />
+            <wsdl:input>
+                <soap:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+            </wsdl:output>
+            <wsdl:fault name="Exception">
+                <soap:fault use="literal" name="Exception" />
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="LoggedUserInfoAdminSoap12Binding" type="ns:LoggedUserInfoAdminPortType">
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+        <wsdl:operation name="getUserInfo">
+            <soap12:operation soapAction="urn:getUserInfo" style="document" />
+            <wsdl:input>
+                <soap12:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap12:body use="literal" />
+            </wsdl:output>
+            <wsdl:fault name="Exception">
+                <soap12:fault use="literal" name="Exception" />
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="LoggedUserInfoAdminHttpBinding" type="ns:LoggedUserInfoAdminPortType">
+        <http:binding verb="POST" />
+        <wsdl:operation name="getUserInfo">
+            <http:operation location="getUserInfo" />
+            <wsdl:input>
+                <mime:content type="text/xml" part="getUserInfo" />
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="getUserInfo" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="LoggedUserInfoAdmin">
+        <wsdl:port name="LoggedUserInfoAdminHttpsSoap11Endpoint" binding="ns:LoggedUserInfoAdminSoap11Binding">
+            <soap:address location="https://10.100.1.226:9443/services/LoggedUserInfoAdmin.LoggedUserInfoAdminHttpsSoap11Endpoint/" />
+        </wsdl:port>
+        <wsdl:port name="LoggedUserInfoAdminHttpsSoap12Endpoint" binding="ns:LoggedUserInfoAdminSoap12Binding">
+            <soap12:address location="https://10.100.1.226:9443/services/LoggedUserInfoAdmin.LoggedUserInfoAdminHttpsSoap12Endpoint/" />
+        </wsdl:port>
+        <wsdl:port name="LoggedUserInfoAdminHttpsEndpoint" binding="ns:LoggedUserInfoAdminHttpBinding">
+            <http:address location="https://10.100.1.226:9443/services/LoggedUserInfoAdmin.LoggedUserInfoAdminHttpsEndpoint/" />
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/RegistryAdminService/RegistryAdminService.wsdl
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/RegistryAdminService/RegistryAdminService.wsdl b/dependencies/org.wso2.carbon.ui/src/main/resources/RegistryAdminService/RegistryAdminService.wsdl
new file mode 100644
index 0000000..f9a3932
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/RegistryAdminService/RegistryAdminService.wsdl
@@ -0,0 +1,173 @@
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://service.server.registry.carbon.wso2.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://service.server.registry.carbon.wso2.org">
+    <wsdl:documentation>RegistryAdminService</wsdl:documentation>
+    <wsdl:types>
+        <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.server.registry.carbon.wso2.org">
+            <xs:element name="isRegistryReadOnlyResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getHTTPSPermalink">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="path" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getHTTPSPermalinkResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getHTTPPermalink">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="path" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getHTTPPermalinkResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="getHTTPPermalinkRequest">
+        <wsdl:part name="parameters" element="ns:getHTTPPermalink"/>
+    </wsdl:message>
+    <wsdl:message name="getHTTPPermalinkResponse">
+        <wsdl:part name="parameters" element="ns:getHTTPPermalinkResponse"/>
+    </wsdl:message>
+    <wsdl:message name="isRegistryReadOnlyRequest"/>
+    <wsdl:message name="isRegistryReadOnlyResponse">
+        <wsdl:part name="parameters" element="ns:isRegistryReadOnlyResponse"/>
+    </wsdl:message>
+    <wsdl:message name="getHTTPSPermalinkRequest">
+        <wsdl:part name="parameters" element="ns:getHTTPSPermalink"/>
+    </wsdl:message>
+    <wsdl:message name="getHTTPSPermalinkResponse">
+        <wsdl:part name="parameters" element="ns:getHTTPSPermalinkResponse"/>
+    </wsdl:message>
+    <wsdl:portType name="RegistryAdminServicePortType">
+        <wsdl:operation name="getHTTPPermalink">
+            <wsdl:input message="ns:getHTTPPermalinkRequest" wsaw:Action="urn:getHTTPPermalink"/>
+            <wsdl:output message="ns:getHTTPPermalinkResponse" wsaw:Action="urn:getHTTPPermalinkResponse"/>
+        </wsdl:operation>
+        <wsdl:operation name="isRegistryReadOnly">
+            <wsdl:input message="ns:isRegistryReadOnlyRequest" wsaw:Action="urn:isRegistryReadOnly"/>
+            <wsdl:output message="ns:isRegistryReadOnlyResponse" wsaw:Action="urn:isRegistryReadOnlyResponse"/>
+        </wsdl:operation>
+        <wsdl:operation name="getHTTPSPermalink">
+            <wsdl:input message="ns:getHTTPSPermalinkRequest" wsaw:Action="urn:getHTTPSPermalink"/>
+            <wsdl:output message="ns:getHTTPSPermalinkResponse" wsaw:Action="urn:getHTTPSPermalinkResponse"/>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="RegistryAdminServiceSoap11Binding" type="ns:RegistryAdminServicePortType">
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="getHTTPPermalink">
+            <soap:operation soapAction="urn:getHTTPPermalink" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="isRegistryReadOnly">
+            <soap:operation soapAction="urn:isRegistryReadOnly" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getHTTPSPermalink">
+            <soap:operation soapAction="urn:getHTTPSPermalink" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="RegistryAdminServiceSoap12Binding" type="ns:RegistryAdminServicePortType">
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="getHTTPPermalink">
+            <soap12:operation soapAction="urn:getHTTPPermalink" style="document"/>
+            <wsdl:input>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap12:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="isRegistryReadOnly">
+            <soap12:operation soapAction="urn:isRegistryReadOnly" style="document"/>
+            <wsdl:input>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap12:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getHTTPSPermalink">
+            <soap12:operation soapAction="urn:getHTTPSPermalink" style="document"/>
+            <wsdl:input>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap12:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="RegistryAdminServiceHttpBinding" type="ns:RegistryAdminServicePortType">
+        <http:binding verb="POST"/>
+        <wsdl:operation name="getHTTPPermalink">
+            <http:operation location="getHTTPPermalink"/>
+            <wsdl:input>
+                <mime:content type="text/xml" part="parameters"/>
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="parameters"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="isRegistryReadOnly">
+            <http:operation location="isRegistryReadOnly"/>
+            <wsdl:input>
+                <mime:content type="text/xml" part="parameters"/>
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="parameters"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getHTTPSPermalink">
+            <http:operation location="getHTTPSPermalink"/>
+            <wsdl:input>
+                <mime:content type="text/xml" part="parameters"/>
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="parameters"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="RegistryAdminService">
+        <wsdl:port name="RegistryAdminServiceHttpsSoap11Endpoint" binding="ns:RegistryAdminServiceSoap11Binding">
+            <soap:address location="https://10.0.0.11:9443/services/RegistryAdminService.RegistryAdminServiceHttpsSoap11Endpoint/"/>
+        </wsdl:port>
+        <wsdl:port name="RegistryAdminServiceHttpsSoap12Endpoint" binding="ns:RegistryAdminServiceSoap12Binding">
+            <soap12:address location="https://10.0.0.11:9443/services/RegistryAdminService.RegistryAdminServiceHttpsSoap12Endpoint/"/>
+        </wsdl:port>
+        <wsdl:port name="RegistryAdminServiceHttpsEndpoint" binding="ns:RegistryAdminServiceHttpBinding">
+            <http:address location="https://10.0.0.11:9443/services/RegistryAdminService.RegistryAdminServiceHttpsEndpoint/"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tiles/main_defs.xml
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tiles/main_defs.xml b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tiles/main_defs.xml
new file mode 100644
index 0000000..a71f8a4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tiles/main_defs.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE tiles-definitions PUBLIC
+        "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+        "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+<tiles-definitions>
+
+    <!-- =======================================================  -->
+    <!-- Master definition  									  -->
+    <!-- =======================================================  -->
+
+    <definition name="main.layout" template="/admin/layout/template.jsp">
+        <put-attribute name="title" value="WSO2 Management Console"/>
+        <put-attribute name="header" value="/admin/layout/header.jsp"/>
+        <put-attribute name="region1" value="/admin/layout/region1.jsp"/>
+        <put-attribute name="region2" value="/admin/layout/region2.jsp"/>
+        <put-attribute name="region3" value="/admin/layout/region3.jsp"/>                
+        <put-attribute name="region4" value="/admin/layout/region4.jsp"/>
+        <put-attribute name="region5" value="/admin/layout/region5.jsp"/>
+        <put-attribute name="body" value="/admin/layout/defaultBody.jsp"/>
+        <put-attribute name="breadcrumb" value="/admin/layout/breadcrumb.jsp"/>              
+        <put-attribute name="footer" value="/admin/layout/footer.jsp"/>
+    </definition>
+    
+
+
+    <!-- 
+    <definition name="main.welcome" extends="main.layout">
+        <put-attribute name="body" value="/admin/jsp/test.jsp"/>
+    </definition>
+    -->
+</tiles-definitions>
\ No newline at end of file


[43/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/ajaxtags.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/ajaxtags.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/ajaxtags.tld
new file mode 100644
index 0000000..32542bc
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/ajaxtags.tld
@@ -0,0 +1,1791 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE taglib
+  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+
+<taglib xmlns="http://java.sun.com/JSP/TagLibraryDescriptor">
+	<tlib-version>1.1</tlib-version>
+	<jsp-version>1.2</jsp-version>
+	<short-name>Ajax Tag Library</short-name>
+	<uri>http://ajaxtags.org/tags/ajax</uri>
+	<description>Ajax Tag Library</description>
+
+	<tag>
+		<name>editor</name>
+		<tag-class>org.ajaxtags.tags.AjaxEditorTag</tag-class>
+		<description>
+			Builds the JavaScript required to create an in-place editor
+		</description>
+
+		<attribute>
+			<name>baseUrl</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				URL of server-side action or servlet that will receive
+				the text entered in the editor
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>target</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>Id of element that will be edited</description>
+		</attribute>
+
+		<attribute>
+			<name>preFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A function that will get executed just before the
+				request is sent to the server, should return the
+				parameters to be sent in the URL. Will get two
+				parameters, the entire form and the value of the text
+				control. By default: function(form)
+				{Form.serialize(form)}
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>postFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute after Ajax is finished, allowing for
+				a chain of additional functions to execute
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>errorFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute if there is a server exception
+				(non-200 HTTP response)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>savingText</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The text shown while the text is sent to the server
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>mouseOverText</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The text shown during mouseover the editable text
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>styleId</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>The id given to the element</description>
+		</attribute>
+
+		<attribute>
+			<name>rows</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The row height of the input field (anything greater than
+				1 uses a multiline textarea for input)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>columns</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The number of columns the text area should span (works
+				for both single line or multi line)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>highlightcolor</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>The highlight color</description>
+		</attribute>
+	</tag>
+
+	<tag>
+		<name>select</name>
+		<tag-class>org.ajaxtags.tags.AjaxSelectTag</tag-class>
+		<description>
+			Builds the JavaScript required to populate a select box
+			based on some event
+		</description>
+
+
+
+		<attribute>
+			<name>emptyOptionValue</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				the value for the option when select target is not filled by ajax response
+				default EMPTY 
+			</description>
+		</attribute>
+		<attribute>
+			<name>emptyOptionName</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+			the display text for the option when select target is not filled by ajax response
+				default EMPTY	</description>
+		</attribute>
+	
+		<attribute>
+			<name>doPost</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				set methodtype to post if true else false
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>var</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object created
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>attachTo</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object to which select box will
+				attach. You must define 'var' for this to work.
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>baseUrl</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				URL of server-side action or servlet that processes
+				search and returns list of values used in target select
+				field
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>source</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The initial select field that will form the basis for
+				the search via AJAX
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>target</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Select field where value of AJAX search will be
+				populated
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parameters</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A comma-separated list of parameters to pass to the
+				server-side action or servlet
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>eventType</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Specifies the event type to attach to the source
+				field(s)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>executeOnLoad</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Indicates whether the target select/dropdown should be
+				populated when the object is initialized (this is
+				essentially when the form loads) [default=false]
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>defaultOptions</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A comma-seperated list of values of options to be marked
+				as selected by default if they exist in the new set of
+				options
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>preFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute before Ajax is begun
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>postFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute after Ajax is finished, allowing for
+				a chain of additional functions to execute
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>errorFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute if there is a server exception
+				(non-200 HTTP response)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parser</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The response parser to implement
+				[default=ResponseHtmlParser]
+			</description>
+		</attribute>
+	</tag>
+
+	<tag>
+		<name>autocomplete</name>
+		<tag-class>org.ajaxtags.tags.AjaxAutocompleteTag</tag-class>
+		<description>
+			Builds the JavaScript required to populate an input field as
+			the user types
+		</description>
+
+		<attribute>
+			<name>var</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object created
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>attachTo</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object to which autocompleter
+				will attach. You must define 'var' for this to work.
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>baseUrl</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				URL of server-side action or servlet that processes
+				search and returns list of values used in autocomplete
+				dropdown
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>source</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Text field where label of autocomplete selection will be
+				populated; also the field in which the user types out
+				the search string
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>target</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Text field where value of autocomplete selection will be
+				populated; you may set this to the same value as the
+				source field
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parameters</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A comma-separated list of parameters to pass to the
+				server-side action or servlet
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>className</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS class name to apply to the popup autocomplete
+				dropdown
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>minimumCharacters</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Minimum number of characters needed before autocomplete
+				is executed
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>indicator</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				ID of indicator region that will show during Ajax
+				request call
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>appendSeparator</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The separator to use for the target field when values
+				are appended [default=space]. If appendValue is not set
+				or is set to "false", this parameter has no effect.
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>preFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute before Ajax is begun
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>postFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute after Ajax is finished, allowing for
+				a chain of additional functions to execute
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>errorFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute if there is a server exception
+				(non-200 HTTP response)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parser</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The response parser to implement
+				[default=ResponseHtmlParser]
+			</description>
+		</attribute>
+	</tag>
+
+	<tag>
+		<name>toggle</name>
+		<tag-class>org.ajaxtags.tags.AjaxToggleTag</tag-class>
+		<description>
+			Builds the JavaScript required to toggle an image on/off
+		</description>
+
+		<attribute>
+			<name>updateFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>handle the response from server</description>
+		</attribute>
+		<attribute>
+			<name>var</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object created
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>attachTo</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object to which toggle will
+				attach. You must define 'var' for this to work.
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>baseUrl</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				URL of server-side action or servlet that processes a
+				simple command from a toggle action; responds with a
+				single option value and label
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parameters</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A comma-separated list of parameters to pass to the
+				server-side action or servlet
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>source</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>A unique ID for each toggle tag</description>
+		</attribute>
+
+		<attribute>
+			<name>ratings</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Comma-delimited list of rating values
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>defaultRating</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The default rating to use from the 'ratings' list
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>state</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				ID of hidden form field used to hold the current state
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>onOff</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Whether this is a simple on/off (two-value) rating
+				[default=false]
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>containerClass</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS style class for the container wrapping the toggle
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>messageClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS style class for the message displayed as you
+				mouseover each toggle image
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>selectedClass</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS style class for the rating that's selected
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>selectedLessClass</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS style class for the rating that is less than the
+				selected one as you mouseover
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>selectedOverClass</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS style class for the rating that is greater than the
+				selected one as you mouseover
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>overClass</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS style class for the rating that is greater than the
+				selected one
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>preFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute before Ajax is begun
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>postFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute after Ajax is finished, allowing for
+				a chain of additional functions to execute
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>errorFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute if there is a server exception
+				(non-200 HTTP response)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parser</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The response parser to implement
+				[default=ResponseTextParser]
+			</description>
+		</attribute>
+	</tag>
+
+	<tag>
+		<name>updateField</name>
+		<tag-class>org.ajaxtags.tags.AjaxFormFieldTag</tag-class>
+		<description>
+			Builds the JavaScript required to update one or more form
+			fields based on the value of another single field
+		</description>
+
+		<attribute>
+			<name>valueUpdateByName</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				update responsevalues by matching the name
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>doPost</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				set methodtype to post if true else false
+			</description>
+		</attribute>
+		<attribute>
+			<name>var</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object created
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>attachTo</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object to which updateField will
+				attach. You must define 'var' for this to work.
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>baseUrl</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				URL of server-side action or servlet that processes a
+				simple command
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>source</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The form field that will hold the parameter passed to
+				the servlet
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>target</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A comma-delimited list of form field IDs that will be
+				populated with results
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>action</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				ID of form button or image tag that will fire the
+				onclick event
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parameters</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A comma-separated list of parameters to pass to the
+				server-side action or servlet
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>eventType</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Specifies the event type to attach to the source
+				field(s)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>preFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute before Ajax is begun
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>postFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute after Ajax is finished, allowing for
+				a chain of additional functions to execute
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>errorFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute if there is a server exception
+				(non-200 HTTP response)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parser</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The response parser to implement
+				[default=ResponseHtmlParser]
+			</description>
+		</attribute>
+	</tag>
+
+	<tag>
+		<name>callout</name>
+		<tag-class>org.ajaxtags.tags.AjaxCalloutTag</tag-class>
+		<description>
+			Builds the JavaScript required to hook a callout or popup
+			balloon to a link, image, or other HTML element's onclick
+			event
+		</description>
+
+		<attribute>
+			<name>doPost</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				set methodtype to post if true else false
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>var</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object created
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>attachTo</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object to which callout will
+				attach. You must define 'var' for this to work.
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>baseUrl</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				URL of server-side action or servlet that processes a
+				simple command
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>source</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The ID of the element to which the callout will be
+				attached
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>sourceClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The CSS class name of the elements to which the callout
+				will be attached
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parameters</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A comma-separated list of parameters to pass to the
+				server-side action or servlet
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>title</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>Title for callout's box header.</description>
+		</attribute>
+
+		<attribute>
+			<name>overlib</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>Options for OverLib.</description>
+		</attribute>
+
+		<attribute>
+			<name>preFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute before Ajax is begun
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>postFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute after Ajax is finished, allowing for
+				a chain of additional functions to execute
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>errorFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute if there is a server exception
+				(non-200 HTTP response)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>openEventType</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Event that will trigger the callout
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>closeEventType</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>Event that will close the box</description>
+		</attribute>
+	</tag>
+
+	<tag>
+		<name>htmlContent</name>
+		<tag-class>org.ajaxtags.tags.AjaxHtmlContentTag</tag-class>
+		<description>
+			Builds the JavaScript required to hook a content area (e.g.,
+			DIV tag) to a link, image, or other HTML element's onclick
+			event
+		</description>
+
+	
+		<attribute>
+			<name>postFunctionParameter</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				postFunction parameters eval(STRING)
+			</description>
+		</attribute>
+		<attribute>
+			<name>errorFunctionParameter</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				errorFunctionParameter
+			</description>
+		</attribute>
+		<attribute>
+			<name>preFunctionParameter</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				preFunctionParameter
+			</description>
+		</attribute>
+	
+
+
+		<attribute>
+			<name>doPost</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				set methodtype to post if true else false
+			</description>
+		</attribute>
+
+
+		<attribute>
+			<name>var</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object created
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>attachTo</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object to which htmlContent will
+				attach. You must define 'var' for this to work.
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>baseUrl</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				URL of server-side action or servlet that processes a
+				simple command
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>source</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The ID of the element to which the event will be
+				attached
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>sourceClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The CSS class name of the elements to which the event
+				will be attached
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parameters</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A comma-separated list of parameters to pass to the
+				server-side action or servlet
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>target</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				ID of DIV tag or other element that will be filled with
+				the response's HTML
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>eventType</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Specifies the event type to attach to the source
+				field(s)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>preFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute before Ajax is begun
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>postFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute after Ajax is finished, allowing for
+				a chain of additional functions to execute
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>errorFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute if there is a server exception
+				(non-200 HTTP response)
+			</description>
+		</attribute>
+	</tag>
+
+	<tag>
+		<name>tree</name>
+		<tag-class>org.ajaxtags.tags.AjaxTreeTag</tag-class>
+		<description>TODO</description>
+
+		<attribute>
+			<name>styleId</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>The ID of the tree</description>
+		</attribute>
+
+		<attribute>
+			<name>preFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute before Ajax is called
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>postFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute after Ajax is finished, allowing for
+				a chain of additional functions to execute
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>errorFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute if there is a server exception
+				(non-200 HTTP response)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parser</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The response parser to implement
+				[default=ResponseXmlToHtmlLinkListParser]
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>baseUrl</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The URL to use for the AJAX action, which will return
+				content for this node
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>collapsedClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS style class for the node image(when collapsed)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>expandedClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS style class for the node image(when expanded)
+			</description>
+		</attribute>
+
+
+		<attribute>
+			<name>treeClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS style class for the unsorted list
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>nodeClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS style class for the node(does not include the image)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parameters</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A comma-separated list of parameters to pass to the
+				server-side action or servlet
+			</description>
+		</attribute>
+
+	</tag>
+
+	<tag>
+		<name>tabPanel</name>
+		<tag-class>org.ajaxtags.tags.AjaxTabPanelTag</tag-class>
+		<description>TODO</description>
+
+		<attribute>
+			<name>var</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object created
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>attachTo</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object to which tabPanel will
+				attach. You must define 'var' for this to work.
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>panelStyleId</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>The ID of the tab panel</description>
+		</attribute>
+
+		<attribute>
+			<name>contentStyleId</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>The ID of the tab panel content</description>
+		</attribute>
+
+		<attribute>
+			<name>panelStyleClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The CSS classname of the tab panel
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>contentStyleClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The CSS classname of the tab panel content
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>currentStyleClass</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The CSS classname to use for the active tab
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>preFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute before Ajax is called
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>postFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute after Ajax is finished, allowing for
+				a chain of additional functions to execute
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>errorFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute if there is a server exception
+				(non-200 HTTP response)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parser</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The response parser to implement
+				[default=ResponseHtmlParser]
+			</description>
+		</attribute>
+	</tag>
+
+	<tag>
+		<name>tab</name>
+		<tag-class>org.ajaxtags.tags.AjaxTabPageTag</tag-class>
+		<description>TODO</description>
+
+		<attribute>
+			<name>baseUrl</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The URL to use for the AJAX action, which will return
+				content for this tab
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parameters</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A comma-separated list of parameters to pass to the
+				server-side action or servlet
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>caption</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>The caption for this tab</description>
+		</attribute>
+
+		<attribute>
+			<name>defaultTab</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Indicates whether this tab is the initial one loaded
+				[true|false]
+			</description>
+		</attribute>
+	</tag>
+
+	<tag>
+		<name>portlet</name>
+		<tag-class>org.ajaxtags.tags.AjaxPortletTag</tag-class>
+		<description>
+			Builds the JavaScript required to build a portlet style view
+		</description>
+
+		<attribute>
+			<name>withBar</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>To start the Portlet with bar. default is true </description>
+		</attribute>
+
+		<attribute>
+			<name>startMinimize</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>To start the Portlet minimized</description>
+		</attribute>
+
+
+		<attribute>
+			<name>var</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object created
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>attachTo</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of the JavaScript object to which portlet will
+				attach. You must define 'var' for this to work.
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>baseUrl</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				URL of server-side action or servlet that processes a
+				simple command
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>source</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>The ID of the portlet</description>
+		</attribute>
+
+		<attribute>
+			<name>parameters</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A comma-separated list of parameters to pass to the
+				server-side action or servlet
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>classNamePrefix</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS class name prefix to use for the portlet's 'Box',
+				'Tools', 'Refresh', 'Size', 'Close', 'Title', and
+				'Content' elements
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>title</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>Title for portlet header</description>
+		</attribute>
+
+		<attribute>
+			<name>imageClose</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>Image used for the close icon</description>
+		</attribute>
+
+		<attribute>
+			<name>imageMaximize</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>Image used for the maximize icon</description>
+		</attribute>
+
+		<attribute>
+			<name>imageMinimize</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>Image used for the minimize icon</description>
+		</attribute>
+
+		<attribute>
+			<name>imageRefresh</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>Image used for the refresh icon</description>
+		</attribute>
+
+		<attribute>
+			<name>refreshPeriod</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The time (in seconds) the portlet waits before
+				automatically refreshing its content. If no period is
+				specified, the portlet will not refresh itself
+				automatically, but must be commanded to do so by
+				clicking the refresh image/link (if one is defined).
+				Lastly, the refresh will not occur until after the first
+				time the content is loaded, so if executeOnLoad is set
+				to false, the refresh will not begin until you manually
+				refresh the first time.
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>executeOnLoad</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Indicates whether the portlet's content should be
+				retrieved when the page loads [default=true]
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>expireDays</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Number of days cookie should persist
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>expireHours</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Number of hours cookie should persist
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>expireMinutes</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Number of minutes cookie should persist
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>preFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute before Ajax is begun
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>postFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute after Ajax is finished, allowing for
+				a chain of additional functions to execute
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>errorFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute if there is a server exception
+				(non-200 HTTP response)
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parser</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The response parser to implement
+				[default=ResponseHtmlParser]
+			</description>
+		</attribute>
+	</tag>
+
+	<tag>
+		<name>area</name>
+		<tag-class>org.ajaxtags.tags.AjaxAreaTag</tag-class>
+		<description>
+			Builds the JavaScript required to wrap an area on the page
+			with AJAX capabilities.
+		</description>
+
+		<attribute>
+			<name>id</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of ID used for enclosing DIV tag written by tag
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>ajaxFlag</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A true/false flag to indicate whether the rest of the
+				page should be ignored in an AJAX call [default=false]
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>style</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>Inline CSS style properties</description>
+		</attribute>
+
+		<attribute>
+			<name>styleClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>CSS class name to use</description>
+		</attribute>
+
+		<attribute>
+			<name>ajaxAnchors</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Whether to rewrite HTML anchor tags with an onclick
+				event
+			</description>
+		</attribute>
+	</tag>
+
+	<tag>
+		<name>displayTag</name>
+		<tag-class>org.ajaxtags.tags.AjaxDisplayTag</tag-class>
+		<description>
+			Builds the JavaScript required to wrap a DisplayTag with
+			AJAX capability.
+		</description>
+
+		<attribute>
+			<name>id</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Name of ID used for enclosing DIV tag written by tag
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>ajaxFlag</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A true/false flag to indicate whether the rest of the
+				page should be ignored in an AJAX call [default=false]
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>style</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>Inline CSS style properties</description>
+		</attribute>
+
+		<attribute>
+			<name>styleClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>CSS class name to use</description>
+		</attribute>
+
+		<attribute>
+			<name>pagelinksClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS class name of the DisplayTag's navigation links,
+				often named "pagelinks" by default in DisplayTag
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>tableClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				CSS class name of the DisplayTag's table
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>columnClass</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The CSS class of the TD within the THEAD of the table
+				that should have its HREFs rewritten.
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>baseUrl</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				URL of server-side page where DisplayTable is created.
+				Useful in a Struts/Tiles environment where several JSPs
+				are combined in a response and you need just the single
+				JSP for the DisplayTable.
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>preFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute befor Ajax is started 
+			</description>
+		</attribute>
+		<attribute>
+			<name>postFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				Function to execute after Ajax is finished, allowing for
+				a chain of additional functions to execute
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>parameters</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A comma-separated list of parameters to pass to the
+				server-side action or servlet
+			</description>
+		</attribute>
+	</tag>
+
+	<tag>
+		<name>anchors</name>
+		<tag-class>org.ajaxtags.tags.AjaxAnchorsTag</tag-class>
+		<description>
+			Builds the JavaScript required to rewrite HTML anchor tags
+			with onclick events to enable AJAX capabilities.
+		</description>
+
+		<attribute>
+			<name>target</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				The target region on the page where the AJAX response
+				will be written, often a DIV tag
+			</description>
+		</attribute>
+
+		<attribute>
+			<name>ajaxFlag</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>
+				A true/false flag to indicate whether the rest of the
+				page should be ignored in an AJAX call [default=false]
+			</description>
+		</attribute>
+	</tag>
+
+
+	<tag>
+		<name>callback</name>
+		<tag-class>org.ajaxtags.tags.AjaxServerCallback</tag-class>
+		<description>
+			Builds the JavaScript required to let the server update the
+			site
+		</description>
+
+		<attribute>
+			<name>parser</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>The parser vor XML response</description>
+		</attribute>
+
+		<attribute>
+			<name>url</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>The url which update the site</description>
+		</attribute>
+
+
+		<attribute>
+			<name>errorFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>The errorFunction</description>
+		</attribute>
+
+		<attribute>
+			<name>postFunction</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>The postFunction</description>
+		</attribute>
+
+		<attribute>
+			<name>preFunction</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>The preFunction</description>
+		</attribute>
+
+		<attribute>
+			<name>plainText</name>
+			<required>false</required>
+			<rtexprvalue>true</rtexprvalue>
+			<description>is the update html or plainText</description>
+		</attribute>
+		 
+	</tag>
+
+
+
+
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/c-1_0-rt.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/c-1_0-rt.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/c-1_0-rt.tld
new file mode 100644
index 0000000..2203657
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/c-1_0-rt.tld
@@ -0,0 +1,393 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+  <tlib-version>1.0</tlib-version>
+  <jsp-version>1.2</jsp-version>
+  <short-name>c_rt</short-name>
+  <uri>http://java.sun.com/jstl/core_rt</uri>
+  <display-name>JSTL core RT</display-name>
+  <description>JSTL 1.0 core library</description>
+
+  <validator>
+    <validator-class>
+        org.apache.taglibs.standard.tlv.JstlCoreTLV
+    </validator-class>
+    <description>
+        Provides core validation features for JSTL tags.
+    </description>
+  </validator>
+
+  <tag>
+    <name>catch</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Catches any Throwable that occurs in its body and optionally
+        exposes it.
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>choose</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Simple conditional tag that establishes a context for
+	mutually exclusive conditional operations, marked by
+	&lt;when&gt; and &lt;otherwise&gt;
+    </description>
+  </tag>
+
+  <tag>
+    <name>if</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.IfTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Simple conditional tag, which evalutes its body if the
+	supplied condition is true and optionally exposes a Boolean
+	scripting variable representing the evaluation of this condition
+    </description>
+    <attribute>
+        <name>test</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+	<type>boolean</type>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>import</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class>
+    <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
+    <body-content>JSP</body-content>
+    <description>
+        Retrieves an absolute or relative URL and exposes its contents
+        to either the page, a String in 'var', or a Reader in 'varReader'.
+    </description>
+    <attribute>
+        <name>url</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>varReader</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>context</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>charEncoding</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>forEach</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class>
+    <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
+    <body-content>JSP</body-content>
+    <description>
+	The basic iteration tag, accepting many different
+        collection types and supporting subsetting and other
+        functionality
+    </description>
+    <attribute>
+	<name>items</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>java.lang.Object</type>
+    </attribute>
+    <attribute>
+	<name>begin</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+	<name>end</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+	<name>step</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+	<name>var</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>varStatus</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>forTokens</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.ForTokensTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Iterates over tokens, separated by the supplied delimeters
+    </description>
+    <attribute>
+	<name>items</name>
+	<required>true</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>java.lang.String</type>
+    </attribute>
+    <attribute>
+	<name>delims</name>
+	<required>true</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>java.lang.String</type>
+    </attribute>
+    <attribute>
+	<name>begin</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+	<name>end</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+	<name>step</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+	<name>var</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>varStatus</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>out</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Like &lt;%= ... &gt;, but for expressions.
+    </description> 
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>default</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>escapeXml</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+
+  <tag>
+    <name>otherwise</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Subtag of &lt;choose&gt; that follows &lt;when&gt; tags
+        and runs only if all of the prior conditions evaluated to
+        'false'
+    </description>
+  </tag>
+
+  <tag>
+    <name>param</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.ParamTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Adds a parameter to a containing 'import' tag's URL.
+    </description>
+    <attribute>
+        <name>name</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>redirect</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.RedirectTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Redirects to a new URL.
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>url</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>context</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>remove</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Removes a scoped variable (from a particular scope, if specified).
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+ <tag>
+    <name>set</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.SetTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Sets the result of an expression evaluation in a 'scope'
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>target</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>property</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>url</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Creates a URL with optional query parameters.
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>context</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>when</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.WhenTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Subtag of &lt;choose&gt; that includes its body if its
+	condition evalutes to 'true'
+    </description>
+    <attribute>
+        <name>test</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+	<type>boolean</type>
+    </attribute>
+  </tag>
+
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/c-1_0.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/c-1_0.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/c-1_0.tld
new file mode 100644
index 0000000..ce80e8d
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/c-1_0.tld
@@ -0,0 +1,416 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+  <tlib-version>1.0</tlib-version>
+  <jsp-version>1.2</jsp-version>
+  <short-name>c</short-name>
+  <uri>http://java.sun.com/jstl/core</uri>
+  <display-name>JSTL core</display-name>
+  <description>JSTL 1.0 core library</description>
+
+  <validator>
+    <validator-class>
+	org.apache.taglibs.standard.tlv.JstlCoreTLV
+    </validator-class>
+    <init-param>
+	<param-name>expressionAttributes</param-name>
+	<param-value>
+	    out:value
+	    out:default
+	    out:escapeXml
+	    if:test
+	    import:url
+	    import:context
+	    import:charEncoding
+	    forEach:items
+	    forEach:begin
+	    forEach:end
+	    forEach:step
+	    forTokens:items
+	    forTokens:begin
+	    forTokens:end
+	    forTokens:step
+	    param:encode
+	    param:name
+	    param:value
+            redirect:context
+            redirect:url
+	    set:property
+	    set:target
+	    set:value
+	    url:context
+	    url:value
+	    when:test
+	</param-value>
+	<description>
+	    Whitespace-separated list of colon-separated token pairs
+	    describing tag:attribute combinations that accept expressions.
+	    The validator uses this information to determine which
+	    attributes need their syntax validated.
+	</description>
+     </init-param>
+  </validator>
+
+  <tag>
+    <name>catch</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Catches any Throwable that occurs in its body and optionally
+        exposes it.
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>choose</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Simple conditional tag that establishes a context for
+        mutually exclusive conditional operations, marked by
+        &lt;when&gt; and &lt;otherwise&gt;
+    </description>
+  </tag>
+
+  <tag>
+    <name>out</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.core.OutTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Like &lt;%= ... &gt;, but for expressions.
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>default</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>escapeXml</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>if</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.core.IfTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Simple conditional tag, which evalutes its body if the
+        supplied condition is true and optionally exposes a Boolean
+        scripting variable representing the evaluation of this condition
+    </description>
+    <attribute>
+        <name>test</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>import</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.core.ImportTag</tag-class>
+    <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
+    <body-content>JSP</body-content>
+    <description>
+	Retrieves an absolute or relative URL and exposes its contents
+	to either the page, a String in 'var', or a Reader in 'varReader'.
+    </description>
+    <attribute>
+        <name>url</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>varReader</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>context</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>charEncoding</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>forEach</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.core.ForEachTag</tag-class>
+    <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
+    <body-content>JSP</body-content>
+    <description>
+	The basic iteration tag, accepting many different
+        collection types and supporting subsetting and other
+        functionality
+    </description>
+    <attribute>
+	<name>items</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>begin</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>end</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>step</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>var</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>varStatus</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>forTokens</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.core.ForTokensTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Iterates over tokens, separated by the supplied delimeters
+    </description>
+    <attribute>
+	<name>items</name>
+	<required>true</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>delims</name>
+	<required>true</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>begin</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>end</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>step</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>var</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>varStatus</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>otherwise</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Subtag of &lt;choose&gt; that follows &lt;when&gt; tags
+	and runs only if all of the prior conditions evaluated to
+	'false'
+    </description>
+  </tag>
+
+  <tag>
+    <name>param</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.core.ParamTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Adds a parameter to a containing 'import' tag's URL.
+    </description>
+    <attribute>
+        <name>name</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>redirect</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.core.RedirectTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Redirects to a new URL.
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>url</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>context</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>remove</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+	Removes a scoped variable (from a particular scope, if specified).
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>set</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.core.SetTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Sets the result of an expression evaluation in a 'scope'
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>target</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>property</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>url</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.core.UrlTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Prints or exposes a URL with optional query parameters
+        (via the c:param tag).
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>context</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>when</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.core.WhenTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Subtag of &lt;choose&gt; that includes its body if its
+        condition evalutes to 'true'
+    </description>
+    <attribute>
+        <name>test</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/c.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/c.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/c.tld
new file mode 100644
index 0000000..9ede99f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/c.tld
@@ -0,0 +1,572 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+    version="2.1">
+    
+  <description>JSTL 1.2 core library</description>
+  <display-name>JSTL core</display-name>
+   <tlib-version>1.2</tlib-version>
+  <short-name>c</short-name>
+  <uri>http://java.sun.com/jsp/jstl/core</uri>
+
+  <validator>
+    <description>
+        Provides core validation features for JSTL tags.
+    </description>
+    <validator-class>
+        org.apache.taglibs.standard.tlv.JstlCoreTLV
+    </validator-class>
+  </validator>
+
+  <tag>
+    <description>
+        Catches any Throwable that occurs in its body and optionally
+        exposes it.
+    </description>
+    <name>catch</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+exception thrown from a nested action. The type of the
+scoped variable is the type of the exception thrown.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+	Simple conditional tag that establishes a context for
+	mutually exclusive conditional operations, marked by
+	&lt;when&gt; and &lt;otherwise&gt;
+    </description>
+    <name>choose</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
+    <body-content>JSP</body-content>
+  </tag>
+
+  <tag>
+    <description>
+	Simple conditional tag, which evalutes its body if the
+	supplied condition is true and optionally exposes a Boolean
+	scripting variable representing the evaluation of this condition
+    </description>
+    <name>if</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.IfTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+The test condition that determines whether or
+not the body content should be processed.
+        </description>
+        <name>test</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+	<type>boolean</type>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+resulting value of the test condition. The type
+of the scoped variable is Boolean.        
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope for var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Retrieves an absolute or relative URL and exposes its contents
+        to either the page, a String in 'var', or a Reader in 'varReader'.
+    </description>
+    <name>import</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class>
+    <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+The URL of the resource to import.
+        </description>
+        <name>url</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+resource's content. The type of the scoped
+variable is String.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope for var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+resource's content. The type of the scoped
+variable is Reader.
+        </description>
+        <name>varReader</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the context when accessing a relative
+URL resource that belongs to a foreign
+context.
+        </description>
+        <name>context</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Character encoding of the content at the input
+resource.
+        </description>
+        <name>charEncoding</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+	The basic iteration tag, accepting many different
+        collection types and supporting subsetting and other
+        functionality
+    </description>
+    <name>forEach</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class>
+    <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Collection of items to iterate over.
+        </description>
+	<name>items</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>java.lang.Object</type>
+	<deferred-value>
+           <type>java.lang.Object</type>
+        </deferred-value>
+    </attribute>
+    <attribute>
+        <description>
+If items specified:
+Iteration begins at the item located at the
+specified index. First item of the collection has
+index 0.
+If items not specified:
+Iteration begins with index set at the value
+specified.
+        </description>
+	<name>begin</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+        <description>
+If items specified:
+Iteration ends at the item located at the
+specified index (inclusive).
+If items not specified:
+Iteration ends when index reaches the value
+specified.
+        </description>
+	<name>end</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+        <description>
+Iteration will only process every step items of
+the collection, starting with the first one.
+        </description>
+	<name>step</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+current item of the iteration. This scoped
+variable has nested visibility. Its type depends
+on the object of the underlying collection.
+        </description>
+	<name>var</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+status of the iteration. Object exported is of type
+javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested
+visibility.
+        </description>
+	<name>varStatus</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+	Iterates over tokens, separated by the supplied delimeters
+    </description>
+    <name>forTokens</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.ForTokensTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+String of tokens to iterate over.
+        </description>
+	<name>items</name>
+	<required>true</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>java.lang.String</type>
+	<deferred-value>
+           <type>java.lang.String</type>
+        </deferred-value>
+    </attribute>
+    <attribute>
+        <description>
+The set of delimiters (the characters that
+separate the tokens in the string).
+        </description>
+	<name>delims</name>
+	<required>true</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>java.lang.String</type>
+    </attribute>
+    <attribute>
+        <description>
+Iteration begins at the token located at the
+specified index. First token has index 0.
+        </description>
+	<name>begin</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+        <description>
+Iteration ends at the token located at the
+specified index (inclusive).
+        </description>
+	<name>end</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+        <description>
+Iteration will only process every step tokens
+of the string, starting with the first one.
+        </description>
+	<name>step</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+current item of the iteration. This scoped
+variable has nested visibility.
+        </description>
+	<name>var</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+status of the iteration. Object exported is of
+type
+javax.servlet.jsp.jstl.core.LoopTag
+Status. This scoped variable has nested
+visibility.
+        </description>
+	<name>varStatus</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Like &lt;%= ... &gt;, but for expressions.
+    </description> 
+    <name>out</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Expression to be evaluated.
+        </description>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Default value if the resulting value is null.
+        </description>
+        <name>default</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Determines whether characters &lt;,&gt;,&amp;,'," in the
+resulting string should be converted to their
+corresponding character entity codes. Default value is
+true.
+        </description>
+        <name>escapeXml</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+
+  <tag>
+    <description>
+        Subtag of &lt;choose&gt; that follows &lt;when&gt; tags
+        and runs only if all of the prior conditions evaluated to
+        'false'
+    </description>
+    <name>otherwise</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
+    <body-content>JSP</body-content>
+  </tag>
+
+  <tag>
+    <description>
+        Adds a parameter to a containing 'import' tag's URL.
+    </description>
+    <name>param</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.ParamTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Name of the query string parameter.
+        </description>
+        <name>name</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Value of the parameter.
+        </description>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Redirects to a new URL.
+    </description>
+    <name>redirect</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.RedirectTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+The URL of the resource to redirect to.
+        </description>
+        <name>url</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the context when redirecting to a relative URL
+resource that belongs to a foreign context.
+        </description>
+        <name>context</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Removes a scoped variable (from a particular scope, if specified).
+    </description>
+    <name>remove</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
+    <body-content>empty</body-content>
+    <attribute>
+        <description>
+Name of the scoped variable to be removed.
+        </description>
+        <name>var</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope for var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+ <tag>
+    <description>
+        Sets the result of an expression evaluation in a 'scope'
+    </description>
+    <name>set</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.SetTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Name of the exported scoped variable to hold the value
+specified in the action. The type of the scoped variable is
+whatever type the value expression evaluates to.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Expression to be evaluated.
+        </description>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+	<deferred-value>
+           <type>java.lang.Object</type>
+        </deferred-value>
+    </attribute>
+    <attribute>
+        <description>
+Target object whose property will be set. Must evaluate to
+a JavaBeans object with setter property property, or to a
+java.util.Map object.
+        </description>
+        <name>target</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the property to be set in the target object.
+        </description>
+        <name>property</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope for var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Creates a URL with optional query parameters.
+    </description>
+    <name>url</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+processed url. The type of the scoped variable is
+String.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope for var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+URL to be processed.
+        </description>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the context when specifying a relative URL
+resource that belongs to a foreign context.
+        </description>
+        <name>context</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+	Subtag of &lt;choose&gt; that includes its body if its
+	condition evalutes to 'true'
+    </description>
+    <name>when</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.core.WhenTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+The test condition that determines whether or not the
+body content should be processed.
+        </description>
+        <name>test</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+	<type>boolean</type>
+    </attribute>
+  </tag>
+
+</taglib>


[08/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shCore.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shCore.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shCore.js
new file mode 100644
index 0000000..1418632
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/highlighter/js/shCore.js
@@ -0,0 +1,161 @@
+/*
+ * JsMin
+ * Javascript Compressor
+ * http://www.crockford.com/
+ * http://www.smallsharptools.com/
+*/
+
+var dp={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Strings:{AboutDialog:'<html><head><title>About...</title></head><body class="dp-about"><table cellspacing="0"><tr><td class="copy"><p class="title">dp.SyntaxHighlighter</div><div class="para">Version: {V}</p><p><a href="http://www.dreamprojections.com/syntaxhighlighter/?ref=about" target="_blank">http://www.dreamprojections.com/syntaxhighlighter</a></p>&copy;2004-2007 Alex Gorbatchev.</td></tr><tr><td class="footer"><input type="button" class="close" value="OK" onClick="window.close()"/></td></tr></table></body></html>'},ClipboardSwf:null,Version:'1.5.1'}};dp.SyntaxHighlighter=dp.sh;dp.sh.Toolbar.Commands={ExpandSource:{label:'+ expand source',check:function(highlighter){return highlighter.collapse;},func:function(sender,highlighter)
+{sender.parentNode.removeChild(sender);highlighter.div.className=highlighter.div.className.replace('collapsed','');}},ViewSource:{label:'view plain',func:function(sender,highlighter)
+{var code=dp.sh.Utils.FixForBlogger(highlighter.originalCode).replace(/</g,'&lt;');var wnd=window.open('','_blank','width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=0');wnd.document.write('<textarea style="width:99%;height:99%">'+code+'</textarea>');wnd.document.close();}},CopyToClipboard:{label:'copy to clipboard',check:function(){return window.clipboardData!=null||dp.sh.ClipboardSwf!=null;},func:function(sender,highlighter)
+{var code=dp.sh.Utils.FixForBlogger(highlighter.originalCode).replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');if(window.clipboardData)
+{window.clipboardData.setData('text',code);}
+else if(dp.sh.ClipboardSwf!=null)
+{var flashcopier=highlighter.flashCopier;if(flashcopier==null)
+{flashcopier=document.createElement('div');highlighter.flashCopier=flashcopier;highlighter.div.appendChild(flashcopier);}
+flashcopier.innerHTML='<embed src="'+dp.sh.ClipboardSwf+'" FlashVars="clipboard='+encodeURIComponent(code)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';}
+alert('The code is in your clipboard now');}},PrintSource:{label:'print',func:function(sender,highlighter)
+{var iframe=document.createElement('IFRAME');var doc=null;iframe.style.cssText='position:absolute;width:0px;height:0px;left:-500px;top:-500px;';document.body.appendChild(iframe);doc=iframe.contentWindow.document;dp.sh.Utils.CopyStyles(doc,window.document);doc.write('<div class="'+highlighter.div.className.replace('collapsed','')+' printing">'+highlighter.div.innerHTML+'</div>');doc.close();iframe.contentWindow.focus();iframe.contentWindow.print();alert('Printing...');document.body.removeChild(iframe);}},About:{label:'?',func:function(highlighter)
+{var wnd=window.open('','_blank','dialog,width=300,height=150,scrollbars=0');var doc=wnd.document;dp.sh.Utils.CopyStyles(doc,window.document);doc.write(dp.sh.Strings.AboutDialog.replace('{V}',dp.sh.Version));doc.close();wnd.focus();}}};dp.sh.Toolbar.Create=function(highlighter)
+{var div=document.createElement('DIV');div.className='tools';for(var name in dp.sh.Toolbar.Commands)
+{var cmd=dp.sh.Toolbar.Commands[name];if(cmd.check!=null&&!cmd.check(highlighter))
+continue;div.innerHTML+='<a href="#" onclick="dp.sh.Toolbar.Command(\''+name+'\',this);return false;">'+cmd.label+'</a>';}
+return div;}
+dp.sh.Toolbar.Command=function(name,sender)
+{var n=sender;while(n!=null&&n.className.indexOf('dp-highlighter')==-1)
+n=n.parentNode;if(n!=null)
+dp.sh.Toolbar.Commands[name].func(sender,n.highlighter);}
+dp.sh.Utils.CopyStyles=function(destDoc,sourceDoc)
+{var links=sourceDoc.getElementsByTagName('link');for(var i=0;i<links.length;i++)
+if(links[i].rel.toLowerCase()=='stylesheet')
+destDoc.write('<link type="text/css" rel="stylesheet" href="'+links[i].href+'"></link>');}
+dp.sh.Utils.FixForBlogger=function(str)
+{return(dp.sh.isBloggerMode==true)?str.replace(/<br\s*\/?>|&lt;br\s*\/?&gt;/gi,'\n'):str;}
+dp.sh.RegexLib={MultiLineCComments:new RegExp('/\\*[\\s\\S]*?\\*/','gm'),SingleLineCComments:new RegExp('//.*$','gm'),SingleLinePerlComments:new RegExp('#.*$','gm'),DoubleQuotedString:new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"','g'),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'",'g')};dp.sh.Match=function(value,index,css)
+{this.value=value;this.index=index;this.length=value.length;this.css=css;}
+dp.sh.Highlighter=function()
+{this.noGutter=false;this.addControls=true;this.collapse=false;this.tabsToSpaces=true;this.wrapColumn=80;this.showColumns=true;}
+dp.sh.Highlighter.SortCallback=function(m1,m2)
+{if(m1.index<m2.index)
+return-1;else if(m1.index>m2.index)
+return 1;else
+{if(m1.length<m2.length)
+return-1;else if(m1.length>m2.length)
+return 1;}
+return 0;}
+dp.sh.Highlighter.prototype.CreateElement=function(name)
+{var result=document.createElement(name);result.highlighter=this;return result;}
+dp.sh.Highlighter.prototype.GetMatches=function(regex,css)
+{var index=0;var match=null;while((match=regex.exec(this.code))!=null)
+this.matches[this.matches.length]=new dp.sh.Match(match[0],match.index,css);}
+dp.sh.Highlighter.prototype.AddBit=function(str,css)
+{if(str==null||str.length==0)
+return;var span=this.CreateElement('SPAN');str=str.replace(/ /g,'&nbsp;');str=str.replace(/</g,'&lt;');str=str.replace(/\n/gm,'&nbsp;<br>');if(css!=null)
+{if((/br/gi).test(str))
+{var lines=str.split('&nbsp;<br>');for(var i=0;i<lines.length;i++)
+{span=this.CreateElement('SPAN');span.className=css;span.innerHTML=lines[i];this.div.appendChild(span);if(i+1<lines.length)
+this.div.appendChild(this.CreateElement('BR'));}}
+else
+{span.className=css;span.innerHTML=str;this.div.appendChild(span);}}
+else
+{span.innerHTML=str;this.div.appendChild(span);}}
+dp.sh.Highlighter.prototype.IsInside=function(match)
+{if(match==null||match.length==0)
+return false;for(var i=0;i<this.matches.length;i++)
+{var c=this.matches[i];if(c==null)
+continue;if((match.index>c.index)&&(match.index<c.index+c.length))
+return true;}
+return false;}
+dp.sh.Highlighter.prototype.ProcessRegexList=function()
+{for(var i=0;i<this.regexList.length;i++)
+this.GetMatches(this.regexList[i].regex,this.regexList[i].css);}
+dp.sh.Highlighter.prototype.ProcessSmartTabs=function(code)
+{var lines=code.split('\n');var result='';var tabSize=4;var tab='\t';function InsertSpaces(line,pos,count)
+{var left=line.substr(0,pos);var right=line.substr(pos+1,line.length);var spaces='';for(var i=0;i<count;i++)
+spaces+=' ';return left+spaces+right;}
+function ProcessLine(line,tabSize)
+{if(line.indexOf(tab)==-1)
+return line;var pos=0;while((pos=line.indexOf(tab))!=-1)
+{var spaces=tabSize-pos%tabSize;line=InsertSpaces(line,pos,spaces);}
+return line;}
+for(var i=0;i<lines.length;i++)
+result+=ProcessLine(lines[i],tabSize)+'\n';return result;}
+dp.sh.Highlighter.prototype.SwitchToList=function()
+{var html=this.div.innerHTML.replace(/<(br)\/?>/gi,'\n');var lines=html.split('\n');if(this.addControls==true)
+this.bar.appendChild(dp.sh.Toolbar.Create(this));if(this.showColumns)
+{var div=this.CreateElement('div');var columns=this.CreateElement('div');var showEvery=10;var i=1;while(i<=150)
+{if(i%showEvery==0)
+{div.innerHTML+=i;i+=(i+'').length;}
+else
+{div.innerHTML+='&middot;';i++;}}
+columns.className='columns';columns.appendChild(div);this.bar.appendChild(columns);}
+for(var i=0,lineIndex=this.firstLine;i<lines.length-1;i++,lineIndex++)
+{var li=this.CreateElement('LI');var span=this.CreateElement('SPAN');li.className=(i%2==0)?'alt':'';span.innerHTML=lines[i]+'&nbsp;';li.appendChild(span);this.ol.appendChild(li);}
+this.div.innerHTML='';}
+dp.sh.Highlighter.prototype.Highlight=function(code)
+{function Trim(str)
+{return str.replace(/^\s*(.*?)[\s\n]*$/g,'$1');}
+function Chop(str)
+{return str.replace(/\n*$/,'').replace(/^\n*/,'');}
+function Unindent(str)
+{var lines=dp.sh.Utils.FixForBlogger(str).split('\n');var indents=new Array();var regex=new RegExp('^\\s*','g');var min=1000;for(var i=0;i<lines.length&&min>0;i++)
+{if(Trim(lines[i]).length==0)
+continue;var matches=regex.exec(lines[i]);if(matches!=null&&matches.length>0)
+min=Math.min(matches[0].length,min);}
+if(min>0)
+for(var i=0;i<lines.length;i++)
+lines[i]=lines[i].substr(min);return lines.join('\n');}
+function Copy(string,pos1,pos2)
+{return string.substr(pos1,pos2-pos1);}
+var pos=0;if(code==null)
+code='';this.originalCode=code;this.code=Chop(Unindent(code));this.div=this.CreateElement('DIV');this.bar=this.CreateElement('DIV');this.ol=this.CreateElement('OL');this.matches=new Array();this.div.className='dp-highlighter';this.div.highlighter=this;this.bar.className='bar';this.ol.start=this.firstLine;if(this.CssClass!=null)
+this.ol.className=this.CssClass;if(this.collapse)
+this.div.className+=' collapsed';if(this.noGutter)
+this.div.className+=' nogutter';if(this.tabsToSpaces==true)
+this.code=this.ProcessSmartTabs(this.code);this.ProcessRegexList();if(this.matches.length==0)
+{this.AddBit(this.code,null);this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol);return;}
+this.matches=this.matches.sort(dp.sh.Highlighter.SortCallback);for(var i=0;i<this.matches.length;i++)
+if(this.IsInside(this.matches[i]))
+this.matches[i]=null;for(var i=0;i<this.matches.length;i++)
+{var match=this.matches[i];if(match==null||match.length==0)
+continue;this.AddBit(Copy(this.code,pos,match.index),null);this.AddBit(match.value,match.css);pos=match.index+match.length;}
+this.AddBit(this.code.substr(pos),null);this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol);}
+dp.sh.Highlighter.prototype.GetKeywords=function(str)
+{return'\\b'+str.replace(/ /g,'\\b|\\b')+'\\b';}
+dp.sh.BloggerMode=function()
+{dp.sh.isBloggerMode=true;}
+dp.sh.HighlightAll=function(name,showGutter,showControls,collapseAll,firstLine,showColumns)
+{function FindValue()
+{var a=arguments;for(var i=0;i<a.length;i++)
+{if(a[i]==null)
+continue;if(typeof(a[i])=='string'&&a[i]!='')
+return a[i]+'';if(typeof(a[i])=='object'&&a[i].value!='')
+return a[i].value+'';}
+return null;}
+function IsOptionSet(value,list)
+{for(var i=0;i<list.length;i++)
+if(list[i]==value)
+return true;return false;}
+function GetOptionValue(name,list,defaultValue)
+{var regex=new RegExp('^'+name+'\\[(\\w+)\\]$','gi');var matches=null;for(var i=0;i<list.length;i++)
+if((matches=regex.exec(list[i]))!=null)
+return matches[1];return defaultValue;}
+function FindTagsByName(list,name,tagName)
+{var tags=document.getElementsByTagName(tagName);for(var i=0;i<tags.length;i++)
+if(tags[i].getAttribute('name')==name)
+list.push(tags[i]);}
+var elements=[];var highlighter=null;var registered={};var propertyName='innerHTML';FindTagsByName(elements,name,'pre');FindTagsByName(elements,name,'textarea');if(elements.length==0)
+return;for(var brush in dp.sh.Brushes)
+{var aliases=dp.sh.Brushes[brush].Aliases;if(aliases==null)
+continue;for(var i=0;i<aliases.length;i++)
+registered[aliases[i]]=brush;}
+for(var i=0;i<elements.length;i++)
+{var element=elements[i];var options=FindValue(element.attributes['class'],element.className,element.attributes['language'],element.language);var language='';if(options==null)
+continue;options=options.split(':');language=options[0].toLowerCase();if(registered[language]==null)
+continue;highlighter=new dp.sh.Brushes[registered[language]]();element.style.display='none';highlighter.noGutter=(showGutter==null)?IsOptionSet('nogutter',options):!showGutter;highlighter.addControls=(showControls==null)?!IsOptionSet('nocontrols',options):showControls;highlighter.collapse=(collapseAll==null)?IsOptionSet('collapse',options):collapseAll;highlighter.showColumns=(showColumns==null)?IsOptionSet('showcolumns',options):showColumns;var headNode=document.getElementsByTagName('head')[0];if(highlighter.Style&&headNode)
+{var styleNode=document.createElement('style');styleNode.setAttribute('type','text/css');if(styleNode.styleSheet)
+{styleNode.styleSheet.cssText=highlighter.Style;}
+else
+{var textNode=document.createTextNode(highlighter.Style);styleNode.appendChild(textNode);}
+headNode.appendChild(styleNode);}
+highlighter.firstLine=(firstLine==null)?parseInt(GetOptionValue('firstline',options,1)):firstLine;highlighter.Highlight(element[propertyName]);highlighter.source=element;element.parentNode.insertBefore(highlighter.div,element);}}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/index.html
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/index.html b/dependencies/org.wso2.carbon.ui/src/main/resources/web/index.html
new file mode 100755
index 0000000..256a699
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/index.html
@@ -0,0 +1,89 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+ ~ Copyright (c) 2005-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~    http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied.  See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+    <meta name="generator" content="Adobe GoLive"/>
+    <title>Carbon Home</title>
+    <link href="admin/css/carbon.css" rel="stylesheet" type="text/css" media="all"/>
+    <link href="admin/css/common.css" rel="stylesheet" type="text/css" media="all"/>
+    <script language="javascript" src="global-params.js"></script>
+    <script language="javascript" src="admin/js/prototype-1.6.js"></script>
+    <script language="javascript" src="admin/js/main.js"></script>
+    <script type="text/javascript">
+        function loadUiComponent(relPath) {
+            window.location = "http://" + HOST +
+                   (HTTP_PORT != 80 ? (":" + HTTP_PORT + ROOT_CONTEXT)  : ROOT_CONTEXT) +
+                   "/" + relPath;
+        }
+        function init() {
+            wso2.wsf.Util.initURLs();
+        }
+    </script>
+
+</head>
+
+<body onload="init()">
+<div id="header">
+    <!--<div class="header_links">
+        <ul>
+            <li class="left"><img src="admin/images/top-link-left.gif"/></li>
+            <li>
+                <a href="#" onclick="alert('TODO')">Sign in</a>
+            </li>
+            <li>|</li>
+            <li>
+                <a href="#" onclick="alert('TODO')">Sign up</a>
+            </li>
+            <li>|</li>
+            <li>
+                <a href="#" onclick="alert('TODO')">About</a>
+            </li>
+            <li class="right"><img src="admin/images/top-link-right.gif"/></li>
+        </ul>
+    </div>-->
+    <div class="logo">
+        <a href="index.html"><img src="admin/images/carbon_logo.gif" alt="WSO2 Carbon"/></a>
+    </div>
+</div>
+<div id="left">
+    <ul class="menu">
+        <li class="home"><a href="index.html">Home</a></li>
+        <li><a href="#" onclick="loadUiComponent('../security/index.jsp'); return false;">Security</a></li>
+        <li><a href="#" onclick="loadUiComponent('../userstore/index.jsp'); return false;">User Store</a></li>
+        <li><a href="../ds/index.html">Data Services</a></li>
+        <li class="bottom">&nbsp;</li>
+    </ul>
+</div>
+<div id="middle">
+    <div>
+        <h1>Welcome to Carbon</h1>
+
+        <p>This is the OSGi powered enterprise Axis2 platform brought to you by WSO2 Inc. <br/>
+            Please use the left hand menues to make use of the components available.</p>
+    </div>
+</div>
+<div id="footer">
+    <div class="footer_content">&copy; WSO2 Inc.</div>
+</div>
+</body>
+
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/README
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/README b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/README
new file mode 100644
index 0000000..1139944
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/README
@@ -0,0 +1,71 @@
+Animation Release Notes
+
+*** version 2.6.0 ***
+* ColorAnim updated to use getAncestorBy 
+
+*** version 2.5.2 ***
+* no change
+
+*** version 2.5.1 ***
+* no change
+
+*** version 2.5.0 ***
+* replace toString overrides with static NAME property
+
+*** version 2.4.0 ***
+* calling stop() on an non-animated Anim no longer fires onComplete
+
+*** version 2.3.1 ***
+* no change
+
+*** version 2.3.0 ***
+
+* duration of zero now executes 1 frame animation
+* added setEl() method to enable reuse
+* fixed stop() for multiple animations
+
+*** version 2.3.0 ***
+* duration of zero now executes 1 frame animation
+* added setEl() method to enable reuse
+* fixed stop() for multiple animations
+
+*** version 2.2.2 ***
+* no change
+
+*** version 2.2.1 ***
+* no change
+
+*** version 2.2.0 ***
+* Fixed AnimMgr.stop() when called without tween
+
+*** version 0.12.2 ***
+* raised AnimMgr.fps to 1000
+
+*** version 0.12.1 ***
+* minified version no longer strips line breaks
+
+*** version 0.12.0 ***
+* added boolean finish argument to Anim.stop()
+
+*** version 0.11.3 ***
+* no changes
+
+*** version 0.11.1 ***
+* changed "prototype" shorthand to "proto" (workaround firefox < 1.5 scoping
+bug)
+
+*** version 0.11.0 ***
+* ColorAnim subclass added
+* Motion and Scroll now inherit from ColorAnim
+* getDefaultUnit method added
+* defaultUnit and defaultUnits deprecated
+* getDefault and setDefault methods deprecated
+
+*** version 0.10.0 ***
+* Scroll now handles relative ("by") animation correctly
+* Now converts "auto" values of "from" to appropriate initial values
+
+*** version 0.9.0 ***
+* Initial release
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/animation-debug.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/animation-debug.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/animation-debug.js
new file mode 100644
index 0000000..c85005d
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/animation-debug.js
@@ -0,0 +1,1385 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+(function() {
+
+var Y = YAHOO.util;
+
+/*
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+*/
+
+/**
+ * The animation module provides allows effects to be added to HTMLElements.
+ * @module animation
+ * @requires yahoo, event, dom
+ */
+
+/**
+ *
+ * Base animation class that provides the interface for building animated effects.
+ * <p>Usage: var myAnim = new YAHOO.util.Anim(el, { width: { from: 10, to: 100 } }, 1, YAHOO.util.Easing.easeOut);</p>
+ * @class Anim
+ * @namespace YAHOO.util
+ * @requires YAHOO.util.AnimMgr
+ * @requires YAHOO.util.Easing
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent
+ * @constructor
+ * @param {String | HTMLElement} el Reference to the element that will be animated
+ * @param {Object} attributes The attribute(s) to be animated.  
+ * Each attribute is an object with at minimum a "to" or "by" member defined.  
+ * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").  
+ * All attribute names use camelCase.
+ * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+ * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+ */
+
+var Anim = function(el, attributes, duration, method) {
+    if (!el) {
+        YAHOO.log('element required to create Anim instance', 'error', 'Anim');
+    }
+    this.init(el, attributes, duration, method); 
+};
+
+Anim.NAME = 'Anim';
+
+Anim.prototype = {
+    /**
+     * Provides a readable name for the Anim instance.
+     * @method toString
+     * @return {String}
+     */
+    toString: function() {
+        var el = this.getEl() || {};
+        var id = el.id || el.tagName;
+        return (this.constructor.NAME + ': ' + id);
+    },
+    
+    patterns: { // cached for performance
+        noNegatives:        /width|height|opacity|padding/i, // keep at zero or above
+        offsetAttribute:  /^((width|height)|(top|left))$/, // use offsetValue as default
+        defaultUnit:        /width|height|top$|bottom$|left$|right$/i, // use 'px' by default
+        offsetUnit:         /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i // IE may return these, so convert these to offset
+    },
+    
+    /**
+     * Returns the value computed by the animation's "method".
+     * @method doMethod
+     * @param {String} attr The name of the attribute.
+     * @param {Number} start The value this attribute should start from for this animation.
+     * @param {Number} end  The value this attribute should end at for this animation.
+     * @return {Number} The Value to be applied to the attribute.
+     */
+    doMethod: function(attr, start, end) {
+        return this.method(this.currentFrame, start, end - start, this.totalFrames);
+    },
+    
+    /**
+     * Applies a value to an attribute.
+     * @method setAttribute
+     * @param {String} attr The name of the attribute.
+     * @param {Number} val The value to be applied to the attribute.
+     * @param {String} unit The unit ('px', '%', etc.) of the value.
+     */
+    setAttribute: function(attr, val, unit) {
+        if ( this.patterns.noNegatives.test(attr) ) {
+            val = (val > 0) ? val : 0;
+        }
+
+        Y.Dom.setStyle(this.getEl(), attr, val + unit);
+    },                        
+    
+    /**
+     * Returns current value of the attribute.
+     * @method getAttribute
+     * @param {String} attr The name of the attribute.
+     * @return {Number} val The current value of the attribute.
+     */
+    getAttribute: function(attr) {
+        var el = this.getEl();
+        var val = Y.Dom.getStyle(el, attr);
+
+        if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) {
+            return parseFloat(val);
+        }
+        
+        var a = this.patterns.offsetAttribute.exec(attr) || [];
+        var pos = !!( a[3] ); // top or left
+        var box = !!( a[2] ); // width or height
+        
+        // use offsets for width/height and abs pos top/left
+        if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) {
+            val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)];
+        } else { // default to zero for other 'auto'
+            val = 0;
+        }
+
+        return val;
+    },
+    
+    /**
+     * Returns the unit to use when none is supplied.
+     * @method getDefaultUnit
+     * @param {attr} attr The name of the attribute.
+     * @return {String} The default unit to be used.
+     */
+    getDefaultUnit: function(attr) {
+         if ( this.patterns.defaultUnit.test(attr) ) {
+            return 'px';
+         }
+         
+         return '';
+    },
+        
+    /**
+     * Sets the actual values to be used during the animation.  Should only be needed for subclass use.
+     * @method setRuntimeAttribute
+     * @param {Object} attr The attribute object
+     * @private 
+     */
+    setRuntimeAttribute: function(attr) {
+        var start;
+        var end;
+        var attributes = this.attributes;
+
+        this.runtimeAttributes[attr] = {};
+        
+        var isset = function(prop) {
+            return (typeof prop !== 'undefined');
+        };
+        
+        if ( !isset(attributes[attr]['to']) && !isset(attributes[attr]['by']) ) {
+            return false; // note return; nothing to animate to
+        }
+        
+        start = ( isset(attributes[attr]['from']) ) ? attributes[attr]['from'] : this.getAttribute(attr);
+
+        // To beats by, per SMIL 2.1 spec
+        if ( isset(attributes[attr]['to']) ) {
+            end = attributes[attr]['to'];
+        } else if ( isset(attributes[attr]['by']) ) {
+            if (start.constructor == Array) {
+                end = [];
+                for (var i = 0, len = start.length; i < len; ++i) {
+                    end[i] = start[i] + attributes[attr]['by'][i] * 1; // times 1 to cast "by" 
+                }
+            } else {
+                end = start + attributes[attr]['by'] * 1;
+            }
+        }
+        
+        this.runtimeAttributes[attr].start = start;
+        this.runtimeAttributes[attr].end = end;
+
+        // set units if needed
+        this.runtimeAttributes[attr].unit = ( isset(attributes[attr].unit) ) ?
+                attributes[attr]['unit'] : this.getDefaultUnit(attr);
+        return true;
+    },
+
+    /**
+     * Constructor for Anim instance.
+     * @method init
+     * @param {String | HTMLElement} el Reference to the element that will be animated
+     * @param {Object} attributes The attribute(s) to be animated.  
+     * Each attribute is an object with at minimum a "to" or "by" member defined.  
+     * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").  
+     * All attribute names use camelCase.
+     * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+     * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+     */ 
+    init: function(el, attributes, duration, method) {
+        /**
+         * Whether or not the animation is running.
+         * @property isAnimated
+         * @private
+         * @type Boolean
+         */
+        var isAnimated = false;
+        
+        /**
+         * A Date object that is created when the animation begins.
+         * @property startTime
+         * @private
+         * @type Date
+         */
+        var startTime = null;
+        
+        /**
+         * The number of frames this animation was able to execute.
+         * @property actualFrames
+         * @private
+         * @type Int
+         */
+        var actualFrames = 0; 
+
+        /**
+         * The element to be animated.
+         * @property el
+         * @private
+         * @type HTMLElement
+         */
+        el = Y.Dom.get(el);
+        
+        /**
+         * The collection of attributes to be animated.  
+         * Each attribute must have at least a "to" or "by" defined in order to animate.  
+         * If "to" is supplied, the animation will end with the attribute at that value.  
+         * If "by" is supplied, the animation will end at that value plus its starting value. 
+         * If both are supplied, "to" is used, and "by" is ignored. 
+         * Optional additional member include "from" (the value the attribute should start animating from, defaults to current value), and "unit" (the units to apply to the values).
+         * @property attributes
+         * @type Object
+         */
+        this.attributes = attributes || {};
+        
+        /**
+         * The length of the animation.  Defaults to "1" (second).
+         * @property duration
+         * @type Number
+         */
+        this.duration = !YAHOO.lang.isUndefined(duration) ? duration : 1;
+        
+        /**
+         * The method that will provide values to the attribute(s) during the animation. 
+         * Defaults to "YAHOO.util.Easing.easeNone".
+         * @property method
+         * @type Function
+         */
+        this.method = method || Y.Easing.easeNone;
+
+        /**
+         * Whether or not the duration should be treated as seconds.
+         * Defaults to true.
+         * @property useSeconds
+         * @type Boolean
+         */
+        this.useSeconds = true; // default to seconds
+        
+        /**
+         * The location of the current animation on the timeline.
+         * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time.
+         * @property currentFrame
+         * @type Int
+         */
+        this.currentFrame = 0;
+        
+        /**
+         * The total number of frames to be executed.
+         * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time.
+         * @property totalFrames
+         * @type Int
+         */
+        this.totalFrames = Y.AnimMgr.fps;
+        
+        /**
+         * Changes the animated element
+         * @method setEl
+         */
+        this.setEl = function(element) {
+            el = Y.Dom.get(element);
+        };
+        
+        /**
+         * Returns a reference to the animated element.
+         * @method getEl
+         * @return {HTMLElement}
+         */
+        this.getEl = function() { return el; };
+        
+        /**
+         * Checks whether the element is currently animated.
+         * @method isAnimated
+         * @return {Boolean} current value of isAnimated.     
+         */
+        this.isAnimated = function() {
+            return isAnimated;
+        };
+        
+        /**
+         * Returns the animation start time.
+         * @method getStartTime
+         * @return {Date} current value of startTime.      
+         */
+        this.getStartTime = function() {
+            return startTime;
+        };        
+        
+        this.runtimeAttributes = {};
+        
+        var logger = {};
+        logger.log = function() {YAHOO.log.apply(window, arguments)};
+        
+        logger.log('creating new instance of ' + this);
+        
+        /**
+         * Starts the animation by registering it with the animation manager. 
+         * @method animate  
+         */
+        this.animate = function() {
+            if ( this.isAnimated() ) {
+                return false;
+            }
+            
+            this.currentFrame = 0;
+            
+            this.totalFrames = ( this.useSeconds ) ? Math.ceil(Y.AnimMgr.fps * this.duration) : this.duration;
+    
+            if (this.duration === 0 && this.useSeconds) { // jump to last frame if zero second duration 
+                this.totalFrames = 1; 
+            }
+            Y.AnimMgr.registerElement(this);
+            return true;
+        };
+          
+        /**
+         * Stops the animation.  Normally called by AnimMgr when animation completes.
+         * @method stop
+         * @param {Boolean} finish (optional) If true, animation will jump to final frame.
+         */ 
+        this.stop = function(finish) {
+            if (!this.isAnimated()) { // nothing to stop
+                return false;
+            }
+
+            if (finish) {
+                 this.currentFrame = this.totalFrames;
+                 this._onTween.fire();
+            }
+            Y.AnimMgr.stop(this);
+        };
+        
+        var onStart = function() {            
+            this.onStart.fire();
+            
+            this.runtimeAttributes = {};
+            for (var attr in this.attributes) {
+                this.setRuntimeAttribute(attr);
+            }
+            
+            isAnimated = true;
+            actualFrames = 0;
+            startTime = new Date(); 
+        };
+        
+        /**
+         * Feeds the starting and ending values for each animated attribute to doMethod once per frame, then applies the resulting value to the attribute(s).
+         * @private
+         */
+         
+        var onTween = function() {
+            var data = {
+                duration: new Date() - this.getStartTime(),
+                currentFrame: this.currentFrame
+            };
+            
+            data.toString = function() {
+                return (
+                    'duration: ' + data.duration +
+                    ', currentFrame: ' + data.currentFrame
+                );
+            };
+            
+            this.onTween.fire(data);
+            
+            var runtimeAttributes = this.runtimeAttributes;
+            
+            for (var attr in runtimeAttributes) {
+                this.setAttribute(attr, this.doMethod(attr, runtimeAttributes[attr].start, runtimeAttributes[attr].end), runtimeAttributes[attr].unit); 
+            }
+            
+            actualFrames += 1;
+        };
+        
+        var onComplete = function() {
+            var actual_duration = (new Date() - startTime) / 1000 ;
+            
+            var data = {
+                duration: actual_duration,
+                frames: actualFrames,
+                fps: actualFrames / actual_duration
+            };
+            
+            data.toString = function() {
+                return (
+                    'duration: ' + data.duration +
+                    ', frames: ' + data.frames +
+                    ', fps: ' + data.fps
+                );
+            };
+            
+            isAnimated = false;
+            actualFrames = 0;
+            this.onComplete.fire(data);
+        };
+        
+        /**
+         * Custom event that fires after onStart, useful in subclassing
+         * @private
+         */    
+        this._onStart = new Y.CustomEvent('_start', this, true);
+
+        /**
+         * Custom event that fires when animation begins
+         * Listen via subscribe method (e.g. myAnim.onStart.subscribe(someFunction)
+         * @event onStart
+         */    
+        this.onStart = new Y.CustomEvent('start', this);
+        
+        /**
+         * Custom event that fires between each frame
+         * Listen via subscribe method (e.g. myAnim.onTween.subscribe(someFunction)
+         * @event onTween
+         */
+        this.onTween = new Y.CustomEvent('tween', this);
+        
+        /**
+         * Custom event that fires after onTween
+         * @private
+         */
+        this._onTween = new Y.CustomEvent('_tween', this, true);
+        
+        /**
+         * Custom event that fires when animation ends
+         * Listen via subscribe method (e.g. myAnim.onComplete.subscribe(someFunction)
+         * @event onComplete
+         */
+        this.onComplete = new Y.CustomEvent('complete', this);
+        /**
+         * Custom event that fires after onComplete
+         * @private
+         */
+        this._onComplete = new Y.CustomEvent('_complete', this, true);
+
+        this._onStart.subscribe(onStart);
+        this._onTween.subscribe(onTween);
+        this._onComplete.subscribe(onComplete);
+    }
+};
+
+    Y.Anim = Anim;
+})();
+/**
+ * Handles animation queueing and threading.
+ * Used by Anim and subclasses.
+ * @class AnimMgr
+ * @namespace YAHOO.util
+ */
+YAHOO.util.AnimMgr = new function() {
+    /** 
+     * Reference to the animation Interval.
+     * @property thread
+     * @private
+     * @type Int
+     */
+    var thread = null;
+    
+    /** 
+     * The current queue of registered animation objects.
+     * @property queue
+     * @private
+     * @type Array
+     */    
+    var queue = [];
+
+    /** 
+     * The number of active animations.
+     * @property tweenCount
+     * @private
+     * @type Int
+     */        
+    var tweenCount = 0;
+
+    /** 
+     * Base frame rate (frames per second). 
+     * Arbitrarily high for better x-browser calibration (slower browsers drop more frames).
+     * @property fps
+     * @type Int
+     * 
+     */
+    this.fps = 1000;
+
+    /** 
+     * Interval delay in milliseconds, defaults to fastest possible.
+     * @property delay
+     * @type Int
+     * 
+     */
+    this.delay = 1;
+
+    /**
+     * Adds an animation instance to the animation queue.
+     * All animation instances must be registered in order to animate.
+     * @method registerElement
+     * @param {object} tween The Anim instance to be be registered
+     */
+    this.registerElement = function(tween) {
+        queue[queue.length] = tween;
+        tweenCount += 1;
+        tween._onStart.fire();
+        this.start();
+    };
+    
+    /**
+     * removes an animation instance from the animation queue.
+     * All animation instances must be registered in order to animate.
+     * @method unRegister
+     * @param {object} tween The Anim instance to be be registered
+     * @param {Int} index The index of the Anim instance
+     * @private
+     */
+    this.unRegister = function(tween, index) {
+        index = index || getIndex(tween);
+        if (!tween.isAnimated() || index == -1) {
+            return false;
+        }
+        
+        tween._onComplete.fire();
+        queue.splice(index, 1);
+
+        tweenCount -= 1;
+        if (tweenCount <= 0) {
+            this.stop();
+        }
+
+        return true;
+    };
+    
+    /**
+     * Starts the animation thread.
+	* Only one thread can run at a time.
+     * @method start
+     */    
+    this.start = function() {
+        if (thread === null) {
+            thread = setInterval(this.run, this.delay);
+        }
+    };
+
+    /**
+     * Stops the animation thread or a specific animation instance.
+     * @method stop
+     * @param {object} tween A specific Anim instance to stop (optional)
+     * If no instance given, Manager stops thread and all animations.
+     */    
+    this.stop = function(tween) {
+        if (!tween) {
+            clearInterval(thread);
+            
+            for (var i = 0, len = queue.length; i < len; ++i) {
+                this.unRegister(queue[0], 0);  
+            }
+
+            queue = [];
+            thread = null;
+            tweenCount = 0;
+        }
+        else {
+            this.unRegister(tween);
+        }
+    };
+    
+    /**
+     * Called per Interval to handle each animation frame.
+     * @method run
+     */    
+    this.run = function() {
+        for (var i = 0, len = queue.length; i < len; ++i) {
+            var tween = queue[i];
+            if ( !tween || !tween.isAnimated() ) { continue; }
+
+            if (tween.currentFrame < tween.totalFrames || tween.totalFrames === null)
+            {
+                tween.currentFrame += 1;
+                
+                if (tween.useSeconds) {
+                    correctFrame(tween);
+                }
+                tween._onTween.fire();          
+            }
+            else { YAHOO.util.AnimMgr.stop(tween, i); }
+        }
+    };
+    
+    var getIndex = function(anim) {
+        for (var i = 0, len = queue.length; i < len; ++i) {
+            if (queue[i] == anim) {
+                return i; // note return;
+            }
+        }
+        return -1;
+    };
+    
+    /**
+     * On the fly frame correction to keep animation on time.
+     * @method correctFrame
+     * @private
+     * @param {Object} tween The Anim instance being corrected.
+     */
+    var correctFrame = function(tween) {
+        var frames = tween.totalFrames;
+        var frame = tween.currentFrame;
+        var expected = (tween.currentFrame * tween.duration * 1000 / tween.totalFrames);
+        var elapsed = (new Date() - tween.getStartTime());
+        var tweak = 0;
+        
+        if (elapsed < tween.duration * 1000) { // check if falling behind
+            tweak = Math.round((elapsed / expected - 1) * tween.currentFrame);
+        } else { // went over duration, so jump to end
+            tweak = frames - (frame + 1); 
+        }
+        if (tweak > 0 && isFinite(tweak)) { // adjust if needed
+            if (tween.currentFrame + tweak >= frames) {// dont go past last frame
+                tweak = frames - (frame + 1);
+            }
+            
+            tween.currentFrame += tweak;      
+        }
+    };
+};
+/**
+ * Used to calculate Bezier splines for any number of control points.
+ * @class Bezier
+ * @namespace YAHOO.util
+ *
+ */
+YAHOO.util.Bezier = new function() {
+    /**
+     * Get the current position of the animated element based on t.
+     * Each point is an array of "x" and "y" values (0 = x, 1 = y)
+     * At least 2 points are required (start and end).
+     * First point is start. Last point is end.
+     * Additional control points are optional.     
+     * @method getPosition
+     * @param {Array} points An array containing Bezier points
+     * @param {Number} t A number between 0 and 1 which is the basis for determining current position
+     * @return {Array} An array containing int x and y member data
+     */
+    this.getPosition = function(points, t) {  
+        var n = points.length;
+        var tmp = [];
+
+        for (var i = 0; i < n; ++i){
+            tmp[i] = [points[i][0], points[i][1]]; // save input
+        }
+        
+        for (var j = 1; j < n; ++j) {
+            for (i = 0; i < n - j; ++i) {
+                tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0];
+                tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; 
+            }
+        }
+    
+        return [ tmp[0][0], tmp[0][1] ]; 
+    
+    };
+};
+(function() {
+/**
+ * Anim subclass for color transitions.
+ * <p>Usage: <code>var myAnim = new Y.ColorAnim(el, { backgroundColor: { from: '#FF0000', to: '#FFFFFF' } }, 1, Y.Easing.easeOut);</code> Color values can be specified with either 112233, #112233, 
+ * [255,255,255], or rgb(255,255,255)</p>
+ * @class ColorAnim
+ * @namespace YAHOO.util
+ * @requires YAHOO.util.Anim
+ * @requires YAHOO.util.AnimMgr
+ * @requires YAHOO.util.Easing
+ * @requires YAHOO.util.Bezier
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @constructor
+ * @extends YAHOO.util.Anim
+ * @param {HTMLElement | String} el Reference to the element that will be animated
+ * @param {Object} attributes The attribute(s) to be animated.
+ * Each attribute is an object with at minimum a "to" or "by" member defined.
+ * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").
+ * All attribute names use camelCase.
+ * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+ * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+ */
+    var ColorAnim = function(el, attributes, duration,  method) {
+        ColorAnim.superclass.constructor.call(this, el, attributes, duration, method);
+    };
+    
+    ColorAnim.NAME = 'ColorAnim';
+
+    ColorAnim.DEFAULT_BGCOLOR = '#fff';
+    // shorthand
+    var Y = YAHOO.util;
+    YAHOO.extend(ColorAnim, Y.Anim);
+
+    var superclass = ColorAnim.superclass;
+    var proto = ColorAnim.prototype;
+    
+    proto.patterns.color = /color$/i;
+    proto.patterns.rgb            = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;
+    proto.patterns.hex            = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;
+    proto.patterns.hex3          = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;
+    proto.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/; // need rgba for safari
+    
+    /**
+     * Attempts to parse the given string and return a 3-tuple.
+     * @method parseColor
+     * @param {String} s The string to parse.
+     * @return {Array} The 3-tuple of rgb values.
+     */
+    proto.parseColor = function(s) {
+        if (s.length == 3) { return s; }
+    
+        var c = this.patterns.hex.exec(s);
+        if (c && c.length == 4) {
+            return [ parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16) ];
+        }
+    
+        c = this.patterns.rgb.exec(s);
+        if (c && c.length == 4) {
+            return [ parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10) ];
+        }
+    
+        c = this.patterns.hex3.exec(s);
+        if (c && c.length == 4) {
+            return [ parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16) ];
+        }
+        
+        return null;
+    };
+
+    proto.getAttribute = function(attr) {
+        var el = this.getEl();
+        if (this.patterns.color.test(attr) ) {
+            var val = YAHOO.util.Dom.getStyle(el, attr);
+            
+            var that = this;
+            if (this.patterns.transparent.test(val)) { // bgcolor default
+                var parent = YAHOO.util.Dom.getAncestorBy(el, function(node) {
+                    return !that.patterns.transparent.test(val);
+                });
+
+                if (parent) {
+                    val = Y.Dom.getStyle(parent, attr);
+                } else {
+                    val = ColorAnim.DEFAULT_BGCOLOR;
+                }
+            }
+        } else {
+            val = superclass.getAttribute.call(this, attr);
+        }
+
+        return val;
+    };
+    
+    proto.doMethod = function(attr, start, end) {
+        var val;
+    
+        if ( this.patterns.color.test(attr) ) {
+            val = [];
+            for (var i = 0, len = start.length; i < len; ++i) {
+                val[i] = superclass.doMethod.call(this, attr, start[i], end[i]);
+            }
+            
+            val = 'rgb('+Math.floor(val[0])+','+Math.floor(val[1])+','+Math.floor(val[2])+')';
+        }
+        else {
+            val = superclass.doMethod.call(this, attr, start, end);
+        }
+
+        return val;
+    };
+
+    proto.setRuntimeAttribute = function(attr) {
+        superclass.setRuntimeAttribute.call(this, attr);
+        
+        if ( this.patterns.color.test(attr) ) {
+            var attributes = this.attributes;
+            var start = this.parseColor(this.runtimeAttributes[attr].start);
+            var end = this.parseColor(this.runtimeAttributes[attr].end);
+            // fix colors if going "by"
+            if ( typeof attributes[attr]['to'] === 'undefined' && typeof attributes[attr]['by'] !== 'undefined' ) {
+                end = this.parseColor(attributes[attr].by);
+            
+                for (var i = 0, len = start.length; i < len; ++i) {
+                    end[i] = start[i] + end[i];
+                }
+            }
+            
+            this.runtimeAttributes[attr].start = start;
+            this.runtimeAttributes[attr].end = end;
+        }
+    };
+
+    Y.ColorAnim = ColorAnim;
+})();
+/*!
+TERMS OF USE - EASING EQUATIONS
+Open source under the BSD License.
+Copyright 2001 Robert Penner All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/**
+ * Singleton that determines how an animation proceeds from start to end.
+ * @class Easing
+ * @namespace YAHOO.util
+*/
+
+YAHOO.util.Easing = {
+
+    /**
+     * Uniform speed between points.
+     * @method easeNone
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeNone: function (t, b, c, d) {
+    	return c*t/d + b;
+    },
+    
+    /**
+     * Begins slowly and accelerates towards end.
+     * @method easeIn
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeIn: function (t, b, c, d) {
+    	return c*(t/=d)*t + b;
+    },
+
+    /**
+     * Begins quickly and decelerates towards end.
+     * @method easeOut
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeOut: function (t, b, c, d) {
+    	return -c *(t/=d)*(t-2) + b;
+    },
+    
+    /**
+     * Begins slowly and decelerates towards end.
+     * @method easeBoth
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeBoth: function (t, b, c, d) {
+    	if ((t/=d/2) < 1) {
+            return c/2*t*t + b;
+        }
+        
+    	return -c/2 * ((--t)*(t-2) - 1) + b;
+    },
+    
+    /**
+     * Begins slowly and accelerates towards end.
+     * @method easeInStrong
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeInStrong: function (t, b, c, d) {
+    	return c*(t/=d)*t*t*t + b;
+    },
+    
+    /**
+     * Begins quickly and decelerates towards end.
+     * @method easeOutStrong
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeOutStrong: function (t, b, c, d) {
+    	return -c * ((t=t/d-1)*t*t*t - 1) + b;
+    },
+    
+    /**
+     * Begins slowly and decelerates towards end.
+     * @method easeBothStrong
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeBothStrong: function (t, b, c, d) {
+    	if ((t/=d/2) < 1) {
+            return c/2*t*t*t*t + b;
+        }
+        
+    	return -c/2 * ((t-=2)*t*t*t - 2) + b;
+    },
+
+    /**
+     * Snap in elastic effect.
+     * @method elasticIn
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} a Amplitude (optional)
+     * @param {Number} p Period (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+
+    elasticIn: function (t, b, c, d, a, p) {
+    	if (t == 0) {
+            return b;
+        }
+        if ( (t /= d) == 1 ) {
+            return b+c;
+        }
+        if (!p) {
+            p=d*.3;
+        }
+        
+    	if (!a || a < Math.abs(c)) {
+            a = c; 
+            var s = p/4;
+        }
+    	else {
+            var s = p/(2*Math.PI) * Math.asin (c/a);
+        }
+        
+    	return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+    },
+
+    /**
+     * Snap out elastic effect.
+     * @method elasticOut
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} a Amplitude (optional)
+     * @param {Number} p Period (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    elasticOut: function (t, b, c, d, a, p) {
+    	if (t == 0) {
+            return b;
+        }
+        if ( (t /= d) == 1 ) {
+            return b+c;
+        }
+        if (!p) {
+            p=d*.3;
+        }
+        
+    	if (!a || a < Math.abs(c)) {
+            a = c;
+            var s = p / 4;
+        }
+    	else {
+            var s = p/(2*Math.PI) * Math.asin (c/a);
+        }
+        
+    	return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
+    },
+    
+    /**
+     * Snap both elastic effect.
+     * @method elasticBoth
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} a Amplitude (optional)
+     * @param {Number} p Period (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    elasticBoth: function (t, b, c, d, a, p) {
+    	if (t == 0) {
+            return b;
+        }
+        
+        if ( (t /= d/2) == 2 ) {
+            return b+c;
+        }
+        
+        if (!p) {
+            p = d*(.3*1.5);
+        }
+        
+    	if ( !a || a < Math.abs(c) ) {
+            a = c; 
+            var s = p/4;
+        }
+    	else {
+            var s = p/(2*Math.PI) * Math.asin (c/a);
+        }
+        
+    	if (t < 1) {
+            return -.5*(a*Math.pow(2,10*(t-=1)) * 
+                    Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+        }
+    	return a*Math.pow(2,-10*(t-=1)) * 
+                Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
+    },
+
+
+    /**
+     * Backtracks slightly, then reverses direction and moves to end.
+     * @method backIn
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} s Overshoot (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    backIn: function (t, b, c, d, s) {
+    	if (typeof s == 'undefined') {
+            s = 1.70158;
+        }
+    	return c*(t/=d)*t*((s+1)*t - s) + b;
+    },
+
+    /**
+     * Overshoots end, then reverses and comes back to end.
+     * @method backOut
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} s Overshoot (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    backOut: function (t, b, c, d, s) {
+    	if (typeof s == 'undefined') {
+            s = 1.70158;
+        }
+    	return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
+    },
+    
+    /**
+     * Backtracks slightly, then reverses direction, overshoots end, 
+     * then reverses and comes back to end.
+     * @method backBoth
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} s Overshoot (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    backBoth: function (t, b, c, d, s) {
+    	if (typeof s == 'undefined') {
+            s = 1.70158; 
+        }
+        
+    	if ((t /= d/2 ) < 1) {
+            return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
+        }
+    	return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
+    },
+
+    /**
+     * Bounce off of start.
+     * @method bounceIn
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    bounceIn: function (t, b, c, d) {
+    	return c - YAHOO.util.Easing.bounceOut(d-t, 0, c, d) + b;
+    },
+    
+    /**
+     * Bounces off end.
+     * @method bounceOut
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    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;
+    },
+    
+    /**
+     * Bounces off start and end.
+     * @method bounceBoth
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    bounceBoth: function (t, b, c, d) {
+    	if (t < d/2) {
+            return YAHOO.util.Easing.bounceIn(t*2, 0, c, d) * .5 + b;
+        }
+    	return YAHOO.util.Easing.bounceOut(t*2-d, 0, c, d) * .5 + c*.5 + b;
+    }
+};
+
+(function() {
+/**
+ * Anim subclass for moving elements along a path defined by the "points" 
+ * member of "attributes".  All "points" are arrays with x, y coordinates.
+ * <p>Usage: <code>var myAnim = new YAHOO.util.Motion(el, { points: { to: [800, 800] } }, 1, YAHOO.util.Easing.easeOut);</code></p>
+ * @class Motion
+ * @namespace YAHOO.util
+ * @requires YAHOO.util.Anim
+ * @requires YAHOO.util.AnimMgr
+ * @requires YAHOO.util.Easing
+ * @requires YAHOO.util.Bezier
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @constructor
+ * @extends YAHOO.util.ColorAnim
+ * @param {String | HTMLElement} el Reference to the element that will be animated
+ * @param {Object} attributes The attribute(s) to be animated.  
+ * Each attribute is an object with at minimum a "to" or "by" member defined.  
+ * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").  
+ * All attribute names use camelCase.
+ * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+ * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+ */
+    var Motion = function(el, attributes, duration,  method) {
+        if (el) { // dont break existing subclasses not using YAHOO.extend
+            Motion.superclass.constructor.call(this, el, attributes, duration, method);
+        }
+    };
+
+
+    Motion.NAME = 'Motion';
+
+    // shorthand
+    var Y = YAHOO.util;
+    YAHOO.extend(Motion, Y.ColorAnim);
+    
+    var superclass = Motion.superclass;
+    var proto = Motion.prototype;
+
+    proto.patterns.points = /^points$/i;
+    
+    proto.setAttribute = function(attr, val, unit) {
+        if (  this.patterns.points.test(attr) ) {
+            unit = unit || 'px';
+            superclass.setAttribute.call(this, 'left', val[0], unit);
+            superclass.setAttribute.call(this, 'top', val[1], unit);
+        } else {
+            superclass.setAttribute.call(this, attr, val, unit);
+        }
+    };
+
+    proto.getAttribute = function(attr) {
+        if (  this.patterns.points.test(attr) ) {
+            var val = [
+                superclass.getAttribute.call(this, 'left'),
+                superclass.getAttribute.call(this, 'top')
+            ];
+        } else {
+            val = superclass.getAttribute.call(this, attr);
+        }
+
+        return val;
+    };
+
+    proto.doMethod = function(attr, start, end) {
+        var val = null;
+
+        if ( this.patterns.points.test(attr) ) {
+            var t = this.method(this.currentFrame, 0, 100, this.totalFrames) / 100;				
+            val = Y.Bezier.getPosition(this.runtimeAttributes[attr], t);
+        } else {
+            val = superclass.doMethod.call(this, attr, start, end);
+        }
+        return val;
+    };
+
+    proto.setRuntimeAttribute = function(attr) {
+        if ( this.patterns.points.test(attr) ) {
+            var el = this.getEl();
+            var attributes = this.attributes;
+            var start;
+            var control = attributes['points']['control'] || [];
+            var end;
+            var i, len;
+            
+            if (control.length > 0 && !(control[0] instanceof Array) ) { // could be single point or array of points
+                control = [control];
+            } else { // break reference to attributes.points.control
+                var tmp = []; 
+                for (i = 0, len = control.length; i< len; ++i) {
+                    tmp[i] = control[i];
+                }
+                control = tmp;
+            }
+
+            if (Y.Dom.getStyle(el, 'position') == 'static') { // default to relative
+                Y.Dom.setStyle(el, 'position', 'relative');
+            }
+    
+            if ( isset(attributes['points']['from']) ) {
+                Y.Dom.setXY(el, attributes['points']['from']); // set position to from point
+            } 
+            else { Y.Dom.setXY( el, Y.Dom.getXY(el) ); } // set it to current position
+            
+            start = this.getAttribute('points'); // get actual top & left
+            
+            // TO beats BY, per SMIL 2.1 spec
+            if ( isset(attributes['points']['to']) ) {
+                end = translateValues.call(this, attributes['points']['to'], start);
+                
+                var pageXY = Y.Dom.getXY(this.getEl());
+                for (i = 0, len = control.length; i < len; ++i) {
+                    control[i] = translateValues.call(this, control[i], start);
+                }
+
+                
+            } else if ( isset(attributes['points']['by']) ) {
+                end = [ start[0] + attributes['points']['by'][0], start[1] + attributes['points']['by'][1] ];
+                
+                for (i = 0, len = control.length; i < len; ++i) {
+                    control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ];
+                }
+            }
+
+            this.runtimeAttributes[attr] = [start];
+            
+            if (control.length > 0) {
+                this.runtimeAttributes[attr] = this.runtimeAttributes[attr].concat(control); 
+            }
+
+            this.runtimeAttributes[attr][this.runtimeAttributes[attr].length] = end;
+        }
+        else {
+            superclass.setRuntimeAttribute.call(this, attr);
+        }
+    };
+    
+    var translateValues = function(val, start) {
+        var pageXY = Y.Dom.getXY(this.getEl());
+        val = [ val[0] - pageXY[0] + start[0], val[1] - pageXY[1] + start[1] ];
+
+        return val; 
+    };
+    
+    var isset = function(prop) {
+        return (typeof prop !== 'undefined');
+    };
+
+    Y.Motion = Motion;
+})();
+(function() {
+/**
+ * Anim subclass for scrolling elements to a position defined by the "scroll"
+ * member of "attributes".  All "scroll" members are arrays with x, y scroll positions.
+ * <p>Usage: <code>var myAnim = new YAHOO.util.Scroll(el, { scroll: { to: [0, 800] } }, 1, YAHOO.util.Easing.easeOut);</code></p>
+ * @class Scroll
+ * @namespace YAHOO.util
+ * @requires YAHOO.util.Anim
+ * @requires YAHOO.util.AnimMgr
+ * @requires YAHOO.util.Easing
+ * @requires YAHOO.util.Bezier
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @extends YAHOO.util.ColorAnim
+ * @constructor
+ * @param {String or HTMLElement} el Reference to the element that will be animated
+ * @param {Object} attributes The attribute(s) to be animated.  
+ * Each attribute is an object with at minimum a "to" or "by" member defined.  
+ * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").  
+ * All attribute names use camelCase.
+ * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+ * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+ */
+    var Scroll = function(el, attributes, duration,  method) {
+        if (el) { // dont break existing subclasses not using YAHOO.extend
+            Scroll.superclass.constructor.call(this, el, attributes, duration, method);
+        }
+    };
+
+    Scroll.NAME = 'Scroll';
+
+    // shorthand
+    var Y = YAHOO.util;
+    YAHOO.extend(Scroll, Y.ColorAnim);
+    
+    var superclass = Scroll.superclass;
+    var proto = Scroll.prototype;
+
+    proto.doMethod = function(attr, start, end) {
+        var val = null;
+    
+        if (attr == 'scroll') {
+            val = [
+                this.method(this.currentFrame, start[0], end[0] - start[0], this.totalFrames),
+                this.method(this.currentFrame, start[1], end[1] - start[1], this.totalFrames)
+            ];
+            
+        } else {
+            val = superclass.doMethod.call(this, attr, start, end);
+        }
+        return val;
+    };
+
+    proto.getAttribute = function(attr) {
+        var val = null;
+        var el = this.getEl();
+        
+        if (attr == 'scroll') {
+            val = [ el.scrollLeft, el.scrollTop ];
+        } else {
+            val = superclass.getAttribute.call(this, attr);
+        }
+        
+        return val;
+    };
+
+    proto.setAttribute = function(attr, val, unit) {
+        var el = this.getEl();
+        
+        if (attr == 'scroll') {
+            el.scrollLeft = val[0];
+            el.scrollTop = val[1];
+        } else {
+            superclass.setAttribute.call(this, attr, val, unit);
+        }
+    };
+
+    Y.Scroll = Scroll;
+})();
+YAHOO.register("animation", YAHOO.util.Anim, {version: "2.6.0", build: "1321"});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/animation-min.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/animation-min.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/animation-min.js
new file mode 100644
index 0000000..47fa162
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/animation-min.js
@@ -0,0 +1,23 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:function(C,E,D){if(this.patterns.noNegatives.test(C)){E=(E>0)?E:0;}B.Dom.setStyle(this.getEl(),C,E+D);},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}return G;},getDefaultUnit:function
 (C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1;}}else{E=I+F[D]["by"]*1;}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true;},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M);};this.getEl=function(){return E;};this.isAnimated=function(){return D;}
 ;this.getStartTime=function(){return F;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}B.AnimMgr.registerElement(this);return true;};this.stop=function(M){if(!this.isAnimated()){return false;}if(M){this.currentFrame=this.totalFrames;this._onTween.fire();}B.AnimMgr.stop(this);};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M);}D=true;H=0;F=new Date();};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit);}H+=1;};var G=function(){var M=(new Date()-F
 )/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps);};D=false;H=0;this.onComplete.fire(N);};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G);}};B.Anim=A;})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=func
 tion(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return -1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0
 ];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H);};A.NAME="ColorAnim";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E;}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)];}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)];}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)];}return null;};B.getAttribute=function(
 E){var G=this.getEl();
+if(this.patterns.color.test(E)){var I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return !H.patterns.transparent.test(I);});if(F){I=C.Dom.getStyle(F,E);}else{I=A.DEFAULT_BGCOLOR;}}}else{I=D.getAttribute.call(this,E);}return I;};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H]);}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")";}else{I=D.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I];}}this.runtimeAttributes[F].start=J;this.runtimeAt
 tributes[F].end=G;}};C.ColorAnim=A;})();
+/*
+TERMS OF USE - EASING EQUATIONS
+Open source under the BSD License.
+Copyright 2001 Robert Penner All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return -D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return -D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C
 ==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75)
 )*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;
 };C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]);}else{E.Dom.setXY(H,E.Dom.getXY(H));
+}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],th
 is.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.6.0",build:"1321"});
\ No newline at end of file


[07/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/animation.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/animation.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/animation.js
new file mode 100644
index 0000000..a198559
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/animation/animation.js
@@ -0,0 +1,1381 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+(function() {
+
+var Y = YAHOO.util;
+
+/*
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+*/
+
+/**
+ * The animation module provides allows effects to be added to HTMLElements.
+ * @module animation
+ * @requires yahoo, event, dom
+ */
+
+/**
+ *
+ * Base animation class that provides the interface for building animated effects.
+ * <p>Usage: var myAnim = new YAHOO.util.Anim(el, { width: { from: 10, to: 100 } }, 1, YAHOO.util.Easing.easeOut);</p>
+ * @class Anim
+ * @namespace YAHOO.util
+ * @requires YAHOO.util.AnimMgr
+ * @requires YAHOO.util.Easing
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent
+ * @constructor
+ * @param {String | HTMLElement} el Reference to the element that will be animated
+ * @param {Object} attributes The attribute(s) to be animated.  
+ * Each attribute is an object with at minimum a "to" or "by" member defined.  
+ * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").  
+ * All attribute names use camelCase.
+ * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+ * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+ */
+
+var Anim = function(el, attributes, duration, method) {
+    if (!el) {
+    }
+    this.init(el, attributes, duration, method); 
+};
+
+Anim.NAME = 'Anim';
+
+Anim.prototype = {
+    /**
+     * Provides a readable name for the Anim instance.
+     * @method toString
+     * @return {String}
+     */
+    toString: function() {
+        var el = this.getEl() || {};
+        var id = el.id || el.tagName;
+        return (this.constructor.NAME + ': ' + id);
+    },
+    
+    patterns: { // cached for performance
+        noNegatives:        /width|height|opacity|padding/i, // keep at zero or above
+        offsetAttribute:  /^((width|height)|(top|left))$/, // use offsetValue as default
+        defaultUnit:        /width|height|top$|bottom$|left$|right$/i, // use 'px' by default
+        offsetUnit:         /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i // IE may return these, so convert these to offset
+    },
+    
+    /**
+     * Returns the value computed by the animation's "method".
+     * @method doMethod
+     * @param {String} attr The name of the attribute.
+     * @param {Number} start The value this attribute should start from for this animation.
+     * @param {Number} end  The value this attribute should end at for this animation.
+     * @return {Number} The Value to be applied to the attribute.
+     */
+    doMethod: function(attr, start, end) {
+        return this.method(this.currentFrame, start, end - start, this.totalFrames);
+    },
+    
+    /**
+     * Applies a value to an attribute.
+     * @method setAttribute
+     * @param {String} attr The name of the attribute.
+     * @param {Number} val The value to be applied to the attribute.
+     * @param {String} unit The unit ('px', '%', etc.) of the value.
+     */
+    setAttribute: function(attr, val, unit) {
+        if ( this.patterns.noNegatives.test(attr) ) {
+            val = (val > 0) ? val : 0;
+        }
+
+        Y.Dom.setStyle(this.getEl(), attr, val + unit);
+    },                        
+    
+    /**
+     * Returns current value of the attribute.
+     * @method getAttribute
+     * @param {String} attr The name of the attribute.
+     * @return {Number} val The current value of the attribute.
+     */
+    getAttribute: function(attr) {
+        var el = this.getEl();
+        var val = Y.Dom.getStyle(el, attr);
+
+        if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) {
+            return parseFloat(val);
+        }
+        
+        var a = this.patterns.offsetAttribute.exec(attr) || [];
+        var pos = !!( a[3] ); // top or left
+        var box = !!( a[2] ); // width or height
+        
+        // use offsets for width/height and abs pos top/left
+        if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) {
+            val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)];
+        } else { // default to zero for other 'auto'
+            val = 0;
+        }
+
+        return val;
+    },
+    
+    /**
+     * Returns the unit to use when none is supplied.
+     * @method getDefaultUnit
+     * @param {attr} attr The name of the attribute.
+     * @return {String} The default unit to be used.
+     */
+    getDefaultUnit: function(attr) {
+         if ( this.patterns.defaultUnit.test(attr) ) {
+            return 'px';
+         }
+         
+         return '';
+    },
+        
+    /**
+     * Sets the actual values to be used during the animation.  Should only be needed for subclass use.
+     * @method setRuntimeAttribute
+     * @param {Object} attr The attribute object
+     * @private 
+     */
+    setRuntimeAttribute: function(attr) {
+        var start;
+        var end;
+        var attributes = this.attributes;
+
+        this.runtimeAttributes[attr] = {};
+        
+        var isset = function(prop) {
+            return (typeof prop !== 'undefined');
+        };
+        
+        if ( !isset(attributes[attr]['to']) && !isset(attributes[attr]['by']) ) {
+            return false; // note return; nothing to animate to
+        }
+        
+        start = ( isset(attributes[attr]['from']) ) ? attributes[attr]['from'] : this.getAttribute(attr);
+
+        // To beats by, per SMIL 2.1 spec
+        if ( isset(attributes[attr]['to']) ) {
+            end = attributes[attr]['to'];
+        } else if ( isset(attributes[attr]['by']) ) {
+            if (start.constructor == Array) {
+                end = [];
+                for (var i = 0, len = start.length; i < len; ++i) {
+                    end[i] = start[i] + attributes[attr]['by'][i] * 1; // times 1 to cast "by" 
+                }
+            } else {
+                end = start + attributes[attr]['by'] * 1;
+            }
+        }
+        
+        this.runtimeAttributes[attr].start = start;
+        this.runtimeAttributes[attr].end = end;
+
+        // set units if needed
+        this.runtimeAttributes[attr].unit = ( isset(attributes[attr].unit) ) ?
+                attributes[attr]['unit'] : this.getDefaultUnit(attr);
+        return true;
+    },
+
+    /**
+     * Constructor for Anim instance.
+     * @method init
+     * @param {String | HTMLElement} el Reference to the element that will be animated
+     * @param {Object} attributes The attribute(s) to be animated.  
+     * Each attribute is an object with at minimum a "to" or "by" member defined.  
+     * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").  
+     * All attribute names use camelCase.
+     * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+     * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+     */ 
+    init: function(el, attributes, duration, method) {
+        /**
+         * Whether or not the animation is running.
+         * @property isAnimated
+         * @private
+         * @type Boolean
+         */
+        var isAnimated = false;
+        
+        /**
+         * A Date object that is created when the animation begins.
+         * @property startTime
+         * @private
+         * @type Date
+         */
+        var startTime = null;
+        
+        /**
+         * The number of frames this animation was able to execute.
+         * @property actualFrames
+         * @private
+         * @type Int
+         */
+        var actualFrames = 0; 
+
+        /**
+         * The element to be animated.
+         * @property el
+         * @private
+         * @type HTMLElement
+         */
+        el = Y.Dom.get(el);
+        
+        /**
+         * The collection of attributes to be animated.  
+         * Each attribute must have at least a "to" or "by" defined in order to animate.  
+         * If "to" is supplied, the animation will end with the attribute at that value.  
+         * If "by" is supplied, the animation will end at that value plus its starting value. 
+         * If both are supplied, "to" is used, and "by" is ignored. 
+         * Optional additional member include "from" (the value the attribute should start animating from, defaults to current value), and "unit" (the units to apply to the values).
+         * @property attributes
+         * @type Object
+         */
+        this.attributes = attributes || {};
+        
+        /**
+         * The length of the animation.  Defaults to "1" (second).
+         * @property duration
+         * @type Number
+         */
+        this.duration = !YAHOO.lang.isUndefined(duration) ? duration : 1;
+        
+        /**
+         * The method that will provide values to the attribute(s) during the animation. 
+         * Defaults to "YAHOO.util.Easing.easeNone".
+         * @property method
+         * @type Function
+         */
+        this.method = method || Y.Easing.easeNone;
+
+        /**
+         * Whether or not the duration should be treated as seconds.
+         * Defaults to true.
+         * @property useSeconds
+         * @type Boolean
+         */
+        this.useSeconds = true; // default to seconds
+        
+        /**
+         * The location of the current animation on the timeline.
+         * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time.
+         * @property currentFrame
+         * @type Int
+         */
+        this.currentFrame = 0;
+        
+        /**
+         * The total number of frames to be executed.
+         * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time.
+         * @property totalFrames
+         * @type Int
+         */
+        this.totalFrames = Y.AnimMgr.fps;
+        
+        /**
+         * Changes the animated element
+         * @method setEl
+         */
+        this.setEl = function(element) {
+            el = Y.Dom.get(element);
+        };
+        
+        /**
+         * Returns a reference to the animated element.
+         * @method getEl
+         * @return {HTMLElement}
+         */
+        this.getEl = function() { return el; };
+        
+        /**
+         * Checks whether the element is currently animated.
+         * @method isAnimated
+         * @return {Boolean} current value of isAnimated.     
+         */
+        this.isAnimated = function() {
+            return isAnimated;
+        };
+        
+        /**
+         * Returns the animation start time.
+         * @method getStartTime
+         * @return {Date} current value of startTime.      
+         */
+        this.getStartTime = function() {
+            return startTime;
+        };        
+        
+        this.runtimeAttributes = {};
+        
+        
+        
+        /**
+         * Starts the animation by registering it with the animation manager. 
+         * @method animate  
+         */
+        this.animate = function() {
+            if ( this.isAnimated() ) {
+                return false;
+            }
+            
+            this.currentFrame = 0;
+            
+            this.totalFrames = ( this.useSeconds ) ? Math.ceil(Y.AnimMgr.fps * this.duration) : this.duration;
+    
+            if (this.duration === 0 && this.useSeconds) { // jump to last frame if zero second duration 
+                this.totalFrames = 1; 
+            }
+            Y.AnimMgr.registerElement(this);
+            return true;
+        };
+          
+        /**
+         * Stops the animation.  Normally called by AnimMgr when animation completes.
+         * @method stop
+         * @param {Boolean} finish (optional) If true, animation will jump to final frame.
+         */ 
+        this.stop = function(finish) {
+            if (!this.isAnimated()) { // nothing to stop
+                return false;
+            }
+
+            if (finish) {
+                 this.currentFrame = this.totalFrames;
+                 this._onTween.fire();
+            }
+            Y.AnimMgr.stop(this);
+        };
+        
+        var onStart = function() {            
+            this.onStart.fire();
+            
+            this.runtimeAttributes = {};
+            for (var attr in this.attributes) {
+                this.setRuntimeAttribute(attr);
+            }
+            
+            isAnimated = true;
+            actualFrames = 0;
+            startTime = new Date(); 
+        };
+        
+        /**
+         * Feeds the starting and ending values for each animated attribute to doMethod once per frame, then applies the resulting value to the attribute(s).
+         * @private
+         */
+         
+        var onTween = function() {
+            var data = {
+                duration: new Date() - this.getStartTime(),
+                currentFrame: this.currentFrame
+            };
+            
+            data.toString = function() {
+                return (
+                    'duration: ' + data.duration +
+                    ', currentFrame: ' + data.currentFrame
+                );
+            };
+            
+            this.onTween.fire(data);
+            
+            var runtimeAttributes = this.runtimeAttributes;
+            
+            for (var attr in runtimeAttributes) {
+                this.setAttribute(attr, this.doMethod(attr, runtimeAttributes[attr].start, runtimeAttributes[attr].end), runtimeAttributes[attr].unit); 
+            }
+            
+            actualFrames += 1;
+        };
+        
+        var onComplete = function() {
+            var actual_duration = (new Date() - startTime) / 1000 ;
+            
+            var data = {
+                duration: actual_duration,
+                frames: actualFrames,
+                fps: actualFrames / actual_duration
+            };
+            
+            data.toString = function() {
+                return (
+                    'duration: ' + data.duration +
+                    ', frames: ' + data.frames +
+                    ', fps: ' + data.fps
+                );
+            };
+            
+            isAnimated = false;
+            actualFrames = 0;
+            this.onComplete.fire(data);
+        };
+        
+        /**
+         * Custom event that fires after onStart, useful in subclassing
+         * @private
+         */    
+        this._onStart = new Y.CustomEvent('_start', this, true);
+
+        /**
+         * Custom event that fires when animation begins
+         * Listen via subscribe method (e.g. myAnim.onStart.subscribe(someFunction)
+         * @event onStart
+         */    
+        this.onStart = new Y.CustomEvent('start', this);
+        
+        /**
+         * Custom event that fires between each frame
+         * Listen via subscribe method (e.g. myAnim.onTween.subscribe(someFunction)
+         * @event onTween
+         */
+        this.onTween = new Y.CustomEvent('tween', this);
+        
+        /**
+         * Custom event that fires after onTween
+         * @private
+         */
+        this._onTween = new Y.CustomEvent('_tween', this, true);
+        
+        /**
+         * Custom event that fires when animation ends
+         * Listen via subscribe method (e.g. myAnim.onComplete.subscribe(someFunction)
+         * @event onComplete
+         */
+        this.onComplete = new Y.CustomEvent('complete', this);
+        /**
+         * Custom event that fires after onComplete
+         * @private
+         */
+        this._onComplete = new Y.CustomEvent('_complete', this, true);
+
+        this._onStart.subscribe(onStart);
+        this._onTween.subscribe(onTween);
+        this._onComplete.subscribe(onComplete);
+    }
+};
+
+    Y.Anim = Anim;
+})();
+/**
+ * Handles animation queueing and threading.
+ * Used by Anim and subclasses.
+ * @class AnimMgr
+ * @namespace YAHOO.util
+ */
+YAHOO.util.AnimMgr = new function() {
+    /** 
+     * Reference to the animation Interval.
+     * @property thread
+     * @private
+     * @type Int
+     */
+    var thread = null;
+    
+    /** 
+     * The current queue of registered animation objects.
+     * @property queue
+     * @private
+     * @type Array
+     */    
+    var queue = [];
+
+    /** 
+     * The number of active animations.
+     * @property tweenCount
+     * @private
+     * @type Int
+     */        
+    var tweenCount = 0;
+
+    /** 
+     * Base frame rate (frames per second). 
+     * Arbitrarily high for better x-browser calibration (slower browsers drop more frames).
+     * @property fps
+     * @type Int
+     * 
+     */
+    this.fps = 1000;
+
+    /** 
+     * Interval delay in milliseconds, defaults to fastest possible.
+     * @property delay
+     * @type Int
+     * 
+     */
+    this.delay = 1;
+
+    /**
+     * Adds an animation instance to the animation queue.
+     * All animation instances must be registered in order to animate.
+     * @method registerElement
+     * @param {object} tween The Anim instance to be be registered
+     */
+    this.registerElement = function(tween) {
+        queue[queue.length] = tween;
+        tweenCount += 1;
+        tween._onStart.fire();
+        this.start();
+    };
+    
+    /**
+     * removes an animation instance from the animation queue.
+     * All animation instances must be registered in order to animate.
+     * @method unRegister
+     * @param {object} tween The Anim instance to be be registered
+     * @param {Int} index The index of the Anim instance
+     * @private
+     */
+    this.unRegister = function(tween, index) {
+        index = index || getIndex(tween);
+        if (!tween.isAnimated() || index == -1) {
+            return false;
+        }
+        
+        tween._onComplete.fire();
+        queue.splice(index, 1);
+
+        tweenCount -= 1;
+        if (tweenCount <= 0) {
+            this.stop();
+        }
+
+        return true;
+    };
+    
+    /**
+     * Starts the animation thread.
+	* Only one thread can run at a time.
+     * @method start
+     */    
+    this.start = function() {
+        if (thread === null) {
+            thread = setInterval(this.run, this.delay);
+        }
+    };
+
+    /**
+     * Stops the animation thread or a specific animation instance.
+     * @method stop
+     * @param {object} tween A specific Anim instance to stop (optional)
+     * If no instance given, Manager stops thread and all animations.
+     */    
+    this.stop = function(tween) {
+        if (!tween) {
+            clearInterval(thread);
+            
+            for (var i = 0, len = queue.length; i < len; ++i) {
+                this.unRegister(queue[0], 0);  
+            }
+
+            queue = [];
+            thread = null;
+            tweenCount = 0;
+        }
+        else {
+            this.unRegister(tween);
+        }
+    };
+    
+    /**
+     * Called per Interval to handle each animation frame.
+     * @method run
+     */    
+    this.run = function() {
+        for (var i = 0, len = queue.length; i < len; ++i) {
+            var tween = queue[i];
+            if ( !tween || !tween.isAnimated() ) { continue; }
+
+            if (tween.currentFrame < tween.totalFrames || tween.totalFrames === null)
+            {
+                tween.currentFrame += 1;
+                
+                if (tween.useSeconds) {
+                    correctFrame(tween);
+                }
+                tween._onTween.fire();          
+            }
+            else { YAHOO.util.AnimMgr.stop(tween, i); }
+        }
+    };
+    
+    var getIndex = function(anim) {
+        for (var i = 0, len = queue.length; i < len; ++i) {
+            if (queue[i] == anim) {
+                return i; // note return;
+            }
+        }
+        return -1;
+    };
+    
+    /**
+     * On the fly frame correction to keep animation on time.
+     * @method correctFrame
+     * @private
+     * @param {Object} tween The Anim instance being corrected.
+     */
+    var correctFrame = function(tween) {
+        var frames = tween.totalFrames;
+        var frame = tween.currentFrame;
+        var expected = (tween.currentFrame * tween.duration * 1000 / tween.totalFrames);
+        var elapsed = (new Date() - tween.getStartTime());
+        var tweak = 0;
+        
+        if (elapsed < tween.duration * 1000) { // check if falling behind
+            tweak = Math.round((elapsed / expected - 1) * tween.currentFrame);
+        } else { // went over duration, so jump to end
+            tweak = frames - (frame + 1); 
+        }
+        if (tweak > 0 && isFinite(tweak)) { // adjust if needed
+            if (tween.currentFrame + tweak >= frames) {// dont go past last frame
+                tweak = frames - (frame + 1);
+            }
+            
+            tween.currentFrame += tweak;      
+        }
+    };
+};
+/**
+ * Used to calculate Bezier splines for any number of control points.
+ * @class Bezier
+ * @namespace YAHOO.util
+ *
+ */
+YAHOO.util.Bezier = new function() {
+    /**
+     * Get the current position of the animated element based on t.
+     * Each point is an array of "x" and "y" values (0 = x, 1 = y)
+     * At least 2 points are required (start and end).
+     * First point is start. Last point is end.
+     * Additional control points are optional.     
+     * @method getPosition
+     * @param {Array} points An array containing Bezier points
+     * @param {Number} t A number between 0 and 1 which is the basis for determining current position
+     * @return {Array} An array containing int x and y member data
+     */
+    this.getPosition = function(points, t) {  
+        var n = points.length;
+        var tmp = [];
+
+        for (var i = 0; i < n; ++i){
+            tmp[i] = [points[i][0], points[i][1]]; // save input
+        }
+        
+        for (var j = 1; j < n; ++j) {
+            for (i = 0; i < n - j; ++i) {
+                tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0];
+                tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; 
+            }
+        }
+    
+        return [ tmp[0][0], tmp[0][1] ]; 
+    
+    };
+};
+(function() {
+/**
+ * Anim subclass for color transitions.
+ * <p>Usage: <code>var myAnim = new Y.ColorAnim(el, { backgroundColor: { from: '#FF0000', to: '#FFFFFF' } }, 1, Y.Easing.easeOut);</code> Color values can be specified with either 112233, #112233, 
+ * [255,255,255], or rgb(255,255,255)</p>
+ * @class ColorAnim
+ * @namespace YAHOO.util
+ * @requires YAHOO.util.Anim
+ * @requires YAHOO.util.AnimMgr
+ * @requires YAHOO.util.Easing
+ * @requires YAHOO.util.Bezier
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @constructor
+ * @extends YAHOO.util.Anim
+ * @param {HTMLElement | String} el Reference to the element that will be animated
+ * @param {Object} attributes The attribute(s) to be animated.
+ * Each attribute is an object with at minimum a "to" or "by" member defined.
+ * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").
+ * All attribute names use camelCase.
+ * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+ * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+ */
+    var ColorAnim = function(el, attributes, duration,  method) {
+        ColorAnim.superclass.constructor.call(this, el, attributes, duration, method);
+    };
+    
+    ColorAnim.NAME = 'ColorAnim';
+
+    ColorAnim.DEFAULT_BGCOLOR = '#fff';
+    // shorthand
+    var Y = YAHOO.util;
+    YAHOO.extend(ColorAnim, Y.Anim);
+
+    var superclass = ColorAnim.superclass;
+    var proto = ColorAnim.prototype;
+    
+    proto.patterns.color = /color$/i;
+    proto.patterns.rgb            = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;
+    proto.patterns.hex            = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;
+    proto.patterns.hex3          = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;
+    proto.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/; // need rgba for safari
+    
+    /**
+     * Attempts to parse the given string and return a 3-tuple.
+     * @method parseColor
+     * @param {String} s The string to parse.
+     * @return {Array} The 3-tuple of rgb values.
+     */
+    proto.parseColor = function(s) {
+        if (s.length == 3) { return s; }
+    
+        var c = this.patterns.hex.exec(s);
+        if (c && c.length == 4) {
+            return [ parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16) ];
+        }
+    
+        c = this.patterns.rgb.exec(s);
+        if (c && c.length == 4) {
+            return [ parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10) ];
+        }
+    
+        c = this.patterns.hex3.exec(s);
+        if (c && c.length == 4) {
+            return [ parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16) ];
+        }
+        
+        return null;
+    };
+
+    proto.getAttribute = function(attr) {
+        var el = this.getEl();
+        if (this.patterns.color.test(attr) ) {
+            var val = YAHOO.util.Dom.getStyle(el, attr);
+            
+            var that = this;
+            if (this.patterns.transparent.test(val)) { // bgcolor default
+                var parent = YAHOO.util.Dom.getAncestorBy(el, function(node) {
+                    return !that.patterns.transparent.test(val);
+                });
+
+                if (parent) {
+                    val = Y.Dom.getStyle(parent, attr);
+                } else {
+                    val = ColorAnim.DEFAULT_BGCOLOR;
+                }
+            }
+        } else {
+            val = superclass.getAttribute.call(this, attr);
+        }
+
+        return val;
+    };
+    
+    proto.doMethod = function(attr, start, end) {
+        var val;
+    
+        if ( this.patterns.color.test(attr) ) {
+            val = [];
+            for (var i = 0, len = start.length; i < len; ++i) {
+                val[i] = superclass.doMethod.call(this, attr, start[i], end[i]);
+            }
+            
+            val = 'rgb('+Math.floor(val[0])+','+Math.floor(val[1])+','+Math.floor(val[2])+')';
+        }
+        else {
+            val = superclass.doMethod.call(this, attr, start, end);
+        }
+
+        return val;
+    };
+
+    proto.setRuntimeAttribute = function(attr) {
+        superclass.setRuntimeAttribute.call(this, attr);
+        
+        if ( this.patterns.color.test(attr) ) {
+            var attributes = this.attributes;
+            var start = this.parseColor(this.runtimeAttributes[attr].start);
+            var end = this.parseColor(this.runtimeAttributes[attr].end);
+            // fix colors if going "by"
+            if ( typeof attributes[attr]['to'] === 'undefined' && typeof attributes[attr]['by'] !== 'undefined' ) {
+                end = this.parseColor(attributes[attr].by);
+            
+                for (var i = 0, len = start.length; i < len; ++i) {
+                    end[i] = start[i] + end[i];
+                }
+            }
+            
+            this.runtimeAttributes[attr].start = start;
+            this.runtimeAttributes[attr].end = end;
+        }
+    };
+
+    Y.ColorAnim = ColorAnim;
+})();
+/*!
+TERMS OF USE - EASING EQUATIONS
+Open source under the BSD License.
+Copyright 2001 Robert Penner All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/**
+ * Singleton that determines how an animation proceeds from start to end.
+ * @class Easing
+ * @namespace YAHOO.util
+*/
+
+YAHOO.util.Easing = {
+
+    /**
+     * Uniform speed between points.
+     * @method easeNone
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeNone: function (t, b, c, d) {
+    	return c*t/d + b;
+    },
+    
+    /**
+     * Begins slowly and accelerates towards end.
+     * @method easeIn
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeIn: function (t, b, c, d) {
+    	return c*(t/=d)*t + b;
+    },
+
+    /**
+     * Begins quickly and decelerates towards end.
+     * @method easeOut
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeOut: function (t, b, c, d) {
+    	return -c *(t/=d)*(t-2) + b;
+    },
+    
+    /**
+     * Begins slowly and decelerates towards end.
+     * @method easeBoth
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeBoth: function (t, b, c, d) {
+    	if ((t/=d/2) < 1) {
+            return c/2*t*t + b;
+        }
+        
+    	return -c/2 * ((--t)*(t-2) - 1) + b;
+    },
+    
+    /**
+     * Begins slowly and accelerates towards end.
+     * @method easeInStrong
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeInStrong: function (t, b, c, d) {
+    	return c*(t/=d)*t*t*t + b;
+    },
+    
+    /**
+     * Begins quickly and decelerates towards end.
+     * @method easeOutStrong
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeOutStrong: function (t, b, c, d) {
+    	return -c * ((t=t/d-1)*t*t*t - 1) + b;
+    },
+    
+    /**
+     * Begins slowly and decelerates towards end.
+     * @method easeBothStrong
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    easeBothStrong: function (t, b, c, d) {
+    	if ((t/=d/2) < 1) {
+            return c/2*t*t*t*t + b;
+        }
+        
+    	return -c/2 * ((t-=2)*t*t*t - 2) + b;
+    },
+
+    /**
+     * Snap in elastic effect.
+     * @method elasticIn
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} a Amplitude (optional)
+     * @param {Number} p Period (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+
+    elasticIn: function (t, b, c, d, a, p) {
+    	if (t == 0) {
+            return b;
+        }
+        if ( (t /= d) == 1 ) {
+            return b+c;
+        }
+        if (!p) {
+            p=d*.3;
+        }
+        
+    	if (!a || a < Math.abs(c)) {
+            a = c; 
+            var s = p/4;
+        }
+    	else {
+            var s = p/(2*Math.PI) * Math.asin (c/a);
+        }
+        
+    	return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+    },
+
+    /**
+     * Snap out elastic effect.
+     * @method elasticOut
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} a Amplitude (optional)
+     * @param {Number} p Period (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    elasticOut: function (t, b, c, d, a, p) {
+    	if (t == 0) {
+            return b;
+        }
+        if ( (t /= d) == 1 ) {
+            return b+c;
+        }
+        if (!p) {
+            p=d*.3;
+        }
+        
+    	if (!a || a < Math.abs(c)) {
+            a = c;
+            var s = p / 4;
+        }
+    	else {
+            var s = p/(2*Math.PI) * Math.asin (c/a);
+        }
+        
+    	return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
+    },
+    
+    /**
+     * Snap both elastic effect.
+     * @method elasticBoth
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} a Amplitude (optional)
+     * @param {Number} p Period (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    elasticBoth: function (t, b, c, d, a, p) {
+    	if (t == 0) {
+            return b;
+        }
+        
+        if ( (t /= d/2) == 2 ) {
+            return b+c;
+        }
+        
+        if (!p) {
+            p = d*(.3*1.5);
+        }
+        
+    	if ( !a || a < Math.abs(c) ) {
+            a = c; 
+            var s = p/4;
+        }
+    	else {
+            var s = p/(2*Math.PI) * Math.asin (c/a);
+        }
+        
+    	if (t < 1) {
+            return -.5*(a*Math.pow(2,10*(t-=1)) * 
+                    Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+        }
+    	return a*Math.pow(2,-10*(t-=1)) * 
+                Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
+    },
+
+
+    /**
+     * Backtracks slightly, then reverses direction and moves to end.
+     * @method backIn
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} s Overshoot (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    backIn: function (t, b, c, d, s) {
+    	if (typeof s == 'undefined') {
+            s = 1.70158;
+        }
+    	return c*(t/=d)*t*((s+1)*t - s) + b;
+    },
+
+    /**
+     * Overshoots end, then reverses and comes back to end.
+     * @method backOut
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} s Overshoot (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    backOut: function (t, b, c, d, s) {
+    	if (typeof s == 'undefined') {
+            s = 1.70158;
+        }
+    	return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
+    },
+    
+    /**
+     * Backtracks slightly, then reverses direction, overshoots end, 
+     * then reverses and comes back to end.
+     * @method backBoth
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @param {Number} s Overshoot (optional)
+     * @return {Number} The computed value for the current animation frame
+     */
+    backBoth: function (t, b, c, d, s) {
+    	if (typeof s == 'undefined') {
+            s = 1.70158; 
+        }
+        
+    	if ((t /= d/2 ) < 1) {
+            return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
+        }
+    	return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
+    },
+
+    /**
+     * Bounce off of start.
+     * @method bounceIn
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    bounceIn: function (t, b, c, d) {
+    	return c - YAHOO.util.Easing.bounceOut(d-t, 0, c, d) + b;
+    },
+    
+    /**
+     * Bounces off end.
+     * @method bounceOut
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    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;
+    },
+    
+    /**
+     * Bounces off start and end.
+     * @method bounceBoth
+     * @param {Number} t Time value used to compute current value
+     * @param {Number} b Starting value
+     * @param {Number} c Delta between start and end values
+     * @param {Number} d Total length of animation
+     * @return {Number} The computed value for the current animation frame
+     */
+    bounceBoth: function (t, b, c, d) {
+    	if (t < d/2) {
+            return YAHOO.util.Easing.bounceIn(t*2, 0, c, d) * .5 + b;
+        }
+    	return YAHOO.util.Easing.bounceOut(t*2-d, 0, c, d) * .5 + c*.5 + b;
+    }
+};
+
+(function() {
+/**
+ * Anim subclass for moving elements along a path defined by the "points" 
+ * member of "attributes".  All "points" are arrays with x, y coordinates.
+ * <p>Usage: <code>var myAnim = new YAHOO.util.Motion(el, { points: { to: [800, 800] } }, 1, YAHOO.util.Easing.easeOut);</code></p>
+ * @class Motion
+ * @namespace YAHOO.util
+ * @requires YAHOO.util.Anim
+ * @requires YAHOO.util.AnimMgr
+ * @requires YAHOO.util.Easing
+ * @requires YAHOO.util.Bezier
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @constructor
+ * @extends YAHOO.util.ColorAnim
+ * @param {String | HTMLElement} el Reference to the element that will be animated
+ * @param {Object} attributes The attribute(s) to be animated.  
+ * Each attribute is an object with at minimum a "to" or "by" member defined.  
+ * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").  
+ * All attribute names use camelCase.
+ * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+ * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+ */
+    var Motion = function(el, attributes, duration,  method) {
+        if (el) { // dont break existing subclasses not using YAHOO.extend
+            Motion.superclass.constructor.call(this, el, attributes, duration, method);
+        }
+    };
+
+
+    Motion.NAME = 'Motion';
+
+    // shorthand
+    var Y = YAHOO.util;
+    YAHOO.extend(Motion, Y.ColorAnim);
+    
+    var superclass = Motion.superclass;
+    var proto = Motion.prototype;
+
+    proto.patterns.points = /^points$/i;
+    
+    proto.setAttribute = function(attr, val, unit) {
+        if (  this.patterns.points.test(attr) ) {
+            unit = unit || 'px';
+            superclass.setAttribute.call(this, 'left', val[0], unit);
+            superclass.setAttribute.call(this, 'top', val[1], unit);
+        } else {
+            superclass.setAttribute.call(this, attr, val, unit);
+        }
+    };
+
+    proto.getAttribute = function(attr) {
+        if (  this.patterns.points.test(attr) ) {
+            var val = [
+                superclass.getAttribute.call(this, 'left'),
+                superclass.getAttribute.call(this, 'top')
+            ];
+        } else {
+            val = superclass.getAttribute.call(this, attr);
+        }
+
+        return val;
+    };
+
+    proto.doMethod = function(attr, start, end) {
+        var val = null;
+
+        if ( this.patterns.points.test(attr) ) {
+            var t = this.method(this.currentFrame, 0, 100, this.totalFrames) / 100;				
+            val = Y.Bezier.getPosition(this.runtimeAttributes[attr], t);
+        } else {
+            val = superclass.doMethod.call(this, attr, start, end);
+        }
+        return val;
+    };
+
+    proto.setRuntimeAttribute = function(attr) {
+        if ( this.patterns.points.test(attr) ) {
+            var el = this.getEl();
+            var attributes = this.attributes;
+            var start;
+            var control = attributes['points']['control'] || [];
+            var end;
+            var i, len;
+            
+            if (control.length > 0 && !(control[0] instanceof Array) ) { // could be single point or array of points
+                control = [control];
+            } else { // break reference to attributes.points.control
+                var tmp = []; 
+                for (i = 0, len = control.length; i< len; ++i) {
+                    tmp[i] = control[i];
+                }
+                control = tmp;
+            }
+
+            if (Y.Dom.getStyle(el, 'position') == 'static') { // default to relative
+                Y.Dom.setStyle(el, 'position', 'relative');
+            }
+    
+            if ( isset(attributes['points']['from']) ) {
+                Y.Dom.setXY(el, attributes['points']['from']); // set position to from point
+            } 
+            else { Y.Dom.setXY( el, Y.Dom.getXY(el) ); } // set it to current position
+            
+            start = this.getAttribute('points'); // get actual top & left
+            
+            // TO beats BY, per SMIL 2.1 spec
+            if ( isset(attributes['points']['to']) ) {
+                end = translateValues.call(this, attributes['points']['to'], start);
+                
+                var pageXY = Y.Dom.getXY(this.getEl());
+                for (i = 0, len = control.length; i < len; ++i) {
+                    control[i] = translateValues.call(this, control[i], start);
+                }
+
+                
+            } else if ( isset(attributes['points']['by']) ) {
+                end = [ start[0] + attributes['points']['by'][0], start[1] + attributes['points']['by'][1] ];
+                
+                for (i = 0, len = control.length; i < len; ++i) {
+                    control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ];
+                }
+            }
+
+            this.runtimeAttributes[attr] = [start];
+            
+            if (control.length > 0) {
+                this.runtimeAttributes[attr] = this.runtimeAttributes[attr].concat(control); 
+            }
+
+            this.runtimeAttributes[attr][this.runtimeAttributes[attr].length] = end;
+        }
+        else {
+            superclass.setRuntimeAttribute.call(this, attr);
+        }
+    };
+    
+    var translateValues = function(val, start) {
+        var pageXY = Y.Dom.getXY(this.getEl());
+        val = [ val[0] - pageXY[0] + start[0], val[1] - pageXY[1] + start[1] ];
+
+        return val; 
+    };
+    
+    var isset = function(prop) {
+        return (typeof prop !== 'undefined');
+    };
+
+    Y.Motion = Motion;
+})();
+(function() {
+/**
+ * Anim subclass for scrolling elements to a position defined by the "scroll"
+ * member of "attributes".  All "scroll" members are arrays with x, y scroll positions.
+ * <p>Usage: <code>var myAnim = new YAHOO.util.Scroll(el, { scroll: { to: [0, 800] } }, 1, YAHOO.util.Easing.easeOut);</code></p>
+ * @class Scroll
+ * @namespace YAHOO.util
+ * @requires YAHOO.util.Anim
+ * @requires YAHOO.util.AnimMgr
+ * @requires YAHOO.util.Easing
+ * @requires YAHOO.util.Bezier
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @requires YAHOO.util.CustomEvent 
+ * @extends YAHOO.util.ColorAnim
+ * @constructor
+ * @param {String or HTMLElement} el Reference to the element that will be animated
+ * @param {Object} attributes The attribute(s) to be animated.  
+ * Each attribute is an object with at minimum a "to" or "by" member defined.  
+ * Additional optional members are "from" (defaults to current value), "units" (defaults to "px").  
+ * All attribute names use camelCase.
+ * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
+ * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
+ */
+    var Scroll = function(el, attributes, duration,  method) {
+        if (el) { // dont break existing subclasses not using YAHOO.extend
+            Scroll.superclass.constructor.call(this, el, attributes, duration, method);
+        }
+    };
+
+    Scroll.NAME = 'Scroll';
+
+    // shorthand
+    var Y = YAHOO.util;
+    YAHOO.extend(Scroll, Y.ColorAnim);
+    
+    var superclass = Scroll.superclass;
+    var proto = Scroll.prototype;
+
+    proto.doMethod = function(attr, start, end) {
+        var val = null;
+    
+        if (attr == 'scroll') {
+            val = [
+                this.method(this.currentFrame, start[0], end[0] - start[0], this.totalFrames),
+                this.method(this.currentFrame, start[1], end[1] - start[1], this.totalFrames)
+            ];
+            
+        } else {
+            val = superclass.doMethod.call(this, attr, start, end);
+        }
+        return val;
+    };
+
+    proto.getAttribute = function(attr) {
+        var val = null;
+        var el = this.getEl();
+        
+        if (attr == 'scroll') {
+            val = [ el.scrollLeft, el.scrollTop ];
+        } else {
+            val = superclass.getAttribute.call(this, attr);
+        }
+        
+        return val;
+    };
+
+    proto.setAttribute = function(attr, val, unit) {
+        var el = this.getEl();
+        
+        if (attr == 'scroll') {
+            el.scrollLeft = val[0];
+            el.scrollTop = val[1];
+        } else {
+            superclass.setAttribute.call(this, attr, val, unit);
+        }
+    };
+
+    Y.Scroll = Scroll;
+})();
+YAHOO.register("animation", YAHOO.util.Anim, {version: "2.6.0", build: "1321"});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/autocomplete.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/autocomplete.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/autocomplete.css
new file mode 100644
index 0000000..82cf7e5
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/autocomplete.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/blankimage.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/blankimage.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/blankimage.png
new file mode 100644
index 0000000..b87bb24
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/blankimage.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/button.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/button.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/button.css
new file mode 100644
index 0000000..bfe8488
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/button.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;_margin:0;_position:static;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:1.875;*padding-bottom:1px;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20p
 x;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam 
 .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-active button,.yui-skin-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sa
 m .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/calendar.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/calendar.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/calendar.css
new file mode 100644
index 0000000..aad1782
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/calendar.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar .calnavright{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none;}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top
 :0;display:none;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:none;background-color:transparent;cursor:pointer;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{pa
 dding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;padding:0;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdayrow th{
 padding:0;border:none;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:none;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.
 yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#ccff99;}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1;}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(sprite.png) r
 epeat-x 0 0;border-color:#A0A0A0;cursor:pointer;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:0.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2;}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em;}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#EDF5FF;border-top:1px solid black;display:none;}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold;}.yui-skin-sam .yui-ca
 lcontainer .yui-cal-nav-mc{width:100%;_width:auto;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#FFEE69;border:1px solid #000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(sprite.png) repeat-x 0 -1400px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff;}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/colorpicker.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/colorpicker.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/colorpicker.css
new file mode 100644
index 0000000..82c6cfd
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/colorpicker.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0px none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0px none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yui-picker-
 mask{position:absolute;z-index:1;top:0px;left:0px;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0px !important;}.yui-picker-controls .bd{height:100px;border-width:0px !important;}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;list-style:none;margin:0}.yui-picker-controls input{font-size:0.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000;}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/container.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/container.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/container.css
new file mode 100644
index 0000000..5023824
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/container.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;}.mask.block-scrollbars{overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px;}.yui-effect-fade .underlay{display:none;}.yui-tt-shadow{position:absolute;}.yui-override-padding{padding:0 !important;}.yui-panel-container .container-close{overflow:hidden;text-indent:-10000em;text-decoration:none;}.yui-skin-sam .mask{background-color:#000;opacity:.25
 ;*filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px;}.yui-skin-sam .yui-panel{position:relative;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;*border-width:1px;*zoom:1;_zoom:normal;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;*margin:0;*border:0;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .yui-panel-container.focused .yui-panel .hd{}.yui-skin-sam .container-close{position:absolute;top:5px;right
 :6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 4px 0 2px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;left:-3px;right:-3px;bottom:-3px;*top:4px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_left:0;_right:0;_bottom:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold;}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369;}.yui-skin
 -sam .yui-dialog .ft span.default button{color:#fff;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled{background-position:0pt -1500px;border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled button{color:#a6a6a6;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative
 ;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;*filter:alpha(opacity=12);}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/datatable.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/datatable.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/datatable.css
new file mode 100644
index 0000000..55dc58d
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/datatable.css
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+.yui-skin-sam .yui-dt-mask{position:absolute;z-index:9500;}.yui-dt-tmp{position:absolute;left:-9000px;}.yui-dt-scrollable .yui-dt-bd{overflow:auto;}.yui-dt-scrollable .yui-dt-hd{overflow:hidden;position:relative;}.yui-dt-scrollable .yui-dt-bd thead tr,.yui-dt-scrollable .yui-dt-bd thead th{position:absolute;left:-1500px;}.yui-dt-scrollable tbody{-moz-outline:none;}.yui-dt-draggable{cursor:move;}.yui-dt-coltarget{position:absolute;z-index:999;}.yui-dt-hd{zoom:1;}th.yui-dt-resizeable .yui-dt-resizerliner{position:relative;}.yui-dt-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;background-color:#CCC;opacity:0;filter:alpha(opacity=0);}.yui-dt-resizerproxy{visibility:hidden;position:absolute;z-index:9000;}th.yui-dt-hidden .yui-dt-liner,td.yui-dt-hidden .yui-dt-liner,th.yui-dt-hidden .yui-dt-resizer{display:none;}.yui-dt-editor{position:absolute;z-index:9000;}.yui-skin-sam .yui-dt table{margin:0;padding:0;font-family:arial;font-size:inherit;border
 -collapse:separate;*border-collapse:collapse;border-spacing:0;border:1px solid #7F7F7F;}.yui-skin-sam .yui-dt thead{border-spacing:0;}.yui-skin-sam .yui-dt caption{color:#000000;font-size:85%;font-weight:normal;font-style:italic;line-height:1;padding:1em 0pt;text-align:center;}.yui-skin-sam .yui-dt th{background:#D8D8DA url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yui-dt th,.yui-skin-sam .yui-dt th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom;}.yui-skin-sam .yui-dt th{margin:0;padding:0;border:none;border-right:1px solid #CBCBCB;}.yui-skin-sam .yui-dt tr.yui-dt-first td{border-top:1px solid #7F7F7F;}.yui-skin-sam .yui-dt th .yui-dt-liner{white-space:nowrap;}.yui-skin-sam .yui-dt-liner{margin:0;padding:0;padding:4px 10px 4px 10px;}.yui-skin-sam .yui-dt-coltarget{width:5px;background-color:red;}.yui-skin-sam .yui-dt td{margin:0;padding:0;border:none;border-right:1px solid #CBCBCB;text-align:left;}.yui-skin-sam .yui-dt-list td{border-right:none;}.yui-skin-
 sam .yui-dt-resizer{width:6px;}.yui-skin-sam .yui-dt-mask{background-color:#000;opacity:.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-dt-message{background-color:#FFF;}.yui-skin-sam .yui-dt-scrollable table{border:none;}.yui-skin-sam .yui-dt-scrollable .yui-dt-hd{border-left:1px solid #7F7F7F;border-top:1px solid #7F7F7F;border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-scrollable .yui-dt-bd{border-left:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;border-right:1px solid #7F7F7F;background-color:#FFF;}.yui-skin-sam .yui-dt-scrollable .yui-dt-data tr.yui-dt-last td{border-bottom:1px solid #7F7F7F;}.yui-skin-sam thead .yui-dt-sortable{cursor:pointer;}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(sprite.png) repeat-x 0 -100px;}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:10px;}.yui-skin-sam th.yui-dt-asc .yui-dt-liner{background:url(dt-arrow-up.png) no-repeat right;}.yui-skin-sam th.yui-dt-desc .yui-dt-liner{background:url(dt-arrow-d
 n.png) no-repeat right;}tbody .yui-dt-editable{cursor:pointer;}.yui-dt-editor{text-align:left;background-color:#F2F2F2;border:1px solid #808080;padding:6px;}.yui-dt-editor label{padding-left:4px;padding-right:6px;}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right;}.yui-dt-editor .yui-dt-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px;}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584E0;border:1px solid #304369;color:#FFF}.yui-dt-editor .yui-dt-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000;}.yui-dt-editor .yui-dt-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000;}.yui-skin-sam tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam tr.yui-dt-odd{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;
 }.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#DBEAFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam th.yui-dt-highlighted,.yui-skin-sam th.yui-dt-highlighted a{background-color:#B2D2FF;}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list th.yui-dt-highlighted,.yui-skin-sam .yui-dt-list th.yui-dt-highlighted a{b
 ackground-color:#B2D2FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam th.yui-dt-selected,.yui-skin-sam th.yui-dt-selected a{background-color:#446CD7;}.yui-skin-sam tr.yui-dt-selected td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-list th.yui-dt-selected,.yui-skin-sam .yui-dt-list th.yui-dt-selected a{background-color:#446CD7;}.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-
 skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-dt-paginator .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px;}.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none;}.yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none;}.yui-skin-sam a.yui-dt-page{border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;background-color:#fff}.yui-skin-sam .yui-dt-selected{border:1px solid #fff;background-color:#fff;}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/dt-arrow-dn.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/dt-arrow-dn.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/dt-arrow-dn.png
new file mode 100644
index 0000000..85fda0b
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/dt-arrow-dn.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/dt-arrow-up.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/dt-arrow-up.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/dt-arrow-up.png
new file mode 100644
index 0000000..1c67431
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/dt-arrow-up.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor-knob.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor-knob.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor-knob.gif
new file mode 100644
index 0000000..03feab3
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor-knob.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor-sprite-active.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor-sprite-active.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor-sprite-active.gif
new file mode 100644
index 0000000..3e9d420
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor-sprite-active.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor-sprite.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor-sprite.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor-sprite.gif
new file mode 100644
index 0000000..02042fa
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/assets/skins/sam/editor-sprite.gif differ


[03/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/autocomplete-debug.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/autocomplete-debug.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/autocomplete-debug.js
new file mode 100644
index 0000000..56e2ace
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/yui/build/autocomplete/autocomplete-debug.js
@@ -0,0 +1,2917 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+/////////////////////////////////////////////////////////////////////////////
+//
+// YAHOO.widget.DataSource Backwards Compatibility
+//
+/////////////////////////////////////////////////////////////////////////////
+
+YAHOO.widget.DS_JSArray = YAHOO.util.LocalDataSource;
+
+YAHOO.widget.DS_JSFunction = YAHOO.util.FunctionDataSource;
+
+YAHOO.widget.DS_XHR = function(sScriptURI, aSchema, oConfigs) {
+    var DS = new YAHOO.util.XHRDataSource(sScriptURI, oConfigs);
+    DS._aDeprecatedSchema = aSchema;
+    return DS;
+};
+
+YAHOO.widget.DS_ScriptNode = function(sScriptURI, aSchema, oConfigs) {
+    var DS = new YAHOO.util.ScriptNodeDataSource(sScriptURI, oConfigs);
+    DS._aDeprecatedSchema = aSchema;
+    return DS;
+};
+
+YAHOO.widget.DS_XHR.TYPE_JSON = YAHOO.util.DataSourceBase.TYPE_JSON;
+YAHOO.widget.DS_XHR.TYPE_XML = YAHOO.util.DataSourceBase.TYPE_XML;
+YAHOO.widget.DS_XHR.TYPE_FLAT = YAHOO.util.DataSourceBase.TYPE_TEXT;
+
+// TODO: widget.DS_ScriptNode.scriptCallbackParam
+
+
+
+ /**
+ * The AutoComplete control provides the front-end logic for text-entry suggestion and
+ * completion functionality.
+ *
+ * @module autocomplete
+ * @requires yahoo, dom, event, datasource
+ * @optional animation
+ * @namespace YAHOO.widget
+ * @title AutoComplete Widget
+ */
+
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+
+/**
+ * The AutoComplete class provides the customizable functionality of a plug-and-play DHTML
+ * auto completion widget.  Some key features:
+ * <ul>
+ * <li>Navigate with up/down arrow keys and/or mouse to pick a selection</li>
+ * <li>The drop down container can "roll down" or "fly out" via configurable
+ * animation</li>
+ * <li>UI look-and-feel customizable through CSS, including container
+ * attributes, borders, position, fonts, etc</li>
+ * </ul>
+ *
+ * @class AutoComplete
+ * @constructor
+ * @param elInput {HTMLElement} DOM element reference of an input field.
+ * @param elInput {String} String ID of an input field.
+ * @param elContainer {HTMLElement} DOM element reference of an existing DIV.
+ * @param elContainer {String} String ID of an existing DIV.
+ * @param oDataSource {YAHOO.widget.DataSource} DataSource instance.
+ * @param oConfigs {Object} (optional) Object literal of configuration params.
+ */
+YAHOO.widget.AutoComplete = function(elInput,elContainer,oDataSource,oConfigs) {
+    if(elInput && elContainer && oDataSource) {
+        // Validate DataSource
+        if(oDataSource instanceof YAHOO.util.DataSourceBase) {
+            this.dataSource = oDataSource;
+        }
+        else {
+            YAHOO.log("Could not instantiate AutoComplete due to an invalid DataSource", "error", this.toString());
+            return;
+        }
+
+        // YAHOO.widget.DataSource schema backwards compatibility
+        // Converted deprecated schema into supported schema
+        // First assume key data is held in position 0 of results array
+        this.key = 0;
+        var schema = oDataSource.responseSchema;
+        // An old school schema has been defined in the deprecated DataSource constructor
+        if(oDataSource._aDeprecatedSchema) {
+            var aDeprecatedSchema = oDataSource._aDeprecatedSchema;
+            if(YAHOO.lang.isArray(aDeprecatedSchema)) {
+                
+                if((oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_JSON) || 
+                (oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_UNKNOWN)) { // Used to default to unknown
+                    // Store the resultsList
+                    schema.resultsList = aDeprecatedSchema[0];
+                    // Store the key
+                    this.key = aDeprecatedSchema[1];
+                    // Only resultsList and key are defined, so grab all the data
+                    schema.fields = (aDeprecatedSchema.length < 3) ? null : aDeprecatedSchema.slice(1);
+                }
+                else if(oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_XML) {
+                    schema.resultNode = aDeprecatedSchema[0];
+                    this.key = aDeprecatedSchema[1];
+                    schema.fields = aDeprecatedSchema.slice(1);
+                }                
+                else if(oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_TEXT) {
+                    schema.recordDelim = aDeprecatedSchema[0];
+                    schema.fieldDelim = aDeprecatedSchema[1];
+                }                
+                oDataSource.responseSchema = schema;
+            }
+        }
+        
+        // Validate input element
+        if(YAHOO.util.Dom.inDocument(elInput)) {
+            if(YAHOO.lang.isString(elInput)) {
+                    this._sName = "instance" + YAHOO.widget.AutoComplete._nIndex + " " + elInput;
+                    this._elTextbox = document.getElementById(elInput);
+            }
+            else {
+                this._sName = (elInput.id) ?
+                    "instance" + YAHOO.widget.AutoComplete._nIndex + " " + elInput.id:
+                    "instance" + YAHOO.widget.AutoComplete._nIndex;
+                this._elTextbox = elInput;
+            }
+            YAHOO.util.Dom.addClass(this._elTextbox, "yui-ac-input");
+        }
+        else {
+            YAHOO.log("Could not instantiate AutoComplete due to an invalid input element", "error", this.toString());
+            return;
+        }
+
+        // Validate container element
+        if(YAHOO.util.Dom.inDocument(elContainer)) {
+            if(YAHOO.lang.isString(elContainer)) {
+                    this._elContainer = document.getElementById(elContainer);
+            }
+            else {
+                this._elContainer = elContainer;
+            }
+            if(this._elContainer.style.display == "none") {
+                YAHOO.log("The container may not display properly if display is set to \"none\" in CSS", "warn", this.toString());
+            }
+            
+            // For skinning
+            var elParent = this._elContainer.parentNode;
+            var elTag = elParent.tagName.toLowerCase();
+            if(elTag == "div") {
+                YAHOO.util.Dom.addClass(elParent, "yui-ac");
+            }
+            else {
+                YAHOO.log("Could not find the wrapper element for skinning", "warn", this.toString());
+            }
+        }
+        else {
+            YAHOO.log("Could not instantiate AutoComplete due to an invalid container element", "error", this.toString());
+            return;
+        }
+
+        // Default applyLocalFilter setting is to enable for local sources
+        if(this.dataSource.dataType === YAHOO.util.DataSourceBase.TYPE_LOCAL) {
+            this.applyLocalFilter = true;
+        }
+        
+        // Set any config params passed in to override defaults
+        if(oConfigs && (oConfigs.constructor == Object)) {
+            for(var sConfig in oConfigs) {
+                if(sConfig) {
+                    this[sConfig] = oConfigs[sConfig];
+                }
+            }
+        }
+
+        // Initialization sequence
+        this._initContainerEl();
+        this._initProps();
+        this._initListEl();
+        this._initContainerHelperEls();
+
+        // Set up events
+        var oSelf = this;
+        var elTextbox = this._elTextbox;
+
+        // Dom events
+        YAHOO.util.Event.addListener(elTextbox,"keyup",oSelf._onTextboxKeyUp,oSelf);
+        YAHOO.util.Event.addListener(elTextbox,"keydown",oSelf._onTextboxKeyDown,oSelf);
+        YAHOO.util.Event.addListener(elTextbox,"focus",oSelf._onTextboxFocus,oSelf);
+        YAHOO.util.Event.addListener(elTextbox,"blur",oSelf._onTextboxBlur,oSelf);
+        YAHOO.util.Event.addListener(elContainer,"mouseover",oSelf._onContainerMouseover,oSelf);
+        YAHOO.util.Event.addListener(elContainer,"mouseout",oSelf._onContainerMouseout,oSelf);
+        YAHOO.util.Event.addListener(elContainer,"click",oSelf._onContainerClick,oSelf);
+        YAHOO.util.Event.addListener(elContainer,"scroll",oSelf._onContainerScroll,oSelf);
+        YAHOO.util.Event.addListener(elContainer,"resize",oSelf._onContainerResize,oSelf);
+        YAHOO.util.Event.addListener(elTextbox,"keypress",oSelf._onTextboxKeyPress,oSelf);
+        YAHOO.util.Event.addListener(window,"unload",oSelf._onWindowUnload,oSelf);
+
+        // Custom events
+        this.textboxFocusEvent = new YAHOO.util.CustomEvent("textboxFocus", this);
+        this.textboxKeyEvent = new YAHOO.util.CustomEvent("textboxKey", this);
+        this.dataRequestEvent = new YAHOO.util.CustomEvent("dataRequest", this);
+        this.dataReturnEvent = new YAHOO.util.CustomEvent("dataReturn", this);
+        this.dataErrorEvent = new YAHOO.util.CustomEvent("dataError", this);
+        this.containerPopulateEvent = new YAHOO.util.CustomEvent("containerPopulate", this);
+        this.containerExpandEvent = new YAHOO.util.CustomEvent("containerExpand", this);
+        this.typeAheadEvent = new YAHOO.util.CustomEvent("typeAhead", this);
+        this.itemMouseOverEvent = new YAHOO.util.CustomEvent("itemMouseOver", this);
+        this.itemMouseOutEvent = new YAHOO.util.CustomEvent("itemMouseOut", this);
+        this.itemArrowToEvent = new YAHOO.util.CustomEvent("itemArrowTo", this);
+        this.itemArrowFromEvent = new YAHOO.util.CustomEvent("itemArrowFrom", this);
+        this.itemSelectEvent = new YAHOO.util.CustomEvent("itemSelect", this);
+        this.unmatchedItemSelectEvent = new YAHOO.util.CustomEvent("unmatchedItemSelect", this);
+        this.selectionEnforceEvent = new YAHOO.util.CustomEvent("selectionEnforce", this);
+        this.containerCollapseEvent = new YAHOO.util.CustomEvent("containerCollapse", this);
+        this.textboxBlurEvent = new YAHOO.util.CustomEvent("textboxBlur", this);
+        this.textboxChangeEvent = new YAHOO.util.CustomEvent("textboxChange", this);
+        
+        // Finish up
+        elTextbox.setAttribute("autocomplete","off");
+        YAHOO.widget.AutoComplete._nIndex++;
+        YAHOO.log("AutoComplete initialized","info",this.toString());
+    }
+    // Required arguments were not found
+    else {
+        YAHOO.log("Could not instantiate AutoComplete due invalid arguments", "error", this.toString());
+    }
+};
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Public member variables
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * The DataSource object that encapsulates the data used for auto completion.
+ * This object should be an inherited object from YAHOO.widget.DataSource.
+ *
+ * @property dataSource
+ * @type YAHOO.widget.DataSource
+ */
+YAHOO.widget.AutoComplete.prototype.dataSource = null;
+
+/**
+ * By default, results from local DataSources will pass through the filterResults
+ * method to apply a client-side matching algorithm. 
+ * 
+ * @property applyLocalFilter
+ * @type Boolean
+ * @default true for local arrays and json, otherwise false
+ */
+YAHOO.widget.AutoComplete.prototype.applyLocalFilter = null;
+
+/**
+ * When applyLocalFilter is true, the local filtering algorthim can have case sensitivity
+ * enabled. 
+ * 
+ * @property queryMatchCase
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.queryMatchCase = false;
+
+/**
+ * When applyLocalFilter is true, results can  be locally filtered to return
+ * matching strings that "contain" the query string rather than simply "start with"
+ * the query string.
+ * 
+ * @property queryMatchContains
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.queryMatchContains = false;
+
+/**
+ * Enables query subset matching. When the DataSource's cache is enabled and queryMatchSubset is
+ * true, substrings of queries will return matching cached results. For
+ * instance, if the first query is for "abc" susequent queries that start with
+ * "abc", like "abcd", will be queried against the cache, and not the live data
+ * source. Recommended only for DataSources that return comprehensive results
+ * for queries with very few characters.
+ *
+ * @property queryMatchSubset
+ * @type Boolean
+ * @default false
+ *
+ */
+YAHOO.widget.AutoComplete.prototype.queryMatchSubset = false;
+
+/**
+ * Number of characters that must be entered before querying for results. A negative value
+ * effectively turns off the widget. A value of 0 allows queries of null or empty string
+ * values.
+ *
+ * @property minQueryLength
+ * @type Number
+ * @default 1
+ */
+YAHOO.widget.AutoComplete.prototype.minQueryLength = 1;
+
+/**
+ * Maximum number of results to display in results container.
+ *
+ * @property maxResultsDisplayed
+ * @type Number
+ * @default 10
+ */
+YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed = 10;
+
+/**
+ * Number of seconds to delay before submitting a query request.  If a query
+ * request is received before a previous one has completed its delay, the
+ * previous request is cancelled and the new request is set to the delay. If 
+ * typeAhead is also enabled, this value must always be less than the typeAheadDelay
+ * in order to avoid certain race conditions. 
+ *
+ * @property queryDelay
+ * @type Number
+ * @default 0.2
+ */
+YAHOO.widget.AutoComplete.prototype.queryDelay = 0.2;
+
+/**
+ * If typeAhead is true, number of seconds to delay before updating input with
+ * typeAhead value. In order to prevent certain race conditions, this value must
+ * always be greater than the queryDelay.
+ *
+ * @property typeAheadDelay
+ * @type Number
+ * @default 0.5
+ */
+YAHOO.widget.AutoComplete.prototype.typeAheadDelay = 0.5;
+
+/**
+ * When IME usage is detected, AutoComplete will switch to querying the input
+ * value at the given interval rather than per key event.
+ *
+ * @property queryInterval
+ * @type Number
+ * @default 500
+ */
+YAHOO.widget.AutoComplete.prototype.queryInterval = 500;
+
+/**
+ * Class name of a highlighted item within results container.
+ *
+ * @property highlightClassName
+ * @type String
+ * @default "yui-ac-highlight"
+ */
+YAHOO.widget.AutoComplete.prototype.highlightClassName = "yui-ac-highlight";
+
+/**
+ * Class name of a pre-highlighted item within results container.
+ *
+ * @property prehighlightClassName
+ * @type String
+ */
+YAHOO.widget.AutoComplete.prototype.prehighlightClassName = null;
+
+/**
+ * Query delimiter. A single character separator for multiple delimited
+ * selections. Multiple delimiter characteres may be defined as an array of
+ * strings. A null value or empty string indicates that query results cannot
+ * be delimited. This feature is not recommended if you need forceSelection to
+ * be true.
+ *
+ * @property delimChar
+ * @type String | String[]
+ */
+YAHOO.widget.AutoComplete.prototype.delimChar = null;
+
+/**
+ * Whether or not the first item in results container should be automatically highlighted
+ * on expand.
+ *
+ * @property autoHighlight
+ * @type Boolean
+ * @default true
+ */
+YAHOO.widget.AutoComplete.prototype.autoHighlight = true;
+
+/**
+ * If autohighlight is enabled, whether or not the input field should be automatically updated
+ * with the first query result as the user types, auto-selecting the substring portion
+ * of the first result that the user has not yet typed.
+ *
+ * @property typeAhead
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.typeAhead = false;
+
+/**
+ * Whether or not to animate the expansion/collapse of the results container in the
+ * horizontal direction.
+ *
+ * @property animHoriz
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.animHoriz = false;
+
+/**
+ * Whether or not to animate the expansion/collapse of the results container in the
+ * vertical direction.
+ *
+ * @property animVert
+ * @type Boolean
+ * @default true
+ */
+YAHOO.widget.AutoComplete.prototype.animVert = true;
+
+/**
+ * Speed of container expand/collapse animation, in seconds..
+ *
+ * @property animSpeed
+ * @type Number
+ * @default 0.3
+ */
+YAHOO.widget.AutoComplete.prototype.animSpeed = 0.3;
+
+/**
+ * Whether or not to force the user's selection to match one of the query
+ * results. Enabling this feature essentially transforms the input field into a
+ * &lt;select&gt; field. This feature is not recommended with delimiter character(s)
+ * defined.
+ *
+ * @property forceSelection
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.forceSelection = false;
+
+/**
+ * Whether or not to allow browsers to cache user-typed input in the input
+ * field. Disabling this feature will prevent the widget from setting the
+ * autocomplete="off" on the input field. When autocomplete="off"
+ * and users click the back button after form submission, user-typed input can
+ * be prefilled by the browser from its cache. This caching of user input may
+ * not be desired for sensitive data, such as credit card numbers, in which
+ * case, implementers should consider setting allowBrowserAutocomplete to false.
+ *
+ * @property allowBrowserAutocomplete
+ * @type Boolean
+ * @default true
+ */
+YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete = true;
+
+/**
+ * Enabling this feature prevents the toggling of the container to a collapsed state.
+ * Setting to true does not automatically trigger the opening of the container.
+ * Implementers are advised to pre-load the container with an explicit "sendQuery()" call.   
+ *
+ * @property alwaysShowContainer
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.alwaysShowContainer = false;
+
+/**
+ * Whether or not to use an iFrame to layer over Windows form elements in
+ * IE. Set to true only when the results container will be on top of a
+ * &lt;select&gt; field in IE and thus exposed to the IE z-index bug (i.e.,
+ * 5.5 < IE < 7).
+ *
+ * @property useIFrame
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.useIFrame = false;
+
+/**
+ * Whether or not the results container should have a shadow.
+ *
+ * @property useShadow
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.useShadow = false;
+
+/**
+ * Whether or not the input field should be updated with selections.
+ *
+ * @property supressInputUpdate
+ * @type Boolean
+ * @default false
+ */
+YAHOO.widget.AutoComplete.prototype.suppressInputUpdate = false;
+
+/**
+ * For backward compatibility to pre-2.6.0 formatResults() signatures, setting
+ * resultsTypeList to true will take each object literal result returned by
+ * DataSource and flatten into an array.  
+ *
+ * @property resultTypeList
+ * @type Boolean
+ * @default true
+ */
+YAHOO.widget.AutoComplete.prototype.resultTypeList = true;
+
+/**
+ * For XHR DataSources, AutoComplete will automatically insert a "?" between the server URI and 
+ * the "query" param/value pair. To prevent this behavior, implementers should
+ * set this value to false. To more fully customize the query syntax, implementers
+ * should override the generateRequest() method. 
+ *
+ * @property queryQuestionMark
+ * @type Boolean
+ * @default true
+ */
+YAHOO.widget.AutoComplete.prototype.queryQuestionMark = true;
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Public methods
+//
+/////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Public accessor to the unique name of the AutoComplete instance.
+ *
+ * @method toString
+ * @return {String} Unique name of the AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.toString = function() {
+    return "AutoComplete " + this._sName;
+};
+
+ /**
+ * Returns DOM reference to input element.
+ *
+ * @method getInputEl
+ * @return {HTMLELement} DOM reference to input element.
+ */
+YAHOO.widget.AutoComplete.prototype.getInputEl = function() {
+    return this._elTextbox;
+};
+
+ /**
+ * Returns DOM reference to container element.
+ *
+ * @method getContainerEl
+ * @return {HTMLELement} DOM reference to container element.
+ */
+YAHOO.widget.AutoComplete.prototype.getContainerEl = function() {
+    return this._elContainer;
+};
+
+ /**
+ * Returns true if widget instance is currently focused.
+ *
+ * @method isFocused
+ * @return {Boolean} Returns true if widget instance is currently focused.
+ */
+YAHOO.widget.AutoComplete.prototype.isFocused = function() {
+    return (this._bFocused === null) ? false : this._bFocused;
+};
+
+ /**
+ * Returns true if container is in an expanded state, false otherwise.
+ *
+ * @method isContainerOpen
+ * @return {Boolean} Returns true if container is in an expanded state, false otherwise.
+ */
+YAHOO.widget.AutoComplete.prototype.isContainerOpen = function() {
+    return this._bContainerOpen;
+};
+
+/**
+ * Public accessor to the &lt;ul&gt; element that displays query results within the results container.
+ *
+ * @method getListEl
+ * @return {HTMLElement[]} Reference to &lt;ul&gt; element within the results container.
+ */
+YAHOO.widget.AutoComplete.prototype.getListEl = function() {
+    return this._elList;
+};
+
+/**
+ * Public accessor to the matching string associated with a given &lt;li&gt; result.
+ *
+ * @method getListItemMatch
+ * @param elListItem {HTMLElement} Reference to &lt;LI&gt; element.
+ * @return {String} Matching string.
+ */
+YAHOO.widget.AutoComplete.prototype.getListItemMatch = function(elListItem) {
+    if(elListItem._sResultMatch) {
+        return elListItem._sResultMatch;
+    }
+    else {
+        return null;
+    }
+};
+
+/**
+ * Public accessor to the result data associated with a given &lt;li&gt; result.
+ *
+ * @method getListItemData
+ * @param elListItem {HTMLElement} Reference to &lt;LI&gt; element.
+ * @return {Object} Result data.
+ */
+YAHOO.widget.AutoComplete.prototype.getListItemData = function(elListItem) {
+    if(elListItem._oResultData) {
+        return elListItem._oResultData;
+    }
+    else {
+        return null;
+    }
+};
+
+/**
+ * Public accessor to the index of the associated with a given &lt;li&gt; result.
+ *
+ * @method getListItemIndex
+ * @param elListItem {HTMLElement} Reference to &lt;LI&gt; element.
+ * @return {Number} Index.
+ */
+YAHOO.widget.AutoComplete.prototype.getListItemIndex = function(elListItem) {
+    if(YAHOO.lang.isNumber(elListItem._nItemIndex)) {
+        return elListItem._nItemIndex;
+    }
+    else {
+        return null;
+    }
+};
+
+/**
+ * Sets HTML markup for the results container header. This markup will be
+ * inserted within a &lt;div&gt; tag with a class of "yui-ac-hd".
+ *
+ * @method setHeader
+ * @param sHeader {String} HTML markup for results container header.
+ */
+YAHOO.widget.AutoComplete.prototype.setHeader = function(sHeader) {
+    if(this._elHeader) {
+        var elHeader = this._elHeader;
+        if(sHeader) {
+            elHeader.innerHTML = sHeader;
+            elHeader.style.display = "block";
+        }
+        else {
+            elHeader.innerHTML = "";
+            elHeader.style.display = "none";
+        }
+    }
+};
+
+/**
+ * Sets HTML markup for the results container footer. This markup will be
+ * inserted within a &lt;div&gt; tag with a class of "yui-ac-ft".
+ *
+ * @method setFooter
+ * @param sFooter {String} HTML markup for results container footer.
+ */
+YAHOO.widget.AutoComplete.prototype.setFooter = function(sFooter) {
+    if(this._elFooter) {
+        var elFooter = this._elFooter;
+        if(sFooter) {
+                elFooter.innerHTML = sFooter;
+                elFooter.style.display = "block";
+        }
+        else {
+            elFooter.innerHTML = "";
+            elFooter.style.display = "none";
+        }
+    }
+};
+
+/**
+ * Sets HTML markup for the results container body. This markup will be
+ * inserted within a &lt;div&gt; tag with a class of "yui-ac-bd".
+ *
+ * @method setBody
+ * @param sBody {String} HTML markup for results container body.
+ */
+YAHOO.widget.AutoComplete.prototype.setBody = function(sBody) {
+    if(this._elBody) {
+        var elBody = this._elBody;
+        YAHOO.util.Event.purgeElement(elBody, true);
+        if(sBody) {
+            elBody.innerHTML = sBody;
+            elBody.style.display = "block";
+        }
+        else {
+            elBody.innerHTML = "";
+            elBody.style.display = "none";
+        }
+        this._elList = null;
+    }
+};
+
+/**
+* A function that converts an AutoComplete query into a request value which is then
+* passed to the DataSource's sendRequest method in order to retrieve data for 
+* the query. By default, returns a String with the syntax: "query={query}"
+* Implementers can customize this method for custom request syntaxes.
+* 
+* @method generateRequest
+* @param sQuery {String} Query string
+*/
+YAHOO.widget.AutoComplete.prototype.generateRequest = function(sQuery) {
+    var dataType = this.dataSource.dataType;
+    
+    // Transform query string in to a request for remote data
+    // By default, local data doesn't need a transformation, just passes along the query as is.
+    if(dataType === YAHOO.util.DataSourceBase.TYPE_XHR) {
+        // By default, XHR GET requests look like "{scriptURI}?{scriptQueryParam}={sQuery}&{scriptQueryAppend}"
+        if(!this.dataSource.connMethodPost) {
+            sQuery = (this.queryQuestionMark ? "?" : "") + (this.dataSource.scriptQueryParam || "query") + "=" + sQuery + 
+                (this.dataSource.scriptQueryAppend ? ("&" + this.dataSource.scriptQueryAppend) : "");        
+        }
+        // By default, XHR POST bodies are sent to the {scriptURI} like "{scriptQueryParam}={sQuery}&{scriptQueryAppend}"
+        else {
+            sQuery = (this.dataSource.scriptQueryParam || "query") + "=" + sQuery + 
+                (this.dataSource.scriptQueryAppend ? ("&" + this.dataSource.scriptQueryAppend) : "");
+        }
+    }
+    // By default, remote script node requests look like "{scriptURI}&{scriptCallbackParam}={callbackString}&{scriptQueryParam}={sQuery}&{scriptQueryAppend}"
+    else if(dataType === YAHOO.util.DataSourceBase.TYPE_SCRIPTNODE) {
+        sQuery = "&" + (this.dataSource.scriptQueryParam || "query") + "=" + sQuery + 
+            (this.dataSource.scriptQueryAppend ? ("&" + this.dataSource.scriptQueryAppend) : "");    
+    }
+    
+    return sQuery;
+};
+
+/**
+ * Makes query request to the DataSource.
+ *
+ * @method sendQuery
+ * @param sQuery {String} Query string.
+ */
+YAHOO.widget.AutoComplete.prototype.sendQuery = function(sQuery) {
+    // Adjust programatically sent queries to look like they input by user
+    // when delimiters are enabled
+    var newQuery = (this.delimChar) ? this._elTextbox.value + sQuery : sQuery;
+    this._sendQuery(newQuery);
+};
+
+/**
+ * Collapses container.
+ *
+ * @method collapseContainer
+ */
+YAHOO.widget.AutoComplete.prototype.collapseContainer = function() {
+    this._toggleContainer(false);
+};
+
+/**
+ * Handles subset matching for when queryMatchSubset is enabled.
+ *
+ * @method getSubsetMatches
+ * @param sQuery {String} Query string.
+ * @return {Object} oParsedResponse or null. 
+ */
+YAHOO.widget.AutoComplete.prototype.getSubsetMatches = function(sQuery) {
+    var subQuery, oCachedResponse, subRequest;
+    // Loop through substrings of each cached element's query property...
+    for(var i = sQuery.length; i >= this.minQueryLength ; i--) {
+        subRequest = this.generateRequest(sQuery.substr(0,i));
+        this.dataRequestEvent.fire(this, subQuery, subRequest);
+        YAHOO.log("Searching for query subset \"" + subQuery + "\" in cache", "info", this.toString());
+        
+        // If a substring of the query is found in the cache
+        oCachedResponse = this.dataSource.getCachedResponse(subRequest);
+        if(oCachedResponse) {
+            YAHOO.log("Found match for query subset \"" + subQuery + "\": " + YAHOO.lang.dump(oCachedResponse), "info", this.toString());
+            return this.filterResults.apply(this.dataSource, [sQuery, oCachedResponse, oCachedResponse, {scope:this}]);
+        }
+    }
+    YAHOO.log("Did not find subset match for query subset \"" + sQuery + "\"" , "info", this.toString());
+    return null;
+};
+
+/**
+ * Executed by DataSource (within DataSource scope via doBeforeParseData()) to
+ * handle responseStripAfter cleanup.
+ *
+ * @method preparseRawResponse
+ * @param sQuery {String} Query string.
+ * @return {Object} oParsedResponse or null. 
+ */
+YAHOO.widget.AutoComplete.prototype.preparseRawResponse = function(oRequest, oFullResponse, oCallback) {
+    var nEnd = ((this.responseStripAfter !== "") && (oFullResponse.indexOf)) ?
+        oFullResponse.indexOf(this.responseStripAfter) : -1;
+    if(nEnd != -1) {
+        oFullResponse = oFullResponse.substring(0,nEnd);
+    }
+    return oFullResponse;
+};
+
+/**
+ * Executed by DataSource (within DataSource scope via doBeforeCallback()) to
+ * filter results through a simple client-side matching algorithm. 
+ *
+ * @method filterResults
+ * @param sQuery {String} Original request.
+ * @param oFullResponse {Object} Full response object.
+ * @param oParsedResponse {Object} Parsed response object.
+ * @param oCallback {Object} Callback object. 
+ * @return {Object} Filtered response object.
+ */
+
+YAHOO.widget.AutoComplete.prototype.filterResults = function(sQuery, oFullResponse, oParsedResponse, oCallback) {
+    // Only if a query string is available to match against
+    if(sQuery && sQuery !== "") {
+        // First make a copy of the oParseResponse
+        oParsedResponse = YAHOO.widget.AutoComplete._cloneObject(oParsedResponse);
+        
+        var oAC = oCallback.scope,
+            oDS = this,
+            allResults = oParsedResponse.results, // the array of results
+            filteredResults = [], // container for filtered results
+            bMatchFound = false,
+            bMatchCase = (oDS.queryMatchCase || oAC.queryMatchCase), // backward compat
+            bMatchContains = (oDS.queryMatchContains || oAC.queryMatchContains); // backward compat
+            
+        // Loop through each result object...
+        for(var i = allResults.length-1; i >= 0; i--) {
+            var oResult = allResults[i];
+
+            // Grab the data to match against from the result object...
+            var sResult = null;
+            
+            // Result object is a simple string already
+            if(YAHOO.lang.isString(oResult)) {
+                sResult = oResult;
+            }
+            // Result object is an array of strings
+            else if(YAHOO.lang.isArray(oResult)) {
+                sResult = oResult[0];
+            
+            }
+            // Result object is an object literal of strings
+            else if(this.responseSchema.fields) {
+                var key = this.responseSchema.fields[0].key || this.responseSchema.fields[0];
+                sResult = oResult[key];
+            }
+            // Backwards compatibility
+            else if(this.key) {
+                sResult = oResult[this.key];
+            }
+            
+            if(YAHOO.lang.isString(sResult)) {
+                
+                var sKeyIndex = (bMatchCase) ?
+                sResult.indexOf(decodeURIComponent(sQuery)) :
+                sResult.toLowerCase().indexOf(decodeURIComponent(sQuery).toLowerCase());
+
+                // A STARTSWITH match is when the query is found at the beginning of the key string...
+                if((!bMatchContains && (sKeyIndex === 0)) ||
+                // A CONTAINS match is when the query is found anywhere within the key string...
+                (bMatchContains && (sKeyIndex > -1))) {
+                    // Stash the match
+                    filteredResults.unshift(oResult);
+                }
+            }
+        }
+        oParsedResponse.results = filteredResults;
+        YAHOO.log("Filtered " + filteredResults.length + " results against query \""  + sQuery + "\": " + YAHOO.lang.dump(filteredResults), "info", this.toString());
+    }
+    else {
+        YAHOO.log("Did not filter results against query", "info", this.toString());
+    }
+    
+    return oParsedResponse;
+};
+
+/**
+ * Handles response for display. This is the callback function method passed to
+ * YAHOO.util.DataSourceBase#sendRequest so results from the DataSource are
+ * returned to the AutoComplete instance.
+ *
+ * @method handleResponse
+ * @param sQuery {String} Original request.
+ * @param oResponse {Object} Response object.
+ * @param oPayload {MIXED} (optional) Additional argument(s)
+ */
+YAHOO.widget.AutoComplete.prototype.handleResponse = function(sQuery, oResponse, oPayload) {
+    if((this instanceof YAHOO.widget.AutoComplete) && this._sName) {
+        this._populateList(sQuery, oResponse, oPayload);
+    }
+};
+
+/**
+ * Overridable method called before container is loaded with result data.
+ *
+ * @method doBeforeLoadData
+ * @param sQuery {String} Original request.
+ * @param oResponse {Object} Response object.
+ * @param oPayload {MIXED} (optional) Additional argument(s)
+ * @return {Boolean} Return true to continue loading data, false to cancel.
+ */
+YAHOO.widget.AutoComplete.prototype.doBeforeLoadData = function(sQuery, oResponse, oPayload) {
+    return true;
+};
+
+/**
+ * Overridable method that returns HTML markup for one result to be populated
+ * as innerHTML of an &lt;LI&gt; element. 
+ *
+ * @method formatResult
+ * @param oResultData {Object} Result data object.
+ * @param sQuery {String} The corresponding query string.
+ * @param sResultMatch {HTMLElement} The current query string. 
+ * @return {String} HTML markup of formatted result data.
+ */
+YAHOO.widget.AutoComplete.prototype.formatResult = function(oResultData, sQuery, sResultMatch) {
+    var sMarkup = (sResultMatch) ? sResultMatch : "";
+    return sMarkup;
+};
+
+/**
+ * Overridable method called before container expands allows implementers to access data
+ * and DOM elements.
+ *
+ * @method doBeforeExpandContainer
+ * @param elTextbox {HTMLElement} The text input box.
+ * @param elContainer {HTMLElement} The container element.
+ * @param sQuery {String} The query string.
+ * @param aResults {Object[]}  An array of query results.
+ * @return {Boolean} Return true to continue expanding container, false to cancel the expand.
+ */
+YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer = function(elTextbox, elContainer, sQuery, aResults) {
+    return true;
+};
+
+
+/**
+ * Nulls out the entire AutoComplete instance and related objects, removes attached
+ * event listeners, and clears out DOM elements inside the container. After
+ * calling this method, the instance reference should be expliclitly nulled by
+ * implementer, as in myDataTable = null. Use with caution!
+ *
+ * @method destroy
+ */
+YAHOO.widget.AutoComplete.prototype.destroy = function() {
+    var instanceName = this.toString();
+    var elInput = this._elTextbox;
+    var elContainer = this._elContainer;
+
+    // Unhook custom events
+    this.textboxFocusEvent.unsubscribeAll();
+    this.textboxKeyEvent.unsubscribeAll();
+    this.dataRequestEvent.unsubscribeAll();
+    this.dataReturnEvent.unsubscribeAll();
+    this.dataErrorEvent.unsubscribeAll();
+    this.containerPopulateEvent.unsubscribeAll();
+    this.containerExpandEvent.unsubscribeAll();
+    this.typeAheadEvent.unsubscribeAll();
+    this.itemMouseOverEvent.unsubscribeAll();
+    this.itemMouseOutEvent.unsubscribeAll();
+    this.itemArrowToEvent.unsubscribeAll();
+    this.itemArrowFromEvent.unsubscribeAll();
+    this.itemSelectEvent.unsubscribeAll();
+    this.unmatchedItemSelectEvent.unsubscribeAll();
+    this.selectionEnforceEvent.unsubscribeAll();
+    this.containerCollapseEvent.unsubscribeAll();
+    this.textboxBlurEvent.unsubscribeAll();
+    this.textboxChangeEvent.unsubscribeAll();
+
+    // Unhook DOM events
+    YAHOO.util.Event.purgeElement(elInput, true);
+    YAHOO.util.Event.purgeElement(elContainer, true);
+
+    // Remove DOM elements
+    elContainer.innerHTML = "";
+
+    // Null out objects
+    for(var key in this) {
+        if(YAHOO.lang.hasOwnProperty(this, key)) {
+            this[key] = null;
+        }
+    }
+
+    YAHOO.log("AutoComplete instance destroyed: " + instanceName);
+};
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Public events
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Fired when the input field receives focus.
+ *
+ * @event textboxFocusEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.textboxFocusEvent = null;
+
+/**
+ * Fired when the input field receives key input.
+ *
+ * @event textboxKeyEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param nKeycode {Number} The keycode number.
+ */
+YAHOO.widget.AutoComplete.prototype.textboxKeyEvent = null;
+
+/**
+ * Fired when the AutoComplete instance makes a request to the DataSource.
+ * 
+ * @event dataRequestEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param sQuery {String} The query string. 
+ * @param oRequest {Object} The request.
+ */
+YAHOO.widget.AutoComplete.prototype.dataRequestEvent = null;
+
+/**
+ * Fired when the AutoComplete instance receives query results from the data
+ * source.
+ *
+ * @event dataReturnEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param sQuery {String} The query string.
+ * @param aResults {Object[]} Results array.
+ */
+YAHOO.widget.AutoComplete.prototype.dataReturnEvent = null;
+
+/**
+ * Fired when the AutoComplete instance does not receive query results from the
+ * DataSource due to an error.
+ *
+ * @event dataErrorEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param sQuery {String} The query string.
+ */
+YAHOO.widget.AutoComplete.prototype.dataErrorEvent = null;
+
+/**
+ * Fired when the results container is populated.
+ *
+ * @event containerPopulateEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.containerPopulateEvent = null;
+
+/**
+ * Fired when the results container is expanded.
+ *
+ * @event containerExpandEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param sQuery {String} The query string.
+ * @param aResults {Object[]} Results array.
+ */
+YAHOO.widget.AutoComplete.prototype.containerExpandEvent = null;
+
+/**
+ * Fired when the input field has been prefilled by the type-ahead
+ * feature. 
+ *
+ * @event typeAheadEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param sQuery {String} The query string.
+ * @param sPrefill {String} The prefill string.
+ */
+YAHOO.widget.AutoComplete.prototype.typeAheadEvent = null;
+
+/**
+ * Fired when result item has been moused over.
+ *
+ * @event itemMouseOverEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param elItem {HTMLElement} The &lt;li&gt element item moused to.
+ */
+YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent = null;
+
+/**
+ * Fired when result item has been moused out.
+ *
+ * @event itemMouseOutEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param elItem {HTMLElement} The &lt;li&gt; element item moused from.
+ */
+YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent = null;
+
+/**
+ * Fired when result item has been arrowed to. 
+ *
+ * @event itemArrowToEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param elItem {HTMLElement} The &lt;li&gt; element item arrowed to.
+ */
+YAHOO.widget.AutoComplete.prototype.itemArrowToEvent = null;
+
+/**
+ * Fired when result item has been arrowed away from.
+ *
+ * @event itemArrowFromEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param elItem {HTMLElement} The &lt;li&gt; element item arrowed from.
+ */
+YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent = null;
+
+/**
+ * Fired when an item is selected via mouse click, ENTER key, or TAB key.
+ *
+ * @event itemSelectEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param elItem {HTMLElement} The selected &lt;li&gt; element item.
+ * @param oData {Object} The data returned for the item, either as an object,
+ * or mapped from the schema into an array.
+ */
+YAHOO.widget.AutoComplete.prototype.itemSelectEvent = null;
+
+/**
+ * Fired when a user selection does not match any of the displayed result items.
+ *
+ * @event unmatchedItemSelectEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @param sSelection {String} The selected string.  
+ */
+YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent = null;
+
+/**
+ * Fired if forceSelection is enabled and the user's input has been cleared
+ * because it did not match one of the returned query results.
+ *
+ * @event selectionEnforceEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent = null;
+
+/**
+ * Fired when the results container is collapsed.
+ *
+ * @event containerCollapseEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.containerCollapseEvent = null;
+
+/**
+ * Fired when the input field loses focus.
+ *
+ * @event textboxBlurEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.textboxBlurEvent = null;
+
+/**
+ * Fired when the input field value has changed when it loses focus.
+ *
+ * @event textboxChangeEvent
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ */
+YAHOO.widget.AutoComplete.prototype.textboxChangeEvent = null;
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Private member variables
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Internal class variable to index multiple AutoComplete instances.
+ *
+ * @property _nIndex
+ * @type Number
+ * @default 0
+ * @private
+ */
+YAHOO.widget.AutoComplete._nIndex = 0;
+
+/**
+ * Name of AutoComplete instance.
+ *
+ * @property _sName
+ * @type String
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._sName = null;
+
+/**
+ * Text input field DOM element.
+ *
+ * @property _elTextbox
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elTextbox = null;
+
+/**
+ * Container DOM element.
+ *
+ * @property _elContainer
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elContainer = null;
+
+/**
+ * Reference to content element within container element.
+ *
+ * @property _elContent
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elContent = null;
+
+/**
+ * Reference to header element within content element.
+ *
+ * @property _elHeader
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elHeader = null;
+
+/**
+ * Reference to body element within content element.
+ *
+ * @property _elBody
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elBody = null;
+
+/**
+ * Reference to footer element within content element.
+ *
+ * @property _elFooter
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elFooter = null;
+
+/**
+ * Reference to shadow element within container element.
+ *
+ * @property _elShadow
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elShadow = null;
+
+/**
+ * Reference to iframe element within container element.
+ *
+ * @property _elIFrame
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elIFrame = null;
+
+/**
+ * Whether or not the input field is currently in focus. If query results come back
+ * but the user has already moved on, do not proceed with auto complete behavior.
+ *
+ * @property _bFocused
+ * @type Boolean
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._bFocused = null;
+
+/**
+ * Animation instance for container expand/collapse.
+ *
+ * @property _oAnim
+ * @type Boolean
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._oAnim = null;
+
+/**
+ * Whether or not the results container is currently open.
+ *
+ * @property _bContainerOpen
+ * @type Boolean
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._bContainerOpen = false;
+
+/**
+ * Whether or not the mouse is currently over the results
+ * container. This is necessary in order to prevent clicks on container items
+ * from being text input field blur events.
+ *
+ * @property _bOverContainer
+ * @type Boolean
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._bOverContainer = false;
+
+/**
+ * Internal reference to &lt;ul&gt; elements that contains query results within the
+ * results container.
+ *
+ * @property _elList
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elList = null;
+
+/*
+ * Array of &lt;li&gt; elements references that contain query results within the
+ * results container.
+ *
+ * @property _aListItemEls
+ * @type HTMLElement[]
+ * @private
+ */
+//YAHOO.widget.AutoComplete.prototype._aListItemEls = null;
+
+/**
+ * Number of &lt;li&gt; elements currently displayed in results container.
+ *
+ * @property _nDisplayedItems
+ * @type Number
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._nDisplayedItems = 0;
+
+/*
+ * Internal count of &lt;li&gt; elements displayed and hidden in results container.
+ *
+ * @property _maxResultsDisplayed
+ * @type Number
+ * @private
+ */
+//YAHOO.widget.AutoComplete.prototype._maxResultsDisplayed = 0;
+
+/**
+ * Current query string
+ *
+ * @property _sCurQuery
+ * @type String
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._sCurQuery = null;
+
+/**
+ * Selections from previous queries (for saving delimited queries).
+ *
+ * @property _sPastSelections
+ * @type String
+ * @default "" 
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._sPastSelections = "";
+
+/**
+ * Stores initial input value used to determine if textboxChangeEvent should be fired.
+ *
+ * @property _sInitInputValue
+ * @type String
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._sInitInputValue = null;
+
+/**
+ * Pointer to the currently highlighted &lt;li&gt; element in the container.
+ *
+ * @property _elCurListItem
+ * @type HTMLElement
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._elCurListItem = null;
+
+/**
+ * Whether or not an item has been selected since the container was populated
+ * with results. Reset to false by _populateList, and set to true when item is
+ * selected.
+ *
+ * @property _bItemSelected
+ * @type Boolean
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._bItemSelected = false;
+
+/**
+ * Key code of the last key pressed in textbox.
+ *
+ * @property _nKeyCode
+ * @type Number
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._nKeyCode = null;
+
+/**
+ * Delay timeout ID.
+ *
+ * @property _nDelayID
+ * @type Number
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._nDelayID = -1;
+
+/**
+ * TypeAhead delay timeout ID.
+ *
+ * @property _nTypeAheadDelayID
+ * @type Number
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._nTypeAheadDelayID = -1;
+
+/**
+ * Src to iFrame used when useIFrame = true. Supports implementations over SSL
+ * as well.
+ *
+ * @property _iFrameSrc
+ * @type String
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._iFrameSrc = "javascript:false;";
+
+/**
+ * For users typing via certain IMEs, queries must be triggered by intervals,
+ * since key events yet supported across all browsers for all IMEs.
+ *
+ * @property _queryInterval
+ * @type Object
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._queryInterval = null;
+
+/**
+ * Internal tracker to last known textbox value, used to determine whether or not
+ * to trigger a query via interval for certain IME users.
+ *
+ * @event _sLastTextboxValue
+ * @type String
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._sLastTextboxValue = null;
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Private methods
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Updates and validates latest public config properties.
+ *
+ * @method __initProps
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._initProps = function() {
+    // Correct any invalid values
+    var minQueryLength = this.minQueryLength;
+    if(!YAHOO.lang.isNumber(minQueryLength)) {
+        this.minQueryLength = 1;
+    }
+    var maxResultsDisplayed = this.maxResultsDisplayed;
+    if(!YAHOO.lang.isNumber(maxResultsDisplayed) || (maxResultsDisplayed < 1)) {
+        this.maxResultsDisplayed = 10;
+    }
+    var queryDelay = this.queryDelay;
+    if(!YAHOO.lang.isNumber(queryDelay) || (queryDelay < 0)) {
+        this.queryDelay = 0.2;
+    }
+    var typeAheadDelay = this.typeAheadDelay;
+    if(!YAHOO.lang.isNumber(typeAheadDelay) || (typeAheadDelay < 0)) {
+        this.typeAheadDelay = 0.2;
+    }
+    var delimChar = this.delimChar;
+    if(YAHOO.lang.isString(delimChar) && (delimChar.length > 0)) {
+        this.delimChar = [delimChar];
+    }
+    else if(!YAHOO.lang.isArray(delimChar)) {
+        this.delimChar = null;
+    }
+    var animSpeed = this.animSpeed;
+    if((this.animHoriz || this.animVert) && YAHOO.util.Anim) {
+        if(!YAHOO.lang.isNumber(animSpeed) || (animSpeed < 0)) {
+            this.animSpeed = 0.3;
+        }
+        if(!this._oAnim ) {
+            this._oAnim = new YAHOO.util.Anim(this._elContent, {}, this.animSpeed);
+        }
+        else {
+            this._oAnim.duration = this.animSpeed;
+        }
+    }
+    if(this.forceSelection && delimChar) {
+        YAHOO.log("The forceSelection feature has been enabled with delimChar defined.","warn", this.toString());
+    }
+};
+
+/**
+ * Initializes the results container helpers if they are enabled and do
+ * not exist
+ *
+ * @method _initContainerHelperEls
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._initContainerHelperEls = function() {
+    if(this.useShadow && !this._elShadow) {
+        var elShadow = document.createElement("div");
+        elShadow.className = "yui-ac-shadow";
+        elShadow.style.width = 0;
+        elShadow.style.height = 0;
+        this._elShadow = this._elContainer.appendChild(elShadow);
+    }
+    if(this.useIFrame && !this._elIFrame) {
+        var elIFrame = document.createElement("iframe");
+        elIFrame.src = this._iFrameSrc;
+        elIFrame.frameBorder = 0;
+        elIFrame.scrolling = "no";
+        elIFrame.style.position = "absolute";
+        elIFrame.style.width = 0;
+        elIFrame.style.height = 0;
+        elIFrame.tabIndex = -1;
+        elIFrame.style.padding = 0;
+        this._elIFrame = this._elContainer.appendChild(elIFrame);
+    }
+};
+
+/**
+ * Initializes the results container once at object creation
+ *
+ * @method _initContainerEl
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._initContainerEl = function() {
+    YAHOO.util.Dom.addClass(this._elContainer, "yui-ac-container");
+    
+    if(!this._elContent) {
+        // The elContent div is assigned DOM listeners and 
+        // helps size the iframe and shadow properly
+        var elContent = document.createElement("div");
+        elContent.className = "yui-ac-content";
+        elContent.style.display = "none";
+
+        this._elContent = this._elContainer.appendChild(elContent);
+
+        var elHeader = document.createElement("div");
+        elHeader.className = "yui-ac-hd";
+        elHeader.style.display = "none";
+        this._elHeader = this._elContent.appendChild(elHeader);
+
+        var elBody = document.createElement("div");
+        elBody.className = "yui-ac-bd";
+        this._elBody = this._elContent.appendChild(elBody);
+
+        var elFooter = document.createElement("div");
+        elFooter.className = "yui-ac-ft";
+        elFooter.style.display = "none";
+        this._elFooter = this._elContent.appendChild(elFooter);
+    }
+    else {
+        YAHOO.log("Could not initialize the container","warn",this.toString());
+    }
+};
+
+/**
+ * Clears out contents of container body and creates up to
+ * YAHOO.widget.AutoComplete#maxResultsDisplayed &lt;li&gt; elements in an
+ * &lt;ul&gt; element.
+ *
+ * @method _initListEl
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._initListEl = function() {
+    var nListLength = this.maxResultsDisplayed;
+    
+    var elList = this._elList || document.createElement("ul");
+    var elListItem;
+    while(elList.childNodes.length < nListLength) {
+        elListItem = document.createElement("li");
+        elListItem.style.display = "none";
+        elListItem._nItemIndex = elList.childNodes.length;
+        elList.appendChild(elListItem);
+    }
+    if(!this._elList) {
+        var elBody = this._elBody;
+        YAHOO.util.Event.purgeElement(elBody, true);
+        elBody.innerHTML = "";
+        this._elList = elBody.appendChild(elList);
+    }
+    
+};
+
+/**
+ * Enables interval detection for IME support.
+ *
+ * @method _enableIntervalDetection
+ * @re 
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._enableIntervalDetection = function() {
+    var oSelf = this;
+    if(!oSelf._queryInterval && oSelf.queryInterval) {
+        oSelf._queryInterval = setInterval(function() { oSelf._onInterval(); }, oSelf.queryInterval);
+        YAHOO.log("Interval set", "info", this.toString());
+    }
+};
+
+/**
+ * Enables query triggers based on text input detection by intervals (rather
+ * than by key events).
+ *
+ * @method _onInterval
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._onInterval = function() {
+    var currValue = this._elTextbox.value;
+    var lastValue = this._sLastTextboxValue;
+    if(currValue != lastValue) {
+        this._sLastTextboxValue = currValue;
+        this._sendQuery(currValue);
+    }
+};
+
+/**
+ * Cancels text input detection by intervals.
+ *
+ * @method _clearInterval
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._clearInterval = function() {
+    if(this._queryInterval) {
+        clearInterval(this._queryInterval);
+        this._queryInterval = null;
+        YAHOO.log("Interval cleared", "info", this.toString());
+    }
+};
+
+/**
+ * Whether or not key is functional or should be ignored. Note that the right
+ * arrow key is NOT an ignored key since it triggers queries for certain intl
+ * charsets.
+ *
+ * @method _isIgnoreKey
+ * @param nKeycode {Number} Code of key pressed.
+ * @return {Boolean} True if key should be ignored, false otherwise.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._isIgnoreKey = function(nKeyCode) {
+    if((nKeyCode == 9) || (nKeyCode == 13)  || // tab, enter
+            (nKeyCode == 16) || (nKeyCode == 17) || // shift, ctl
+            (nKeyCode >= 18 && nKeyCode <= 20) || // alt, pause/break,caps lock
+            (nKeyCode == 27) || // esc
+            (nKeyCode >= 33 && nKeyCode <= 35) || // page up,page down,end
+            /*(nKeyCode >= 36 && nKeyCode <= 38) || // home,left,up
+            (nKeyCode == 40) || // down*/
+            (nKeyCode >= 36 && nKeyCode <= 40) || // home,left,up, right, down
+            (nKeyCode >= 44 && nKeyCode <= 45) || // print screen,insert
+            (nKeyCode == 229) // Bug 2041973: Korean XP fires 2 keyup events, the key and 229
+        ) { 
+        return true;
+    }
+    return false;
+};
+
+/**
+ * Makes query request to the DataSource.
+ *
+ * @method _sendQuery
+ * @param sQuery {String} Query string.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._sendQuery = function(sQuery) {
+    // Widget has been effectively turned off
+    if(this.minQueryLength < 0) {
+        this._toggleContainer(false);
+        YAHOO.log("Property minQueryLength is less than 0", "info", this.toString());
+        return;
+    }
+    // Delimiter has been enabled
+    var aDelimChar = (this.delimChar) ? this.delimChar : null;
+    if(aDelimChar) {
+        // Loop through all possible delimiters and find the rightmost one in the query
+        // A " " may be a false positive if they are defined as delimiters AND
+        // are used to separate delimited queries
+        var nDelimIndex = -1;
+        for(var i = aDelimChar.length-1; i >= 0; i--) {
+            var nNewIndex = sQuery.lastIndexOf(aDelimChar[i]);
+            if(nNewIndex > nDelimIndex) {
+                nDelimIndex = nNewIndex;
+            }
+        }
+        // If we think the last delimiter is a space (" "), make sure it is NOT
+        // a false positive by also checking the char directly before it
+        if(aDelimChar[i] == " ") {
+            for (var j = aDelimChar.length-1; j >= 0; j--) {
+                if(sQuery[nDelimIndex - 1] == aDelimChar[j]) {
+                    nDelimIndex--;
+                    break;
+                }
+            }
+        }
+        // A delimiter has been found in the query so extract the latest query from past selections
+        if(nDelimIndex > -1) {
+            var nQueryStart = nDelimIndex + 1;
+            // Trim any white space from the beginning...
+            while(sQuery.charAt(nQueryStart) == " ") {
+                nQueryStart += 1;
+            }
+            // ...and save the rest of the string for later
+            this._sPastSelections = sQuery.substring(0,nQueryStart);
+            // Here is the query itself
+            sQuery = sQuery.substr(nQueryStart);
+        }
+        // No delimiter found in the query, so there are no selections from past queries
+        else {
+            this._sPastSelections = "";
+        }
+    }
+
+    // Don't search queries that are too short
+    if((sQuery && (sQuery.length < this.minQueryLength)) || (!sQuery && this.minQueryLength > 0)) {
+        if(this._nDelayID != -1) {
+            clearTimeout(this._nDelayID);
+        }
+        this._toggleContainer(false);
+        YAHOO.log("Query \"" + sQuery + "\" is too short", "info", this.toString());
+        return;
+    }
+
+    sQuery = encodeURIComponent(sQuery);
+    this._nDelayID = -1;    // Reset timeout ID because request is being made
+    
+    // Subset matching
+    if(this.dataSource.queryMatchSubset || this.queryMatchSubset) { // backward compat
+        var oResponse = this.getSubsetMatches(sQuery);
+        if(oResponse) {
+            this.handleResponse(sQuery, oResponse, {query: sQuery});
+            return;
+        }
+    }
+    
+    if(this.responseStripAfter) {
+        this.dataSource.doBeforeParseData = this.preparseRawResponse;
+    }
+    if(this.applyLocalFilter) {
+        this.dataSource.doBeforeCallback = this.filterResults;
+    }
+    
+    var sRequest = this.generateRequest(sQuery);
+    this.dataRequestEvent.fire(this, sQuery, sRequest);
+    YAHOO.log("Sending query \"" + sRequest + "\"", "info", this.toString());
+
+    this.dataSource.sendRequest(sRequest, {
+            success : this.handleResponse,
+            failure : this.handleResponse,
+            scope   : this,
+            argument: {
+                query: sQuery
+            }
+    });
+};
+
+/**
+ * Populates the array of &lt;li&gt; elements in the container with query
+ * results.
+ *
+ * @method _populateList
+ * @param sQuery {String} Original request.
+ * @param oResponse {Object} Response object.
+ * @param oPayload {MIXED} (optional) Additional argument(s)
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._populateList = function(sQuery, oResponse, oPayload) {
+    // Clear previous timeout
+    if(this._nTypeAheadDelayID != -1) {
+        clearTimeout(this._nTypeAheadDelayID);
+    }
+        
+    sQuery = (oPayload && oPayload.query) ? oPayload.query : sQuery;
+    
+    // Pass data through abstract method for any transformations
+    var ok = this.doBeforeLoadData(sQuery, oResponse, oPayload);
+
+    // Data is ok
+    if(ok && !oResponse.error) {
+        this.dataReturnEvent.fire(this, sQuery, oResponse.results);
+        
+        // Continue only if instance is still focused (i.e., user hasn't already moved on)
+        // Null indicates initialized state, which is ok too
+        if(this._bFocused || (this._bFocused === null)) {
+            
+            //TODO: is this still necessary?
+            /*var isOpera = (YAHOO.env.ua.opera);
+            var contentStyle = this._elContent.style;
+            contentStyle.width = (!isOpera) ? null : "";
+            contentStyle.height = (!isOpera) ? null : "";*/
+        
+            // Store state for this interaction
+            var sCurQuery = decodeURIComponent(sQuery);
+            this._sCurQuery = sCurQuery;
+            this._bItemSelected = false;
+        
+            var allResults = oResponse.results,
+                nItemsToShow = Math.min(allResults.length,this.maxResultsDisplayed),
+                sMatchKey = (this.dataSource.responseSchema.fields) ? 
+                    (this.dataSource.responseSchema.fields[0].key || this.dataSource.responseSchema.fields[0]) : 0;
+            
+            if(nItemsToShow > 0) {
+                // Make sure container and helpers are ready to go
+                if(!this._elList || (this._elList.childNodes.length < nItemsToShow)) {
+                    this._initListEl();
+                }
+                this._initContainerHelperEls();
+                
+                var allListItemEls = this._elList.childNodes;
+                // Fill items with data from the bottom up
+                for(var i = nItemsToShow-1; i >= 0; i--) {
+                    var elListItem = allListItemEls[i],
+                    oResult = allResults[i];
+                    
+                    // Backward compatibility
+                    if(this.resultTypeList) {
+                        // Results need to be converted back to an array
+                        var aResult = [];
+                        // Match key is first
+                        aResult[0] = (YAHOO.lang.isString(oResult)) ? oResult : oResult[sMatchKey] || oResult[this.key];
+                        // Add additional data to the result array
+                        var fields = this.dataSource.responseSchema.fields;
+                        if(YAHOO.lang.isArray(fields) && (fields.length > 1)) {
+                            for(var k=1, len=fields.length; k<len; k++) {
+                                aResult[aResult.length] = oResult[fields[k].key || fields[k]];
+                            }
+                        }
+                        // No specific fields defined, so pass along entire data object
+                        else {
+                            // Already an array
+                            if(YAHOO.lang.isArray(oResult)) {
+                                aResult = oResult;
+                            }
+                            // Simple string 
+                            else if(YAHOO.lang.isString(oResult)) {
+                                aResult = [oResult];
+                            }
+                            // Object
+                            else {
+                                aResult[1] = oResult;
+                            }
+                        }
+                        oResult = aResult;
+                    }
+
+                    // The matching value, including backward compatibility for array format and safety net
+                    elListItem._sResultMatch = (YAHOO.lang.isString(oResult)) ? oResult : (YAHOO.lang.isArray(oResult)) ? oResult[0] : (oResult[sMatchKey] || "");
+                    elListItem._oResultData = oResult; // Additional data
+                    elListItem.innerHTML = this.formatResult(oResult, sCurQuery, elListItem._sResultMatch);
+                    elListItem.style.display = "";
+                }
+        
+                // Clear out extraneous items
+                if(nItemsToShow < allListItemEls.length) {
+                    var extraListItem;
+                    for(var j = allListItemEls.length-1; j >= nItemsToShow; j--) {
+                        extraListItem = allListItemEls[j];
+                        extraListItem.style.display = "none";
+                    }
+                }
+                
+                this._nDisplayedItems = nItemsToShow;
+                
+                this.containerPopulateEvent.fire(this, sQuery, allResults);
+                
+                // Highlight the first item
+                if(this.autoHighlight) {
+                    var elFirstListItem = this._elList.firstChild;
+                    this._toggleHighlight(elFirstListItem,"to");
+                    this.itemArrowToEvent.fire(this, elFirstListItem);
+                    YAHOO.log("Arrowed to first item", "info", this.toString());
+                    this._typeAhead(elFirstListItem,sQuery);
+                }
+                // Unhighlight any previous time
+                else {
+                    this._toggleHighlight(this._elCurListItem,"from");
+                }
+        
+                // Expand the container
+                ok = this.doBeforeExpandContainer(this._elTextbox, this._elContainer, sQuery, allResults);
+                this._toggleContainer(ok);
+            }
+            else {
+                this._toggleContainer(false);
+            }
+
+            YAHOO.log("Container populated with " + nItemsToShow +  " list items", "info", this.toString());
+            return;
+        }
+    }
+    // Error
+    else {
+        this.dataErrorEvent.fire(this, sQuery);
+    }
+        
+    YAHOO.log("Could not populate list", "info", this.toString());    
+};
+
+/**
+ * When forceSelection is true and the user attempts
+ * leave the text input box without selecting an item from the query results,
+ * the user selection is cleared.
+ *
+ * @method _clearSelection
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._clearSelection = function() {
+    var sValue = this._elTextbox.value;
+    //TODO: need to check against all delimChars?
+    var sChar = (this.delimChar) ? this.delimChar[0] : null;
+    var nIndex = (sChar) ? sValue.lastIndexOf(sChar, sValue.length-2) : -1;
+    if(nIndex > -1) {
+        this._elTextbox.value = sValue.substring(0,nIndex);
+    }
+    else {
+         this._elTextbox.value = "";
+    }
+    this._sPastSelections = this._elTextbox.value;
+
+    // Fire custom event
+    this.selectionEnforceEvent.fire(this);
+    YAHOO.log("Selection enforced", "info", this.toString());
+};
+
+/**
+ * Whether or not user-typed value in the text input box matches any of the
+ * query results.
+ *
+ * @method _textMatchesOption
+ * @return {HTMLElement} Matching list item element if user-input text matches
+ * a result, null otherwise.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._textMatchesOption = function() {
+    var elMatch = null;
+
+    for(var i = this._nDisplayedItems-1; i >= 0 ; i--) {
+        var elListItem = this._elList.childNodes[i];
+        var sMatch = ("" + elListItem._sResultMatch).toLowerCase();
+        if(sMatch == this._sCurQuery.toLowerCase()) {
+            elMatch = elListItem;
+            break;
+        }
+    }
+    return(elMatch);
+};
+
+/**
+ * Updates in the text input box with the first query result as the user types,
+ * selecting the substring that the user has not typed.
+ *
+ * @method _typeAhead
+ * @param elListItem {HTMLElement} The &lt;li&gt; element item whose data populates the input field.
+ * @param sQuery {String} Query string.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._typeAhead = function(elListItem, sQuery) {
+    // Don't typeAhead if turned off or is backspace
+    if(!this.typeAhead || (this._nKeyCode == 8)) {
+        return;
+    }
+
+    var oSelf = this,
+        elTextbox = this._elTextbox;
+        
+    // Only if text selection is supported
+    if(elTextbox.setSelectionRange || elTextbox.createTextRange) {
+        // Set and store timeout for this typeahead
+        this._nTypeAheadDelayID = setTimeout(function() {
+                // Select the portion of text that the user has not typed
+                var nStart = elTextbox.value.length; // any saved queries plus what user has typed
+                oSelf._updateValue(elListItem);
+                var nEnd = elTextbox.value.length;
+                oSelf._selectText(elTextbox,nStart,nEnd);
+                var sPrefill = elTextbox.value.substr(nStart,nEnd);
+                oSelf.typeAheadEvent.fire(oSelf,sQuery,sPrefill);
+                YAHOO.log("Typeahead occured with prefill string \"" + sPrefill + "\"", "info", oSelf.toString());
+            },(this.typeAheadDelay*1000));            
+    }
+};
+
+/**
+ * Selects text in the input field.
+ *
+ * @method _selectText
+ * @param elTextbox {HTMLElement} Text input box element in which to select text.
+ * @param nStart {Number} Starting index of text string to select.
+ * @param nEnd {Number} Ending index of text selection.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._selectText = function(elTextbox, nStart, nEnd) {
+    if(elTextbox.setSelectionRange) { // For Mozilla
+        elTextbox.setSelectionRange(nStart,nEnd);
+    }
+    else if(elTextbox.createTextRange) { // For IE
+        var oTextRange = elTextbox.createTextRange();
+        oTextRange.moveStart("character", nStart);
+        oTextRange.moveEnd("character", nEnd-elTextbox.value.length);
+        oTextRange.select();
+    }
+    else {
+        elTextbox.select();
+    }
+};
+
+/**
+ * Syncs results container with its helpers.
+ *
+ * @method _toggleContainerHelpers
+ * @param bShow {Boolean} True if container is expanded, false if collapsed
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers = function(bShow) {
+    var width = this._elContent.offsetWidth + "px";
+    var height = this._elContent.offsetHeight + "px";
+
+    if(this.useIFrame && this._elIFrame) {
+    var elIFrame = this._elIFrame;
+        if(bShow) {
+            elIFrame.style.width = width;
+            elIFrame.style.height = height;
+            elIFrame.style.padding = "";
+            YAHOO.log("Iframe expanded", "info", this.toString());
+        }
+        else {
+            elIFrame.style.width = 0;
+            elIFrame.style.height = 0;
+            elIFrame.style.padding = 0;
+            YAHOO.log("Iframe collapsed", "info", this.toString());
+        }
+    }
+    if(this.useShadow && this._elShadow) {
+    var elShadow = this._elShadow;
+        if(bShow) {
+            elShadow.style.width = width;
+            elShadow.style.height = height;
+            YAHOO.log("Shadow expanded", "info", this.toString());
+        }
+        else {
+            elShadow.style.width = 0;
+            elShadow.style.height = 0;
+            YAHOO.log("Shadow collapsed", "info", this.toString());
+        }
+    }
+};
+
+/**
+ * Animates expansion or collapse of the container.
+ *
+ * @method _toggleContainer
+ * @param bShow {Boolean} True if container should be expanded, false if container should be collapsed
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) {
+    var elContainer = this._elContainer;
+
+    // If implementer has container always open and it's already open, don't mess with it
+    // Container is initialized with display "none" so it may need to be shown first time through
+    if(this.alwaysShowContainer && this._bContainerOpen) {
+        return;
+    }
+    
+    // Reset states
+    if(!bShow) {
+        this._toggleHighlight(this._elCurListItem,"from");
+        this._nDisplayedItems = 0;
+        this._sCurQuery = null;
+        
+        // Container is already closed, so don't bother with changing the UI
+        if(!this._bContainerOpen) {
+            this._elContent.style.display = "none";
+            return;
+        }
+    }
+
+    // If animation is enabled...
+    var oAnim = this._oAnim;
+    if(oAnim && oAnim.getEl() && (this.animHoriz || this.animVert)) {
+        if(oAnim.isAnimated()) {
+            oAnim.stop(true);
+        }
+
+        // Clone container to grab current size offscreen
+        var oClone = this._elContent.cloneNode(true);
+        elContainer.appendChild(oClone);
+        oClone.style.top = "-9000px";
+        oClone.style.width = "";
+        oClone.style.height = "";
+        oClone.style.display = "";
+
+        // Current size of the container is the EXPANDED size
+        var wExp = oClone.offsetWidth;
+        var hExp = oClone.offsetHeight;
+
+        // Calculate COLLAPSED sizes based on horiz and vert anim
+        var wColl = (this.animHoriz) ? 0 : wExp;
+        var hColl = (this.animVert) ? 0 : hExp;
+
+        // Set animation sizes
+        oAnim.attributes = (bShow) ?
+            {width: { to: wExp }, height: { to: hExp }} :
+            {width: { to: wColl}, height: { to: hColl }};
+
+        // If opening anew, set to a collapsed size...
+        if(bShow && !this._bContainerOpen) {
+            this._elContent.style.width = wColl+"px";
+            this._elContent.style.height = hColl+"px";
+        }
+        // Else, set it to its last known size.
+        else {
+            this._elContent.style.width = wExp+"px";
+            this._elContent.style.height = hExp+"px";
+        }
+
+        elContainer.removeChild(oClone);
+        oClone = null;
+
+    	var oSelf = this;
+    	var onAnimComplete = function() {
+            // Finish the collapse
+    		oAnim.onComplete.unsubscribeAll();
+
+            if(bShow) {
+                oSelf._toggleContainerHelpers(true);
+                oSelf._bContainerOpen = bShow;
+                oSelf.containerExpandEvent.fire(oSelf);
+                YAHOO.log("Container expanded", "info", oSelf.toString());
+            }
+            else {
+                oSelf._elContent.style.display = "none";
+                oSelf._bContainerOpen = bShow;
+                oSelf.containerCollapseEvent.fire(oSelf);
+                YAHOO.log("Container collapsed", "info", oSelf.toString());
+            }
+     	};
+
+        // Display container and animate it
+        this._toggleContainerHelpers(false); // Bug 1424486: Be early to hide, late to show;
+        this._elContent.style.display = "";
+        oAnim.onComplete.subscribe(onAnimComplete);
+        oAnim.animate();
+    }
+    // Else don't animate, just show or hide
+    else {
+        if(bShow) {
+            this._elContent.style.display = "";
+            this._toggleContainerHelpers(true);
+            this._bContainerOpen = bShow;
+            this.containerExpandEvent.fire(this);
+            YAHOO.log("Container expanded", "info", this.toString());
+        }
+        else {
+            this._toggleContainerHelpers(false);
+            this._elContent.style.display = "none";
+            this._bContainerOpen = bShow;
+            this.containerCollapseEvent.fire(this);
+            YAHOO.log("Container collapsed", "info", this.toString());
+        }
+   }
+
+};
+
+/**
+ * Toggles the highlight on or off for an item in the container, and also cleans
+ * up highlighting of any previous item.
+ *
+ * @method _toggleHighlight
+ * @param elNewListItem {HTMLElement} The &lt;li&gt; element item to receive highlight behavior.
+ * @param sType {String} Type "mouseover" will toggle highlight on, and "mouseout" will toggle highlight off.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._toggleHighlight = function(elNewListItem, sType) {
+    if(elNewListItem) {
+        var sHighlight = this.highlightClassName;
+        if(this._elCurListItem) {
+            // Remove highlight from old item
+            YAHOO.util.Dom.removeClass(this._elCurListItem, sHighlight);
+            this._elCurListItem = null;
+        }
+    
+        if((sType == "to") && sHighlight) {
+            // Apply highlight to new item
+            YAHOO.util.Dom.addClass(elNewListItem, sHighlight);
+            this._elCurListItem = elNewListItem;
+        }
+    }
+};
+
+/**
+ * Toggles the pre-highlight on or off for an item in the container.
+ *
+ * @method _togglePrehighlight
+ * @param elNewListItem {HTMLElement} The &lt;li&gt; element item to receive highlight behavior.
+ * @param sType {String} Type "mouseover" will toggle highlight on, and "mouseout" will toggle highlight off.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._togglePrehighlight = function(elNewListItem, sType) {
+    if(elNewListItem == this._elCurListItem) {
+        return;
+    }
+
+    var sPrehighlight = this.prehighlightClassName;
+    if((sType == "mouseover") && sPrehighlight) {
+        // Apply prehighlight to new item
+        YAHOO.util.Dom.addClass(elNewListItem, sPrehighlight);
+    }
+    else {
+        // Remove prehighlight from old item
+        YAHOO.util.Dom.removeClass(elNewListItem, sPrehighlight);
+    }
+};
+
+/**
+ * Updates the text input box value with selected query result. If a delimiter
+ * has been defined, then the value gets appended with the delimiter.
+ *
+ * @method _updateValue
+ * @param elListItem {HTMLElement} The &lt;li&gt; element item with which to update the value.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._updateValue = function(elListItem) {
+    if(!this.suppressInputUpdate) {    
+        var elTextbox = this._elTextbox;
+        var sDelimChar = (this.delimChar) ? (this.delimChar[0] || this.delimChar) : null;
+        var sResultMatch = elListItem._sResultMatch;
+    
+        // Calculate the new value
+        var sNewValue = "";
+        if(sDelimChar) {
+            // Preserve selections from past queries
+            sNewValue = this._sPastSelections;
+            // Add new selection plus delimiter
+            sNewValue += sResultMatch + sDelimChar;
+            if(sDelimChar != " ") {
+                sNewValue += " ";
+            }
+        }
+        else { 
+            sNewValue = sResultMatch;
+        }
+        
+        // Update input field
+        elTextbox.value = sNewValue;
+    
+        // Scroll to bottom of textarea if necessary
+        if(elTextbox.type == "textarea") {
+            elTextbox.scrollTop = elTextbox.scrollHeight;
+        }
+    
+        // Move cursor to end
+        var end = elTextbox.value.length;
+        this._selectText(elTextbox,end,end);
+    
+        this._elCurListItem = elListItem;
+    }
+};
+
+/**
+ * Selects a result item from the container
+ *
+ * @method _selectItem
+ * @param elListItem {HTMLElement} The selected &lt;li&gt; element item.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._selectItem = function(elListItem) {
+    this._bItemSelected = true;
+    this._updateValue(elListItem);
+    this._sPastSelections = this._elTextbox.value;
+    this._clearInterval();
+    this.itemSelectEvent.fire(this, elListItem, elListItem._oResultData);
+    YAHOO.log("Item selected: " + YAHOO.lang.dump(elListItem._oResultData), "info", this.toString());
+    this._toggleContainer(false);
+};
+
+/**
+ * If an item is highlighted in the container, the right arrow key jumps to the
+ * end of the textbox and selects the highlighted item, otherwise the container
+ * is closed.
+ *
+ * @method _jumpSelection
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._jumpSelection = function() {
+    if(this._elCurListItem) {
+        this._selectItem(this._elCurListItem);
+    }
+    else {
+        this._toggleContainer(false);
+    }
+};
+
+/**
+ * Triggered by up and down arrow keys, changes the current highlighted
+ * &lt;li&gt; element item. Scrolls container if necessary.
+ *
+ * @method _moveSelection
+ * @param nKeyCode {Number} Code of key pressed.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._moveSelection = function(nKeyCode) {
+    if(this._bContainerOpen) {
+        // Determine current item's id number
+        var elCurListItem = this._elCurListItem;
+        var nCurItemIndex = -1;
+
+        if(elCurListItem) {
+            nCurItemIndex = elCurListItem._nItemIndex;
+        }
+
+        var nNewItemIndex = (nKeyCode == 40) ?
+                (nCurItemIndex + 1) : (nCurItemIndex - 1);
+
+        // Out of bounds
+        if(nNewItemIndex < -2 || nNewItemIndex >= this._nDisplayedItems) {
+            return;
+        }
+
+        if(elCurListItem) {
+            // Unhighlight current item
+            this._toggleHighlight(elCurListItem, "from");
+            this.itemArrowFromEvent.fire(this, elCurListItem);
+            YAHOO.log("Item arrowed from: " + elCurListItem._nItemIndex, "info", this.toString());
+        }
+        if(nNewItemIndex == -1) {
+           // Go back to query (remove type-ahead string)
+            if(this.delimChar) {
+                this._elTextbox.value = this._sPastSelections + this._sCurQuery;
+            }
+            else {
+                this._elTextbox.value = this._sCurQuery;
+            }
+            return;
+        }
+        if(nNewItemIndex == -2) {
+            // Close container
+            this._toggleContainer(false);
+            return;
+        }
+        
+        var elNewListItem = this._elList.childNodes[nNewItemIndex];
+
+        // Scroll the container if necessary
+        var elContent = this._elContent;
+        var scrollOn = ((YAHOO.util.Dom.getStyle(elContent,"overflow") == "auto") ||
+            (YAHOO.util.Dom.getStyle(elContent,"overflowY") == "auto"));
+        if(scrollOn && (nNewItemIndex > -1) &&
+        (nNewItemIndex < this._nDisplayedItems)) {
+            // User is keying down
+            if(nKeyCode == 40) {
+                // Bottom of selected item is below scroll area...
+                if((elNewListItem.offsetTop+elNewListItem.offsetHeight) > (elContent.scrollTop + elContent.offsetHeight)) {
+                    // Set bottom of scroll area to bottom of selected item
+                    elContent.scrollTop = (elNewListItem.offsetTop+elNewListItem.offsetHeight) - elContent.offsetHeight;
+                }
+                // Bottom of selected item is above scroll area...
+                else if((elNewListItem.offsetTop+elNewListItem.offsetHeight) < elContent.scrollTop) {
+                    // Set top of selected item to top of scroll area
+                    elContent.scrollTop = elNewListItem.offsetTop;
+
+                }
+            }
+            // User is keying up
+            else {
+                // Top of selected item is above scroll area
+                if(elNewListItem.offsetTop < elContent.scrollTop) {
+                    // Set top of scroll area to top of selected item
+                    this._elContent.scrollTop = elNewListItem.offsetTop;
+                }
+                // Top of selected item is below scroll area
+                else if(elNewListItem.offsetTop > (elContent.scrollTop + elContent.offsetHeight)) {
+                    // Set bottom of selected item to bottom of scroll area
+                    this._elContent.scrollTop = (elNewListItem.offsetTop+elNewListItem.offsetHeight) - elContent.offsetHeight;
+                }
+            }
+        }
+
+        this._toggleHighlight(elNewListItem, "to");
+        this.itemArrowToEvent.fire(this, elNewListItem);
+        YAHOO.log("Item arrowed to " + elNewListItem._nItemIndex, "info", this.toString());
+        if(this.typeAhead) {
+            this._updateValue(elNewListItem);
+        }
+    }
+};
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Private event handlers
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Handles &lt;li&gt; element mouseover events in the container.
+ *
+ * @method _onItemMouseover
+ * @param v {HTMLEvent} The mouseover event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+/*YAHOO.widget.AutoComplete.prototype._onItemMouseover = function(v,oSelf) {
+    if(oSelf.prehighlightClassName) {
+        oSelf._togglePrehighlight(this,"mouseover");
+    }
+    else {
+        oSelf._toggleHighlight(this,"to");
+    }
+
+    oSelf.itemMouseOverEvent.fire(oSelf, this);
+    YAHOO.log("Item moused over", "info", oSelf.toString());
+};*/
+
+/**
+ * Handles &lt;li&gt; element mouseout events in the container.
+ *
+ * @method _onItemMouseout
+ * @param v {HTMLEvent} The mouseout event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+/*YAHOO.widget.AutoComplete.prototype._onItemMouseout = function(v,oSelf) {
+    if(oSelf.prehighlightClassName) {
+        oSelf._togglePrehighlight(this,"mouseout");
+    }
+    else {
+        oSelf._toggleHighlight(this,"from");
+    }
+
+    oSelf.itemMouseOutEvent.fire(oSelf, this);
+    YAHOO.log("Item moused out", "info", oSelf.toString());
+};*/
+
+/**
+ * Handles &lt;li&gt; element click events in the container.
+ *
+ * @method _onItemMouseclick
+ * @param v {HTMLEvent} The click event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+/*YAHOO.widget.AutoComplete.prototype._onItemMouseclick = function(v,oSelf) {
+    // In case item has not been moused over
+    oSelf._toggleHighlight(this,"to");
+    oSelf._selectItem(this);
+};*/
+
+/**
+ * Handles container mouseover events.
+ *
+ * @method _onContainerMouseover
+ * @param v {HTMLEvent} The mouseover event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._onContainerMouseover = function(v,oSelf) {
+    var elTarget = YAHOO.util.Event.getTarget(v);
+    var elTag = elTarget.nodeName.toLowerCase();
+    while(elTarget && (elTag != "table")) {
+        switch(elTag) {
+            case "body":
+                return;
+            case "li":
+                if(oSelf.prehighlightClassName) {
+                    oSelf._togglePrehighlight(elTarget,"mouseover");
+                }
+                else {
+                    oSelf._toggleHighlight(elTarget,"to");
+                }
+            
+                oSelf.itemMouseOverEvent.fire(oSelf, elTarget);
+                YAHOO.log("Item moused over " + elTarget._nItemIndex, "info", oSelf.toString());
+                break;
+            case "div":
+                if(YAHOO.util.Dom.hasClass(elTarget,"yui-ac-container")) {
+                    oSelf._bOverContainer = true;
+                    return;
+                }
+                break;
+            default:
+                break;
+        }
+        
+        elTarget = elTarget.parentNode;
+        if(elTarget) {
+            elTag = elTarget.nodeName.toLowerCase();
+        }
+    }
+};
+
+/**
+ * Handles container mouseout events.
+ *
+ * @method _onContainerMouseout
+ * @param v {HTMLEvent} The mouseout event.
+ * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
+ * @private
+ */
+YAHOO.widget.AutoComplete.prototype._onContainerMouseout = function(v,oSelf) {
+    var elTarget = YAHOO.util.Event.getTarget(v);
+    var elTag = elTarget.nodeName.toLowerCase();
+    while(elTarget && (elTag != "table")) {
+        switch(elTag) {
+            case "body":
+                return;
+            case "li":
+                if(oSelf.prehighlightClassName) {
+                    oSelf._togglePrehighlight(elTarget,"mouseout");
+                }
+                else {
+                    oSelf._toggleHighlight(elTarget,"from");
+                }
+            
+                oSelf.itemMouseOutEvent.fire(oSelf, elTarget);
+                YAHOO.log("Item moused out " + elTarget._nItemIndex, "info", oSelf.toString());
+                break;
+            case "ul":
+                oSelf._toggleHighlight(oSelf._elCurListItem,"to");
+                break;
+            case "div":
+                if(YAHOO.util.Dom.hasClass(elTarget,"yui-ac-container")) {
+                    oSelf._bOverContainer = false;
+                    return;
+                }
+                break;
+            default:
+                break;
+        }
+
+        elTarget = elTarget.parentNode;


<TRUNCATED>

[38/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/WSRequest.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/WSRequest.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/WSRequest.js
new file mode 100644
index 0000000..37988bd
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/WSRequest.js
@@ -0,0 +1,1446 @@
+/*
+ * Copyright 2007 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// This file introduces two classes: WSRequest for invoking a Web Service, and WebServiceError to encapsulate failure information.
+
+var WSRequestInaccessibleDomains = new Array();  // Assume all domains can be accessed without restrictions.  Once this fails, we'll try alternate means.
+var WSRequestActiveRequests = new Array();
+
+var WSRequest = function() {
+    // properties and usage mirror XMLHTTPRequest
+    this.readyState = 0;
+    this.responseText = null;
+    this.responseXML = null;
+    this.error = null;
+    this.onreadystatechange = null;
+    this.proxyAddress = null;
+    this.proxyEngagedCallback = null;
+    this.sentRequestUsingProxy = false;
+	this.pattern = null;
+
+    // Some internal properties
+    this._xmlhttp = WSRequest.util._createXMLHttpRequestObject();
+    this._soapVer = null;
+    this._async = true;
+    this._optionSet = null;
+    this._uri = null;
+    this._username = null;
+    this._password = null;
+    this._accessibleDomain = true;
+    this._timeoutHandler = null;
+	this._timeout = 1.2 * 60 * 1000;
+};
+
+var WebServiceError = function(reason, detail, code) {
+    this.reason = reason;
+    this.detail = detail;
+    this.code = code;
+    this.toString = function() { return this.reason; };
+};
+
+/**
+ * @description Prepare a Web Service Request .
+ * @method open
+ * @public
+ * @static
+ * @param {object} options
+ * @param {string} URL
+ * @param {boolean} asyncFlag
+ * @param {string} username
+ * @param {string} password
+ */
+WSRequest.prototype.open = function(options, URL, asnycFlag, username, password) {
+    if (arguments.length < 2 || arguments.length > 6)
+    {
+        throw new WebServiceError("Invalid input argument", "WSRequest.open method requires 2 to 6 arguments, but " + arguments.length + (arguments.length == 1 ? " was" : " were") + " specified.");
+    }
+
+    if (typeof(options) == "string") {
+        this._optionSet = new Array();
+        this._optionSet["HTTPMethod"] = options;
+        this._optionSet["useSOAP"] = false;
+    } else {
+        this._optionSet = options;
+    }
+
+    this._uri = URL;
+    this._async = asnycFlag;
+    if (username != null && password == null)
+        throw new WebServiceError("User name should be accompanied by a password", "WSRequest.open invocation specified username: '" + username + "' without a corresponding password.");
+    else
+    {
+        this._username = username;
+        this._password = password;
+    }
+
+    this.readyState = 1;
+    if (this.onreadystatechange != null)
+        this.onreadystatechange();
+    this.responseText = null;
+    this.responseXML = null;
+    this.error = null;
+};
+
+/**
+ * @description Send the payload to the Web Service.
+ * @method send
+ * @public
+ * @static
+ * @param {dom} response xml payload
+ */
+WSRequest.prototype.send = function(payload, type) {
+    if (arguments.length > 1) {
+        throw new WebServiceError("Invalid input argument.", "WSRequest.send() only accepts a single argument, " + arguments.length + " were specified.");
+    }
+
+    var accessibleDomain = true;
+
+    if (this._optionSet != null) {
+        accessibleDomain = this._optionSet['accessibleDomain'];
+        if (accessibleDomain == null) {
+            accessibleDomain = true;
+        }
+    }
+
+    for (var d in WSRequestInaccessibleDomains) {
+        if (this._uri.indexOf(WSRequestInaccessibleDomains[d]) == 0) {
+            accessibleDomain = false;
+            break;
+        }
+    }
+
+    this._soapVer = WSRequest.util._bindingVersion(this._optionSet);
+
+    if (accessibleDomain) {
+        // request body formatted as a string
+        var req = null;
+
+        var method;
+        if (this._optionSet["HTTPMethod"] != null)
+            method = this._optionSet["HTTPMethod"];
+        else
+            method = "POST";
+
+        if (payload != null)
+        {
+            var content;
+            if(type == "json") {
+                content = WSRequest.util.bf2xml(payload);
+            } else {
+                // seralize the dom to string
+                content = WSRequest.util._serializeToString(payload);
+                if (typeof(content) == "boolean" && !content) {
+                    throw new WebServiceError("Invalid input argument.", "WSRequest.send() unable to serialize XML payload.");
+                }
+            }
+
+        }
+
+        // formulate the message envelope
+        if (this._soapVer == 0) {
+            var processed = WSRequest.util._buildHTTPpayload(this._optionSet, this._uri, content);
+            req = processed["body"];
+            this._uri = processed["url"];
+        } else {
+            req = WSRequest.util._buildSOAPEnvelope(this._soapVer, this._optionSet, this._uri, content, this._username, this._password);
+        }
+
+        // Note that we infer soapAction from the "action" parameter - also used for wsa:Action.
+        //  WS-A recommends keeping these two items in sync.
+        var soapAction = this._optionSet["action"];
+
+//        try {
+//            netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
+//        } catch(e) {
+//        }
+
+		var browserURL = null;
+        var that;
+		if(document.URL != undefined || document.URL != null) {
+			browserURL = document.URL;
+			var hostURL = browserURL.substring(0, browserURL.indexOf("/", 8));
+			var host = hostURL.substring(hostURL.indexOf("://") + 3);
+			var protocol = hostURL.substring(0, hostURL.indexOf("://"));
+			var port;
+			var hostName;
+
+			if(host.indexOf(":") == -1) {
+				hostName = host;
+				if(protocol == "https") {
+					port = 443;
+				} else if(protocol == "http") {
+					port = 80;
+				}
+			} else {
+				hostName = host.substring(0, host.indexOf(":"));
+				port = host.substring(host.indexOf(":") + 1);
+			}
+			//if we are calling from localhost, we need to check it with wsdl endpoint and unify
+			/*if(hostName == "localhost" || hostName == "127.0.0.1") {
+				var hostURLWSDL = this._uri.substring(0,this._uri.indexOf("/", 8));
+				var hostWSDL = hostURLWSDL.substring(hostURL.indexOf("://") + 3);
+				var hostNameWSDL = hostWSDL.substring(0, hostWSDL.indexOf(":"));
+				if(hostNameWSDL == "localhost" || hostNameWSDL == "127.0.0.1") {
+					hostName = hostNameWSDL;
+				}
+			}*/
+			//browserURL = protocol + "://" + hostName + ":" + port + browserURL.substring(browserURL.indexOf("/", 8));
+		}
+        /*
+            if document.URL is present, we check weather this will be subjected
+            to XSS restriction and directed to the private proxy
+          */
+        if(!this.sentRequestUsingProxy && (browserURL == null ||
+                (this._uri.substring(0,this._uri.indexOf("/", 8)) == browserURL.substring(0,browserURL.indexOf("/", 8))))) {
+            // no XSS restriction
+            try {
+                this._xmlhttp.open(method, this._uri, this._async, this._username, this._password);
+
+                // Process protocol-specific details
+                switch (this._soapVer) {
+                    case 1.1:
+                        soapAction = (soapAction == undefined ? '""' : '"' + soapAction + '"');
+                        this._xmlhttp.setRequestHeader("SOAPAction", soapAction);
+                        this._xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=UTF-8");
+                        break;
+                    case 1.2:
+                        this._xmlhttp.setRequestHeader("Content-Type", "application/soap+xml;charset=UTF-8" + (soapAction == undefined ? "" : ";action=" + soapAction));
+                        break;
+                    case 0:
+                        var contentType;
+                        if (this._optionSet["HTTPInputSerialization"] != null) {
+                            contentType = this._optionSet["HTTPInputSerialization"]
+                        } else {
+                            if (method == "GET" | method == "DELETE") {
+                                contentType = "application/x-www-form-urlencoded";
+                            } else {
+                                contentType = "application/xml";
+                            }
+                        }
+                        this._xmlhttp.setRequestHeader("Content-Type", contentType);
+                        break;
+                }
+            }  catch(e) {
+                throw e;
+            }
+        } else {
+            // this domain might be subjected to XSS restriction, private proxy will be used
+            try {
+                var thisDomain = this._uri.substring(0, this._uri.substring(9).indexOf("/") + 10);
+                WSRequestInaccessibleDomains.push(thisDomain);
+                this.send(payload);
+                return;
+            } catch (e) {
+                throw e;
+            }
+        }
+
+        if (this._async) {
+            // async call
+            this._xmlhttp.onreadystatechange = WSRequest.util._bind(this._handleReadyState, this);
+            that = this;
+            this._timeoutHandler = setTimeout(function() {
+                if(that._xmlhttp.abort) that._xmlhttp.abort();
+                that.error = new WebServiceError("Service Timeout", "Request to the service timeout");
+                if(that._xmlhttp.readyState == 0 || that._xmlhttp.readyState == 1) {
+                    that.readyState = 4;
+                    if (that.onreadystatechange != null)
+                        that.onreadystatechange();
+                }
+            }, this._timeout);
+            this._xmlhttp.send(req);
+        } else {
+            // sync call
+            this.readyState = 2;
+            if (this.onreadystatechange != null)
+                this.onreadystatechange();
+            this._xmlhttp.send(req);
+
+            this._processResult();
+            if (this.error != null)
+                throw (this.error);
+
+            this.readyState = 4;
+            if (this.onreadystatechange != null)
+                this.onreadystatechange();
+        }
+    } else {
+
+        if (!this._async) {
+            throw new WebServiceError("Synchronous requests not supported.", "Request tunnelled through a URL requires asynchronous invocation.  Synchronous requests are not yet implemented.");
+        }
+        this.sentRequestUsingProxy = true;
+
+        var tunnelEndpoint;
+        if (this.proxyAddress == null || this.proxyAddress == "") {
+            if (this._uri.indexOf("http") == 0)
+                tunnelEndpoint = this._uri.substring(0,this._uri.indexOf("/services/"));
+            else throw new WebServiceError("Unspecified WSRequest.proxyAddress property - must specify when using script-injection fallback when endpoint is not http or https.")
+        } else {
+            tunnelEndpoint = this.proxyAddress;
+        }
+        var request = "async=" + this._async.toString() + "&" +
+                      "uri=" + encodeURIComponent(this._base64(this._uri)) + "&" +
+                      "pattern=" + encodeURIComponent(this._base64(this.pattern)) + "&" +
+                      "username=" + encodeURIComponent(this._base64(this._username)) + "&" +
+                      "password=" + encodeURIComponent(this._base64(this._password)) + "&" +
+                      "payload=" + encodeURIComponent(this._base64(WSRequest.util._serializeToString(payload))) + "&";
+        request += "options=";
+        for (var option in this._optionSet) {
+            if (this._optionSet[option] != null)
+                request += encodeURIComponent(this._base64(option + ":" + this._optionSet[option])) + ",";
+        }
+
+        this._xmlhttp.open("POST", tunnelEndpoint, true);
+        this._xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+
+        this._xmlhttp.onreadystatechange = WSRequest.util._bind(function() {
+            if (this._xmlhttp.readyState == 2) {
+                this.readyState = 2;
+                if (this.onreadystatechange != null)
+                    this.onreadystatechange();
+            }
+
+            if (this._xmlhttp.readyState == 3) {
+                this.readyState = 3;
+                if (this.onreadystatechange != null)
+                    this.onreadystatechange();
+            }
+
+            if (this._xmlhttp.readyState == 4) {
+                clearTimeout(this._timeoutHandler);
+                WSRequest._tunnelcallback(this);
+            }
+        }, this);
+
+        that = this;
+        this._timeoutHandler = setTimeout(function() {
+            if(that._xmlhttp.abort) that._xmlhttp.abort();
+            that.error = new WebServiceError("Proxy Timeout", "Request to the Tryit proxy timeout");
+            if(that._xmlhttp.readyState == 0 || that._xmlhttp.readyState == 1) {
+                that.readyState = 4;
+                if (that.onreadystatechange != null)
+                    that.onreadystatechange();
+            }
+        }, this._timeout);
+        this._xmlhttp.send(request);
+    }
+
+    // Execute a simple callback enabling UI to reflect whether the call was normal or through the proxy.
+    if (this.proxyEngagedCallback != null)
+        this.proxyEngagedCallback(!accessibleDomain);
+
+}
+
+WSRequest._tunnelcallback = function (thisRequest) {
+    var httpstatus = thisRequest._xmlhttp.status;
+    if (httpstatus == '200' || httpstatus == '202') {
+        var browser = WSRequest.util._getBrowser();
+        var responseText = thisRequest._xmlhttp.responseText;
+        var responseXMLdoc = null;
+        var response = null;
+        if (responseText != "") {
+            if (browser == "ie" || browser == "ie7") {
+                try {
+                    responseXMLdoc = new ActiveXObject("Microsoft.XMLDOM");
+                    responseXMLdoc.loadXML(responseText);
+                    response = responseXMLdoc;
+                } catch (e) {
+                    thisRequest.error = new WebServiceError("XML Parsing Error.", e);
+                }
+            } else {
+                var parser = new DOMParser();
+                responseXMLdoc = parser.parseFromString(responseText,"text/xml");
+                response = responseXMLdoc;
+                response.normalize();  //fixes data getting truncated at 4096 characters
+                if (response.documentElement.localName == "parsererror" && response.documentElement.namespaceURI == "http://www.mozilla.org/newlayout/xml/parsererror.xml") {
+                    thisRequest.error = new WebServiceError("XML Parsing Error.", responseText);
+                }
+            }
+        }
+
+        if (thisRequest.error == null) {
+            thisRequest.responseText = responseText;
+            thisRequest.responseXML = response;
+
+            if (response != null) {
+                var httpStatus;
+                if (browser == "ie" || browser == "ie7") {
+                    httpStatus = response.documentElement.getAttribute("h:status");
+                } else {
+                    httpStatus = response.documentElement.getAttributeNS("http://wso2.org/ns/TryitProxy", "status");
+                }
+                if (httpStatus != null && httpStatus != '') {
+                    thisRequest.error = new WebServiceError(httpStatus, responseText);
+                    thisRequest.httpStatus = 404;
+                } else {
+                    thisRequest.httpStatus = 200;
+                }
+            }
+            if (thisRequest._soapVer != 0) {
+
+                if (response != null) {
+                    var soapNamespace;
+                    if (thisRequest._soapVer == 1.1)
+                        soapNamespace = "http://schemas.xmlsoap.org/soap/envelope/";
+                    else
+                        soapNamespace = "http://www.w3.org/2003/05/soap-envelope";
+
+                    var fault = response.documentElement;
+                    if (fault.localName == "Fault" && fault.namespaceURI == soapNamespace) {
+                        thisRequest.error = new WebServiceError();
+                        if (thisRequest._soapVer == 1.2) {
+                            thisRequest.error.code = WSRequest.util._stringValue(WSRequest.util._firstElement(fault, soapNamespace, "Value"));
+                            thisRequest.error.reason = WSRequest.util._stringValue(WSRequest.util._firstElement(fault, soapNamespace, "Text"));
+                            thisRequest.error.detail = fault;
+                        } else {
+                            thisRequest.error.code = WSRequest.util._stringValue(fault.getElementsByTagName("faultcode")[0]);
+                            thisRequest.error.reason = WSRequest.util._stringValue(fault.getElementsByTagName("faultstring")[0]);
+                            thisRequest.error.detail = fault;
+                        }
+                    }
+                }
+            }
+        }
+    } else {
+        thisRequest.error = new WebServiceError("Error connecting to the Tryit ajax proxy");
+    }
+
+    thisRequest.readyState = 4;
+    if (thisRequest.onreadystatechange != null)
+        thisRequest.onreadystatechange();
+}
+
+WSRequest.prototype._base64 = function (input) {
+    // Not strictly base64 returns - nulls represented as "~"
+    if (input == null) return "~";
+
+    var base64Map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+    var length = input.length;
+    var output = "";
+    var p = [];
+    var charCode;
+    var i = 0;
+    var padding = 0;
+    while (charCode = input.charCodeAt(i++)) {
+        // convert to utf-8 as we fill the buffer
+        if (charCode < 0x80) {
+            p[p.length] = charCode;
+        } else if (charCode < 0x800) {
+            p[p.length] = 0xc0 | (charCode >> 6);
+            p[p.length] = 0x80 | (charCode & 0x3f);
+        } else if (charCode < 0x10000){
+            p[p.length] = 0xe0 | (charCode >> 12);
+            p[p.length] = 0x80 | ((charCode >> 6) & 0x3f);
+            p[p.length] = 0x80 | (charCode & 0x3f);
+        } else {
+            p[p.length] = 0xf0 | (charCode >> 18);
+            p[p.length] = 0x80 | ((charCode >> 12) & 0x3f);
+            p[p.length] = 0x80 | ((charCode >> 6) & 0x3f);
+            p[p.length] = 0x80 | (charCode & 0x3f);
+        }
+
+        if (i == length) {
+            while (p.length % 3)
+            {
+                p[p.length] = 0;
+                padding++;
+            }
+        }
+
+        if (p.length > 2) {
+            output += base64Map.charAt(p[0] >> 2);
+            output += base64Map.charAt(((p.shift() & 3) << 4) | (p[0] >> 4));
+            output += (padding > 1) ? "=" : base64Map.charAt(((p.shift() & 0xf) << 2) | (p[0] >> 6));
+            output += (padding > 0) ? "=" : base64Map.charAt(p.shift() & 0x3f);
+        }
+
+    }
+
+    return output;
+}
+
+
+/**
+ * @description Set responseText, responseXML, and error of WSRequest.
+ * @method _processResult
+ * @private
+ * @static
+ */
+WSRequest.prototype._processResult = function () {
+    var httpstatus;
+    if (this._soapVer == 0) {
+        this.responseText = this._xmlhttp.responseText;
+        this.responseXML = this._xmlhttp.responseXML;
+
+        httpstatus = this._xmlhttp.status;
+        if (httpstatus == '200' || httpstatus == '202') {
+            this.error = null;
+        } else {
+            this.error = new WebServiceError(this._xmlhttp.statusText, this.responseText, "HTTP " + this._xmlhttp.status);
+        }
+    } else {
+        var browser = WSRequest.util._getBrowser();
+
+        if (this._xmlhttp.responseText != "") {
+            var response;
+            var responseXMLdoc;
+            if (browser == "ie" || browser == "ie7") {
+                if (this._xmlhttp.responseXML.documentElement == null) {
+                    // unrecognized media type (probably application/soap+xml)
+                    responseXMLdoc = new ActiveXObject("Microsoft.XMLDOM");
+                    responseXMLdoc.loadXML(this._xmlhttp.responseText);
+                    response = responseXMLdoc.documentElement;
+                } else {
+                    response = this._xmlhttp.responseXML.documentElement;
+                }
+            } else {
+                var parser = new DOMParser();
+                responseXMLdoc = parser.parseFromString(this._xmlhttp.responseText,"text/xml");
+                response = responseXMLdoc.documentElement;
+                response.normalize();  //fixes data getting truncated at 4096 characters
+            }
+            var soapNamespace;
+            if (this._soapVer == 1.1)
+                soapNamespace = "http://schemas.xmlsoap.org/soap/envelope/";
+            else
+                soapNamespace = "http://www.w3.org/2003/05/soap-envelope";
+
+            var soapBody = WSRequest.util._firstElement(response, soapNamespace, "Body");
+            if (soapBody != null && soapBody.hasChildNodes()) {
+                var newDoc;
+                if (browser == "ie" || browser == "ie7") {
+                    newDoc = new ActiveXObject("Microsoft.XMLDOM");
+                    newDoc.appendChild(soapBody.firstChild);
+                } else {
+                    newDoc = document.implementation.createDocument("", "", null);
+                    newDoc.appendChild(soapBody.firstChild.cloneNode(true));
+                }
+
+                this.responseXML = newDoc;
+                this.responseText = WSRequest.util._serializeToString(newDoc);
+
+                fault = WSRequest.util._firstElement(newDoc, soapNamespace, "Fault");
+                if (fault != undefined) {
+                    this.error = new WebServiceError();
+                    if (this._soapVer == 1.2) {
+                        this.error.code = WSRequest.util._stringValue(WSRequest.util._firstElement(fault, soapNamespace, "Value"));
+                        this.error.reason = WSRequest.util._stringValue(WSRequest.util._firstElement(fault, soapNamespace, "Text"));
+                        this.error.detail = fault;
+                    } else {
+                        this.error.code = WSRequest.util._stringValue(fault.getElementsByTagName("faultcode")[0]);
+                        this.error.reason = WSRequest.util._stringValue(fault.getElementsByTagName("faultstring")[0]);
+                        this.error.detail = fault;
+                    }
+                }
+            } else {
+                // empty SOAP body - not necessarily an error
+                this.responseXML = null;
+                this.responseText = "";
+                this.error = null;
+            }
+        } else {
+            // If this block being executed; it's due to server connection has falied.
+            this.responseXML = null;
+            this.responseText = "";
+            try {
+                httpstatus = this._xmlhttp.status;
+                if (httpstatus == '200' || httpstatus == '202') {
+                    this.error = null;
+                } else {
+                    this.error = new WebServiceError();
+                    this.error.code = "HTTP " + this._xmlhttp.status;
+                    this.error.reason = "Server connection has failed.";
+                    this.error.detail = this._xmlhttp.statusText;
+                }
+            } catch (e) {
+                this.error = new WebServiceError();
+                this.error.code = null;
+                this.error.reason = "Server connection has failed.";
+                this.error.detail = e.toString();
+            }
+        }
+    }
+}
+
+/**
+ * @description XMLHttp callback handler.
+ * @method _handleReadyState
+ * @private
+ * @static
+ */
+WSRequest.prototype._handleReadyState = function() {
+    if (this._xmlhttp.readyState == 2) {
+        this.readyState = 2;
+        if (this.onreadystatechange != null)
+            this.onreadystatechange();
+    }
+
+    if (this._xmlhttp.readyState == 3) {
+        this.readyState = 3;
+        if (this.onreadystatechange != null)
+            this.onreadystatechange();
+    }
+
+    if (this._xmlhttp.readyState == 4) {
+        clearTimeout(this._timeoutHandler);
+        this._processResult();
+
+        this.readyState = 4;
+        if (this.onreadystatechange != null)
+            this.onreadystatechange();
+    }
+};
+
+
+// Utility functions
+
+WSRequest.util = {
+
+    xml2DOM : function(content) {
+        //create new document from string
+        var xmlDoc;
+
+        // Parser is browser specific.
+        var browser = this._getBrowser();
+        if (browser == "ie" || browser == "ie7") {
+            //create a DOM from content string.
+            xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
+            if (content != null && content != "")
+                xmlDoc.loadXML(content);
+        } else {
+            //create a DOMParser to get DOM from content string.
+            var xmlParser = new DOMParser();
+            if (content != null && content != "")
+                xmlDoc = xmlParser.parseFromString(content, "text/xml");
+        }
+        return xmlDoc;
+    },
+
+    _msxml : [
+            'MSXML2.XMLHTTP.3.0',
+            'MSXML2.XMLHTTP',
+            'Microsoft.XMLHTTP'
+            ],
+
+    /**
+     * @description Instantiates a XMLHttpRequest object and returns it.
+     * @method _createXMLHttpRequestObject
+     * @private
+     * @static
+     * @return object
+     */
+    _createXMLHttpRequestObject : function() {
+        var xhrObject;
+
+        try {
+            xhrObject = new XMLHttpRequest();
+        } catch(e) {
+            for (var i = 0; i < this._msxml.length; ++i) {
+                try
+                {
+                    // Instantiates XMLHttpRequest for IE and assign to http.
+                    xhrObject = new ActiveXObject(this._msxml[i]);
+                    break;
+                }
+                catch(e) {
+                    // do nothing
+                }
+            }
+        } finally {
+            return xhrObject;
+        }
+    },
+
+    /**
+     * @description Serialize payload to string.
+     * @method _serializeToString
+     * @private
+     * @static
+     * @param {dom} payload   xml payload
+     * @return string
+     */
+    _serializeToString : function(payload) {
+        if (payload == null) return null;
+        if (typeof(payload) == "string") {
+            return payload;
+        } else if (typeof(payload) == "object") {
+            var browser = WSRequest.util._getBrowser();
+            switch (browser) {
+                case "gecko":
+                case "safari":
+                    var serializer = new XMLSerializer();
+                    return serializer.serializeToString(payload);
+                    break;
+                case "ie":
+                case "ie7":
+                    return payload.xml;
+                    break;
+                case "opera":
+                    var xmlSerializer = document.implementation.createLSSerializer();
+                    return xmlSerializer.writeToString(payload);
+                    break;
+                case "undefined":
+                    throw new WebServiceError("Unknown browser", "WSRequest.util._serializeToString doesn't recognize the browser, to invoke browser-specific serialization code.");
+            }
+        } else {
+            return false;
+        }
+    },
+
+
+    /**
+     * @description get the character element children in a browser-independent way.
+     * @method _stringValue
+     * @private
+     * @static
+     * @param {dom element} node
+     * @return string
+     */
+    _stringValue : function(node) {
+        var browser = WSRequest.util._getBrowser();
+        switch (browser) {
+            case "ie":
+            case "ie7":
+                return node.text;
+                break;
+            case "gecko":
+            case "opera":
+            case "safari":
+            case "undefined":
+                var value = "";
+                if (node.nodeType == 3) {
+                    value = node.nodeValue;
+                } else {
+                    for (var i = 0; i < node.childNodes.length; i++) {
+                        value += WSRequest.util._stringValue(node.childNodes[i]);
+                    }
+                }
+                return value;
+                break;
+        }
+    },
+
+
+    /**
+     * @description Determines which binding to use (SOAP 1.1, SOAP 1.2, or HTTP) from the various options.
+     * @method _bindingVersion
+     * @private
+     * @static
+     * @param {Array} options   Options given by user
+     * @return string
+     */
+    _bindingVersion : function(options) {
+        var soapVer;
+        switch (options["useBindng"]) {
+            case "SOAP 1.2":
+                soapVer = 1.2;
+                break;
+            case "SOAP 1.1":
+                soapVer = 1.1;
+                break;
+            case "HTTP":
+                soapVer = 0;
+                break;
+            case undefined:
+                var useSOAP = options["useSOAP"];
+                switch (useSOAP) {
+                    case 1.2:
+                        soapVer = 1.2;
+                        break;
+                    case "1.2":
+                        soapVer = 1.2;
+                        break;
+                    case 1.1:
+                        soapVer = 1.1;
+                        break;
+                    case "1.1":
+                        soapVer = 1.1;
+                        break;
+                    case true:
+                        soapVer = 1.2;
+                        break;
+                    case false:
+                        soapVer = 0;
+                        break;
+                    case undefined:
+                        throw("Unspecified binding type: set useBinding = 'SOAP 1.1' | 'SOAP 1.2' | 'HTTP'.");
+                        break;
+                    default:
+                        throw("Unsupported useSOAP value '" + useSOAP + "'; set 'useBinding' option instead.");
+                }
+                break;
+            default:
+                throw("Unsupported useBinding value '" + options["useBinding"] + "': must be 'SOAP 1.2' | 'SOAP 1.1' | 'HTTP'.");
+        }
+        return soapVer;
+    },
+
+
+    /**
+     * @description Determine which browser we're running.
+     * @method _getBrowser
+     * @private
+     * @static
+     * @return string
+     */
+    _getBrowser : function() {
+        var ua = navigator.userAgent.toLowerCase();
+        if (ua.indexOf('opera') != -1) { // Opera (check first in case of spoof)
+            return 'opera';
+        } else if (ua.indexOf('msie 7') != -1) { // IE7
+            return 'ie7';
+        } else if (ua.indexOf('msie') != -1) { // IE
+            return 'ie';
+        } else if (ua.indexOf('safari') != -1) { // Safari (check before Gecko because it includes "like Gecko")
+            return 'safari';
+        } else if (ua.indexOf('gecko') != -1) { // Gecko
+            return 'gecko';
+        } else {
+            return false;
+        }
+    },
+
+
+    /**
+     * @description Build HTTP payload using given parameters.
+     * @method _buildHTTPpayload
+     * @private
+     * @static
+     * @param {Array} options Options given by user
+     * @param {string} url Address the request will be sent to.
+     * @param {string} content SOAP payload in string format.
+     * @return {array} Containing the processed URL and request body.
+     */
+    _buildHTTPpayload : function(options, url, content) {
+        // Create array to hold request uri and body.
+        var resultValues = new Array();
+        resultValues["url"] = "";
+        resultValues["body"] = "";
+        var paramSeparator = "&";
+        var inputSerialization;
+
+        var HTTPQueryParameterSeparator = "HTTPQueryParameterSeparator";
+        var HTTPInputSerialization = "HTTPInputSerialization";
+        var HTTPLocation = "HTTPLocation";
+        var HTTPMethod = "HTTPMethod";
+
+        // If a parameter separator has been identified, use it instead of the default &.
+        if (options[HTTPQueryParameterSeparator] != null) {
+            paramSeparator = options[HTTPQueryParameterSeparator];
+        }
+
+        // If input serialization is not specified, default based on HTTP Method.
+        if (options[HTTPInputSerialization] == null) {
+            if (options[HTTPMethod] == "GET" | options[HTTPMethod] == "DELETE") {
+                inputSerialization = "application/x-www-form-urlencoded";
+            } else {
+                inputSerialization = "application/xml";
+            }
+        } else {
+            inputSerialization = options[HTTPInputSerialization];
+        }
+
+        //create new document from string
+        var xmlDoc = this.xml2DOM(content);
+
+        // If the payload is to be URL encoded, other options have to be examined.
+        if (inputSerialization == "application/x-www-form-urlencoded" || inputSerialization == "application/xml") {
+
+            resultValues["url"] = options[HTTPLocation];
+
+            // If templates are specified and a valid payload is available, process, else just return original URI.
+            if (options[HTTPLocation] == null) {
+                resultValues["url"] = "";
+            } else if (xmlDoc != null && xmlDoc.hasChildNodes()) {
+
+                // Ideally .documentElement should be used instead of .firstChild, but this does not work.
+                var rootNode = xmlDoc.firstChild;
+
+                // Process payload, distributing content across the URL and body as specified.
+                resultValues = WSRequest.util._processNode(options, resultValues, rootNode, paramSeparator,
+                        inputSerialization);
+
+            }
+            // Globally replace any remaining template tags with empty strings.
+            var allTemplateRegex = new RegExp("\{.*\}", "ig");
+            resultValues["url"] = resultValues["url"].replace(allTemplateRegex, "");
+
+            // Append processed HTTPLocation value to URL.
+            resultValues["url"] = WSRequest.util._joinUrlToLocation(url, resultValues["url"]);
+
+            // Sending the XML in the request body.
+            if (content != null && inputSerialization == "application/xml") {
+                resultValues["body"] = content;
+            }
+        } else if (inputSerialization == "multipart/form-data") {
+            // Just throw an exception for now - will try to use browser features in a later release.
+            throw new WebServiceError("Unsupported serialization option.", "WSRequest.util._buildHTTPpayload doesn't yet support multipart/form-data serialization.");
+        }
+        return resultValues;
+    },
+
+    /**
+     * @description Traverse the DOM tree below a given node, retreiving the content of each node and appending it to the
+     *  URL or the body of the request based on the options specified.
+     * @method _processNode
+     * @private
+     * @static
+     * @param {Array} options Options given by user.
+     * @param {Array} resultValues HTTP Location content and request body.
+     * @param {XML} node SOAP payload as an XML object.
+     * @param {string} paramSeparator Separator character for URI parameters.
+     * @return {array} Containing the processed HTTP Location content and request body.
+     */
+    _processNode : function(options, resultValues, node, paramSeparator, inputSerialization) {
+        var queryStringSep = '?';
+        var HTTPLocationIgnoreUncited = "HTTPLocationIgnoreUncited";
+        var HTTPMethod = "HTTPMethod";
+
+        // Traverse the XML and add the contents of each node to the URL or body.
+        do {
+
+            // Recurse if node has children.
+            if (node.hasChildNodes())
+            {
+                resultValues = WSRequest.util._processNode(options, resultValues, node.firstChild, paramSeparator,
+                        inputSerialization);
+            }
+
+            // Check for availability of node name and data before processing.
+            if (node.nodeValue != null && (node.nodeType === 1 ||
+                    node.nodeType === 2 || node.nodeType === 3 || node.nodeType === 9)) {
+                var tokenName = WSRequest.util._nameForValue(node);
+
+                // Create a regex to look for the token.
+                var templateRegex = new RegExp("\{" + tokenName + "\}", "i");
+                var unencTmpltRegex = new RegExp("\{!" + tokenName + "\}", "i");
+                var tokenLocn;
+
+                // If the token is in the URL - swap tokens with values.
+                if ((tokenLocn = resultValues["url"].search(templateRegex)) != -1) {
+                    // Replace the token with the URL encoded node value.
+                    var isQuery = resultValues["url"].substring(0, tokenLocn).indexOf('?') != -1;
+                    resultValues["url"] = resultValues["url"].replace(templateRegex,
+                            WSRequest.util._encodeString(node.nodeValue, isQuery));
+                } else if (resultValues["url"].search(unencTmpltRegex) != -1) {
+                    // Replace the token with the node value, witout encoding.
+                    resultValues["url"] = resultValues["url"].replace(templateRegex, node.nodeValue);
+                } else {
+                    var parameter = "";
+
+                    // If the node has a list, create a bunch of name/value pairs, otherwise a single pair.
+                    if (WSRequest.util._attributesContain(node.parentNode, "xsd:list")) {
+                        var valueList = new Array();
+                        valueList = node.nodeValue.split(' ');
+                        for (var valueNum = 0; valueNum < valueList.length; valueNum++) {
+                            parameter = parameter + tokenName + "=" + WSRequest.util._encodeString(valueList[valueNum],
+                                    true);
+
+                            // Add the parameter separator after each list value except the last.
+                            if (valueNum < (valueList.length - 1)) {
+                                parameter += paramSeparator;
+                            }
+                        }
+                    } else {
+                        parameter = tokenName + "=" + WSRequest.util._encodeString(node.nodeValue, true);
+                    }
+
+                    // If ignore uncited option has been set, append parameters to body else to the url.
+                    if (options[HTTPLocationIgnoreUncited] != null && options[HTTPLocationIgnoreUncited] == "true") {
+
+                        // Add to request body if the serialization option and request type allows it.
+                        if (inputSerialization == "application/x-www-form-urlencoded" && (options[HTTPMethod] == "POST"
+                                || options[HTTPMethod] == "PUT")) {
+
+                            // Assign or append additional parameters.
+                            if (resultValues["body"] == "") {
+                                resultValues["body"] = parameter;
+                            } else {
+                                resultValues["body"] = resultValues["body"] + paramSeparator + parameter;
+                            }
+                        }
+
+                    } else {
+                        // If he URL does not contain ? add it and then the parameter.
+                        if (resultValues["url"].indexOf(queryStringSep) == -1) {
+                            resultValues["url"] = resultValues["url"] + queryStringSep + parameter;
+                        } else {
+                            // ...otherwise just append the uncited value.
+                            resultValues["url"] = resultValues["url"] + paramSeparator + parameter;
+                        }
+                    }
+                }
+            }
+        } while (node = node.nextSibling)
+
+        return resultValues;
+    },
+
+    /**
+     * @description Build soap message using given parameters.
+     * @method _buildSoapEnvelope
+     * @private
+     * @static
+     * @param {string} soapVer SOAP version (1.1 or 1.2)
+     * @param {Array} options   Options given by user
+     * @param {string} url Address the request will be sent to.
+     * @param {string} content SOAP payload
+     * @param {string} username Optional username
+     * @param {string} password Optional password
+     * @return string
+     */
+    _buildSOAPEnvelope : function(soapVer, options, url, content, username, password) {
+        var ns;
+        if (soapVer == 1.1)
+            ns = "http://schemas.xmlsoap.org/soap/envelope/";
+        else
+            ns = "http://www.w3.org/2003/05/soap-envelope";
+
+        var headers = "";
+
+        // addressing version/namespace
+        var useWSA = options["useWSA"];
+        var wsaNs = "";
+        var wsaNsDecl = "";
+        var usingWSA = false;
+        if (useWSA != undefined && useWSA) {
+            var standardversion;
+            if (useWSA == "1.0" || useWSA) {
+                wsaNs = "http://www.w3.org/2005/08/addressing";
+                standardversion = true;
+            } else if (useWSA == "submission") {
+                wsaNs = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
+                standardversion = false;
+            } else throw ("Unknown WS-Addressing version '" + useWSA + "': must be '1.0' | 'submission' | true | false.");
+            wsaNsDecl = ' xmlns:wsa="' + wsaNs + '"';
+            headers = this._buildWSAHeaders(standardversion, options, url);
+            usingWSA = true;
+        }
+        var useWSS = options["useWSS"];
+        if (useWSS != undefined && useWSS) {
+            if (!usingWSA) {
+                throw ('In order to use WS Security, WS Addressing should be enabled. Please set "options["useWSA"] = true"');
+            }
+            var created = new Date();
+            headers += '<o:Security s:mustUnderstand="1" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" ' +
+                       'xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">' +
+                       '<u:Timestamp u:Id="uuid-c3cdb38b-e4aa-4467-9d0e-dd30f081e08d-5">' +
+                       '<u:Created>' + WSRequest.util._toXSdateTime(created) + '</u:Created>' +
+                       '<u:Expires>' + WSRequest.util._toXSdateTime(created, 5*60) + '</u:Expires>' +
+                       '</u:Timestamp>' +
+                       '<o:UsernameToken u:Id="Me" >' +
+                       '<o:Username>' + username + '</o:Username>' +
+                       '<o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' + password + '</o:Password>' +
+                       '</o:UsernameToken>' +
+                       '</o:Security>';
+        }
+
+        var request = '<?xml version="1.0" encoding="UTF-8"?>\n' +
+                  '<s:Envelope xmlns:s="' + ns + '"' +
+                   wsaNsDecl + '>\n' +
+                  '<s:Header>' + headers + '</s:Header>\n' +
+                  '<s:Body>' + (content != null ? content : '') + '</s:Body>\n' +
+                  '</s:Envelope>';
+        return request;
+    },
+
+    /**
+     * @description Build WS-Addressing headers using given parameters.
+     * @method _buildWSAHeaders
+     * @private
+     * @static
+     * @param {boolean} standardversion true for 1.0, false for submission
+     * @param {Array} options   Options given by user
+     * @param {string} address Address the request will be sent to.
+     * @return string
+     */
+    _buildWSAHeaders : function(standardversion, options, address) {
+        if (options['action'] == null)
+            throw("'Action' option must be specified when WS-Addressing is engaged.");
+
+        // wsa:To (required)
+        var headers = "<wsa:To>" + address + "</wsa:To>\n";
+
+        // wsa:From (optional)
+        // Note: reference parameters and metadata aren't supported.
+        if (options['from'] != null)
+            headers += "<wsa:From><wsa:Address>" + options['from'] + "</wsa:Address></wsa:From>\n";
+
+        // wsa:ReplyTo (optional)
+        // Note: reference parameters and metadata aren't supported.
+        // Note: No way to specify that wsa:ReplyTo should be omitted (e.g., only in-out MEPs are supported).
+        if (options['replyto'] != null) {
+            headers += "<wsa:ReplyTo><wsa:Address>" + options['replyto'] + "</wsa:Address></wsa:ReplyTo>\n";
+        } else {
+            // Note: although wsa:ReplyTo is optional on in-out MEPs in the standard version, we put it in
+            //  explicitly for convenience.
+            headers += "<wsa:ReplyTo><wsa:Address>" +
+                       ( standardversion ?
+                         "http://www.w3.org/2005/08/addressing/anonymous" :
+                         "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"
+                               ) +
+                       "</wsa:Address></wsa:ReplyTo>\n";
+        }
+
+        // wsa:MessageID (required if a response is expected, e.g. wsa:ReplyTo is specified, which is always for us.)
+        // If user doesn't supply an identifier, we'll make one up.
+        var id;
+        if (options['messageid'] != null) {
+            id = options['messageid'];
+        } else {
+            // coin a unique identifier based on the time (in milliseconds) and a 10-digit random number.
+            var now = (new Date()).valueOf();
+            var randomToken = Math.floor(Math.random() * 10000000000);
+            id = "http://identifiers.wso2.com/messageid/" + now + "/" + randomToken;
+        }
+        headers += "<wsa:MessageID>" + id + "</wsa:MessageID>\n";
+
+        // wsa:FaultTo (optional)
+        // Note: reference parameters and metadata aren't supported.
+        if (options['faultto'] != null)
+            headers += "<wsa:FaultTo><wsa:Address>" + options['faultto'] + "</wsa:Address></wsa:FaultTo>\n";
+
+        // wsa:Action (required)
+        headers += "<wsa:Action>" + options['action'] + "</wsa:Action>\n"
+
+        return headers;
+    },
+
+    /**
+     * @description Set scope for callbacks.
+     * @method _getRealScope
+     * @private
+     * @static
+     * @param {Function} fn
+     * @return Function
+     */
+    _getRealScope : function(fn) {
+        var scope = window;
+        if (fn._cscope) scope = fn._cscope;
+        return function() {
+            return fn.apply(scope, arguments);
+        }
+    },
+
+    /**
+     * @description Bind a function to the correct scope for callbacks
+     * @method _bind
+     * @private
+     * @static
+     * @param {Function} fn
+     * @param {Object} obj
+     * @return Function
+     */
+    _bind : function(fn, obj) {
+        fn._cscope = obj;
+        return this._getRealScope(fn);
+
+    },
+
+
+    /**
+     * @description Normalize browser-specific differences in getElementsByTagName
+     * @method _firstElement
+     * @private
+     * @static
+     * @param {dom} node
+     * @param {string} namespace
+     * @param {string} localName
+     * @return element
+     */
+    _firstElement : function (node, namespace, localName) {
+        if (node == null) return null;
+        var browser = WSRequest.util._getBrowser();
+        var doc, el;
+        if (browser == "ie" || browser == "ie7") {
+            if (node.nodeType == 9)
+                doc = node;
+            else
+                doc = node.ownerDocument;
+            doc.setProperty("SelectionNamespaces", "xmlns:soap='" + namespace + "'");
+            el = node.selectSingleNode(".//soap:" + localName);
+        } else {
+            // Some Firefox DOMs recognize namespaces ...
+            el = node.getElementsByTagNameNS(namespace, localName)[0];
+            if (el == undefined)
+            // ... and some don't.
+                el = node.getElementsByTagName(localName)[0];
+        }
+        return el;
+    },
+
+
+    /**
+     * @description Returns the name of a given DOM text node, managing browser issues
+     * @method _nameForValue
+     * @private
+     * @static
+     * @param {dom} node
+     * @return string
+     */
+    _nameForValue : function(node) {
+        var browser = WSRequest.util._getBrowser();
+        var nodeNameVal;
+
+        // IE localName property does not work, so extract from node name.
+        if (browser == "ie" || browser == "ie7") {
+            var fullName = WSRequest.util._isEmpty(node.nodeName) ? node.parentNode.nodeName : node.nodeName;
+            nodeNameVal = fullName.substring(fullName.indexOf(":") + 1, fullName.length);
+        } else {
+            nodeNameVal = WSRequest.util._isEmpty(node.localName) ? node.parentNode.localName : node.localName;
+        }
+        return nodeNameVal;
+    },
+
+
+    /**
+     * @description Determins if a node string value is null or empty, managing browser issues
+     * @method _isEmpty
+     * @private
+     * @static
+     * @param {*} value
+     * @return boolean
+     */
+    _isEmpty : function(value) {
+        // Regex for determining if a given string is empty.
+        var emptyRegEx = /^[\s]*$/;
+
+        // Short circuit if null, otherwise check for empty.
+        return (value == null || value == "#text" || emptyRegEx.test(value));
+    },
+
+
+    /**
+     * @description Returns true if the attributes of the node contain a given value.
+     * @method _attributeContain
+     * @private
+     * @static
+     * @param {dom node} node
+     * @param {string} value
+      * @return boolean
+     */
+    _attributesContain : function(node, value) {
+        var hasValue = false;
+
+        // If node has attributes...
+        if (node.attributes.length > 0) {
+            // ...cycle through them and check for the value.
+            for (var attNum = 0; attNum < node.attributes.length; attNum++) {
+                if (node.attributes[attNum].nodeValue == value) {
+                    hasValue = true;
+                    break;
+                }
+            }
+        }
+        return hasValue;
+    },
+
+
+    /**
+     * @description Appends the template string to the URI, ensuring that the two are separated by a ? or a /. Performs a
+     * merge if the start of the template is the same as the end of the URI, which will resolve at joining until a
+     * full resolution function can be developed.
+     * @method _joinUrlToLocation
+     * @private
+     * @static
+     * @param {string} endpointUri Base URI.
+     * @param {string} templateString Processed contents of the HTTPLocation option.
+     * @return string URI with the template string appended.
+     */
+    _joinUrlToLocation : function(endpointUri, templateString) {
+
+        // JS implementation of pseudo-code found at http://www.ietf.org/rfc/rfc3986.txt sec 5.2.2
+        function parse(url) {
+            var result = {"scheme" : null, "authority" : null, "path" : null, "query": null, "fragment" : null};
+
+            result.fragment = url.indexOf("#") < 0 ? null : url.substring(url.indexOf("#") + 1);
+            url = result.fragment == null ? url : url.substring(0, url.indexOf("#"));
+            result.query = url.indexOf("?") < 0 ? null : url.substring(url.indexOf("?") + 1);
+            url = result.query == null ? url : url.substring(0, url.indexOf("?"));
+            if (url.indexOf(':') > 0) {
+                result.scheme = url.substring(0, url.indexOf(":"));
+                url = url.substring(url.indexOf(":") + 1);
+            }
+            if (url.indexOf("//") == 0){
+                url = url.substring(2);
+                result.authority = url.substring(0, url.indexOf("/"));
+                result.path = url.substring(url.indexOf("/"));
+            } else result.path = url;
+            return result;
+        }
+
+        function merge(base, relative) {
+            if (base.authority != null && base.path == "") {
+                return "/" + relative.path;
+            } else {
+                if (base.path.indexOf("/") < 0) {
+                    return relative.path;
+                } else {
+                    var path = base.path.substring(0, base.path.lastIndexOf("/") + 1);
+                    return path + relative.path;
+                }
+            }
+        }
+
+        function removeDotSegments (path) {
+            var input = path;
+            var output = "";
+
+            while (input.length > 0) {
+                if (input.indexOf("../") == 0 || input.indexOf("./") == 0) {
+                    input = input.substring(input.indexOf("./"));
+                } else {
+                    if (input.indexOf("/./") == 0 || (input.indexOf("/.") == 0 && input.length == 2)) {
+                        input = input.substring(2);
+                        if (input.length == 0) input = "/";
+                    } else {
+                        if (input.indexOf("/../") == 0 || (input.indexOf("/..") == 0 && input.length == 3)) {
+                            input = input.substring(3);
+                            if (input.length == 0) input = "/";
+                            output = output.substring(0, output.lastIndexOf("/"));
+                        } else {
+                            if (input == "." || input == "..") {
+                                input="";
+                            } else {
+                                if (input.indexOf("/") == 0) {
+                                    output += "/";
+                                    input = input.substring(1);
+                                }
+                                var i = input.indexOf("/");
+                                if (i < 0) i = 10000;
+                                output += input.substring(0, i);
+                                input = input.substring(i);
+                            }
+                        }
+                    }
+                }
+            }
+            return output;
+        }
+
+        var base = parse(endpointUri);
+        var relative = parse(templateString);
+        var result = {"scheme" : null, "authority" : null, "path" : null, "query": null, "fragment" : null};
+
+        if (relative.scheme != null) {
+            result.scheme = relative.scheme;
+            result.authority = relative.authority;
+            result.path = removeDotSegments(relative.path);
+            result.query = relative.query;
+        } else {
+            if (relative.authority != null) {
+                result.authority = relative.authority;
+                result.path = removeDotSegments(relative.path);
+                result.query = relative.query;
+            } else {
+                if (relative.path == "") {
+                   result.path = base.path;
+                   if (relative.query != null) {
+                      result.query = relative.query;
+                   } else {
+                      result.query = base.query;
+                   }
+                } else {
+                   if (relative.path.indexOf("/") == 0) {
+                      result.path = removeDotSegments(relative.path);
+                   } else {
+                      result.path = merge(base, relative);
+                      result.path = removeDotSegments(result.path);
+                   }
+                   result.query = relative.query;
+                }
+                result.authority = base.authority;
+            }
+            result.scheme = base.scheme;
+        }
+        result.fragment = relative.fragment;
+
+        var resultURI = "";
+        if (result.scheme != null) resultURI += result.scheme + ":";
+        if (result.authority != null) resultURI += "//" + result.authority;
+        resultURI += result.path;
+        if (result.query != null) resultURI += "?" + result.query;
+        if (result.fragment != null) resultURI += "#" + result.fragment;
+        return resultURI;
+    },
+
+
+    /**
+     * @description Encodes a given string in either path or query parameter format.
+     * @method _encodeString
+     * @private
+     * @static
+     * @param {string} srcString String to be encoded.
+     * @param {boolean} queryParm Indicates that the string is a query parameter and not a part of the path.
+     * @return string URL encoded string.
+     */
+    _encodeString : function (srcString, queryParm) {
+        var legalInPath = "-._~!$'()*+,;=:@";
+        var legalInQuery = "-._~!$'()*+,;=:@/?";
+
+        var legal = queryParm ? legalInQuery : legalInPath;
+        var encodedString = "";
+        for (var i = 0; i < srcString.length; i++) {
+            var ch = srcString.charAt(i);
+            if ((ch >= 'a' && ch <= 'z')
+                    || (ch >= 'A' && ch <= 'Z')
+                    || (ch >= '0' && ch <= '9')
+                    || legal.indexOf(ch) > -1) {
+                encodedString += ch;
+            } else {
+                // Function encodeURIComponent will not encode ~!*()' but they are legal anyway.
+                encodedString += encodeURIComponent(ch);
+            }
+        }
+        return encodedString;
+    },
+
+
+    /**
+     * @description Convert a Date to an xs:dateTime string
+     * @method _toXSdateTime
+     * @private
+     * @static
+     * @param {Date} thisDate   Date to be serialized.
+     * @param {number} delta    Optional offset to serialize a time delta seconds in the future.
+     * @return string
+     */
+    _toXSdateTime : function (thisDate, delta) {
+        if (delta == null) delta = 0;
+
+	thisDate = new Date(thisDate.getTime() + 1000*delta);
+
+        var year = thisDate.getUTCFullYear();
+        var month = thisDate.getUTCMonth() + 1;
+        var day = thisDate.getUTCDate();
+        var hours = thisDate.getUTCHours();
+        var minutes = thisDate.getUTCMinutes();
+        var seconds = thisDate.getUTCSeconds();
+        var milliseconds = thisDate.getUTCMilliseconds();
+
+        return year + "-" +
+            (month < 10 ? "0" : "") + month + "-" +
+            (day < 10 ? "0" : "") + day + "T" +
+            (hours < 10 ? "0" : "") + hours + ":" +
+            (minutes < 10 ? "0" : "") + minutes + ":" +
+            (seconds < 10 ? "0" : "") + seconds +
+            (milliseconds == 0 ? "" : (milliseconds/1000).toString().substring(1)) + "Z";
+    }
+};
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/breadcrumbs.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/breadcrumbs.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/breadcrumbs.js
new file mode 100644
index 0000000..aef29b1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/breadcrumbs.js
@@ -0,0 +1,187 @@
+//todo - this is a hack, should be assinged at runtime
+var solutionPrefix = 'ds';
+
+function setSolutionPrefix(prefix) {
+    solutionPrefix = prefix;
+}
+
+function getCookieName() {
+    return solutionPrefix + '-breadcrumb-cookie';
+}
+
+//function generateBreadcrumbs(div, currentPosition, goBackLevel) {
+function generateBreadcrumbs(div, currentPosition) {
+
+    fixForBack(currentPosition);
+    var cookieDetails = getCookieDetails();
+    var text = "<h4>";
+
+    if (cookieDetails != null) {
+        var currentLevel = parseInt(cookieDetails[0]);
+        if (currentLevel > 0) {
+            var i, back, url;
+            var info = new Array();
+            for (i = 1; i < currentLevel + 1; i++) {
+                back = "";
+                if (cookieDetails[i] != null) {
+                    info = cookieDetails[i].split(',');
+                    url = info[2];
+                    if (url.indexOf('?') != -1) {
+                        url = url.substring(0, url.indexOf('?'));
+                    }
+                    if (url.indexOf('#') != -1) {
+                        url = url.substring(0, url.indexOf('#'));
+                    }
+                    if (info[0] == 'xslt') {
+                        back = "?back=true";
+                    }
+                    text += "<a href=" + url + back + " onClick=\"javascript:deleteAdditionalEntries(" + i + ");\">" + info[1] + "</a>&#160;&gt;&#160;";
+                }
+            }
+        }
+    }
+    text += currentPosition + "</h4>";
+    div.innerHTML = text;
+    div.style.display = 'inline';
+}
+
+function prepareCancelButton(link) {
+    var cookieDetails = getCookieDetails();
+    if (cookieDetails != null) {
+        var currentLevel = parseInt(cookieDetails[0]);
+        var back = "";
+        if (currentLevel > 0) {
+            var info = new Array();
+            info = cookieDetails[currentLevel].split(',');
+            var url = info[2];
+            if (url.indexOf('?') != -1) {
+                url = url.substring(0, url.indexOf('?'));
+            }
+            if (info[0] == 'xslt') {
+                back = "?back=true";
+            }
+            link.href = url + back;
+        }
+    }
+}
+
+function fixForBack(currentPosition) {
+    var cookieDetails = getCookieDetails();
+    if (cookieDetails != null) {
+        var currentLevel = parseInt(cookieDetails[0]);
+        if (currentLevel > 0) {
+            var info = new Array();
+            var i;
+            for (i = currentLevel; i > 0; i--) {
+                info = cookieDetails[i].split(',');
+                if (info[1] == currentPosition) {
+                    deleteCurrentEntry();
+                    deleteAdditionalEntries(i);
+                }
+            }
+        }
+    }
+}
+
+function updateHistory(breadcrumbName, url, type, jsMethod) {
+    var history = new Array();
+    history[0] = type;
+    history[1] = breadcrumbName;
+    history[2] = url;
+    history[3] = jsMethod;
+    history[4] = '-+-'
+
+    var detailString = getCookie(getCookieName());
+    var level, otherPart;
+    if (detailString != null) {
+        level = parseInt(detailString.substring(0, 1)) + 1;
+        otherPart = detailString.substring(1, detailString.length) + history;
+    } else {
+        level = '1-+-';
+        otherPart = history;
+    }
+    setCookie(getCookieName(), level + otherPart);
+}
+
+function getCookieDetails() {
+    var details = getCookie(getCookieName());
+    if (details != null) {
+        var detailArray = new Array();
+        detailArray = details.split('-+-');
+        return detailArray;
+    } else {
+        return null;
+    }
+}
+
+function deleteBreadcrumbCookie() {
+    deleteCookie(getCookieName());
+}
+
+function goBack(steps) {
+    var cookieDetails = getCookieDetails();
+    var currentLevel = parseInt(cookieDetails[0]);
+    if (currentLevel >= steps) {
+        deleteAdditionalEntries(currentLevel - steps + 1);
+    }
+}
+
+function deleteAdditionalEntries(levelToGo) {
+    var cookieDetails = getCookieDetails();
+    var currentLevel = parseInt(cookieDetails[0]);
+
+    var temp = Array();
+    temp = cookieDetails[levelToGo].split(',');
+    if (temp[0] != 'xslt') {
+        levelToGo--;
+    }
+
+    if (levelToGo < currentLevel) {
+        var i;
+        cookieDetails[0] = levelToGo;
+        var newDetails = "";
+        for (i = 0; i < levelToGo + 1; i ++) {
+            newDetails += (cookieDetails[i] + '-+-');
+        }
+        setCookie(getCookieName(), newDetails);
+    }
+}
+
+function deleteCurrentEntry() {
+    var cookieDetails = getCookieDetails();
+    var currentLevel = parseInt(cookieDetails[0]);
+    cookieDetails[0] = currentLevel - 1;
+
+    var newDetails = "";
+    var i;
+    for (i = 0; i < currentLevel; i ++) {
+        newDetails += (cookieDetails[i] + '-+-');
+    }
+    setCookie(getCookieName(), newDetails);
+}
+
+function getDivToLoad() {
+    var cookieDetails = getCookieDetails();
+    var currentLevel = parseInt(cookieDetails[0]);
+    var currentPageDetails = new Array();
+    currentPageDetails = cookieDetails[currentLevel].split(',');
+    return currentPageDetails[3];
+}
+
+
+function isBack(url) {
+    var devidePoint = url.indexOf("?");
+    if (devidePoint != -1) {
+        var params = new Array();
+        params = url.substring(devidePoint + 1, url.length).split('&');
+        var i;
+        var param = new Array();
+        for (i = 0; i < params.length; i++) {
+            param = params[i].split('=');
+            if (param[0] == 'back' && param[1] == 'true') {
+                return true;
+            }
+        }
+    }
+    return false;
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/cookies.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/cookies.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/cookies.js
new file mode 100644
index 0000000..0dc4c4c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/cookies.js
@@ -0,0 +1,84 @@
+//******************************************************************************************//
+// File for cookie related fnctions in JavaScript											//
+// Author : 	   Manish Hatwalne (http://www.technofundo.com/)							//
+// Feedback :  	   feedback@technofundo.com		(for feedback/bugs)							//
+// Created : 	   19 August 2001  															//
+// Functions :	   	  		 																//
+// 			 (1) setCookie(szName, szValue [,szExpires] [,szPath] [,szDomain] [,szSecure])	//
+//			 (2) getCookie(szName) 		   						  			  				//
+//			 (3) deleteCookie(szName)														//
+// 			 	 																			//
+// Feel free to use/modify the code in this file, but always keep the header intact.		//
+// And DO NOT re-distribute this file, instead provide a link to the site 	   				//
+// http://www.technofundo.com/. Thank You.	  		 										//
+// 									  														//
+//******************************************************************************************//
+
+
+
+//******************************************************************************************
+//
+// A CGI program uses the following syntax to add cookie information to the HTTP header:
+//
+// Set-Cookie:   name=value
+// [;EXPIRES=dateValue]
+// [;DOMAIN=domainName]
+// [;PATH=pathName]
+// [;SECURE]
+//
+// This function sets a client-side cookie as above.  Only first 2 parameters are required
+// Rest of the parameters are optional. If no szExpires value is set, cookie is a session cookie.
+//
+// Prototype : setCookie(szName, szValue [,szExpires] [,szPath] [,szDomain] [,bSecure])
+//******************************************************************************************
+
+
+function setCookie(szName, szValue, szExpires, szDomain, bSecure)
+{
+    var path = '/';
+    var szCookieText = 	   escape(szName) + '=' + escape(szValue);
+	szCookieText +=	 	   (szExpires ? '; EXPIRES=' + szExpires.toGMTString() : '');
+	szCookieText += 	   (path ? '; PATH=' + path : '');
+	szCookieText += 	   (szDomain ? '; DOMAIN=' + szDomain : '');
+	szCookieText += 	   (bSecure ? '; SECURE' : '');
+
+	document.cookie = szCookieText;
+}
+
+//******************************************************************************************
+// This functions reads & returns the cookie value of the specified cookie (by cookie name)
+//
+// Prototype : getCookie(szName)
+//******************************************************************************************
+
+function getCookie(szName)
+{
+ 	var szValue =	  null;
+	if(document.cookie)	   //only if exists
+	{
+           var arr = 		  document.cookie.split((escape(szName) + '='));
+       	if(2 <= arr.length)
+       	{
+           	var arr2 = 	   arr[1].split(';');
+       		szValue  = 	   unescape(arr2[0]);
+       	}
+	}
+	return szValue;
+}
+
+//******************************************************************************************
+// To delete a cookie, pass name of the cookie to be deleted
+//
+// Prototype : deleteCookie(szName)
+//******************************************************************************************
+
+function deleteCookie(szName)
+{
+ 	var tmp = 	  			 	 getCookie(szName);
+	if(tmp)
+	{ setCookie(szName,tmp,(new Date(1))); }
+}
+
+//==========================================^-^==============================================//
+//    This and many more interesting and usefull scripts at http://www.technofundo.com/		 //
+//==========================================^-^==============================================//   
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/customControls.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/customControls.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/customControls.js
new file mode 100644
index 0000000..22a8a26
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/js/customControls.js
@@ -0,0 +1,148 @@
+function initSections(initHidden) {
+    jQuery(document).ready(
+            function() {
+    if (initHidden == "hidden") {
+        jQuery(".togglebleTitle").next().hide();
+        jQuery(".togglebleTitle").addClass("contentHidden");
+        jQuery(".togglebleTitle").each(
+                function() {
+                    jQuery(this).html(jQuery(this).html() + '<img src="../admin/images/arrow-up.png" />');
+                }
+                );
+    } else {
+        jQuery(".togglebleTitle").next().show();
+        jQuery(".togglebleTitle").removeClass("contentHidden");
+        jQuery(".togglebleTitle").each(
+                function() {
+                    jQuery(this).html(jQuery(this).html() + '<img src="../admin/images/arrow-down.png" />');
+                }
+                );
+    }
+    jQuery(".togglebleTitle").click(
+            function() {
+                if (jQuery(this).next().is(":visible")) {
+                    jQuery(this).addClass("contentHidden");
+                    jQuery('img', this).remove();
+                    jQuery(this).html(jQuery(this).html() + '<img src="../admin/images/arrow-up.png" />');
+                } else {
+                    jQuery(this).removeClass("contentHidden");
+                    jQuery('img', this).remove();
+                    jQuery(this).html(jQuery(this).html() + '<img src="../admin/images/arrow-down.png" />');
+
+                }
+                jQuery(this).next().toggle("fast");
+            }
+            );
+         });
+}
+function createPlaceholders() {
+    var inputs = jQuery("input[type=text],input[type=email],input[type=tel],input[type=url]");
+    inputs.each(
+            function() {
+                var _this = jQuery(this);
+                this.placeholderVal = _this.attr("placeholder");
+                _this.val(this.placeholderVal);
+                if (this.placeholderVal != "") {
+                    _this.addClass("placeholderClass");
+                }
+            }
+            )
+            .bind("focus", function() {
+        var _this = jQuery(this);
+        var val = jQuery.trim(_this.val());
+        if (val == this.placeholderVal || val == "") {
+            _this.val("");
+            _this.removeClass("placeholderClass");
+        }
+    })
+            .bind("blur", function() {
+        var _this = jQuery(this);
+        var val = jQuery.trim(_this.val());
+        if (val == this.placeholderVal || val == "") {
+            _this.val(this.placeholderVal);
+            _this.addClass("placeholderClass");
+        }
+
+    });
+}
+function initMultipleSelectors(tableId) {
+    jQuery(document).ready(
+            function() {
+                var multiSelectTable = document.getElementById(tableId);
+                var leftSelect = jQuery('select', multiSelectTable)[0];
+                var rightSelect = jQuery('select', multiSelectTable)[1];
+                var toRight_btn = jQuery('input.toRight_btn', multiSelectTable)[0];
+                var toLeft_btn = jQuery('input.toLeft_btn', multiSelectTable)[0];
+
+                var addAllLink = jQuery('a.addAllLink', multiSelectTable)[0];
+                var removeAllLink = jQuery('a.removeAllLink', multiSelectTable)[0];
+
+                var transfer = function(params) {
+                    var fromElm = params.fromElm;
+                    var toElm = params.toElm;
+                    var all = params.all;
+                    
+                    var opt = fromElm.options;
+                    for (var i = 0; i < opt.length; i++) {
+                        if (opt[i].selected || all) {
+                            var newElm = document.createElement("option");
+                            newElm.value = opt[i].value;
+                            newElm.innerHTML = opt[i].innerHTML;
+                            if (opt[i].name != undefined) {
+                                newElm.value = opt[i].value;
+                            }
+                            if (opt[i].id != undefined) {
+                                newElm.id = opt[i].id;
+                            }
+                            toElm.appendChild(newElm);
+                        }
+                    }
+                    for (var i = (opt.length - 1); i >= 0; i--) {
+                        if (opt[i].selected || all) {
+                            fromElm.removeChild(opt[i]);
+                        }
+                    }
+                    sortSelect(toElm);
+                };
+                jQuery(toRight_btn).click(
+                        function() {
+                            transfer({fromElm:leftSelect, toElm:rightSelect,all:false});
+                        }
+                        );
+
+                jQuery(toLeft_btn).click(
+                        function() {
+                            transfer({fromElm:rightSelect, toElm:leftSelect,all:false});
+                        }
+                        );
+                jQuery(addAllLink).click(
+                        function() {
+                            transfer({fromElm:leftSelect, toElm:rightSelect,all:true});
+                        }
+                 );
+                jQuery(removeAllLink).click(
+                        function() {
+                            transfer({fromElm:rightSelect, toElm:leftSelect,all:true});
+                        }
+                 );
+
+
+            });
+}
+function sortSelect(selElem) {
+    var tmpAry = new Array();
+    for (var i = 0; i < selElem.options.length; i++) {
+        tmpAry[i] = new Array();
+        tmpAry[i][0] = selElem.options[i].text;
+        tmpAry[i][1] = selElem.options[i].value;
+    }
+    tmpAry.sort();
+    while (selElem.options.length > 0) {
+        selElem.options[0] = null;
+    }
+    for (var i = 0; i < tmpAry.length; i++) {
+        var op = new Option(tmpAry[i][0], tmpAry[i][1]);
+        selElem.options[i] = op;
+    }
+    return;
+}
\ No newline at end of file


[41/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/sql-1_0.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/sql-1_0.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/sql-1_0.tld
new file mode 100644
index 0000000..2f8a328
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/sql-1_0.tld
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+  <tlib-version>1.0</tlib-version>
+  <jsp-version>1.2</jsp-version>
+  <short-name>sql</short-name>
+  <uri>http://java.sun.com/jstl/sql</uri>
+  <display-name>JSTL sql</display-name>
+  <description>JSTL 1.0 sql library</description>
+
+  <validator>
+    <validator-class>
+	org.apache.taglibs.standard.tlv.JstlSqlTLV
+    </validator-class>
+    <init-param>
+        <param-name>expressionAttributes</param-name>
+        <param-value>
+        transaction:dataSource
+        transaction:isolation
+        query:sql
+        query:dataSource
+        query:startRow
+        query:maxRows
+        update:sql
+        update:dataSource
+        param:value
+        dateParam:value
+        dateParam:type
+        setDataSource:dataSource
+        setDataSource:driver
+        setDataSource:url
+        setDataSource:user
+        setDataSource:password
+        </param-value>
+        <description>
+            Whitespace-separated list of colon-separated token pairs
+            describing tag:attribute combinations that accept expressions.
+            The validator uses this information to determine which
+            attributes need their syntax validated.
+        </description>
+     </init-param>
+  </validator>
+
+  <tag>
+    <name>transaction</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.sql.TransactionTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Provides nested database action elements with a shared Connection,
+        set up to execute all statements as one transaction.
+    </description>
+    <attribute>
+        <name>dataSource</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>isolation</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>query</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.sql.QueryTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Executes the SQL query defined in its body or through the
+        sql attribute.
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>sql</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>dataSource</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>startRow</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>maxRows</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>update</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.sql.UpdateTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Executes the SQL update defined in its body or through the
+        sql attribute.
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>sql</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>dataSource</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>param</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.sql.ParamTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Sets a parameter in an SQL statement to the specified value.
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>dateParam</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.sql.DateParamTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Sets a parameter in an SQL statement to the specified java.util.Date val
+ue.
+    </description>
+    <attribute>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>setDataSource</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.sql.SetDataSourceTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+        Creates a simple DataSource suitable only for prototyping.
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>dataSource</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>driver</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>url</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>user</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>password</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/sql.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/sql.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/sql.tld
new file mode 100644
index 0000000..e53445b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/sql.tld
@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+    version="2.0">
+    
+  <description>JSTL 1.1 sql library</description>
+  <display-name>JSTL sql</display-name>
+  <tlib-version>1.1</tlib-version>
+  <short-name>sql</short-name>
+  <uri>http://java.sun.com/jsp/jstl/sql</uri>
+
+  <validator>
+    <description>
+        Provides core validation features for JSTL tags.
+    </description>
+    <validator-class>
+        org.apache.taglibs.standard.tlv.JstlSqlTLV
+    </validator-class>
+  </validator>
+
+  <tag>
+    <description>
+        Provides nested database action elements with a shared Connection,
+        set up to execute all statements as one transaction.
+    </description>
+    <name>transaction</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.sql.TransactionTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+DataSource associated with the database to access. A
+String value represents a relative path to a JNDI
+resource or the parameters for the JDBC
+DriverManager facility.
+        </description>
+        <name>dataSource</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Transaction isolation level. If not specified, it is the
+isolation level the DataSource has been configured
+with.
+        </description>
+        <name>isolation</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Executes the SQL query defined in its body or through the
+        sql attribute.
+    </description>
+    <name>query</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.sql.QueryTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+query result. The type of the scoped variable is
+javax.servlet.jsp.jstl.sql.
+Result (see Chapter 16 "Java APIs").
+        </description>
+        <name>var</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope of var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+SQL query statement.
+        </description>
+        <name>sql</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Data source associated with the database to
+query. A String value represents a relative path
+to a JNDI resource or the parameters for the
+DriverManager class.
+        </description>
+        <name>dataSource</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+The returned Result object includes the rows
+starting at the specified index. The first row of
+the original query result set is at index 0. If not
+specified, rows are included starting from the
+first row at index 0.
+        </description>
+        <name>startRow</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+The maximum number of rows to be included in
+the query result. If not specified, or set to -1, no
+limit on the maximum number of rows is
+enforced.
+        </description>
+        <name>maxRows</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Executes the SQL update defined in its body or through the
+        sql attribute.
+    </description>
+    <name>update</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.sql.UpdateTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the result
+of the database update. The type of the scoped
+variable is java.lang.Integer.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope of var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+SQL update statement.
+        </description>
+        <name>sql</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Data source associated with the database to update.
+A String value represents a relative path to a JNDI
+resource or the parameters for the JDBC
+DriverManager class.
+        </description>
+        <name>dataSource</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Sets a parameter in an SQL statement to the specified value.
+    </description>
+    <name>param</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.sql.ParamTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Parameter value.
+        </description>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Sets a parameter in an SQL statement to the specified java.util.Date value.
+    </description>
+    <name>dateParam</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.sql.DateParamTag</tag-class>
+    <body-content>empty</body-content>
+    <attribute>
+        <description>
+Parameter value for DATE, TIME, or
+TIMESTAMP column in a database table.
+        </description>
+        <name>value</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+One of "date", "time" or "timestamp".
+        </description>
+        <name>type</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Creates a simple DataSource suitable only for prototyping.
+    </description>
+    <name>setDataSource</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.sql.SetDataSourceTag</tag-class>
+    <body-content>empty</body-content>
+    <attribute>
+        <description>
+Name of the exported scoped variable
+for the data source specified. Type can
+be String or DataSource.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+If var is specified, scope of the
+exported variable. Otherwise, scope of
+the data source configuration variable.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Data source. If specified as a string, it
+can either be a relative path to a JNDI
+resource, or a JDBC parameters string
+as defined in Section 10.1.1.
+        </description>
+        <name>dataSource</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+JDBC parameter: driver class name.
+        </description>
+        <name>driver</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+JDBC parameter: URL associated with
+the database.
+        </description>
+        <name>url</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+JDBC parameter: database user on
+whose behalf the connection to the
+database is being made.
+        </description>
+        <name>user</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+JDBC parameter: user password
+        </description>
+        <name>password</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/tiles-jsp.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/tiles-jsp.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/tiles-jsp.tld
new file mode 100644
index 0000000..5250bb2
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/tiles-jsp.tld
@@ -0,0 +1,801 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * $Id: tiles-jsp.tld 545733 2007-06-09 11:38:36Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<!DOCTYPE taglib PUBLIC
+    "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+   <tlib-version>2.0</tlib-version>
+   <jsp-version>1.2</jsp-version>
+   <short-name>tiles</short-name>
+   <uri>http://tiles.apache.org/tags-tiles</uri>
+   <description>
+   <![CDATA[
+   <p>This tag library provides Tiles tags.</p>
+   ]]>
+   </description>
+   <tag>
+      <name>insertTemplate</name>
+      <tag-class>org.apache.tiles.jsp.taglib.InsertTemplateTag</tag-class>
+      <body-content>JSP</body-content>
+      <description>
+      <![CDATA[
+      <p><strong>Insert a template.</strong></p>
+      <p>Insert a template with the possibility to pass 
+      parameters (called attributes).
+      A template can be seen as a procedure that can take parameters or attributes.
+      <code>&lt;tiles:insertTemplate&gt;</code> allows to define these attributes 
+      and pass them to the inserted jsp page, called template.
+      Attributes are defined using nested tag <code>&lt;tiles:put&gt;</code> or
+      <code>&lt;tiles:putList&gt;</code>.
+      </p>
+      <p>You must specify <li><code>template</code> attribute, for inserting a template</p>
+     
+      <p><strong>Example : </strong></p>
+      <pre>
+        <code>
+          &lt;tiles:insertTemplate template="/basic/myLayout.jsp" flush="true">
+             &lt;tiles:put name="title" value="My first page" />
+             &lt;tiles:put name="header" value="/common/header.jsp" />
+             &lt;tiles:put name="footer" value="/common/footer.jsp" />
+             &lt;tiles:put name="menu" value="/basic/menu.jsp" />
+             &lt;tiles:put name="body" value="/basic/helloBody.jsp" />
+          &lt;/tiles:insert>
+        </code>
+      </pre>
+      ]]>
+      </description>
+      <attribute>
+         <name>template</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>A string representing the URI of a template (for example, a JSP
+         page).
+         </p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>flush</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
+         <type>boolean</type>
+         <description>
+         <![CDATA[
+         <p>True or false. If true, current page out stream is flushed 
+         before insertion.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>ignore</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
+         <description>
+         <![CDATA[
+         <p>If this attribute is set to true, and the attribute specified by the
+         name does not exist, simply return without writing anything. The
+         default value is false, which will cause a runtime exception to be
+         thrown.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>If the user is in the specified role, the tag is taken into account;
+         otherwise, the tag is ignored (skipped).</p>
+         ]]>
+         </description>
+      </attribute>
+
+      <attribute>
+         <name>preparer</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+          <description>
+              The fully qualified class name of the preparer.
+          </description>
+      </attribute>
+   </tag>
+   <tag>
+      <name>insertDefinition</name>
+      <tag-class>org.apache.tiles.jsp.taglib.InsertDefinitionTag</tag-class>
+      <body-content>JSP</body-content>
+      <description>
+      <![CDATA[
+      <p><strong>Insert a definition.</strong></p>
+      <p>Insert a definition with the possibility to override and specify 
+      parameters (called attributes).
+      A definition can be seen as a (partially or totally) filled template that
+      can override or complete attribute values.
+      <code>&lt;tiles:insertDefinition&gt;</code> allows to define these attributes 
+      and pass them to the inserted jsp page, called template.
+      Attributes are defined using nested tag <code>&lt;tiles:put&gt;</code> or
+      <code>&lt;tiles:putList&gt;</code>.
+      </p>
+      <p>You must specify <code>name</code> tag attribute, for inserting a definition from 
+        definitions factory.</p>
+      <p><strong>Example : </strong></p>
+      <pre>
+        <code>
+          &lt;tiles:insertDefinition name=".my.tiles.defininition flush="true">
+             &lt;tiles:put name="title" value="My first page" />
+             &lt;tiles:put name="header" value="/common/header.jsp" />
+             &lt;tiles:put name="footer" value="/common/footer.jsp" />
+             &lt;tiles:put name="menu" value="/basic/menu.jsp" />
+             &lt;tiles:put name="body" value="/basic/helloBody.jsp" />
+          &lt;/tiles:insertDefinition>
+        </code>
+      </pre>
+      ]]>
+      </description>
+      <attribute>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Name of the definition to insert.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>flush</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
+         <type>boolean</type>
+         <description>
+         <![CDATA[
+         <p>True or false. If true, current page out stream is flushed 
+         before insertion.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>ignore</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
+         <description>
+         <![CDATA[
+         <p>If this attribute is set to true, and the attribute specified by the
+         name does not exist, simply return without writing anything. The
+         default value is false, which will cause a runtime exception to be
+         thrown.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>If the user is in the specified role, the tag is taken into account;
+         otherwise, the tag is ignored (skipped).</p>
+         ]]>
+         </description>
+      </attribute>
+
+      <attribute>
+         <name>preparer</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+          <description>
+              The fully qualified class name of preparer.
+          </description>
+      </attribute>
+   </tag>
+   <tag>
+      <name>insertAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.InsertAttributeTag</tag-class>
+      <body-content>JSP</body-content>
+      <description>
+      <![CDATA[
+      <p><strong>Inserts the value of an attribute into the page.</strong></p>
+      <p>This tag can be flexibly used to insert the value of an attribute into a page.
+      As in other usages in Tiles, every attribute can be determined to have a "type", 
+      either set explicitly when it was defined, or "computed".  If the type is not explicit, then
+      if the attribute value is a valid definition, it will be inserted as such.  Otherwise,
+      if it begins with a "/" character, it will be treated as a "template".  Finally, if it 
+      has not otherwise been assigned a type, it will be treated as a String and included without 
+      any special handling.</p>
+     
+      <p><strong>Example : </strong></p>
+      <pre>
+        <code>
+          <tiles:insertAttribute name="body">
+        </code>
+      </pre>
+      ]]>
+      </description>
+      <attribute>
+         <name>name</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Name of the attribute to insert. This attribute will be ignored if
+         the <code>value</code> attribute is specified.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>value</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>java.lang.Object</type>
+         <description>
+         <![CDATA[
+         <p>Attribute object to render directly. If it specified, the <code>name</code>
+         attribute will be ignored.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>flush</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
+         <type>boolean</type>
+         <description>
+         <![CDATA[
+         <p>True or false. If true, current page out stream is flushed 
+         before insertion.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>ignore</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
+         <description>
+         <![CDATA[
+         <p>If this attribute is set to true, and the attribute specified by the
+         name does not exist, simply return without writing anything. The
+         default value is false, which will cause a runtime exception to be
+         thrown.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>If the user is in the specified role, the tag is taken into account;
+         otherwise, the tag is ignored (skipped).</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>preparer</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+          <description>
+              The fully qualified name of the preparer.
+          </description>
+      </attribute>
+   </tag>
+   <tag>
+      <name>definition</name>
+      <tag-class>org.apache.tiles.jsp.taglib.definition.DefinitionTag</tag-class>
+      <body-content>JSP</body-content>
+      <description>
+         <![CDATA[
+         <p><strong>Create a definition at runtime.
+         </strong></p>
+         <p>Create a new definition at runtime.
+         Newly created definition will be available across the entire request.
+         </p>]]>
+         </description>
+      <attribute>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Specifies the name under which the newly created definition bean 
+         will be saved.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>template</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>A string representing the URI of a template 
+         (a JSP page).</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Role to check before inserting this definition. If role is not 
+         defined for current user, definition is not inserted. Checking is
+         done at insert time, not during definition process.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>extends</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Name of a parent definition that is used to initialize this new 
+         definition. Parent definition is searched in definitions factory.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>preparer</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Specifies the preparer name to use. The specified preparer will
+         be executed before rendering this newly created definition.</p>
+         ]]>
+         </description>
+      </attribute>
+   </tag>
+   <tag>
+      <name>putAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.PutAttributeTag</tag-class>
+      <body-content>JSP</body-content>
+      <description>
+      <![CDATA[
+      <p><strong>Put an attribute in enclosing attribute container tag.</strong></p>
+		<p>
+		Enclosing attribute container tag can be : 
+		<ul>
+		<li>&lt;initContainer&gt;</li> 
+		<li>&lt;definition&gt;</li> 
+		<li>&lt;insertAttribute&gt;</li> 
+		<li>&lt;insertDefinition&gt;</li>
+		<li>&lt;putListAttribute&gt;</li>
+		</ul>
+		(or any other tag which implements the <code>{@link PutAttributeTagParent}</code> interface.
+		Exception is thrown if no appropriate tag can be found.</p>
+		<p>Put tag can have following atributes :
+		<ul>
+		<li>name : Name of the attribute</li>
+		<li>value : value to put as attribute</li>
+		<li>type : value type. Only valid if value is a String and is set by
+		value="something" or by a bean.
+		Possible type are : string (value is used as direct string),
+		template (value is used as a page url to insert),
+		definition (value is used as a definition name to insert)</li>
+		<li>direct : Specify if value is to be used as a direct string or as a
+		page url to insert. This is another way to specify the type. It only apply
+		if value is set as a string, and type is not present.</li>
+		<li>beanName : Name of a bean used for setting value. Only valid if value is not set.
+		If property is specified, value come from bean's property. Otherwise, bean
+		itself is used for value.</li>
+		<li>beanProperty : Name of the property used for retrieving value.</li>
+		<li>beanScope : Scope containing bean. </li>
+		<li>role : Role to check when 'insert' will be called. If enclosing tag is
+		&lt;insert&gt;, role is checked immediately. If enclosing tag is
+		&lt;definition&gt;, role will be checked when this definition will be
+		inserted.</li>
+		</ul></p>
+		<p>Value can also come from tag body. Tag body is taken into account only if
+		value is not set by one of the tag attributes. In this case Attribute type is
+		"string", unless tag body define another type.</p>
+      ]]>
+      </description>
+      <attribute>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Name of the attribute.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>value</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>java.lang.Object</type>
+         <description>
+         <![CDATA[
+         <p>Attribute value. Could be a String or an Object.
+         Value can come from a direct assignment (value="aValue") or from a bean.
+         One of 'value' 'content' or 'beanName' must be present.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>type</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Specify content type: string, template or definition.</p>
+         <ul>
+           <li>String : Content is printed directly.</li>
+           <li>template : Content is included from specified URL. Value is used as an URL.</li>
+           <li>definition : Value is the name of a definition defined in factory (xml file). Definition will be searched
+           in the inserted tile, in a <code>&lt;tiles:insert attribute="attributeName"&gt;</code> tag, where 'attributeName'
+           is the name used for this tag.</li>
+         </ul>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>
+         If the user is in the specified role, the tag is taken into account;
+         otherwise, the tag is ignored (skipped).
+         </p>
+         ]]>
+         </description>
+      </attribute>
+   </tag>
+   <tag>
+      <name>putListAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.PutListAttributeTag</tag-class>
+      <body-content>JSP</body-content>
+      <description>
+      <![CDATA[
+      <p><strong>Declare a list that will be pass as attribute to tile.
+      </strong></p>
+      <p>Declare a list that will be pass as attribute to tile.
+      List elements are added using the tag 'add'.
+      This tag can only be used inside 'insert' or 'definition' tag.</p>
+      ]]>
+      </description>
+      <attribute>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Name of the list.</p>
+         ]]>
+         </description>
+      </attribute>
+   </tag>
+   <tag>
+      <name>addAttribute</name>
+       <!--
+           Intentionally PutTag, it doubles for the AddTag
+           The only difference between the two is that the name
+           is not used in the Add Tag (and it's only valid within
+           the PutList
+        -->
+      <tag-class>org.apache.tiles.jsp.taglib.AddAttributeTag</tag-class>
+      <body-content>JSP</body-content>
+      <description>
+      <![CDATA[
+      <p><strong>Add an element to the surrounding list.
+      Equivalent to 'put', but for list element.</strong></p>
+          
+      <p>Add an element to the surrounding list.
+      This tag can only be used inside putList tag.
+      Value can come from a direct assignment (value="aValue") or from a bean.
+      One of 'value' or 'beanName' must be present.</p>
+      ]]>
+      </description>
+      <attribute>
+         <name>value</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>java.lang.Object</type>
+         <description>
+         <![CDATA[
+         <p>Attribute value. Can be a String or Object.</p>
+         ]]>
+      </description>
+      </attribute>
+      <attribute>
+         <name>type</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Specify content type: string, template or definition.</p>
+         <ul>
+            <li>String : Content is printed directly.</li>
+            <li>template : Content is included from specified URL. Value is used as an URL.</li>
+            <li>definition : Value denote a definition defined in factory (xml file). Definition will be searched
+            in the inserted tile, in a <code>&lt;insert attribute="attributeName"&gt;</code> tag, where 'attributeName'
+            is the name used for this tag.</li>
+         </ul>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>If the user is in the specified role, the tag is taken into account;
+         otherwise, the tag is ignored (skipped).</p>
+         <p>The role isn't taken into account if <code>&lt;add&gt;</code> 
+         tag is used in a definition.</p>
+         ]]>
+         </description>
+      </attribute>
+   </tag>
+   <tag>
+      <name>addListAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.AddListAttributeTag</tag-class>
+      <body-content>JSP</body-content>
+      <description>
+      <![CDATA[
+      <p><strong>Declare a list that will be pass as attribute to tile.
+      </strong></p>
+      <p>Declare a list that will be pass as attribute to tile.
+      List elements are added using the tag 'add'.
+      This tag can only be used inside 'insert' or 'definition' tag.</p>
+      ]]>
+      </description>
+   </tag>
+   <tag>
+      <name>getAsString</name>
+      <tag-class>org.apache.tiles.jsp.taglib.GetAsStringTag</tag-class>
+      <body-content>empty</body-content>
+      <description>
+      <![CDATA[
+      <p><strong>
+      Render the value of the specified template attribute to the current JspWriter
+      </strong></p>
+          
+      <p>Retrieve the value of the specified template attribute 
+      property, and render it to the current JspWriter as a String.
+      The usual toString() conversions is applied on found value.</p>
+      <p>Throw a JSPException if named value is not found.</p>
+      ]]>
+      </description>
+      <attribute>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Attribute name.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>ignore</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
+         <description>
+         <![CDATA[
+         <p>
+         If this attribute is set to true, and the attribute specified by the name
+         does not exist, simply return without writing anything. The default value is false, which will
+         cause a runtime exception to be thrown.
+         </p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>
+         If the user is in the specified role, the tag is taken into account;
+         otherwise, the tag is ignored (skipped).
+         </p>
+         ]]>
+         </description>
+      </attribute>
+   </tag>
+   <tag>
+      <name>useAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.UseAttributeTag</tag-class>
+      <tei-class>org.apache.tiles.jsp.taglib.UseAttributeTag$Tei</tei-class>
+      <body-content>empty</body-content>
+      <description>
+      <![CDATA[
+      <p><strong>Use attribute value inside page.</strong></p>
+      <p>Declare a Java variable, and an attribute in the specified scope, 
+      using tile attribute value.</p>
+      <p>Java variable and attribute will have the name specified by 'id',
+      or the original name if not specified.</p>
+      ]]>
+      </description>
+      <attribute>
+         <name>id</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Declared attribute and variable name.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>classname</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Class of the declared variable.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>scope</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Scope of the declared attribute. Default to 'page'.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Tile's attribute name.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>ignore</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
+         <description>
+         <![CDATA[
+         <p>
+         If this attribute is set to true, and the attribute specified by the name
+         does not exist, simply return without error. The default value is false, which will
+         cause a runtime exception to be thrown.
+         </p>
+         ]]>
+         </description>
+      </attribute>
+   </tag>
+   <tag>
+      <name>importAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.ImportAttributeTag</tag-class>
+      <body-content>empty</body-content>
+      <description>
+      <![CDATA[
+      <p><strong>Import Tile's attribute in specified context.</strong></p>
+      <p>Import attribute from tile to requested scope.
+      Attribute name and scope are optional. If not specified, all tile
+      attributes are imported in page scope.
+      Once imported, an attribute can be used as any other beans from jsp 
+      contexts.</p>
+      ]]>
+      </description>
+      <attribute>
+         <name>name</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Tile's attribute name. If not specified, all attributes are
+         imported.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>toName</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Name of the destination attribute. If not specified, the name will
+         be the same as specified in <code>name</code> attribute</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>scope</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
+         <description>
+         <![CDATA[
+         <p>Scope into which attribute is imported. Default to page.</p>
+         ]]>
+         </description>
+      </attribute>
+      <attribute>
+         <name>ignore</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
+         <description>
+         <![CDATA[
+         <p>If this attribute is set to true, and the attribute specified by 
+         the name does not exist, simply return without error. The default 
+         value is false, which will cause a runtime exception to be thrown.</p>
+         ]]>
+         </description>
+      </attribute>
+   </tag>
+   <tag>
+       <name>initContainer</name>
+      <tag-class>org.apache.tiles.jsp.taglib.definition.InitContainerTag</tag-class>
+      <body-content>JSP</body-content>
+      <description>
+      <![CDATA[
+      <p><strong>Initialize the TilesContainer.</strong></p>
+      <p>
+      In order to use the Tiles system, a TilesContainer must be instantiated.
+      This initialization is generally done by the TilesListener (or perhaps the
+      TilesServlet or TilesFilter).
+      </p>
+      <p>
+      If the intialization needs to be dynamic, you can initialize the container using
+      this tag.  Realize however, that this tag MUST be executed prior to invoking
+      any other definitions.  Additionally, the initilization may only be done once,
+      and any subsequent invocations will be ignored.
+      </p>
+      ]]>
+      </description>
+      <attribute>
+         <name>containerFactory</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <description> <![CDATA[ <p>Container Factory implementation used to instantiate the container.</p> ]]> </description>
+      </attribute>
+   </tag>
+
+    <tag>
+        <name>destroyContainer</name>
+        <tag-class>org.apache.tiles.jsp.taglib.definition.DestroyContainerTag</tag-class>
+        <body-content>empty</body-content>
+        <description>
+            <![CDATA[
+            <p><strong>Destroy the TilesContainer.</strong></p>
+            ]]>
+        </description>
+    </tag>
+</taglib>
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/x-1_0-rt.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/x-1_0-rt.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/x-1_0-rt.tld
new file mode 100644
index 0000000..e7062b7
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/x-1_0-rt.tld
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+  <tlib-version>1.0</tlib-version>
+  <jsp-version>1.2</jsp-version>
+  <short-name>x_rt</short-name>
+  <uri>http://java.sun.com/jstl/xml_rt</uri>
+  <display-name>JSTL XML RT</display-name>
+  <description>JSTL 1.0 XML library</description>
+
+  <validator>
+    <validator-class>
+	org.apache.taglibs.standard.tlv.JstlXmlTLV
+    </validator-class>
+    <description>
+        Provides validation features for JSTL XML tags.
+    </description>
+  </validator>
+
+  <tag>
+    <name>choose</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Simple conditional tag that establishes a context for
+        mutually exclusive conditional operations, marked by
+        &lt;when&gt; and &lt;otherwise&gt;
+    </description>
+  </tag>
+
+  <tag>
+    <name>out</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.xml.ExprTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+	Like &lt;%= ... &gt;, but for XPath expressions.
+    </description>
+    <attribute>
+        <name>select</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>escapeXml</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>if</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.xml.IfTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        XML conditional tag, which evalutes its body if the
+        supplied XPath expression evalutes to 'true' as a boolean
+    </description>
+    <attribute>
+        <name>select</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>forEach</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.xml.ForEachTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	XML iteration tag.
+    </description>
+    <attribute>
+	<name>var</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>select</name>
+	<required>true</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>otherwise</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Subtag of &lt;choose&gt; that follows &lt;when&gt; tags
+	and runs only if all of the prior conditions evaluated to
+	'false'
+    </description>
+  </tag>
+
+  <tag>
+    <name>param</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.xml.ParamTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Adds a parameter to a containing 'transform' tag's Transformer
+    </description>
+    <attribute>
+        <name>name</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>parse</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.xml.ParseTag</tag-class>
+    <tei-class>org.apache.taglibs.standard.tei.XmlParseTEI</tei-class>
+    <body-content>JSP</body-content>
+    <description>
+	Parses XML content from 'source' attribute or 'body'
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>varDom</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scopeDom</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>xml</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>systemId</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>filter</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>set</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.xml.SetTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+	Saves the result of an XPath expression evaluation in a 'scope'
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>select</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>transform</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.xml.TransformTag</tag-class>
+    <tei-class>org.apache.taglibs.standard.tei.XmlTransformTEI</tei-class>
+    <body-content>JSP</body-content>
+    <description>
+	Conducts a transformation given a source XML document
+	and an XSLT stylesheet
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>result</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>xml</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>xmlSystemId</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>xslt</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>xsltSystemId</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>when</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.xml.WhenTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Subtag of &lt;choose&gt; that includes its body if its
+        expression evalutes to 'true'
+    </description>
+    <attribute>
+        <name>select</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/x-1_0.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/x-1_0.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/x-1_0.tld
new file mode 100644
index 0000000..2237ccb
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/x-1_0.tld
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+  <tlib-version>1.0</tlib-version>
+  <jsp-version>1.2</jsp-version>
+  <short-name>x</short-name>
+  <uri>http://java.sun.com/jstl/xml</uri>
+  <display-name>JSTL XML</display-name>
+  <description>JSTL 1.0 XML library</description>
+
+  <validator>
+    <validator-class>
+	org.apache.taglibs.standard.tlv.JstlXmlTLV
+    </validator-class>
+    <init-param>
+	<param-name>expressionAttributes</param-name>
+	<param-value>
+	    out:escapeXml
+	    parse:xml
+	    parse:systemId
+	    parse:filter
+	    transform:xml
+	    transform:xmlSystemId
+	    transform:xslt
+	    transform:xsltSystemId
+	    transform:result
+	</param-value>
+	<description>
+	    Whitespace-separated list of colon-separated token pairs
+	    describing tag:attribute combinations that accept expressions.
+	    The validator uses this information to determine which
+	    attributes need their syntax validated.
+	</description>
+     </init-param>
+  </validator>
+
+  <tag>
+    <name>choose</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Simple conditional tag that establishes a context for
+        mutually exclusive conditional operations, marked by
+        &lt;when&gt; and &lt;otherwise&gt;
+    </description>
+  </tag>
+
+  <tag>
+    <name>out</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.xml.ExprTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+	Like &lt;%= ... &gt;, but for XPath expressions.
+    </description>
+    <attribute>
+        <name>select</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>escapeXml</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>if</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.xml.IfTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+      XML conditional tag, which evalutes its body if the
+      supplied XPath expression evalutes to 'true' as a boolean
+    </description>
+    <attribute>
+        <name>select</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>forEach</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.xml.ForEachTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	XML iteration tag.
+    </description>
+    <attribute>
+	<name>var</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>select</name>
+	<required>true</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>otherwise</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+	Subtag of &lt;choose&gt; that follows &lt;when&gt; tags
+	and runs only if all of the prior conditions evaluated to
+	'false'
+    </description>
+  </tag>
+
+  <tag>
+    <name>param</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.xml.ParamTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Adds a parameter to a containing 'transform' tag's Transformer
+    </description>
+    <attribute>
+        <name>name</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>parse</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.xml.ParseTag</tag-class>
+    <tei-class>org.apache.taglibs.standard.tei.XmlParseTEI</tei-class>
+    <body-content>JSP</body-content>
+    <description>
+	Parses XML content from 'source' attribute or 'body'
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>varDom</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scopeDom</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>xml</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>systemId</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>filter</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>set</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.xml.SetTag</tag-class>
+    <body-content>empty</body-content>
+    <description>
+	Saves the result of an XPath expression evaluation in a 'scope'
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>select</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>transform</name>
+    <tag-class>org.apache.taglibs.standard.tag.el.xml.TransformTag</tag-class>
+    <tei-class>org.apache.taglibs.standard.tei.XmlTransformTEI</tei-class>
+    <body-content>JSP</body-content>
+    <description>
+	Conducts a transformation given a source XML document
+	and an XSLT stylesheet
+    </description>
+    <attribute>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>result</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>xml</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <name>xmlSystemId</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>xslt</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+	<name>xsltSystemId</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <name>when</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.xml.WhenTag</tag-class>
+    <body-content>JSP</body-content>
+    <description>
+        Subtag of &lt;choose&gt; that includes its body if its
+        expression evalutes to 'true'
+    </description>
+    <attribute>
+        <name>select</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/x.tld
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/x.tld b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/x.tld
new file mode 100644
index 0000000..e52ffe8
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/x.tld
@@ -0,0 +1,448 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+    version="2.0">
+    
+  <description>JSTL 1.1 XML library</description>
+  <display-name>JSTL XML</display-name>
+  <tlib-version>1.1</tlib-version>
+  <short-name>x</short-name>
+  <uri>http://java.sun.com/jsp/jstl/xml</uri>
+
+  <validator>
+    <description>
+        Provides validation features for JSTL XML tags.
+    </description>
+    <validator-class>
+	org.apache.taglibs.standard.tlv.JstlXmlTLV
+    </validator-class>
+  </validator>
+
+  <tag>
+    <description>
+        Simple conditional tag that establishes a context for
+        mutually exclusive conditional operations, marked by
+        &lt;when&gt; and &lt;otherwise&gt;
+    </description>
+    <name>choose</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
+    <body-content>JSP</body-content>
+  </tag>
+
+  <tag>
+    <description>
+	Like &lt;%= ... &gt;, but for XPath expressions.
+    </description>
+    <name>out</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.xml.ExprTag</tag-class>
+    <body-content>empty</body-content>
+    <attribute>
+        <description>
+XPath expression to be evaluated.
+        </description>
+        <name>select</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Determines whether characters &lt;,&gt;,&amp;,'," in the
+resulting string should be converted to their
+corresponding character entity codes. Default
+value is true.
+        </description>
+        <name>escapeXml</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        XML conditional tag, which evalutes its body if the
+        supplied XPath expression evalutes to 'true' as a boolean
+    </description>
+    <name>if</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.xml.IfTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+The test condition that tells whether or not the
+body content should be processed.
+        </description>
+        <name>select</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+resulting value of the test condition. The type
+of the scoped variable is Boolean.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope for var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+	XML iteration tag.
+    </description>
+    <name>forEach</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.xml.ForEachTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+current item of the iteration. This scoped variable
+has nested visibility. Its type depends on the
+result of the XPath expression in the select
+attribute.
+        </description>
+	<name>var</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+XPath expression to be evaluated.
+        </description>
+	<name>select</name>
+	<required>true</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Iteration begins at the item located at the
+specified index. First item of the collection has
+index 0.
+        </description>
+	<name>begin</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+        <description>
+Iteration ends at the item located at the specified
+index (inclusive).
+        </description>
+	<name>end</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+        <description>
+Iteration will only process every step items of
+the collection, starting with the first one.
+        </description>
+	<name>step</name>
+	<required>false</required>
+	<rtexprvalue>true</rtexprvalue>
+	<type>int</type>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable for the
+status of the iteration. Object exported is of type
+javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested visibility.
+        </description>
+	<name>varStatus</name>
+	<required>false</required>
+	<rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+	Subtag of &lt;choose&gt; that follows &lt;when&gt; tags
+	and runs only if all of the prior conditions evaluated to
+	'false'
+    </description>
+    <name>otherwise</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
+    <body-content>JSP</body-content>
+  </tag>
+
+  <tag>
+    <description>
+        Adds a parameter to a containing 'transform' tag's Transformer
+    </description>
+    <name>param</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.xml.ParamTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Name of the transformation parameter.
+        </description>
+        <name>name</name>
+        <required>true</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Value of the parameter.
+        </description>
+        <name>value</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+	Parses XML content from 'source' attribute or 'body'
+    </description>
+    <name>parse</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.xml.ParseTag</tag-class>
+    <tei-class>org.apache.taglibs.standard.tei.XmlParseTEI</tei-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Name of the exported scoped variable for
+the parsed XML document. The type of the
+scoped variable is implementation
+dependent.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Name of the exported scoped variable for
+the parsed XML document. The type of the
+scoped variable is
+org.w3c.dom.Document.
+        </description>
+        <name>varDom</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope for var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope for varDom.
+        </description>
+        <name>scopeDom</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Deprecated. Use attribute 'doc' instead.
+        </description>
+        <name>xml</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Source XML document to be parsed.
+        </description>
+        <name>doc</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+The system identifier (URI) for parsing the
+XML document.
+        </description>
+        <name>systemId</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Filter to be applied to the source
+document.
+        </description>
+        <name>filter</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+	Saves the result of an XPath expression evaluation in a 'scope'
+    </description>
+    <name>set</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.xml.SetTag</tag-class>
+    <body-content>empty</body-content>
+    <attribute>
+        <description>
+Name of the exported scoped variable to hold
+the value specified in the action. The type of the
+scoped variable is whatever type the select
+expression evaluates to.
+        </description>
+        <name>var</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+XPath expression to be evaluated.
+        </description>
+	<name>select</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope for var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+	Conducts a transformation given a source XML document
+	and an XSLT stylesheet
+    </description>
+    <name>transform</name>
+    <tag-class>org.apache.taglibs.standard.tag.rt.xml.TransformTag</tag-class>
+    <tei-class>org.apache.taglibs.standard.tei.XmlTransformTEI</tei-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+Name of the exported
+scoped variable for the
+transformed XML
+document. The type of the
+scoped variable is
+org.w3c.dom.Document.
+        </description>
+        <name>var</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Scope for var.
+        </description>
+        <name>scope</name>
+        <required>false</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Result
+Object that captures or
+processes the transformation
+result.
+        </description>
+        <name>result</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Deprecated. Use attribute
+'doc' instead.
+        </description>
+        <name>xml</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Source XML document to be
+transformed. (If exported by
+&lt;x:set&gt;, it must correspond
+to a well-formed XML
+document, not a partial
+document.)
+        </description>
+        <name>doc</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+Deprecated. Use attribute
+'docSystemId' instead.
+        </description>
+        <name>xmlSystemId</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+The system identifier (URI)
+for parsing the XML
+document.
+        </description>
+        <name>docSystemId</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+javax.xml.transform.Source
+Transformation stylesheet as
+a String, Reader, or
+Source object.
+        </description>
+	<name>xslt</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+    <attribute>
+        <description>
+The system identifier (URI)
+for parsing the XSLT
+stylesheet.
+        </description>
+	<name>xsltSystemId</name>
+        <required>false</required>
+        <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
+
+  <tag>
+    <description>
+        Subtag of &lt;choose&gt; that includes its body if its
+        expression evalutes to 'true'
+    </description>
+    <name>when</name>
+    <tag-class>org.apache.taglibs.standard.tag.common.xml.WhenTag</tag-class>
+    <body-content>JSP</body-content>
+    <attribute>
+        <description>
+The test condition that tells whether or
+not the body content should be
+processed
+        </description>
+        <name>select</name>
+        <required>true</required>
+        <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
+</taglib>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/web.xml b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/web.xml
new file mode 100644
index 0000000..59d5a5f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/web.xml
@@ -0,0 +1,47 @@
+<!--
+ ~ Copyright (c) 2005-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~    http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied.  See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+         version="3.0">
+
+    <servlet>
+        <servlet-name>TilesServlet</servlet-name>
+        <servlet-class>org.apache.tiles.web.startup.TilesServlet</servlet-class>
+        <!--<init-param>
+            <param-name>definitions-config</param-name>
+            <param-value>/WEB-INF/tiles/tiles_main_defs.xml</param-value>
+        </init-param>-->
+        <load-on-startup>0</load-on-startup>
+    </servlet>
+
+    <context-param>
+        <param-name>org.apache.tiles.context.TilesContextFactory</param-name>
+        <param-value>org.apache.tiles.context.enhanced.EnhancedContextFactory</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>org.apache.tiles.factory.TilesContainerFactory.MUTABLE</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>org.apache.tiles.definition.DefinitionsFactory</param-name>
+        <param-value>org.wso2.carbon.tiles.CarbonUrlDefinitionsFactory</param-value>
+    </context-param>
+</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/carbonFormStyles.css
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/carbonFormStyles.css b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/carbonFormStyles.css
new file mode 100644
index 0000000..3daad0d
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/admin/css/carbonFormStyles.css
@@ -0,0 +1,274 @@
+.placeholderClass {
+    color: #ccc;
+}
+
+#tabs ul li {
+    /* webkit */
+    background-image: -webkit-gradient( linear, left top, left bottom, from( #cdd6e3 ), to( #ffffff ) ); /* mozilla - FF3.6+ */
+    background-image: -moz-linear-gradient( top, #cdd6e3 0%, #ffffff 100% ); /* IE 5.5 - 7 */
+    filter: progid:DXImageTransform.Microsoft.gradient( gradientType = 0, startColor = 0, endColorStr = #cdd6e3 ); /* IE8 */
+    -ms-filter: progid: DXImageTransform . Microsoft . gradient( gradientType = 0, startColor = 0, endColoStr = #cdd6e3 );
+
+    padding: 2px 8px 3px;
+    color: #fff;
+    text-decoration: none;
+    line-height: 1;
+    -moz-border-radius-topleft: 5px;
+    -moz-border-radius-topright: 5px;
+    border-top-left-radius: 5px;
+    border-top-right-radius: 5px;
+
+    border-bottom: none;
+    height: 20px;
+    margin-right: 5px;
+    border-top: solid 1px #b2ccdd;
+    border-left: solid 1px #b2ccdd;
+    border-right: solid 1px #b2ccdd;
+}
+
+#tabs ul li a {
+    color: #00608f;
+    padding: 2px;
+    font-size: .8em;
+}
+
+#tabs ul li.ui-tabs-selected {
+    background-image: none;
+    background-color: #fff;
+}
+
+#tabs ul li.ui-tabs-selected a {
+    color: #000;
+}
+
+#workArea {
+    padding-bottom: 0px;
+}
+
+.carbonFormTable {
+    color: #555;
+    width: 100%;
+}
+
+.carbonFormTable td {
+    vertical-align: top;
+    font-size: 12px;
+    padding-bottom: 5px !important;
+}
+
+.carbonFormTable input[type=text],.carbonFormTable input[type=password] {
+/* webkit */
+    background-image: -webkit-gradient( linear, left top, left bottom, from( #f7f7f7 ), to( #ffffff ) ); /* mozilla - FF3.6+ */
+    background-image: -moz-linear-gradient( top, #f7f7f7 0%, #ffffff 100% ); /* IE 5.5 - 7 */
+    filter: progid:DXImageTransform.Microsoft.gradient( gradientType = 0, startColorStr = #f7f7f7ff, endColorStr = #ffffffff ); /* IE8 */
+    -ms-filter: progid: DXImageTransform . Microsoft . gradient( gradientType = 0, startColorStr = #f7f7f7ff, endColoStr = #ffffffff );
+
+    background-repeat: repeat-x;
+    border: 1px solid #58697d;
+    min-width: 230px;
+    height: 20px;
+    color: #333333;
+    padding: 3px;
+    margin-right: 4px;
+    margin-bottom: 2px; /*font-family:tahoma, arial, sans-serif;*/
+}
+.carbonFormTable input[disabled=disabled]{
+    background-image: -webkit-gradient( linear, left top, left bottom, from( #dddddd ), to( #eeeeee ) ); /* mozilla - FF3.6+ */
+      background-image: -moz-linear-gradient( top, #dddddd 0%, #eeeeee 100% ); /* IE 5.5 - 7 */
+      filter: progid:DXImageTransform.Microsoft.gradient( gradientType = 0, startColorStr = #ddddddff, endColorStr = #eeeeeeff ); /* IE8 */
+      -ms-filter: progid: DXImageTransform . Microsoft . gradient( gradientType = 0, startColorStr = #ddddddff, endColoStr = #eeeeeeff );
+
+}
+.carbonFormTable td.labelField, .carbonFormTable label.labelField {
+}
+
+.buttonRow {
+    padding: 10px; /* webkit */
+    background-image: -webkit-gradient( linear, left top, left bottom, from( #f2f2f2 ), to( #ffffff ) ); /* mozilla - FF3.6+ */
+    background-image: -moz-linear-gradient( top, #f2f2f2 0%, #ffffff 100% ); /* IE 5.5 - 7 */
+    filter: progid:DXImageTransform.Microsoft.gradient( gradientType = 0, startColorStr = #f2f2f2ff, endColorStr = #ffffffff ); /* IE8 */
+    -ms-filter: progid: DXImageTransform . Microsoft . gradient( gradientType = 0, startColorStr = #f2f2f2ff, endColoStr = #ffffffff );
+
+    border: solid 1px #b8c9d0;
+
+}
+.sub_buttonRow{
+     padding: 10px; /* webkit */
+    background-color:#f5f5f5;
+    border-left: solid 1px #b8c9d0;
+    border-right: solid 1px #b8c9d0;
+    border-bottom: solid 1px #b8c9d0;
+}
+.sub_buttonRow input.button,.sub_buttonRow button.button {
+    margin-right:10px;
+}
+.ui-tabs .ui-tabs-panel {
+    padding: 0px;
+}
+
+.togglebleTitle {
+/*background:transparent url(../images/arrowDownUp.png) no-repeat left -20px;*/
+    cursor: pointer;
+}
+
+.sectionSeperator {
+    color: #000;
+    text-transform: capitalize;
+    font-size: 12px;
+
+    background-image: -webkit-gradient( linear, left top, left bottom, from( #ffffff ), to( #dddddd ) ); /* mozilla - FF3.6+ */
+    background-image: -moz-linear-gradient( top, #ffffff 0%, #dddddd 100% ); /* IE 5.5 - 7 */
+    filter: progid:DXImageTransform.Microsoft.gradient( gradientType = 0, startColorStr = #ffffff, endColorStr = #dddddd ); /* IE8 */
+    -ms-filter: progid: DXImageTransform . Microsoft . gradient( gradientType = 0, startColorStr = #ffffff, endColoStr = #dddddd );
+
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+    border: solid 1px #888888;
+    padding: 5px 10px;
+    width: auto;
+
+    -moz-box-shadow: 3px 3px 2px #ddd;
+    -webkit-box-shadow: 3px 3px 2px #ddd;
+    box-shadow: 3px 3px 2px #ddd;
+    margin-bottom: 10px;
+    clear: both;
+}
+
+.sectionSeperator img {
+    margin-left: 20px;
+}
+
+.contentHidden {
+/*background:transparent url(../images/arrowDownUp.png) no-repeat left 5px !important; */
+    color: #fff;
+    background-image: -webkit-gradient( linear, left top, left bottom, from( #555555 ), to( #dddddd ) ); /* mozilla - FF3.6+ */
+    background-image: -moz-linear-gradient( top, #888888 0%, #eeeeee 100% ); /* IE 5.5 - 7 */
+    filter: progid:DXImageTransform.Microsoft.gradient( gradientType = 0, startColorStr = #555555, endColorStr = #dddddd ); /* IE8 */
+    -ms-filter: progid: DXImageTransform . Microsoft . gradient( gradientType = 0, startColorStr = #555555, endColoStr = #dddddd );
+}
+
+.sectionSub {
+    padding-left: 10px;
+    padding-bottom: 10px;
+    padding-top: 10px;
+}
+.sectionSubForm{
+    border: solid 1px #b8c9d0;
+}
+.sectionSub table.styledLeft{
+    margin-left:0px !important;
+}
+.sectionHelp {
+    padding-bottom: 10px;
+    font-style: italic;
+    background: transparent url( ../images/help-small-icon.png ) no-repeat left top;
+    text-indent: 20px;
+}
+
+.button, .button:visited {
+    font-family: Arial;
+  color: #000000;
+  font-size: 13px;
+  padding: 2px;
+  text-decoration: none;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+
+  text-shadow: 1px 1px 3px #ffffff;
+  border: solid #9D9FA1 1px;
+  background: -webkit-gradient(linear, 0 0, 0 100%, from(#f7f7f7), to(#cccccc));
+  background: -moz-linear-gradient(top, #f7f7f7, #cccccc);
+  -ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorStr=#f7f7f7, endColorStr=#cccccc);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorStr=#f7f7f7, endColorStr=#cccccc);
+  display:inline-block; /* IE is so silly */
+    position: relative;
+    cursor: pointer;
+}
+
+.button:hover, .button:focus {
+     background: #ededed;
+}
+input.button[disabled='disabled'] ,button.button[disabled='disabled'],input.button[disabled=''] ,button.button[disabled=''] {
+    color:#888;
+     background: #ededed;
+}
+input.button, button.button{ /*Fix for IE8 */
+    color:#222\0/ !important;
+}
+.txtbox-small {
+    width: 20px;
+}
+
+.txtbox-med {
+    width: 100px;
+}
+
+.txtbox-big {
+    width: 200px;
+}
+
+.expandedTextarea {
+    width: 99%;
+    height: 150px;
+}
+.sectionInputs{
+    background-color:#eee;
+    border:solid 1px #999;
+    padding:3px 0px 3px 3px;
+}
+.sectionInputs div.sectionHelp{
+    margin:10px 5px 0px 5px;    
+}
+ul.items{
+    margin:0px;
+    list-style-type:none;
+}
+ul.items li{
+    padding:5px 0px;
+}
+
+/* Tempory overrides */
+.ui-tabs-nav li a{
+    background:none;
+}
+/* -- Form headdings --*/
+.heading_A  {
+    font-size:12px;font-weight: bold;border-bottom: solid 1px #ccc;line-height: 20px;
+}
+.heading_B  {
+    font-size:12px;font-weight: bold;line-height: 20px;
+}
+.heading_C  {
+    color:#888;font-size:12px;font-weight: bold;line-height: 20px;
+}
+
+/* Icons */
+a.icon-a{
+    cursor:pointer;
+    color:#2F7ABD;
+    line-height:25px;
+}
+[class^="icon-"], [class*=" icon-"] {
+  display: inline-block;
+  line-height: 14px;
+  vertical-align: text-top;
+  background-repeat: no-repeat;
+  margin-right:5px;
+  *margin-right: .3em;
+}
+[class^="icon-"]:last-child, [class*=" icon-"]:last-child {
+  *margin-left: 0;
+}
+
+.icon-edit { width: 16px; height: 16px; background:url(../images/mainIcons.png) no-repeat -0px -0px; }
+.icon-add { width: 16px; height: 16px; background:url(../images/mainIcons.png) no-repeat -0px -16px; }
+.icon-add-small { width: 12px; height: 12px; background:url(../images/mainIcons.png) no-repeat -0px -32px; }
+.icon-delete { width: 16px; height: 16px; background:url(../images/mainIcons.png) no-repeat -0px -44px; }
+ .odd-even-data-table tr:nth-child(odd) td,
+.odd-even-data-table tr:nth-child(odd) th {
+    background-color: #f9f9f9;
+}
+.odd-even-data-table{
+    border-collapse:collapse;
+}
+


[49/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUILoginUtil.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUILoginUtil.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUILoginUtil.java
new file mode 100644
index 0000000..ba05a7b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUILoginUtil.java
@@ -0,0 +1,596 @@
+/*
+ *  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.wso2.carbon.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.core.common.AuthenticationException;
+import org.wso2.carbon.ui.tracker.AuthenticatorRegistry;
+import org.wso2.carbon.utils.UserUtils;
+import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
+import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+import java.util.regex.Pattern;
+
+public final class CarbonUILoginUtil {
+
+    private static Log log = LogFactory.getLog(CarbonUILoginUtil.class);
+    private static Pattern tenantEnabledUriPattern;
+    private static final String TENANT_ENABLED_URI_PATTERN = "(/.*/|/)"
+            + MultitenantConstants.TENANT_AWARE_URL_PREFIX + "/[^/]*($|/.*)";
+    protected static final int RETURN_FALSE = 0;
+    protected static final int RETURN_TRUE = 1;
+    protected static final int CONTINUE = 2;
+
+    static {
+        tenantEnabledUriPattern = Pattern.compile(TENANT_ENABLED_URI_PATTERN);
+    }
+
+    /**
+     * 
+     * @return
+     */
+    protected static Pattern getTenantEnabledUriPattern() {
+        return tenantEnabledUriPattern;
+    }
+
+    /**
+     * Returns the corresponding CarbonAuthenticator based on the request.
+     * 
+     * @param request
+     * @return
+     */
+    protected static CarbonUIAuthenticator getAuthenticator(HttpServletRequest request) {
+        return AuthenticatorRegistry.getCarbonAuthenticator(request);
+    }
+
+    /**
+     * 
+     * @param authenticator
+     * @param request
+     * @param response
+     * @param session
+     * @param skipLoginPage
+     * @param contextPath
+     * @param indexPageURL
+     * @param requestedURI
+     * @return
+     * @throws IOException
+     */
+    protected static boolean saveOriginalUrl(CarbonUIAuthenticator authenticator,
+            HttpServletRequest request, HttpServletResponse response, HttpSession session,
+            boolean skipLoginPage, String contextPath, String indexPageURL, String requestedURI)
+            throws IOException {
+
+        // Saving originally requested url should not forward to error page after login
+        if (!requestedURI.endsWith("admin/error.jsp")) {
+            String queryString = request.getQueryString();
+            String tmpURI;
+            if (queryString != null) {
+                tmpURI = requestedURI + "?" + queryString;
+            } else {
+                tmpURI = requestedURI;
+            }
+            tmpURI = "../.." + tmpURI;
+            request.getSession(false).setAttribute("requestedUri", tmpURI);
+            if (!tmpURI.contains("session-validate.jsp") && !("/null").equals(requestedURI)) {
+                // Also setting it in a cookie, for non-remember-me cases
+                Cookie cookie = new Cookie("requestedURI", tmpURI);
+                cookie.setPath("/");
+                response.addCookie(cookie);
+            }
+        }
+
+        try {
+            Cookie[] cookies = request.getCookies();
+            if (cookies != null) {
+                for (Cookie cookie : cookies) {
+                    if (cookie.getName().equals(CarbonConstants.REMEMBER_ME_COOKE_NAME)
+                            && authenticator != null) {
+                        try {
+                            authenticator.authenticateWithCookie(request);
+                            return true;
+                        } catch (AuthenticationException ignored) {
+                            // We can ignore here and proceed with normal login.
+                            if (log.isDebugEnabled()) {
+                                log.debug(ignored);
+                            }
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            log.error("error occurred while login", e);
+        }
+
+        if (request.getAttribute(MultitenantConstants.TENANT_DOMAIN) != null) {
+            if (skipLoginPage) {
+                response.sendRedirect("../admin/login_action.jsp");
+            } else {
+                response.sendRedirect("../admin/login.jsp");
+            }
+        } else {
+            if (skipLoginPage) {
+                response.sendRedirect(contextPath + "/carbon/admin/login_action.jsp");
+            } else {
+                response.sendRedirect(contextPath + "/carbon/admin/login.jsp");
+
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 
+     * @param request
+     * @param indexPageURL
+     * @return
+     */
+    protected static String getCustomIndexPage(HttpServletRequest request, String indexPageURL) {
+        // If a custom index page is used send the login request with the index page specified
+        if (request.getParameter(CarbonConstants.INDEX_PAGE_URL) != null) {
+            return request.getParameter(CarbonConstants.INDEX_PAGE_URL);
+        } else if (indexPageURL == null) {
+            return "/carbon/admin/index.jsp";
+        }
+
+        return indexPageURL;
+    }
+
+    /**
+     * 
+     * @param requestedURI
+     * @param indexPageURL
+     * @param request
+     * @return
+     */
+    protected static String getIndexPageUrlFromCookie(String requestedURI, String indexPageURL,
+            HttpServletRequest request) {
+        if (requestedURI.equals("/carbon/admin/login_action.jsp")) {
+            Cookie[] cookies = request.getCookies();
+            if (cookies != null) {
+                for (Cookie cookie : cookies) {
+                    if (cookie.getName().equals("requestedURI")) {
+                        indexPageURL = cookie.getValue();
+                    }
+                }
+                // Removing any tenant specific strings from the cookie value for the indexPageURL
+                if (tenantEnabledUriPattern.matcher(indexPageURL).matches()) {
+                    indexPageURL = CarbonUIUtil.removeTenantSpecificStringsFromURL(indexPageURL);
+                }
+            }
+        }
+        return indexPageURL;
+    }
+
+    /**
+     * 
+     * @param requestedURI
+     * @return
+     */
+    protected static boolean letRequestedUrlIn(String requestedURI, String tempUrl) {
+        if (requestedURI.endsWith(".css") || requestedURI.endsWith(".gif")
+                || requestedURI.endsWith(".GIF") || requestedURI.endsWith(".jpg")
+                || requestedURI.endsWith(".JPG") || requestedURI.endsWith(".png")
+                || requestedURI.endsWith(".PNG") || requestedURI.endsWith(".xsl")
+                || requestedURI.endsWith(".xslt") || requestedURI.endsWith(".js")
+                || requestedURI.startsWith("/registry") || requestedURI.endsWith(".html")
+                || requestedURI.endsWith(".ico") || requestedURI.startsWith("/openid/")
+                || requestedURI.indexOf("/openid/") > -1
+                || requestedURI.indexOf("/openidserver") > -1
+                || requestedURI.indexOf("/gadgets") > -1 || requestedURI.indexOf("/samlsso") > -1) {
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * 
+     * @param authenticator
+     * @param request
+     * @param response
+     * @param session
+     * @param authenticated
+     * @param contextPath
+     * @param indexPageURL
+     * @param httpLogin
+     * @return
+     * @throws IOException
+     */
+    protected static boolean handleLogout(CarbonUIAuthenticator authenticator,
+            HttpServletRequest request, HttpServletResponse response, HttpSession session,
+            boolean authenticated, String contextPath, String indexPageURL, String httpLogin)
+            throws IOException {
+    	log.debug("Handling Logout..");
+        // Logout the user from the back-end
+        try {
+            authenticator = (CarbonUIAuthenticator) session
+                    .getAttribute(CarbonSecuredHttpContext.CARBON_AUTHNETICATOR);
+            if (authenticator != null) {
+                authenticator.unauthenticate(request);
+                log.debug("Backend session invalidated");
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            response.sendRedirect("../admin/login.jsp");
+            return false;
+        }
+
+        // Only applicable if this is SAML2 based SSO. Complete the logout action after receiving
+        // the Logout response.
+        if ("true".equals(request.getParameter("logoutcomplete"))) {
+            HttpSession currentSession = request.getSession(false);
+            if (currentSession != null) {
+                // check if current session has expired
+                session.removeAttribute(CarbonSecuredHttpContext.LOGGED_USER);
+                session.getServletContext().removeAttribute(CarbonSecuredHttpContext.LOGGED_USER);
+                try {
+                    session.invalidate();
+                } catch (Exception ignored) { // Ignore exception when
+                    // invalidating and
+                    // invalidated session
+                }
+                log.debug("Frontend session invalidated");
+            }
+            response.sendRedirect("../../carbon/admin/login.jsp");
+            return false;
+        }
+        
+		if (request.getAttribute("ExternalLogoutPage") != null) {
+			HttpSession currentSession = request.getSession(false);
+			if (currentSession != null) {
+				session.removeAttribute("logged-user");
+				session.getServletContext().removeAttribute("logged-user");
+				try {
+					session.invalidate();
+				} catch (Exception ignored) {
+				}
+				log.debug("Frontend session invalidated");
+			}
+
+			response.sendRedirect((String) request.getAttribute("ExternalLogoutPage"));
+			return false;
+		}
+
+        CarbonSSOSessionManager ssoSessionManager = CarbonSSOSessionManager.getInstance();
+
+        if (!ssoSessionManager.skipSSOSessionInvalidation(request, authenticator)
+                && !ssoSessionManager.isSessionValid(request.getSession().getId())) {
+            HttpSession currentSession = request.getSession(false);
+            if (currentSession != null) {
+                // check if current session has expired
+                session.removeAttribute(CarbonSecuredHttpContext.LOGGED_USER);
+                session.getServletContext().removeAttribute(CarbonSecuredHttpContext.LOGGED_USER);
+                try {
+                    session.invalidate();
+                    log.debug("SSO session session invalidated ");
+                } catch (Exception ignored) { // Ignore exception when
+                    // Invalidating and invalidated session
+                    if (log.isDebugEnabled()) {
+                        log.debug("Ignore exception when invalidating session", ignored);
+                    }
+                }
+            }
+            response.sendRedirect("../.." + indexPageURL);
+            return false;
+        }
+
+        // Memory clean up : remove invalid session from the invalid session list.
+        ssoSessionManager.removeInvalidSession(request.getSession().getId());
+
+        // This condition is evaluated when users are logged out in SAML2 based SSO
+        if (request.getAttribute("logoutRequest") != null) {
+        	log.debug("Loging out from SSO session");
+            response.sendRedirect("../../carbon/sso-acs/redirect_ajaxprocessor.jsp?logout=true");
+            return false;
+        }
+
+        HttpSession currentSession = request.getSession(false);
+        if (currentSession != null) {
+            // Check if current session has expired
+            session.removeAttribute(CarbonSecuredHttpContext.LOGGED_USER);
+            session.getServletContext().removeAttribute(CarbonSecuredHttpContext.LOGGED_USER);
+            try {
+                session.invalidate();
+                log.debug("Frontend session invalidated");
+            } catch (Exception ignored) {
+                // Ignore exception when invalidating and invalidated session
+            }
+        }
+
+        Cookie rmeCookie = new Cookie(CarbonConstants.REMEMBER_ME_COOKE_NAME, null);
+        rmeCookie.setPath("/");
+        rmeCookie.setSecure(true);
+        rmeCookie.setMaxAge(0);
+        response.addCookie(rmeCookie);
+        response.sendRedirect(contextPath + indexPageURL);
+        return false;
+    }
+
+    /**
+     * 
+     * @param authenticator
+     * @param request
+     * @param response
+     * @param session
+     * @param authenticated
+     * @param contextPath
+     * @param indexPageURL
+     * @param httpLogin
+     * @return
+     * @throws IOException
+     */
+    protected static boolean handleLogin(CarbonUIAuthenticator authenticator,
+            HttpServletRequest request, HttpServletResponse response, HttpSession session,
+            boolean authenticated, String contextPath, String indexPageURL, String httpLogin)
+            throws IOException {
+        try {
+
+            // commenting out this method as it is not required
+//        	String[] username = (String[])request.getParameterMap().get(AbstractCarbonUIAuthenticator.USERNAME);
+//        	if(username != null && !username[0].contains("/") && UserUtils.hasMultipleUserStores()){
+//            	response.sendRedirect("../../carbon/admin/login.jsp?loginStatus=false&errorCode=domain.not.specified");
+//            	return false;
+//        	}
+        	
+            authenticator.authenticate(request);
+            session = request.getSession();
+            session.setAttribute(CarbonSecuredHttpContext.CARBON_AUTHNETICATOR, authenticator);
+
+            // Check if the username is of type bob@acme.com if so, this is a login from a
+            // multi-tenant deployment
+            // The tenant id part(i.e. acme.com) should be set into http session for further UI
+            // related processing
+            String userName = (String) request.getAttribute(AbstractCarbonUIAuthenticator.USERNAME);
+            
+            if(log.isDebugEnabled()) {
+            	log.debug("Login request from " + userName);
+            }
+            String tenantDomain = null;
+            if (request.getAttribute(MultitenantConstants.TENANT_DOMAIN) != null) {
+                tenantDomain = (String) request.getAttribute(MultitenantConstants.TENANT_DOMAIN);
+
+            }
+            if (tenantDomain == null) {
+                tenantDomain = MultitenantUtils.getTenantDomain(userName);
+            }
+            if (tenantDomain != null
+                    && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
+                // we will add it to the context
+                contextPath += "/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX + "/"
+                        + tenantDomain;
+            }
+
+            String value = request.getParameter("rememberMe");
+            boolean isRememberMe = false;
+            if (value != null && value.equals("rememberMe")) {
+                isRememberMe = true;
+            }
+
+            try {
+                if (isRememberMe) {
+                    String rememberMeCookieValue = (String) request
+                            .getAttribute(CarbonConstants.REMEMBER_ME_COOKIE_VALUE);
+                    int age = Integer.parseInt((String) request
+                            .getAttribute(CarbonConstants.REMEMBER_ME_COOKIE_AGE));
+
+                    Cookie rmeCookie = new Cookie(CarbonConstants.REMEMBER_ME_COOKE_NAME,
+                            rememberMeCookieValue);
+                    rmeCookie.setPath("/");
+                    rmeCookie.setSecure(true);
+                    rmeCookie.setMaxAge(age);
+                    response.addCookie(rmeCookie);
+                }
+            } catch (Exception e) {
+                response.sendRedirect(contextPath + indexPageURL
+                        + (indexPageURL.indexOf('?') == -1 ? "?" : "&") + "loginStatus=false");
+				if (log.isDebugEnabled()) {
+					log.debug("Security check failed for login request for " + userName);
+				}
+                return false;
+            }
+            if (contextPath != null) {
+                if (indexPageURL.startsWith("../..")) {
+                    indexPageURL = indexPageURL.substring(5);
+                }
+
+                response.sendRedirect(contextPath + indexPageURL
+                        + (indexPageURL.indexOf('?') == -1 ? "?" : "&") + "loginStatus=true");
+            }
+
+        } catch (AuthenticationException e) {
+            log.debug("Authentication failure ...", e);
+            try {
+                request.getSession().invalidate();
+                getAuthenticator(request).unauthenticate(request);
+                if (httpLogin != null) {
+                    response.sendRedirect(httpLogin + "?loginStatus=false");
+                    return false;
+                } else {
+                    response.sendRedirect("/carbon/admin/login.jsp?loginStatus=false");
+                    return false;
+                }
+            } catch (Exception e1) {
+                // ignore exception 
+            }
+
+        } catch (Exception e) {
+            log.error("error occurred while login", e);
+            response.sendRedirect("../../carbon/admin/login.jsp?loginStatus=failed");
+        }
+
+        return false;
+    }
+
+    /**
+     * 
+     * @param requestedURI
+     * @param request
+     * @return
+     */
+    protected static String getForcedSignOutRequestedURI(String requestedURI,
+            HttpServletRequest request) {
+        if (requestedURI.endsWith(".jsp")
+                && !requestedURI.endsWith("ajaxprocessor.jsp")
+                && !requestedURI.endsWith("session_validate.jsp")
+                && (request.getSession().getAttribute("authenticated")) != null
+                && ((Boolean) (request.getSession().getAttribute("authenticated"))).booleanValue()
+                && ((request.getSession().getAttribute(MultitenantConstants.TENANT_DOMAIN) == null && request
+                        .getAttribute(MultitenantConstants.TENANT_DOMAIN) != null) || ((request
+                        .getSession().getAttribute(MultitenantConstants.TENANT_DOMAIN) != null && request
+                        .getAttribute(MultitenantConstants.TENANT_DOMAIN) != null) && !request
+                        .getSession().getAttribute(MultitenantConstants.TENANT_DOMAIN)
+                        .equals(request.getAttribute(MultitenantConstants.TENANT_DOMAIN))))) {
+            // If someone signed in from a tenant, try to access a different tenant domain, he
+            // should be forced to sign out without any prompt Cloud requirement
+            requestedURI = "../admin/logout_action.jsp";
+        }
+
+        return requestedURI;
+    }
+
+    /**
+     * 
+     * @param requestedURI
+     * @param request
+     * @param response
+     * @param authenticated
+     * @param context
+     * @param indexPageURL
+     * @return
+     * @throws IOException
+     */
+    protected static int handleLoginPageRequest(String requestedURI, HttpServletRequest request,
+            HttpServletResponse response, boolean authenticated, String context, String indexPageURL)
+            throws IOException {
+        if (requestedURI.indexOf("login.jsp") > -1
+                || requestedURI.indexOf("login_ajaxprocessor.jsp") > -1
+                || requestedURI.indexOf("admin/layout/template.jsp") > -1
+                || requestedURI.endsWith("/filedownload") || requestedURI.endsWith("/fileupload")
+                || requestedURI.indexOf("/fileupload/") > -1
+                || requestedURI.indexOf("login_action.jsp") > -1
+                || requestedURI.indexOf("admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp") > -1) {
+
+            if ((requestedURI.indexOf("login.jsp") > -1
+                    || requestedURI.indexOf("login_ajaxprocessor.jsp") > -1 || requestedURI
+                    .indexOf("login_action.jsp") > -1) && authenticated) {
+                // User has typed the login page url, while being logged in
+                if (request.getSession().getAttribute(MultitenantConstants.TENANT_DOMAIN) != null) {
+                    String tenantDomain = (String) request.getSession().getAttribute(
+                            MultitenantConstants.TENANT_DOMAIN);
+                    if (tenantDomain != null
+                            && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
+                        context += "/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX + "/"
+                                + tenantDomain;
+                    }
+                }
+                if(log.isDebugEnabled()){
+                	log.debug("User already authenticated. Redirecting to " + indexPageURL);
+                }
+                // redirect relative to the servlet container root
+                response.sendRedirect(context + "/carbon/admin/index.jsp");
+                return RETURN_FALSE;
+            } else if (requestedURI.indexOf("login_action.jsp") > -1 && !authenticated) {
+                // User is not yet authenticated and now trying to get authenticated
+                // do nothing, leave for authentication at the end
+                if (log.isDebugEnabled()) {
+                    log.debug("User is not yet authenticated and now trying to get authenticated;"
+                            + "do nothing, leave for authentication at the end");
+                }
+                return CONTINUE;
+            } else {
+				if (log.isDebugEnabled()) {
+					log.debug("Skipping security checks for " + requestedURI);
+				}
+                return RETURN_TRUE;
+            }
+        }
+
+        return CONTINUE;
+    }
+
+    /**
+     * 
+     * @param authenticated
+     * @param response
+     * @param requestedURI
+     * @param context
+     * @return
+     * @throws IOException
+     */
+    protected static boolean escapeTenantWebAppRequests(boolean authenticated,
+            HttpServletResponse response, String requestedURI, String context) throws IOException {
+        // Tenant webapp requests should never reach Carbon. It can happen
+        // if Carbon is deployed at / context and requests for non-existent tenant webapps is made.
+        if (requestedURI.contains("/webapps/")) {
+            response.sendError(404, "Web application not found. Request URI: " + requestedURI);
+            return false;
+        } else if (requestedURI.contains("/carbon/admin/login.jsp") && !authenticated) {
+            // a tenant requesting login.jsp while not being authenticated
+            // redirecting the tenant login page request to the root /carbon/admin/login.jsp
+            // instead of tenant-aware login page
+            response.sendRedirect(context + "/carbon/admin/login.jsp");
+           	log.debug("Redirecting to /carbon/admin/login.jsp");
+            return false;
+        }
+        log.debug("Skipping security checks");
+        return true;
+    }
+
+    /**
+     * 
+     * @param requestedURI
+     * @return
+     */
+    protected static String addNewContext(String requestedURI) {
+        String tmp = requestedURI;
+        String customWarContext = "";
+        if (requestedURI.startsWith("/carbon") && !(requestedURI.startsWith("/carbon/carbon/"))) {
+            // one can name the folder as 'carbon'
+            requestedURI = tmp;
+        } else if (requestedURI.indexOf("filedownload") == -1
+                && requestedURI.indexOf("fileupload") == -1) {
+            // replace first context
+            String tmp1 = tmp.replaceFirst("/", "");
+            int end = tmp1.indexOf('/');
+            if (end > -1) {
+                customWarContext = tmp1.substring(0, end);
+                // one can rename the war file as 'registry'.
+                // This will conflict with our internal 'registry' context
+                if (!(requestedURI.startsWith("/registry/registry/"))
+                        && !(requestedURI.startsWith("/registry/carbon/"))
+                        && (customWarContext.equals("registry")
+                                || customWarContext.equals("gadgets") || customWarContext
+                                .equals("social"))) {
+                    requestedURI = tmp;
+                } else {
+                    requestedURI = tmp.substring(end + 1);
+                }
+            }
+        }
+
+        return requestedURI;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIMessage.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIMessage.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIMessage.java
new file mode 100644
index 0000000..c73519c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIMessage.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.Serializable;
+
+public class CarbonUIMessage implements Serializable {
+
+    private static final long serialVersionUID = 7464385412679479148L;
+    
+    public static final String ID = "carbonUIMessage";
+    public static final String INFO = "info";
+    public static final String ERROR = "error";
+    public static final String WARNING = "warning";
+
+    private String message;
+    private String messageType;
+    private Exception exception;
+    private boolean showStackTrace = true;
+
+    /**
+     * TODO: Make this constructor private
+     */
+    public CarbonUIMessage(String message, String messageType) {
+        this.message = message;
+        this.messageType = messageType;
+    }
+
+    /**
+     * TODO: Make this constructor private
+     */
+    public CarbonUIMessage(String message, String messageType, Exception exception) {
+        this.message = message;
+        this.messageType = messageType;
+        this.exception = exception;
+    }
+
+    /**
+     * TODO: Make this constructor private
+     */
+    public CarbonUIMessage(String message, String messageType, Exception exception,
+            boolean showStackTrace) {
+        this.message = message;
+        this.messageType = messageType;
+        this.exception = exception;
+        this.showStackTrace = showStackTrace;
+    }
+
+    public String getMessageType() {
+        return messageType;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public Exception getException(){
+        return exception;
+    }
+
+    public void setException(Exception exception){
+        this.exception = exception;
+    }
+    
+    public boolean isShowStackTrace() {
+        return showStackTrace;
+    }
+
+    public void setShowStackTrace(boolean showStackTrace) {
+        this.showStackTrace = showStackTrace;
+    }
+
+    /**
+     * Creates CarbonUIMessage, set it to the session and redirect it to the given url
+     *
+     * @param message       meesage to be displayed
+     * @param messageType   info, warning, error
+     * @param request
+     * @param response
+     * @param urlToRedirect
+     */
+    public static void sendCarbonUIMessage(String message, String messageType, HttpServletRequest request,
+                                           HttpServletResponse response, String urlToRedirect) throws IOException {
+        CarbonUIMessage carbonMessage = new CarbonUIMessage(message, messageType);
+        request.getSession().setAttribute(CarbonUIMessage.ID, carbonMessage);
+        response.sendRedirect(urlToRedirect);
+    }
+
+    /***
+     * Creates error CarbonUIMessage, set it to the session and redirect it to the given url with the exception object
+     * @param message
+     * @param messageType
+     * @param request
+     * @param response
+     * @param urlToRedirect
+     * @param exception
+     * @return
+     * @throws IOException
+     */
+    public static CarbonUIMessage sendCarbonUIMessage(String message, String messageType,
+                                                      HttpServletRequest request, HttpServletResponse response,
+                                                      String urlToRedirect, Exception exception) throws IOException {
+        CarbonUIMessage carbonMessage = new CarbonUIMessage(message, messageType, exception);
+        request.getSession().setAttribute(CarbonUIMessage.ID, carbonMessage);
+        response.sendRedirect(urlToRedirect);
+        return carbonMessage;
+    }
+
+    /**
+     * Creates CarbonUIMessage, set it to the session
+     * @param message
+     * @param messageType
+     * @param request
+     */
+    public static void sendCarbonUIMessage(String message, String messageType, HttpServletRequest request) {
+        CarbonUIMessage carbonMessage = new CarbonUIMessage(message, messageType);
+        request.getSession().setAttribute(CarbonUIMessage.ID, carbonMessage);
+    }
+
+    /**
+     * Creates error CarbonUIMessage, set it to the session
+     * @param message
+     * @param messageType
+     * @param request
+     * @param exception
+     */
+    public static void sendCarbonUIMessage(String message, String messageType,
+                                           HttpServletRequest request, Exception exception) {
+        CarbonUIMessage carbonMessage = new CarbonUIMessage(message, messageType, exception);
+        request.getSession().setAttribute(CarbonUIMessage.ID, carbonMessage);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIUtil.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIUtil.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIUtil.java
new file mode 100644
index 0000000..711198b
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIUtil.java
@@ -0,0 +1,469 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.carbon.ui;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleContext;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.base.api.ServerConfigurationService;
+import org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions;
+import org.wso2.carbon.ui.deployment.beans.Menu;
+import org.wso2.carbon.ui.internal.CarbonUIServiceComponent;
+import org.wso2.carbon.utils.CarbonUtils;
+import org.wso2.carbon.utils.ConfigurationContextService;
+import org.wso2.carbon.utils.NetworkUtils;
+import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
+
+/**
+ * Utility class for Carbon UI
+ */
+public class CarbonUIUtil {
+    public static final String QUERY_PARAM_LOCALE = "locale";
+    public static final String SESSION_PARAM_LOCALE = "custom_locale";
+    private static Log log = LogFactory.getLog(CarbonUIUtil.class);
+    private static BundleContext bundleContext = null;
+
+    //To store the product specific params 
+    private static HashMap productParams = new HashMap();
+
+    /**
+     * Get a proxy object to the business logic implementation class.
+     * <p/>
+     * This proxy could be a handle to an OSGi service or a Web services client
+     *
+     * @param clientClassObject Web services client
+     * @param osgiObjectClass   OSGi service class
+     * @param session           The HTTP Session
+     * @return Proxy object
+     * @deprecated Do not use this method. Simply use the relevant client.
+     */
+    public static Object getServerProxy(Object clientClassObject,
+                                        Class osgiObjectClass,
+                                        HttpSession session) {
+        return clientClassObject;
+    }
+
+    public static void setBundleContext(BundleContext context) {
+        bundleContext = context;
+    }
+
+    public static BundleContext getBundleContext() {
+        return bundleContext;
+    }
+
+    public static String getIndexPageURL(ServerConfigurationService serverConfig) {
+        return serverConfig.getFirstProperty(CarbonConstants.INDEX_PAGE_URL);
+    }
+
+    public static String getIndexPageURL(ServletContext servletContext, HttpSession httpSession) {
+        String url;
+        Object obj = httpSession.getAttribute(CarbonConstants.INDEX_PAGE_URL);
+        if (obj != null && obj instanceof String) {
+            // Index Page URL is present in the servlet session
+            url = (String) obj;
+        } else {
+            url = (String) servletContext.getAttribute(CarbonConstants.INDEX_PAGE_URL);
+        }
+        return url;
+    }
+
+    public static String getServerURL(ServerConfigurationService serverConfig) {
+        ConfigurationContext serverCfgCtx =
+                CarbonUIServiceComponent.getConfigurationContextService().getServerConfigContext();
+        return CarbonUtils.getServerURL(serverConfig, serverCfgCtx);
+    }
+
+    public static String getServerURL(ServletContext servletContext, HttpSession httpSession) {
+        return CarbonUtils.getServerURL(servletContext, httpSession,
+                CarbonUIServiceComponent.
+                        getConfigurationContextService().getServerConfigContext());
+    }
+
+    public static boolean isSuperTenant(HttpServletRequest request) {
+        return request.getSession().getAttribute(MultitenantConstants.IS_SUPER_TENANT) != null &&
+                request.getSession().getAttribute(MultitenantConstants.IS_SUPER_TENANT)
+                        .equals(Boolean.toString(true));
+    }
+
+    public static String https2httpURL(String url) {
+        if (url.indexOf("${carbon.https.port}") != -1) {
+            String httpPort = CarbonUtils.getTransportPort(CarbonUIServiceComponent
+                    .getConfigurationContextService(), "http")
+                    + "";
+            url = url.replace("${carbon.https.port}", httpPort);
+        } else {
+            // TODO: This is a hack to gaurd against the above if condition failing.
+            // Need to dig into the root of the problem
+            url = url.replace("https", "http");
+            String httpsPort = CarbonUtils.getTransportPort(CarbonUIServiceComponent
+                    .getConfigurationContextService(), "https")
+                    + "";
+            String httpPort = CarbonUtils.getTransportPort(CarbonUIServiceComponent
+                    .getConfigurationContextService(), "http")
+                    + "";
+            url = url.replace(httpsPort, httpPort);
+        }
+        return url;
+    }
+
+    /**
+     * Returns url to admin console. eg: https://192.168.1.201:9443/wso2/carbon
+     *
+     * @param request The HTTPServletRequest
+     * @return The URL of the Admin Console
+     */
+    public static String getAdminConsoleURL(HttpServletRequest request) {
+
+        // Hostname
+        String hostName = "localhost";
+        try {
+            hostName = NetworkUtils.getMgtHostName();
+        } catch (Exception ignored) {
+        }
+
+        // HTTPS port
+        String mgtConsoleTransport = CarbonUtils.getManagementTransport();
+        ConfigurationContextService configContextService = CarbonUIServiceComponent
+            .getConfigurationContextService();
+        int httpsPort = CarbonUtils.getTransportPort(configContextService, mgtConsoleTransport);
+        int httpsProxyPort =
+            CarbonUtils.getTransportProxyPort(configContextService.getServerConfigContext(),
+                                              mgtConsoleTransport);
+
+        // Context
+        String context = request.getContextPath();
+        if ("/".equals(context)) {
+            context = "";
+        }
+
+        if (httpsPort == -1) {
+            return null;
+        }
+        
+        String adminConsoleURL = null;
+        String enableHTTPAdminConsole = CarbonUIServiceComponent.getServerConfiguration()
+                .getFirstProperty(CarbonConstants.ENABLE_HTTP_ADMIN_CONSOLE);
+
+        if (enableHTTPAdminConsole != null
+                && "true".equalsIgnoreCase(enableHTTPAdminConsole.trim())) {
+            int httpPort = CarbonUtils.getTransportPort(
+                    CarbonUIServiceComponent.getConfigurationContextService(), "http");
+            adminConsoleURL = "http://" + hostName + ":" + httpPort + context + "/carbon/";
+        } else {
+            adminConsoleURL = "https://" + hostName + ":"
+                    + (httpsProxyPort != -1 ? httpsProxyPort : httpsPort) + context + "/carbon/";
+        }
+
+        return adminConsoleURL;
+    }
+
+    /**
+     * Returns url to admin console.
+     *
+     * @param context Webapp context root of the Carbon webapp
+     * @return The URL of the Admin Console
+     */
+    public static String getAdminConsoleURL(String context) {
+        // Hostname
+        String hostName = "localhost";
+        try {
+            hostName = NetworkUtils.getMgtHostName();
+        } catch (Exception ignored) {
+        }
+
+        // HTTPS port
+        String mgtConsoleTransport = CarbonUtils.getManagementTransport();
+        ConfigurationContextService configContextService = CarbonUIServiceComponent
+            .getConfigurationContextService();
+        int httpsPort = CarbonUtils.getTransportPort(configContextService, mgtConsoleTransport);
+        int httpsProxyPort =
+            CarbonUtils.getTransportProxyPort(configContextService.getServerConfigContext(),
+                                              mgtConsoleTransport);
+        // Context
+        if ("/".equals(context)) {
+            context = "";
+        }
+        return "https://" + hostName + ":" + (httpsProxyPort != -1? httpsProxyPort : httpsPort) +
+            context + "/carbon/";
+    }
+
+    /**
+     * Get a ServerConfiguration Property
+     *
+     * @param propertyName Name of the property
+     * @return the property
+     */
+    public static String getServerConfigurationProperty(String propertyName) {
+        try {
+            ServerConfigurationService serverConfig = CarbonUIServiceComponent.getServerConfiguration();
+            return serverConfig.getFirstProperty(propertyName);
+        } catch (Exception e) {
+            String msg = "ServerConfiguration Service not available";
+            log.error(msg, e);
+        }
+
+        return null;
+    }
+
+    public static boolean isContextRegistered(ServletConfig config, String context) {
+        URL url;
+        try {
+            url = config.getServletContext().getResource(context);
+        } catch (MalformedURLException e) {
+            return false;
+        }
+        if (url == null) {
+            return false;
+        } else if (url.toString().indexOf(context) != -1) {
+            return true;
+        }
+        return false;
+    }
+
+    public static Locale toLocale(String localeQuery){
+        String localeInfo[] = localeQuery.split("_");
+        int size = localeInfo.length;
+        Locale locale;
+        switch (size){
+            case 2:
+                locale = new Locale(localeInfo[0],localeInfo[1]);
+                break;
+            case 3:
+                locale = new Locale(localeInfo[0],localeInfo[1],localeInfo[2]);
+                break;
+            default:
+                locale = new Locale(localeInfo[0]);
+                break;
+        }
+        return locale;
+    }
+
+    public static void setLocaleToSession (HttpServletRequest request)
+    {
+        if (request.getParameter(QUERY_PARAM_LOCALE) != null) {
+            request.getSession().setAttribute(CarbonUIUtil.SESSION_PARAM_LOCALE, request.getParameter(QUERY_PARAM_LOCALE));
+        }
+    }
+
+    public static Locale getLocaleFromSession (HttpServletRequest request)
+    {
+        if (request.getSession().getAttribute(SESSION_PARAM_LOCALE) != null) {
+            String custom_locale = request.getSession().getAttribute(SESSION_PARAM_LOCALE).toString();
+            return toLocale(custom_locale);
+
+        } else {
+            return request.getLocale();
+        }
+    }
+
+    /**
+     * Returns internationalized string for supplied key.
+     *
+     * @param key        - key to look for
+     * @param i18nBundle - resource bundle
+     * @param language   - language
+     * @return internationalized key value of key, if no value can be derived
+     */
+    public static String geti18nString(String key, String i18nBundle, String language) {
+        Locale locale = new Locale(language);
+        String text = geti18nString(key, i18nBundle, locale);
+        return text;
+    }
+
+    /**
+     * Returns internationalized string for supplied key.
+     *
+     * @param key        - key to look for
+     * @param i18nBundle - resource bundle
+     * @param locale     - locale
+     * @return internationalized key value of key, if no value can be derived
+     */
+    public static String geti18nString(String key, String i18nBundle, Locale locale) {
+        java.util.ResourceBundle resourceBundle = null;
+        if (i18nBundle != null) {
+            try {
+                resourceBundle = java.util.ResourceBundle.getBundle(i18nBundle, locale);
+            } catch (java.util.MissingResourceException e) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Cannot find resource bundle : " + i18nBundle + " for locale : "
+                                    + locale);
+                }
+            }
+        }
+        String text = key;
+        if (resourceBundle != null) {
+            String tmp = null;
+            try {
+                tmp = resourceBundle.getString(key);
+            } catch (java.util.MissingResourceException e) {
+                // Missing key should not be a blocking factor for UI rendering
+                if (log.isDebugEnabled()) {
+                    log.debug("Cannot find resource for key :" + key);
+                }
+            }
+            if (tmp != null) {
+                text = tmp;
+            }
+        }
+        return text;
+    }
+
+    /**
+     * Removed menu item from current user's session. Only current user's menu
+     * items are effected.
+     *
+     * @param menuId
+     * @param request
+     * @see CarbonUIDefinitions#removeMenuDefinition(String)
+     */
+    public static void removeMenuDefinition(String menuId, HttpServletRequest request) {
+        // TODO : consider removing child menu items as well
+        ArrayList<Menu> modifiedMenuDefs = new ArrayList<Menu>();
+        Menu[] currentMenus = (Menu[]) request.getSession().getAttribute(
+                MenuAdminClient.USER_MENU_ITEMS);
+        boolean modified = false;
+        if (currentMenus != null) {
+            if (menuId != null && menuId.trim().length() > 0) {
+                for (int a = 0; a < currentMenus.length; a++) {
+                    Menu menu = currentMenus[a];
+                    if (menu != null) {
+                        if (!menuId.equals(menu.getId())) {
+                            modifiedMenuDefs.add(menu);
+                            modified = true;
+                        } else {
+                            if (log.isDebugEnabled()) {
+                                log.debug("Removing menu item : " + menuId);
+                            }
+                        }
+                    }
+                }
+                if (modified) {
+                    Menu[] newMenuDefs = new Menu[modifiedMenuDefs.size()];
+                    newMenuDefs = modifiedMenuDefs.toArray(newMenuDefs);
+                    request.getSession().setAttribute(MenuAdminClient.USER_MENU_ITEMS, newMenuDefs);
+                }
+            }
+        }
+    }
+
+    public static String getBundleResourcePath(String resourceName) {
+        if (resourceName == null || resourceName.length() == 0) {
+            return null;
+        }
+
+        String resourcePath = resourceName;
+        resourcePath = resourcePath.startsWith("/") ? resourcePath.substring(1) : resourcePath;
+        resourcePath = (resourcePath.lastIndexOf('/') != -1) ? resourcePath.substring(0,
+                resourcePath.indexOf('/')) : resourcePath;
+
+        return resourcePath;
+    }
+
+    /**
+     * This method is a helper method for checking UI permissions.
+     */
+    @SuppressWarnings("unchecked")
+    public static boolean isUserAuthorized(HttpServletRequest request, String resource) {
+        boolean isAuthorized = false;
+        List<String> permissions = (List<String>) request.getSession().getAttribute(
+                CarbonConstants.UI_USER_PERMISSIONS);
+        if (permissions == null) {
+            return false;
+        }
+
+        for (String permission : permissions) {
+            if (resource.startsWith(permission)) {
+                isAuthorized = true;
+                break;
+            }
+        }
+
+        return isAuthorized;
+    }
+
+    /**
+     * Method is used to retrive product xml params
+     *
+     * @param key = product xml key
+     * @return product xml value
+     */
+    public static Object getProductParam(String key) {
+        return productParams.get(key);
+    }
+
+    public static void setProductParam(String key, Object value) {
+        productParams.put(key, value);
+    }
+
+    /**
+     * Returns home page location for "Home" link in Carbon UI menu.
+     * If defaultHomePage property is available in product.xml this method will return it and if not it'll return
+     * default ../admin/index.jsp
+     *
+     * @return home page location
+     */
+    public static String getHomePage() {
+        Object homePage;
+        if ((homePage = getDefaultHomePageProductParam())
+                != null) {
+            String homePageLocation = (String) homePage;
+            if (!homePageLocation.startsWith("/")) {
+                // it is assumed that homepage location is provided as a relative path starting
+                // from carbon context. This is to support the re-direction url at the login.
+                // Therefore here we fix the location to suit the homepage link of the product.
+                homePageLocation = "../../" + homePageLocation;
+            }
+            return homePageLocation;
+        }
+
+        return CarbonConstants.CARBON_UI_DEFAULT_HOME_PAGE;
+
+    }
+    
+    public static String removeTenantSpecificStringsFromURL(String requestURL) {
+		if (requestURL.contains("/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX + "/")) {
+			int tenantPrefixIndex = requestURL.lastIndexOf("/" +
+			                                               MultitenantConstants.TENANT_AWARE_URL_PREFIX +
+			                                               "/");
+			requestURL = requestURL.substring(tenantPrefixIndex +
+			                                  MultitenantConstants.TENANT_AWARE_URL_PREFIX.length() +
+			                                  2);
+			// bypassing tenantDomain part
+			int pageUrlIndex = requestURL.indexOf('/');
+			requestURL = requestURL.substring(pageUrlIndex);
+		}
+		return requestURL;
+	}
+
+    private static Object getDefaultHomePageProductParam() {
+        return getProductParam(CarbonConstants.PRODUCT_XML_WSO2CARBON + CarbonConstants.DEFAULT_HOME_PAGE);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/ComponentDeployer.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/ComponentDeployer.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/ComponentDeployer.java
new file mode 100644
index 0000000..0347906
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/ComponentDeployer.java
@@ -0,0 +1,189 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.Bundle;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.ui.deployment.beans.Component;
+import org.wso2.carbon.ui.deployment.beans.Menu;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.transform.TransformerException;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.wso2.carbon.CarbonConstants.COMPONENT_ELE;
+import static org.wso2.carbon.CarbonConstants.GENERAL_ELE;
+import static org.wso2.carbon.CarbonConstants.JS_FILES_ELE;
+import static org.wso2.carbon.CarbonConstants.TAG_LIBS_ELE;
+import static org.wso2.carbon.ui.Utils.transform;
+
+/**
+ * Deploy the component
+ */
+public class ComponentDeployer {
+    /**
+     *
+     */
+    private final String[] mainTemplateSuffixes =
+            new String[]{"script_header", "menu", "main_layout"};
+
+    /**
+     *
+     */
+    private static Log log = LogFactory.getLog(ComponentDeployer.class);
+
+    /**
+     *
+     */
+    private Bundle componentBundle;
+
+    /**
+     *
+     */
+    private static final Map<String, String> processedFileMap = new HashMap<String, String>();
+
+
+    public ComponentDeployer(Bundle componentBundle) {
+        this.componentBundle = componentBundle;
+    }
+
+    public void layout(Map<Long, Component> componentMap) throws CarbonException {
+        Collection<Component> componentCollection = componentMap.values();
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMElement componentEle = fac.createOMElement(new QName(COMPONENT_ELE));
+        OMElement tagLibsEle = fac.createOMElement(new QName(TAG_LIBS_ELE));
+        componentEle.addChild(tagLibsEle);
+        OMElement jsFilesEle = fac.createOMElement(new QName(JS_FILES_ELE));
+        OMElement generalEle = fac.createOMElement(new QName(GENERAL_ELE));
+        componentEle.addChild(jsFilesEle);
+        componentEle.addChild(generalEle);
+//        for (Component component : componentCollection) {
+//            constructIntermediateStruecte(component, tagLibsEle, jsFilesEle, fac);
+//        }
+        //leveling the menus first before adding to ims
+        List<Menu> menuList = new ArrayList<Menu>();
+        for (Component component : componentCollection) {
+            menuList.addAll(component.getMenusList());
+        }
+        Collections.sort(menuList, new Comparator<Menu>() {
+            public int compare(Menu m1, Menu m2) {
+                return m1.compareTo(m2);
+            }
+        });
+//        for (Menu menu : menuList) {
+//            OMElement menuEle = fac.createOMElement(new QName(MENUE_ELE));
+//            generalEle.addChild(menuEle);
+//            Action action = menu.getAction();
+//            menuEle.addAttribute(ACTION_REF_ATTR, action.getName(), fac.createOMNamespace("", ""));
+//            menuEle.addAttribute(NAME_ATTR, menu.getName(), fac.createOMNamespace("", ""));
+//            menuEle.addAttribute(LEVEL_ATTR, Integer.toString(menu.getLevel()),
+//                                 fac.createOMNamespace("", ""));
+//        }
+
+
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+
+        if(log.isDebugEnabled()){
+            log.debug("intermediate : " + componentEle);
+        }
+        
+        try {
+            componentEle.serializeAndConsume(bos);
+        } catch (XMLStreamException e) {
+            e.printStackTrace();
+            throw new CarbonException(e);
+        }
+        byte[] bytes = bos.toByteArray();
+
+        try {
+            // Transform
+            for (String templatSuffix : mainTemplateSuffixes) {
+                String xslResourceName = "ui/" + templatSuffix + ".xsl";
+                URL xslResource = componentBundle.getResource(xslResourceName);
+                if (xslResource == null) {
+                    throw new CarbonException(
+                            xslResourceName + " is not avaiable in component bundle");
+                }
+                ByteArrayOutputStream jspBos = new ByteArrayOutputStream();
+                transform(new ByteArrayInputStream(bytes), xslResource.openStream(), jspBos);
+                processedFileMap
+                        .put("web/" + templatSuffix + ".jsp", new String(jspBos.toByteArray()));
+            }
+        } catch (TransformerException e) {
+            e.printStackTrace();
+            throw new CarbonException(e);
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+            throw new CarbonException(e);
+        } catch (IOException e) {
+            e.printStackTrace();
+            throw new CarbonException(e);
+        }
+
+
+    }
+
+    /**
+     * Processed map
+     *
+     * @param key key
+     * @return value
+     */
+    public static String getFragment(String key) {
+        return processedFileMap.get(key);
+    }
+
+//    private void constructIntermediateStruecte(Component component,
+//                                               OMElement tabLibsEle,
+//                                               OMElement jsFilesEle,
+//                                               OMFactory fac) {
+//        String effectivePath = component.getName() + "/" + component.getVersion() + "/";
+//        List<TagLib> tagLibList = component.getTagLibList();
+//        List<String> jsFilesList = component.getJsFilesList();
+//        for (TagLib tagLib : tagLibList) {
+//            OMElement tagLibEle = fac.createOMElement(new QName(TAG_LIB_ELE));
+//            tagLibEle.addAttribute(URL_ATTR, tagLib.getUrl(), fac.createOMNamespace("", ""));
+//            tagLibEle.addAttribute(PREFIX_ATTR, tagLib.getPrefix(), fac.createOMNamespace("", ""));
+//            tabLibsEle.addChild(tagLibEle);
+//        }
+//        for (String fileName : jsFilesList) {
+//            OMElement fileNameEle = fac.createOMElement(new QName(JS_FILE_ELE));
+//            fileNameEle.setText(effectivePath + fileName);
+//            jsFilesEle.addChild(fileNameEle);
+//        }
+//
+//    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultAuthenticatorCredentials.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultAuthenticatorCredentials.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultAuthenticatorCredentials.java
new file mode 100644
index 0000000..c651bb8
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultAuthenticatorCredentials.java
@@ -0,0 +1,22 @@
+package org.wso2.carbon.ui;
+
+public class DefaultAuthenticatorCredentials {
+
+    private String userName;
+    private String password;
+
+    public DefaultAuthenticatorCredentials(String userName, String password) {
+        super();
+        this.userName = userName;
+        this.password = password;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultCarbonAuthenticator.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultCarbonAuthenticator.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultCarbonAuthenticator.java
new file mode 100644
index 0000000..c84bb83
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultCarbonAuthenticator.java
@@ -0,0 +1,186 @@
+/*
+ *  Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.wso2.carbon.ui;
+
+import java.util.Map;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.authenticator.proxy.AuthenticationAdminClient;
+import org.wso2.carbon.authenticator.stub.RememberMeData;
+import org.wso2.carbon.core.common.AuthenticationException;
+import org.wso2.carbon.utils.CarbonUtils;
+import org.wso2.carbon.utils.ServerConstants;
+
+/**
+ * Default implementation of CarbonUIAuthenticator.
+ */
+public class DefaultCarbonAuthenticator extends BasicAuthUIAuthenticator {
+
+    protected static final Log log = LogFactory.getLog(DefaultCarbonAuthenticator.class);
+
+    private static final String AUTHENTICATOR_NAME = "DefaultCarbonAuthenticator";
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean canHandle(HttpServletRequest request) {
+        // try to authenticate any request that comes
+        // least priority authenticator
+        String userName = request.getParameter(AbstractCarbonUIAuthenticator.USERNAME);
+        String password = request.getParameter(AbstractCarbonUIAuthenticator.PASSWORD);
+
+        if (!CarbonUtils.isRunningOnLocalTransportMode()) {
+            return false;
+        }
+
+        if (userName != null && password != null) {
+            return true;
+        }
+
+        // This is to login with Remember Me.
+        Cookie[] cookies = request.getCookies();
+        if (cookies != null) {
+            for (Cookie cookie : cookies) {
+                if (cookie.getName().equals(CarbonConstants.REMEMBER_ME_COOKE_NAME)) {
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String doAuthentication(Object credentials, boolean isRememberMe, ServiceClient client,
+            HttpServletRequest request) throws AuthenticationException {
+
+        DefaultAuthenticatorCredentials defaultCredentials = (DefaultAuthenticatorCredentials) credentials;
+        // call AuthenticationAdmin, since BasicAuth are not validated for LocalTransport
+        AuthenticationAdminClient authClient;
+        try {
+            authClient = getAuthenticationAdminCient(request);
+            boolean isAutenticated = false;
+            if (isRememberMe && defaultCredentials.getUserName() != null
+                    && defaultCredentials.getPassword() != null) {
+                RememberMeData rememberMe;
+                rememberMe = authClient.loginWithRememberMeOption(defaultCredentials.getUserName(),
+                        defaultCredentials.getPassword(), "127.0.0.1");
+                isAutenticated = rememberMe.getAuthenticated();
+                if (isAutenticated) {
+                    request.setAttribute(CarbonConstants.REMEMBER_ME_COOKIE_VALUE,
+                            rememberMe.getValue());
+                    request.setAttribute(CarbonConstants.REMEMBER_ME_COOKIE_AGE, new Integer(
+                            rememberMe.getMaxAge()).toString());
+                    return defaultCredentials.getUserName();
+                }
+            } else if (isRememberMe) {
+                // This is to login with Remember Me.
+                Cookie[] cookies = request.getCookies();
+                if (cookies != null) {
+                    for (Cookie cookie : cookies) {
+                        if (cookie.getName().equals(CarbonConstants.REMEMBER_ME_COOKE_NAME)) {
+                            isAutenticated = authClient
+                                    .loginWithRememberMeCookie(cookie.getValue());
+                            if (isAutenticated) {
+                                String cookieValue = cookie.getValue();
+                                return getUserNameFromCookie(cookieValue);
+                            }
+                        }
+                    }
+                }
+            } else {
+                isAutenticated = authClient.login(defaultCredentials.getUserName(),
+                        defaultCredentials.getPassword(), "127.0.0.1");
+                if (isAutenticated) {
+                    return defaultCredentials.getUserName();
+                }
+            }
+
+            throw new AuthenticationException("Invalid user credentials.");
+
+        } catch (AxisFault e) {
+            throw new AuthenticationException(e.getMessage(), e);
+        }
+
+    }
+
+    /**
+     *
+     */
+    public void unauthenticate(Object object) throws Exception {
+        try {
+            getAuthenticationAdminCient(((HttpServletRequest) object)).logout();
+        } catch (Exception ignored) {
+            String msg = "Configuration context is null.";
+            log.error(msg);
+            throw new Exception(msg);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getAuthenticatorName() {
+        return AUTHENTICATOR_NAME;
+    }
+
+    /**
+     * 
+     * @param request
+     * @return
+     * @throws AxisFault
+     */
+    private AuthenticationAdminClient getAuthenticationAdminCient(HttpServletRequest request)
+            throws AxisFault {
+        HttpSession session = request.getSession();
+        ServletContext servletContext = session.getServletContext();
+        String backendServerURL = request.getParameter("backendURL");
+        if (backendServerURL == null) {
+            backendServerURL = CarbonUIUtil.getServerURL(servletContext, request.getSession());
+        }
+        session.setAttribute(CarbonConstants.SERVER_URL, backendServerURL);
+
+        ConfigurationContext configContext = (ConfigurationContext) servletContext
+                .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+
+        String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_AUTH_TOKEN);
+
+        return new AuthenticationAdminClient(configContext, backendServerURL, cookie, session, true);
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    public void handleRememberMe(Map transportHeaders, HttpServletRequest httpServletRequest)
+            throws AuthenticationException {
+        // Do nothing here. Already done.
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultComponentEntryHttpContext.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultComponentEntryHttpContext.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultComponentEntryHttpContext.java
new file mode 100644
index 0000000..db7d199
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultComponentEntryHttpContext.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.eclipse.equinox.http.helper.BundleEntryHttpContext;
+import org.osgi.framework.Bundle;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ *
+ */
+public class DefaultComponentEntryHttpContext extends BundleEntryHttpContext {
+
+    private String bundlePath;
+    
+    public DefaultComponentEntryHttpContext(Bundle bundle) {
+        super(bundle);
+    }
+
+    public DefaultComponentEntryHttpContext(Bundle bundle, String bundlePath) {
+        super(bundle, bundlePath);
+        this.bundlePath = bundlePath;
+    }
+
+    public URL getResource(String resourceName) {
+        URL url = super.getResource(resourceName);
+        if (url != null) {
+            return url;
+        } else {
+            if (bundlePath != null) {
+                resourceName = bundlePath + resourceName;
+            }
+            int lastSlash = resourceName.lastIndexOf('/');
+            if (lastSlash == -1) {
+                return null;
+            }
+            String path = resourceName.substring(0, lastSlash);
+            if (path.length() == 0) {
+                path = "/";
+            }
+            String file = resourceName.substring(lastSlash + 1);
+            if (file.endsWith(".js") && isListed(file)) {
+                try {
+                    return new URL("carbon://generate/" + file);
+                } catch (MalformedURLException e) {
+                    return null;
+                }
+            }
+            return null;
+
+        }
+
+    }
+
+    /**
+     * TODO: fix this from a configuration file
+     *
+     * @param file
+     * @return
+     */
+    private boolean isListed(String file) {
+        return "global-params.js".equals(file);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DeploymentEngine.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DeploymentEngine.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DeploymentEngine.java
new file mode 100644
index 0000000..497bbc4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DeploymentEngine.java
@@ -0,0 +1,98 @@
+/*
+*  Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+*  WSO2 Inc. licenses this file to you under the Apache License,
+*  Version 2.0 (the "License"); you may not use this file except
+*  in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.wso2.carbon.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.Bundle;
+import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.ui.deployment.beans.Component;
+
+import javax.xml.stream.XMLStreamException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Dictionary;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import static org.wso2.carbon.ui.deployment.ComponentBuilder.build;
+
+/**
+ * Engine that process plugins
+ */
+public class DeploymentEngine {
+
+    /**
+     *
+     */
+    private Map<Long, Component> componentMap = new ConcurrentHashMap<Long, Component>();
+
+    /**
+     *
+     */
+    private ComponentDeployer componentDeployer;
+
+    /**
+     *
+     */
+    private static Log log = LogFactory.getLog(DeploymentEngine.class);
+
+    /**
+     *
+     */
+    private Bundle componentBundle;
+
+    public DeploymentEngine(Bundle componentBundle) {
+        this.componentBundle = componentBundle;
+        this.componentDeployer = new ComponentDeployer(componentBundle);
+    }
+
+
+    public void process(Bundle registeredBundle) {
+        try {
+            URL url = registeredBundle.getEntry("META-INF/component.xml");
+            if (url != null) {
+                //found a Carbon OSGi bundle that should amend for admin UI
+                Dictionary headers = registeredBundle.getHeaders();
+                String bundleName = (String) headers.get("Bundle-Name");
+                String bundleVersion = (String) headers.get("Bundle-Version");
+                InputStream inputStream = url.openStream();
+                Component component = build(inputStream,
+                                            bundleName,
+                                            bundleVersion,
+                                            registeredBundle.getBundleContext());
+                componentMap.put(registeredBundle.getBundleId(), component);
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+            log.error("", e);
+        } catch (XMLStreamException e) {
+            e.printStackTrace();
+            log.error("", e);
+        } catch (CarbonException e) {
+            e.printStackTrace();
+            log.error("", e);
+        }
+    }
+
+    public void layout() throws CarbonException {
+        componentDeployer.layout(componentMap);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JSPContextFinder.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JSPContextFinder.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JSPContextFinder.java
new file mode 100644
index 0000000..95a8430
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JSPContextFinder.java
@@ -0,0 +1,193 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.wso2.carbon.ui.internal.CarbonUIServiceComponent;
+
+import java.io.IOException;
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+// This class is a slightly augmented copy of org.eclipse.core.runtime.internal.adaptor.ContextFinder
+// in particular basicFindClassLoaders has been altered to use PackageAdmin to determine if a class originated from
+// a bundle and to skip over the various JspClassloader classes.
+public class JSPContextFinder extends ClassLoader implements PrivilegedAction {
+	static final class Finder extends SecurityManager {
+		public Class[] getClassContext() {
+			return super.getClassContext();
+		}
+	}
+	//This is used to detect cycle that could be caused while delegating the loading to other classloaders
+	//It keeps track on a thread basis of the set of requested classes and resources
+	private static ThreadLocal cycleDetector = new ThreadLocal();
+	private static Finder contextFinder;
+	static {
+		AccessController.doPrivileged(new PrivilegedAction() {
+			public Object run() {
+				contextFinder = new Finder();
+				return null;
+			}
+		});
+	}
+
+	public JSPContextFinder(ClassLoader contextClassLoader) {
+		super(contextClassLoader);
+	}
+
+	// Return a list of all classloaders on the stack that are neither the
+	// JSPContextFinder classloader nor the boot classloader.  The last classloader
+	// in the list is either a bundle classloader or the framework's classloader
+	// We assume that the bootclassloader never uses the context classloader to find classes in itself.
+	List basicFindClassLoaders() {
+		Class[] stack = contextFinder.getClassContext();
+		ArrayList result = new ArrayList(1);
+		ClassLoader previousLoader = null;
+		for (int i = 1; i < stack.length; i++) {
+			ClassLoader tmp = stack[i].getClassLoader();
+			if (checkClass(stack[i]) && tmp != null && tmp != this) {
+				if (checkClassLoader(tmp) && previousLoader != tmp) {
+						result.add(tmp);
+						previousLoader = tmp;
+				}
+				// stop at the framework classloader or the first bundle classloader
+				if (CarbonUIServiceComponent.getBundle(stack[i]) != null) {
+					break;
+				}
+			}
+		}
+		return result;
+	}
+
+	private boolean checkClass(Class clazz) {
+		return clazz != JSPContextFinder.class &&
+			clazz != BundleProxyClassLoader.class &&
+			clazz != JspClassLoader.class;
+	}
+
+	// ensures that a classloader does not have the JSPContextFinder as part of the
+	// parent hierachy.  A classloader which has the JSPContextFinder as a parent must
+	// not be used as a delegate, otherwise we endup in endless recursion.
+	private boolean checkClassLoader(ClassLoader classloader) {
+		if (classloader == null || classloader == getParent()) {
+			return false;
+		}
+		for (ClassLoader parent = classloader.getParent(); parent != null; parent = parent.getParent()) {
+			if (parent == this) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	private List findClassLoaders() {
+		if (System.getSecurityManager() == null) {
+			return basicFindClassLoaders();
+		}
+		return (ArrayList) AccessController.doPrivileged(this);
+	}
+
+	public Object run() {
+		return basicFindClassLoaders();
+	}
+
+	//Return whether the request for loading "name" should proceed.
+	//False is returned when a cycle is being detected
+	private boolean startLoading(String name) {
+		Set classesAndResources = (Set) cycleDetector.get();
+		if (classesAndResources != null && classesAndResources.contains(name)) {
+			return false;
+		}
+
+		if (classesAndResources == null) {
+			classesAndResources = new HashSet(3);
+			cycleDetector.set(classesAndResources);
+		}
+		classesAndResources.add(name);
+		return true;
+	}
+
+	private void stopLoading(String name) {
+		((Set) cycleDetector.get()).remove(name);
+	}
+
+	protected Class loadClass(String arg0, boolean arg1) throws ClassNotFoundException {
+		//Shortcut cycle
+		if (!startLoading(arg0)) {
+			throw new ClassNotFoundException(arg0);
+		}
+
+		try {
+			List toConsult = findClassLoaders();
+			for (Iterator loaders = toConsult.iterator(); loaders.hasNext();) {
+				try {
+					return ((ClassLoader) loaders.next()).loadClass(arg0);
+				} catch (ClassNotFoundException e) {
+					// go to the next class loader
+				}
+			}
+			return super.loadClass(arg0, arg1);
+		} finally {
+			stopLoading(arg0);
+		}
+	}
+
+	public URL getResource(String arg0) {
+		//Shortcut cycle
+		if (!startLoading(arg0)) {
+			return null;
+		}
+		try {
+			List toConsult = findClassLoaders();
+			for (Iterator loaders = toConsult.iterator(); loaders.hasNext();) {
+				URL result = ((ClassLoader) loaders.next()).getResource(arg0);
+				if (result != null) {
+					return result;
+				}
+				// go to the next class loader
+			}
+			return super.getResource(arg0);
+		} finally {
+			stopLoading(arg0);
+		}
+	}
+
+	protected Enumeration findResources(String arg0) throws IOException {
+		//Shortcut cycle
+		if (!startLoading(arg0)) {
+			return null;
+		}
+		try {
+			List toConsult = findClassLoaders();
+			for (Iterator loaders = toConsult.iterator(); loaders.hasNext();) {
+				Enumeration result = ((ClassLoader) loaders.next()).getResources(arg0);
+				if (result != null && result.hasMoreElements()) {
+					return result;
+				}
+				// go to the next class loader
+			}
+			return super.findResources(arg0);
+		} finally {
+			stopLoading(arg0);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JspClassLoader.java
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JspClassLoader.java b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JspClassLoader.java
new file mode 100644
index 0000000..31e8bb6
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JspClassLoader.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.carbon.ui;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Constants;
+import org.wso2.carbon.ui.internal.CarbonUIServiceComponent;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.CodeSource;
+import java.security.PermissionCollection;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.StringTokenizer;
+
+/**
+ * Jasper requires that this class loader be an instance of URLClassLoader.
+ * At runtime it uses the URLClassLoader's getURLs method to find jar files that are in turn searched for TLDs. In a webapp
+ * these jar files would normally be located in WEB-INF/lib. In the OSGi context, this behaviour is provided by returning the
+ * URLs of the jar files contained on the Bundle-ClassPath. Other than jar file tld resources this classloader is not used for
+ * loading classes which should be done by the other contained class loaders.
+ * <p/>
+ * The rest of the ClassLoader is as follows:
+ * 1) Thread-ContextClassLoader (top - parent) -- see ContextFinder
+ * 2) Jasper Bundle
+ * 3) The Bundle referenced at JSPServlet creation
+ */
+public class JspClassLoader extends URLClassLoader {
+
+    private static final Bundle JASPERBUNDLE = CarbonUIServiceComponent.getBundle(JspServlet.class);
+    private static final ClassLoader PARENT = JspClassLoader.class.getClassLoader().getParent();
+    private static final String JAVA_PACKAGE = "java.";     //$NON-NLS-1$
+    private static final ClassLoader EMPTY_CLASSLOADER = new ClassLoader(null) {
+        public URL getResource(String name) {
+            return null;
+        }
+
+        public Enumeration findResources(String name) throws IOException {
+            return new Enumeration() {
+                public boolean hasMoreElements() {
+                    return false;
+                }
+
+                public Object nextElement() {
+                    return null;
+                }
+            };
+        }
+
+        public Class loadClass(String name) throws ClassNotFoundException {
+            throw new ClassNotFoundException(name);
+        }
+    };
+
+     private PermissionCollection permissions;
+
+    public JspClassLoader(Bundle bundle, PermissionCollection permissions) {
+        super(new URL[0], new BundleProxyClassLoader(bundle, new BundleProxyClassLoader(
+                JASPERBUNDLE, new JSPContextFinder(EMPTY_CLASSLOADER))));
+        this.permissions = permissions;
+        addBundleClassPathJars(bundle);
+    }
+
+    private void addBundleClassPathJars(Bundle bundle) {
+        Dictionary headers = bundle.getHeaders();
+        String classPath = (String) headers.get(Constants.BUNDLE_CLASSPATH);
+        if (classPath != null) {
+            StringTokenizer tokenizer = new StringTokenizer(classPath, ","); //$NON-NLS-1$
+            while (tokenizer.hasMoreTokens()) {
+                String candidate = tokenizer.nextToken().trim();
+                if (candidate.endsWith(".jar")) { //$NON-NLS-1$
+                    URL entry = bundle.getEntry(candidate);
+                    if (entry != null) {
+                        URL jarEntryURL;
+                        try {
+                            jarEntryURL = new URL(
+                                    "jar:" + entry.toString() + "!/"); //$NON-NLS-1$ //$NON-NLS-2$
+                            super.addURL(jarEntryURL);
+                        } catch (MalformedURLException e) {
+                            // TODO should log this.
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException {
+        if (PARENT != null && name.startsWith(JAVA_PACKAGE)) {
+            return PARENT.loadClass(name);
+        }
+        return super.loadClass(name, resolve);
+    }
+
+    // Classes should "not" be loaded by this classloader from the URLs - it is just used for TLD resource discovery.
+    protected Class findClass(String name) throws ClassNotFoundException {
+        throw new ClassNotFoundException(name);
+    }
+
+    protected PermissionCollection getPermissions(CodeSource codesource) {
+        return permissions;
+    }
+}


[18/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/jquery-ui-1.6.custom.min.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/jquery-ui-1.6.custom.min.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/jquery-ui-1.6.custom.min.js
new file mode 100644
index 0000000..2f7db30
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/jquery-ui-1.6.custom.min.js
@@ -0,0 +1 @@
+/*
 * jQuery UI 1.6
 *
 * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI
 */
(function(C){var I=C.fn.remove,D=C.browser.mozilla&&(parseFloat(C.browser.version)<1.9);C.ui={version:"1.6",plugin:{add:function(K,L,N){var M=C.ui[K].prototype;for(var J in N){M.plugins[J]=M.plugins[J]||[];M.plugins[J].push([L,N[J]])}},call:function(J,L,K){var N=J.plugins[L];if(!N){return }for(var M=0;M<N.length;M++){if(J.options[N[M][0]]){N[M][1].apply(J.element,K)}}}},contains:function(L,K){var J=C.browser.safari&&C.browser.version<522;if(L.contains&&!J){return L.contains(K)}if(L.compareDocumentPosition){return !!(L.compareDocumentPosition(K)&16)}while(K=K.parentNode){if(K==L){return true}}return false},cssCache:{},css:function(J){if(C.ui.cssCache[J]){return C.ui.cssCache[J]}var K=C('<div class="ui-gen">').addClass(J).css({position:"absolute",top:"-5000px",left:"-5000px",dis
 play:"block"}).appendTo("body");C.ui.cssCache[J]=!!((!(/auto|default/).test(K.css("cursor"))||(/^[1-9]/).test(K.css("height"))||(/^[1-9]/).test(K.css("width"))||!(/none/).test(K.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(K.css("backgroundColor"))));try{C("body").get(0).removeChild(K.get(0))}catch(L){}return C.ui.cssCache[J]},hasScroll:function(M,K){if(C(M).css("overflow")=="hidden"){return false}var J=(K&&K=="left")?"scrollLeft":"scrollTop",L=false;if(M[J]>0){return true}M[J]=1;L=(M[J]>0);M[J]=0;return L},isOverAxis:function(K,J,L){return(K>J)&&(K<(J+L))},isOver:function(O,K,N,M,J,L){return C.ui.isOverAxis(O,N,J)&&C.ui.isOverAxis(K,M,L)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(D){var F=C.attr
 ,E=C.fn.removeAttr,H="http://www.w3.org/2005/07/aaa",A=/^aria-/,B=/^wairole:/;C.attr=function(K,J,L){var M=L!==undefined;return(J=="role"?(M?F.call(this,K,J,"wairole:"+L):(F.apply(this,arguments)||"").replace(B,"")):(A.test(J)?(M?K.setAttributeNS(H,J.replace(A,"aaa:"),L):F.call(this,K,J.replace(A,"aaa:"))):F.apply(this,arguments)))};C.fn.removeAttr=function(J){return(A.test(J)?this.each(function(){this.removeAttributeNS(H,J.replace(A,""))}):E.call(this,J))}}C.fn.extend({remove:function(){C("*",this).add(this).each(function(){C(this).triggerHandler("remove")});return I.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var J;if((C.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))
 ){J=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(C.curCSS(this,"position",1))&&(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}else{J=this.parents().filter(function(){return(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!J.length?C(document):J}});C.extend(C.expr[":"],{data:function(K,L,J){return C.data(K,J[3])},tabbable:function(L,M,K){var N=L.nodeName.toLowerCase();function J(O){return !(C(O).is(":hidden")||C(O).parents(":hidden").length)}return(L.tabIndex>=0&&(("a"==N&&L.href)||(/input|select|textarea|button/.test(N)&&"hidden"!=L.type&&!L.disabled))&&J(L))}});function G(M,N,O,L){function K(Q){var P=C[M][N][Q]||[];return(typeof P=="string"?P.split(/,?\s+/):P)}var J=K("getter");if(L.length==1&&typeof L[0]=="string"){J=J.concat(K("getterSetter"))}return(C.inArray(O,J)!=
 -1)}C.widget=function(K,J){var L=K.split(".")[0];K=K.split(".")[1];C.fn[K]=function(P){var N=(typeof P=="string"),O=Array.prototype.slice.call(arguments,1);if(N&&P.substring(0,1)=="_"){return this}if(N&&G(L,K,P,O)){var M=C.data(this[0],K);return(M?M[P].apply(M,O):undefined)}return this.each(function(){var Q=C.data(this,K);(!Q&&!N&&C.data(this,K,new C[L][K](this,P)));(Q&&N&&C.isFunction(Q[P])&&Q[P].apply(Q,O))})};C[L]=C[L]||{};C[L][K]=function(O,N){var M=this;this.widgetName=K;this.widgetEventPrefix=C[L][K].eventPrefix||K;this.widgetBaseClass=L+"-"+K;this.options=C.extend({},C.widget.defaults,C[L][K].defaults,C.metadata&&C.metadata.get(O)[K],N);this.element=C(O).bind("setData."+K,function(Q,P,R){return M._setData(P,R)}).bind("getData."+K,function(Q,P){return M._getData(P)}).bind("remove",function(){return M.destroy()});this._init()};C[L][K].prototype=C.extend({},C.widget.prototype,J);C[L][K].getterSetter="option"};C.widget.prototype={_init:function(){},destroy:function(){this.element
 .removeData(this.widgetName)},option:function(L,M){var K=L,J=this;if(typeof L=="string"){if(M===undefined){return this._getData(L)}K={};K[L]=M}C.each(K,function(N,O){J._setData(N,O)})},_getData:function(J){return this.options[J]},_setData:function(J,K){this.options[J]=K;if(J=="disabled"){this.element[K?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(K,L,M){var J=(K==this.widgetEventPrefix?K:this.widgetEventPrefix+K);L=L||C.event.fix({type:J,target:this.element[0]});return this.element.triggerHandler(J,[L,M],this.options[K])}};C.widget.defaults={disabled:false};C.ui.mouse={_mouseInit:function(){var J=this;this.element.bind("mousedown."+this.widgetName,function(K){return J._mouseDown(K)}).bind("click."+this.widgetName,function(K){if(J._preventClickEvent){J._preventClickEvent=false;return false}});if(C.browser.msie){this._mouseUnselectable=this.element.a
 ttr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(C.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(L){(this._mouseStarted&&this._mouseUp(L));this._mouseDownEvent=L;var K=this,M=(L.which==1),J=(typeof this.options.cancel=="string"?C(L.target).parents().add(L.target).filter(this.options.cancel).length:false);if(!M||J||!this._mouseCapture(L)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){K.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(L)&&this._mouseDelayMet(L)){this._mouseStarted=(this._mouseStart(L)!==false);if(!this._mouseStarted){L.preventDefault();return true}}this._mouseMoveDelegate=function(N){return K._mouseMove(N)};this._mouseUpDelegate=function(N){return K._mouseUp(N)};C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind(
 "mouseup."+this.widgetName,this._mouseUpDelegate);if(!C.browser.safari){L.preventDefault()}return true},_mouseMove:function(J){if(C.browser.msie&&!J.button){return this._mouseUp(J)}if(this._mouseStarted){this._mouseDrag(J);return J.preventDefault()}if(this._mouseDistanceMet(J)&&this._mouseDelayMet(J)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,J)!==false);(this._mouseStarted?this._mouseDrag(J):this._mouseUp(J))}return !this._mouseStarted},_mouseUp:function(J){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=true;this._mouseStop(J)}return false},_mouseDistanceMet:function(J){return(Math.max(Math.abs(this._mouseDownEvent.pageX-J.pageX),Math.abs(this._mouseDownEvent.pageY-J.pageY))>=this.options.distance)},_mouseDelayMet:function(J){return this.mouseDelayMet},_mouseStart:function(J){},_mouseDrag:function(J){},_mouseStop:
 function(J){},_mouseCapture:function(J){return true}};C.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);/*
 * jQuery UI Draggable 1.6
 *
 * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Draggables
 *
 * Depends:
 *	ui.core.js
 */
(function(A){A.widget("ui.draggable",A.extend({},A.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:f
 unction(B){var C=this.options;if(this.helper||C.disabled||A(B.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(B);if(!this.handle){return false}return true},_mouseStart:function(B){var C=this.options;this.helper=this._createHelper(B);this._cacheHelperProportions();if(A.ui.ddmanager){A.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};A.extend(this.offset,{click:{left:B.pageX-this.offset.left,top:B.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});if(C.cursorAt){this._adjustOffsetFromHelper(C.cursorAt)}this.originalPosition=this._generatePosition(B);if(C.containment){this._setContainment()}this._propagate("start",B);this._cacheHelperProportions();if(A.ui.ddmanager&&!C.dropBehaviour){A.ui.ddmanager.prepareOff
 sets(this,B)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(B,true);return true},_mouseDrag:function(B,C){this.position=this._generatePosition(B);this.positionAbs=this._convertPositionTo("absolute");if(!C){this.position=this._propagate("drag",B)||this.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false},_mouseStop:function(C){var D=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){var D=A.ui.ddmanager.drop(this,C)}if((this.options.revert=="invalid"&&!D)||(this.options.revert=="valid"&&D)||this.options.revert===true||(A.isFunction(this.options.revert)&&this.options.revert.call(this.element,D))){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){B._propagate("stop",C);B._clear()})}else{this._propagate("st
 op",C);this._clear()}return false},_getHandle:function(B){var C=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==B.target){C=true}});return C},_createHelper:function(C){var D=this.options;var B=A.isFunction(D.helper)?A(D.helper.apply(this.element[0],[C])):(D.helper=="clone"?this.element.clone():this.element);if(!B.parents("body").length){B.appendTo((D.appendTo=="parent"?this.element[0].parentNode:D.appendTo))}if(B[0]!=this.element[0]&&!(/(fixed|absolute)/).test(B.css("position"))){B.css("position","absolute")}return B},_adjustOffsetFromHelper:function(B){if(B.left!=undefined){this.offset.click.left=B.left+this.margins.left}if(B.right!=undefined){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if(B.top!=undefined){this.offset.click.top=B.top+this.margins.top}if(B.bottom!=undefined){this.offset.click.top=this.helperProportions.height-B.bottom+this.
 margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if((this.offsetParent[0]==document.body&&A.browser.mozilla)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie)){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.element.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.
 outerHeight()}},_setContainment:function(){var E=this.options;if(E.containment=="parent"){E.containment=this.helper[0].parentNode}if(E.containment=="document"||E.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(E.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(A(E.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(E.containment)){var C=A(E.containment)[0];var D=A(E.containment).offset();var B=(A(C).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-
 this.offset.parent.left-this.margins.left,D.top+(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.margins.top,D.left+(B?Math.max(C.scrollWidth,C.offsetWidth):C.offsetWidth)-(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left,D.top+(B?Math.max(C.scrollHeight,C.offsetHeight):C.offsetHeight)-(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(D,F){if(!F){F=this.position}var C=D=="absolute"?1:-1;var B=this[(this.cssPosition=="absolute"?"offset":"scroll")+"Parent"],E=(/(html|body)/i).test(B[0].tagName);return{top:(F.top+this.offset.relative.top*C+this.offset.parent.top*C+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(E?0:B.scrollTop()))*C+this.margins.top*C),left:(F.left+this.offset.relative.left*C+this.offset.parent.left*
 C+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():(E?0:B.scrollLeft()))*C+this.margins.left*C)}},_generatePosition:function(D){var G=this.options,C=this[(this.cssPosition=="absolute"?"offset":"scroll")+"Parent"],H=(/(html|body)/i).test(C[0].tagName);var B={top:(D.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(H?0:C.scrollTop()))),left:(D.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():H?0:C.scrollLeft()))};if(!this.originalPosition){return B}if(this.containment){if(B.left<this.containment[0]){B.left=this.containment[0]}if(B.top<this.containment[1]){B.top=this.containment[1]}if(B.left>this.containment[2]){B.left=this.containment[2]}if(B.top>this.containment[3]){B.top=this.containment[3]}}if(G.grid){var F=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/G.grid[1])*G.grid[1];B.t
 op=this.containment?(!(F<this.containment[1]||F>this.containment[3])?F:(!(F<this.containment[1])?F-G.grid[1]:F+G.grid[1])):F;var E=this.originalPosition.left+Math.round((B.left-this.originalPosition.left)/G.grid[0])*G.grid[0];B.left=this.containment?(!(E<this.containment[0]||E>this.containment[2])?E:(!(E<this.containment[0])?E-G.grid[0]:E+G.grid[0])):E}return B},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this._uiHash()]);if(C=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return this.element.triggerHandler(C=="drag"?C:"drag"+C,[B,this._uiHash()],this.options[C])},plugins:{},_uiHash:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}}}));A.extend(A.ui.draggable,{version:"1.6",defaults:{appendTo:"pare
 nt",axis:false,cancel:":input",connectToSortable:false,containment:false,cssNamespace:"ui",cursor:"default",cursorAt:null,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:1,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:null}});A.ui.plugin.add("draggable","connectToSortable",{start:function(B,D){var C=A(this).data("draggable");C.sortables=[];A(D.options.connectToSortable).each(function(){A(this+"").each(function(){if(A.data(this,"sortable")){var E=A.data(this,"sortable");C.sortables.push({instance:E,shouldRevert:E.options.revert});E._refreshItems();E._propagate("activate",B,C)}})})},stop:function(B,D){var C=A(this).data("draggable");A.each(C.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;C.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.opti
 ons.revert=true}this.instance._mouseStop(B);this.instance.element.triggerHandler("sortreceive",[B,A.extend(this.instance._ui(),{sender:C.element})],this.instance.options["receive"]);this.instance.options.helper=this.instance.options._helper;if(C.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._propagate("deactivate",B,C)}})},drag:function(C,F){var E=A(this).data("draggable"),B=this;var D=function(I){var N=this.offset.click.top,M=this.offset.click.left;var G=this.positionAbs.top,K=this.positionAbs.left;var J=I.height,L=I.width;var O=I.top,H=I.left;return A.ui.isOver(G+N,K+M,O,H,J,L)};A.each(E.sortables,function(G){if(D.call(E,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(B).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=fu
 nction(){return F.helper[0]};C.target=this.instance.currentItem[0];this.instance._mouseCapture(C,true);this.instance._mouseStart(C,true,true);this.instance.offset.click.top=E.offset.click.top;this.instance.offset.click.left=E.offset.click.left;this.instance.offset.parent.left-=E.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=E.offset.parent.top-this.instance.offset.parent.top;E._propagate("toSortable",C)}if(this.instance.currentItem){this.instance._mouseDrag(C)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._mouseStop(C,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}E._propagate("fromSortable",C)}}})}});A.ui.plugin.add("draggable","cursor",{start:function(C,D){var B=A("body");if(B.css("cursor")){D.options._cursor=B.css("cursor")}B.css("
 cursor",D.options.cursor)},stop:function(B,C){if(C.options._cursor){A("body").css("cursor",C.options._cursor)}}});A.ui.plugin.add("draggable","iframeFix",{start:function(B,C){A(C.options.iframeFix===true?"iframe":C.options.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")})},stop:function(B,C){A("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});A.ui.plugin.add("draggable","opacity",{start:function(C,D){var B=A(D.helper);if(B.css("opacity")){D.options._opacity=B.css("opacity")}B.css("opacity",D.options.opacity)},stop:function(B,C){if(C.options._opacity){A(C.helper).css("opacity",C.options._opacity)}}});A.ui.plugin.add("draggable","scroll",{start:function(C,D){var E=D.options;var B=A(this).data("draggable");if(B.scrollParent[0]!=document&&B.scrollPare
 nt[0].tagName!="HTML"){B.overflowOffset=B.scrollParent.offset()}},drag:function(D,E){var F=E.options,B=false;var C=A(this).data("draggable");if(C.scrollParent[0]!=document&&C.scrollParent[0].tagName!="HTML"){if((C.overflowOffset.top+C.scrollParent[0].offsetHeight)-D.pageY<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop+F.scrollSpeed}else{if(D.pageY-C.overflowOffset.top<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop-F.scrollSpeed}}if((C.overflowOffset.left+C.scrollParent[0].offsetWidth)-D.pageX<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft+F.scrollSpeed}else{if(D.pageX-C.overflowOffset.left<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft-F.scrollSpeed}}}else{if(D.pageY-A(document).scrollTop()<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()-F.scrollSpeed)}else{if(A(window).height()-(D.pageY-A(document).scrollTop())<F.scrollSensitivity)
 {B=A(document).scrollTop(A(document).scrollTop()+F.scrollSpeed)}}if(D.pageX-A(document).scrollLeft()<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()-F.scrollSpeed)}else{if(A(window).width()-(D.pageX-A(document).scrollLeft())<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()+F.scrollSpeed)}}}if(B!==false&&A.ui.ddmanager&&!F.dropBehaviour){A.ui.ddmanager.prepareOffsets(C,D)}if(B!==false&&C.cssPosition=="absolute"&&C.scrollParent[0]!=document&&A.ui.contains(C.scrollParent[0],C.offsetParent[0])){C.offset.parent=C._getParentOffset()}if(B!==false&&C.cssPosition=="relative"&&!(C.scrollParent[0]!=document&&C.scrollParent[0]!=C.offsetParent[0])){C.offset.relative=C._getRelativeOffset()}}});A.ui.plugin.add("draggable","snap",{start:function(B,D){var C=A(this).data("draggable");C.snapElements=[];A(D.options.snap.constructor!=String?(D.options.snap.items||":data(draggable)"):D.options.snap).each(function(){var F=A(this);var E=F.offset();if(this!=C.ele
 ment[0]){C.snapElements.push({item:this,width:F.outerWidth(),height:F.outerHeight(),top:E.top,left:E.left})}})},drag:function(M,K){var E=A(this).data("draggable");var Q=K.options.snapTolerance;var P=K.absolutePosition.left,O=P+E.helperProportions.width,D=K.absolutePosition.top,C=D+E.helperProportions.height;for(var N=E.snapElements.length-1;N>=0;N--){var L=E.snapElements[N].left,J=L+E.snapElements[N].width,I=E.snapElements[N].top,S=I+E.snapElements[N].height;if(!((L-Q<P&&P<J+Q&&I-Q<D&&D<S+Q)||(L-Q<P&&P<J+Q&&I-Q<C&&C<S+Q)||(L-Q<O&&O<J+Q&&I-Q<D&&D<S+Q)||(L-Q<O&&O<J+Q&&I-Q<C&&C<S+Q))){if(E.snapElements[N].snapping){(E.options.snap.release&&E.options.snap.release.call(E.element,M,A.extend(E._uiHash(),{snapItem:E.snapElements[N].item})))}E.snapElements[N].snapping=false;continue}if(K.options.snapMode!="inner"){var B=Math.abs(I-C)<=Q;var R=Math.abs(S-D)<=Q;var G=Math.abs(L-O)<=Q;var H=Math.abs(J-P)<=Q;if(B){K.position.top=E._convertPositionTo("relative",{top:I-E.helperProportions.height,l
 eft:0}).top}if(R){K.position.top=E._convertPositionTo("relative",{top:S,left:0}).top}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:L-E.helperProportions.width}).left}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J}).left}}var F=(B||R||G||H);if(K.options.snapMode!="outer"){var B=Math.abs(I-D)<=Q;var R=Math.abs(S-C)<=Q;var G=Math.abs(L-P)<=Q;var H=Math.abs(J-O)<=Q;if(B){K.position.top=E._convertPositionTo("relative",{top:I,left:0}).top}if(R){K.position.top=E._convertPositionTo("relative",{top:S-E.helperProportions.height,left:0}).top}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:L}).left}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J-E.helperProportions.width}).left}}if(!E.snapElements[N].snapping&&(B||R||G||H||F)){(E.options.snap.snap&&E.options.snap.snap.call(E.element,M,A.extend(E._uiHash(),{snapItem:E.snapElements[N].item})))}E.snapElements[N].snapping=(B||R||G||H||F)}}});A.ui.plugin.add("draggable","
 stack",{start:function(B,C){var D=A.makeArray(A(C.options.stack.group)).sort(function(F,E){return(parseInt(A(F).css("zIndex"),10)||C.options.stack.min)-(parseInt(A(E).css("zIndex"),10)||C.options.stack.min)});A(D).each(function(E){this.style.zIndex=C.options.stack.min+E});this[0].style.zIndex=C.options.stack.min+D.length}});A.ui.plugin.add("draggable","zIndex",{start:function(C,D){var B=A(D.helper);if(B.css("zIndex")){D.options._zIndex=B.css("zIndex")}B.css("zIndex",D.options.zIndex)},stop:function(B,C){if(C.options._zIndex){A(C.helper).css("zIndex",C.options._zIndex)}}})})(jQuery);/*
 * jQuery UI Droppable 1.6
 *
 * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Droppables
 *
 * Depends:
 *	ui.core.js
 *	ui.draggable.js
 */
(function(A){A.widget("ui.droppable",{_init:function(){var C=this.options,B=C.accept;this.isover=0;this.isout=1;this.options.acce
 pt=this.options.accept&&A.isFunction(this.options.accept)?this.options.accept:function(D){return D.is(B)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};A.ui.ddmanager.droppables[this.options.scope]=A.ui.ddmanager.droppables[this.options.scope]||[];A.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-droppable"))},destroy:function(){var B=A.ui.ddmanager.droppables[this.options.scope];for(var C=0;C<B.length;C++){if(B[C]==this){B.splice(C,1)}}this.element.removeClass("ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(B,C){if(B=="accept"){this.options.accept=C&&A.isFunction(C)?C:function(D){return D.is(accept)}}else{A.widget.prototype._setData.apply(this,arguments)}},_activate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"activate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropactivate",[C,this.ui(B)
 ],this.options.activate)}},_deactivate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"deactivate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropdeactivate",[C,this.ui(B)],this.options.deactivate)}},_over:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"over",[C,this.ui(B)]);this.element.triggerHandler("dropover",[C,this.ui(B)],this.options.over)}},_out:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"out",[C,this.ui(B)]);this.element.triggerHandler("dropout",[C,this.ui(B)],this.options.out)}},_drop:function(C,D){var B=D||A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return false}var E=false;this.element.find(":data(droppable)").not(".u
 i-draggable-dragging").each(function(){var F=A.data(this,"droppable");if(F.options.greedy&&A.ui.intersect(B,A.extend(F,{offset:F.element.offset()}),F.options.tolerance)){E=true;return false}});if(E){return false}if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"drop",[C,this.ui(B)]);this.element.triggerHandler("drop",[C,this.ui(B)],this.options.drop);return this.element}return false},plugins:{},ui:function(B){return{draggable:(B.currentItem||B.element),helper:B.helper,position:B.position,absolutePosition:B.positionAbs,options:this.options,element:this.element}}});A.extend(A.ui.droppable,{version:"1.6",defaults:{accept:"*",activeClass:null,cssNamespace:"ui",greedy:false,hoverClass:null,scope:"default",tolerance:"intersect"}});A.ui.intersect=function(O,I,M){if(!I.offset){return false}var D=(O.positionAbs||O.position.absolute).left,C=D+O.helperProportions.width,L=(O.positionAbs||O.position.absolute).top,K=L+O.helperProportions.height;var F=I.o
 ffset.left,B=F+I.proportions.width,N=I.offset.top,J=N+I.proportions.height;switch(M){case"fit":return(F<D&&C<B&&N<L&&K<J);break;case"intersect":return(F<D+(O.helperProportions.width/2)&&C-(O.helperProportions.width/2)<B&&N<L+(O.helperProportions.height/2)&&K-(O.helperProportions.height/2)<J);break;case"pointer":var G=((O.positionAbs||O.position.absolute).left+(O.clickOffset||O.offset.click).left),H=((O.positionAbs||O.position.absolute).top+(O.clickOffset||O.offset.click).top),E=A.ui.isOver(H,G,N,F,I.proportions.height,I.proportions.width);return E;break;case"touch":return((L>=N&&L<=J)||(K>=N&&K<=J)||(L<N&&K>J))&&((D>=F&&D<=B)||(C>=F&&C<=B)||(D<F&&C>B));break;default:return false;break}};A.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(E,G){var B=A.ui.ddmanager.droppables[E.options.scope];var F=G?G.type:null;var H=(E.currentItem||E.element).find(":data(droppable)").andSelf();droppablesLoop:for(var D=0;D<B.length;D++){if(B[D].options.disabled||(E&&!B[D].o
 ptions.accept.call(B[D].element,(E.currentItem||E.element)))){continue}for(var C=0;C<H.length;C++){if(H[C]==B[D].element[0]){B[D].proportions.height=0;continue droppablesLoop}}B[D].visible=B[D].element.css("display")!="none";if(!B[D].visible){continue}B[D].offset=B[D].element.offset();B[D].proportions={width:B[D].element[0].offsetWidth,height:B[D].element[0].offsetHeight};if(F=="dragstart"||F=="sortactivate"){B[D]._activate.call(B[D],G)}}},drop:function(B,C){var D=false;A.each(A.ui.ddmanager.droppables[B.options.scope],function(){if(!this.options){return }if(!this.options.disabled&&this.visible&&A.ui.intersect(B,this,this.options.tolerance)){D=this._drop.call(this,C)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element,(B.currentItem||B.element))){this.isout=1;this.isover=0;this._deactivate.call(this,C)}});return D},drag:function(B,C){if(B.options.refreshPositions){A.ui.ddmanager.prepareOffsets(B,C)}A.each(A.ui.ddmanager.droppables[B.options.scope],function
 (){if(this.options.disabled||this.greedyChild||!this.visible){return }var E=A.ui.intersect(B,this,this.options.tolerance);var G=!E&&this.isover==1?"isout":(E&&this.isover==0?"isover":null);if(!G){return }var F;if(this.options.greedy){var D=this.element.parents(":data(droppable):eq(0)");if(D.length){F=A.data(D[0],"droppable");F.greedyChild=(G=="isover"?1:0)}}if(F&&G=="isover"){F["isover"]=0;F["isout"]=1;F._out.call(F,C)}this[G]=1;this[G=="isout"?"isover":"isout"]=0;this[G=="isover"?"_over":"_out"].call(this,C);if(F&&G=="isout"){F["isout"]=0;F["isover"]=1;F._over.call(F,C)}})}};A.ui.plugin.add("droppable","activeClass",{activate:function(B,C){A(this).addClass(C.options.activeClass)},deactivate:function(B,C){A(this).removeClass(C.options.activeClass)},drop:function(B,C){A(this).removeClass(C.options.activeClass)}});A.ui.plugin.add("droppable","hoverClass",{over:function(B,C){A(this).addClass(C.options.hoverClass)},out:function(B,C){A(this).removeClass(C.options.hoverClass)},drop:functi
 on(B,C){A(this).removeClass(C.options.hoverClass)}})})(jQuery);/*
 * jQuery UI Resizable 1.6
 *
 * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Resizables
 *
 * Depends:
 *	ui.core.js
 */
(function(B){B.widget("ui.resizable",B.extend({},B.ui.mouse,{_init:function(){var N=this,O=this.options;var R=this.element.css("position");this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(R)?"relative":R});B.extend(O,{_aspectRatio:!!(O.aspectRatio),helper:O.helper||O.ghost||O.animate?O.helper||"ui-resizable-helper":null,knobHandles:O.knobHandles===true?"ui-resizable-knob-handle":O.knobHandles});var I="1px solid #DEDEDE";O.defaultTheme={"ui-resizable":{display:"block"},"ui-resizable-handle":{position:"absolute",background:"#F2F2F2",fontSize:"0.1px"},"ui-resizable-n":{cursor:"n-resize",height:"4px",left:"0px",right:"0
 px",borderTop:I},"ui-resizable-s":{cursor:"s-resize",height:"4px",left:"0px",right:"0px",borderBottom:I},"ui-resizable-e":{cursor:"e-resize",width:"4px",top:"0px",bottom:"0px",borderRight:I},"ui-resizable-w":{cursor:"w-resize",width:"4px",top:"0px",bottom:"0px",borderLeft:I},"ui-resizable-se":{cursor:"se-resize",width:"4px",height:"4px",borderRight:I,borderBottom:I},"ui-resizable-sw":{cursor:"sw-resize",width:"4px",height:"4px",borderBottom:I,borderLeft:I},"ui-resizable-ne":{cursor:"ne-resize",width:"4px",height:"4px",borderRight:I,borderTop:I},"ui-resizable-nw":{cursor:"nw-resize",width:"4px",height:"4px",borderLeft:I,borderTop:I}};O.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"0px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"0px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"0px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"0px",top:"45%"},"ui-resiza
 ble-se":{cursor:"se-resize",right:"0px",bottom:"0px"},"ui-resizable-sw":{cursor:"sw-resize",left:"0px",bottom:"0px"},"ui-resizable-nw":{cursor:"nw-resize",left:"0px",top:"0px"},"ui-resizable-ne":{cursor:"ne-resize",right:"0px",top:"0px"}};O._nodeName=this.element[0].nodeName;if(O._nodeName.match(/canvas|textarea|input|select|button|img/i)){var C=this.element;if(/relative/.test(C.css("position"))&&B.browser.opera){C.css({position:"relative",top:"auto",left:"auto"})}C.wrap(B('<div class="ui-wrapper"	style="overflow: hidden;"></div>').css({position:C.css("position"),width:C.outerWidth(),height:C.outerHeight(),top:C.css("top"),left:C.css("left")}));var K=this.element;this.element=this.element.parent();this.element.data("resizable",this);this.element.css({marginLeft:K.css("marginLeft"),marginTop:K.css("marginTop"),marginRight:K.css("marginRight"),marginBottom:K.css("marginBottom")});K.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(B.browser.safari&&O.preventDefault){K.cs
 s("resize","none")}O.proportionallyResize=K.css({position:"static",zoom:1,display:"block"});this.element.css({margin:K.css("margin")});this._proportionallyResize()}if(!O.handles){O.handles=!B(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}}if(O.handles.constructor==String){O.zIndex=O.zIndex||1000;if(O.handles=="all"){O.handles="n,e,s,w,se,sw,ne,nw"}var P=O.handles.split(",");O.handles={};var H={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"};for(var S=0;S<P.length;S++){var T=B.trim(P[S]),M=O.defaultTheme,G="ui-resizable-"+T,D=!B.ui.css(G)&&!O.knobHandles,Q=B.ui.css("ui-resizabl
 e-knob-handle"),U=B.extend(M[G],M["ui-resizable-handle"]),E=B.extend(O.knobTheme[G],!Q?O.knobTheme["ui-resizable-handle"]:{});var L=/sw|se|ne|nw/.test(T)?{zIndex:++O.zIndex}:{};var J=(D?H[T]:""),F=B(['<div class="ui-resizable-handle ',G,'" style="',J,H.handle,'"></div>'].join("")).css(L);O.handles[T]=".ui-resizable-"+T;this.element.append(F.css(D?U:{}).css(O.knobHandles?E:{}).addClass(O.knobHandles?"ui-resizable-knob-handle":"").addClass(O.knobHandles))}if(O.knobHandles){this.element.addClass("ui-resizable-knob").css(!B.ui.css("ui-resizable-knob")?{}:{})}}this._renderAxis=function(Z){Z=Z||this.element;for(var W in O.handles){if(O.handles[W].constructor==String){O.handles[W]=B(O.handles[W],this.element).show()}if(O.transparent){O.handles[W].css({opacity:0})}if(this.element.is(".ui-wrapper")&&O._nodeName.match(/textarea|input|select|button/i)){var X=B(O.handles[W],this.element),Y=0;Y=/sw|ne|nw|se|n|s/.test(W)?X.outerHeight():X.outerWidth();var V=["padding",/ne|nw|n/.test(W)?"Top":/se|
 sw|s/.test(W)?"Bottom":/^e$/.test(W)?"Right":"Left"].join("");if(!O.transparent){Z.css(V,Y)}this._proportionallyResize()}if(!B(O.handles[W]).length){continue}}};this._renderAxis(this.element);O._handles=B(".ui-resizable-handle",N.element);if(O.disableSelection){O._handles.disableSelection()}O._handles.mouseover(function(){if(!O.resizing){if(this.className){var V=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}N.axis=O.axis=V&&V[1]?V[1]:"se"}});if(O.autoHide){O._handles.hide();B(N.element).addClass("ui-resizable-autohide").hover(function(){B(this).removeClass("ui-resizable-autohide");O._handles.show()},function(){if(!O.resizing){B(this).addClass("ui-resizable-autohide");O._handles.hide()}})}this._mouseInit()},destroy:function(){var E=this.element,D=E.children(".ui-resizable").get(0);this._mouseDestroy();var C=function(F){B(F).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};C(E);if(E.is("
 .ui-wrapper")&&D){E.parent().append(B(D).css({position:E.css("position"),width:E.outerWidth(),height:E.outerHeight(),top:E.css("top"),left:E.css("left")})).end().remove();C(D)}},_mouseCapture:function(D){if(this.options.disabled){return false}var E=false;for(var C in this.options.handles){if(B(this.options.handles[C])[0]==D.target){E=true}}if(!E){return false}return true},_mouseStart:function(D){var E=this.options,C=this.element.position(),F=this.element,I=B.browser.msie&&B.browser.version<7;E.resizing=true;E.documentScroll={top:B(document).scrollTop(),left:B(document).scrollLeft()};if(F.is(".ui-draggable")||(/absolute/).test(F.css("position"))){var K=B.browser.msie&&!E.containment&&(/absolute/).test(F.css("position"))&&!(/relative/).test(F.parent().css("position"));var L=K?this.documentScroll.top:0,H=K?this.documentScroll.left:0;F.css({position:"absolute",top:(C.top+L),left:(C.left+H)})}if(B.browser.opera&&(/relative/).test(F.css("position"))){F.css({position:"relative",top:"auto",
 left:"auto"})}this._renderProxy();var M=A(this.helper.css("left")),G=A(this.helper.css("top"));if(E.containment){M+=B(E.containment).scrollLeft()||0;G+=B(E.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:M,top:G};this.size=E.helper||I?{width:F.outerWidth(),height:F.outerHeight()}:{width:F.width(),height:F.height()};this.originalSize=E.helper||I?{width:F.outerWidth(),height:F.outerHeight()}:{width:F.width(),height:F.height()};this.originalPosition={left:M,top:G};this.sizeDiff={width:F.outerWidth()-F.width(),height:F.outerHeight()-F.height()};this.originalMousePosition={left:D.pageX,top:D.pageY};E.aspectRatio=(typeof E.aspectRatio=="number")?E.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);if(E.preserveCursor){var J=B(".ui-resizable-"+this.axis).css("cursor");B("body").css("cursor",J=="auto"?this.axis+"-resize":J)}this._propagate("start",D);return true},_mouseDrag:function(C){var F=this.helper,E=this.options,K={},N=this,H=this.orig
 inalMousePosition,L=this.axis;var O=(C.pageX-H.left)||0,M=(C.pageY-H.top)||0;var G=this._change[L];if(!G){return false}var J=G.apply(this,[C,O,M]),I=B.browser.msie&&B.browser.version<7,D=this.sizeDiff;if(E._aspectRatio||C.shiftKey){J=this._updateRatio(J,C)}J=this._respectSize(J,C);this._propagate("resize",C);F.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!E.helper&&E.proportionallyResize){this._proportionallyResize()}this._updateCache(J);this.element.triggerHandler("resize",[C,this.ui()],this.options["resize"]);return false},_mouseStop:function(F){this.options.resizing=false;var G=this.options,K=this;if(G.helper){var E=G.proportionallyResize,C=E&&(/textarea/i).test(E.get(0).nodeName),D=C&&B.ui.hasScroll(E.get(0),"left")?0:K.sizeDiff.height,I=C?0:K.sizeDiff.width;var L={width:(K.size.width-I),height:(K.size.height-D)},H=(parseInt(K.element.css("left"),10)+(K.position.left-K.originalPosition.left))||null,J=(p
 arseInt(K.element.css("top"),10)+(K.position.top-K.originalPosition.top))||null;if(!G.animate){this.element.css(B.extend(L,{top:J,left:H}))}if(G.helper&&!G.animate){this._proportionallyResize()}}if(G.preserveCursor){B("body").css("cursor","auto")}this._propagate("stop",F);if(G.helper){this.helper.remove()}return false},_updateCache:function(C){var D=this.options;this.offset=this.helper.offset();if(C.left){this.position.left=C.left}if(C.top){this.position.top=C.top}if(C.height){this.size.height=C.height}if(C.width){this.size.width=C.width}},_updateRatio:function(F,E){var G=this.options,H=this.position,D=this.size,C=this.axis;if(F.height){F.width=(D.height*G.aspectRatio)}else{if(F.width){F.height=(D.width/G.aspectRatio)}}if(C=="sw"){F.left=H.left+(D.width-F.width);F.top=null}if(C=="nw"){F.top=H.top+(D.height-F.height);F.left=H.left+(D.width-F.width)}return F},_respectSize:function(J,E){var H=this.helper,G=this.options,O=G._aspectRatio||E.shiftKey,N=this.axis,Q=J.width&&G.maxWidth&&G.m
 axWidth<J.width,K=J.height&&G.maxHeight&&G.maxHeight<J.height,F=J.width&&G.minWidth&&G.minWidth>J.width,P=J.height&&G.minHeight&&G.minHeight>J.height;if(F){J.width=G.minWidth}if(P){J.height=G.minHeight}if(Q){J.width=G.maxWidth}if(K){J.height=G.maxHeight}var D=this.originalPosition.left+this.originalSize.width,M=this.position.top+this.size.height;var I=/sw|nw|w/.test(N),C=/nw|ne|n/.test(N);if(F&&I){J.left=D-G.minWidth}if(Q&&I){J.left=D-G.maxWidth}if(P&&C){J.top=M-G.minHeight}if(K&&C){J.top=M-G.maxHeight}var L=!J.width&&!J.height;if(L&&!J.left&&J.top){J.top=null}else{if(L&&!J.top&&J.left){J.left=null}}return J},_proportionallyResize:function(){var G=this.options;if(!G.proportionallyResize){return }var E=G.proportionallyResize,D=this.helper||this.element;if(!G.borderDif){var C=[E.css("borderTopWidth"),E.css("borderRightWidth"),E.css("borderBottomWidth"),E.css("borderLeftWidth")],F=[E.css("paddingTop"),E.css("paddingRight"),E.css("paddingBottom"),E.css("paddingLeft")];G.borderDif=B.map(
 C,function(H,J){var I=parseInt(H,10)||0,K=parseInt(F[J],10)||0;return I+K})}E.css({height:(D.height()-G.borderDif[0]-G.borderDif[2])+"px",width:(D.width()-G.borderDif[1]-G.borderDif[3])+"px"})},_renderProxy:function(){var D=this.element,G=this.options;this.elementOffset=D.offset();if(G.helper){this.helper=this.helper||B('<div style="overflow:hidden;"></div>');var C=B.browser.msie&&B.browser.version<7,E=(C?1:0),F=(C?2:-1);this.helper.addClass(G.helper).css({width:D.outerWidth()+F,height:D.outerHeight()+F,position:"absolute",left:this.elementOffset.left-E+"px",top:this.elementOffset.top-E+"px",zIndex:++G.zIndex});this.helper.appendTo("body");if(G.disableSelection){this.helper.disableSelection()}}else{this.helper=D}},_change:{e:function(E,D,C){return{width:this.originalSize.width+D}},w:function(F,D,C){var H=this.options,E=this.originalSize,G=this.originalPosition;return{left:G.left+D,width:E.width-D}},n:function(F,D,C){var H=this.options,E=this.originalSize,G=this.originalPosition;retu
 rn{top:G.top+C,height:E.height-C}},s:function(E,D,C){return{height:this.originalSize.height+C}},se:function(E,D,C){return B.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[E,D,C]))},sw:function(E,D,C){return B.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[E,D,C]))},ne:function(E,D,C){return B.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[E,D,C]))},nw:function(E,D,C){return B.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[E,D,C]))}},_propagate:function(D,C){B.ui.plugin.call(this,D,[C,this.ui()]);if(D!="resize"){this.element.triggerHandler(["resize",D].join(""),[C,this.ui()],this.options[D])}},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));B.extend(B.ui.resizable,{version:"1.6",defaults:{alsoResiz
 e:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input",containment:false,disableSelection:true,distance:1,delay:0,ghost:false,grid:false,knobHandles:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,preserveCursor:true,preventDefault:true,proportionallyResize:false,transparent:false}});B.ui.plugin.add("resizable","alsoResize",{start:function(D,E){var G=E.options,C=B(this).data("resizable"),F=function(H){B(H).each(function(){B(this).data("resizable-alsoresize",{width:parseInt(B(this).width(),10),height:parseInt(B(this).height(),10),left:parseInt(B(this).css("left"),10),top:parseInt(B(this).css("top"),10)})})};if(typeof (G.alsoResize)=="object"&&!G.alsoResize.parentNode){if(G.alsoResize.length){G.alsoResize=G.alsoResize[0];F(G.alsoResize)}else{B.each(G.alsoResize,function(H,I){F(H)})}}else{F(G.alsoResize)}},resize:function(E,G){var H=G.options,D=B(this).data("resizable"),F=D.originalSize,J=D.originalPosition;var I=
 {height:(D.size.height-F.height)||0,width:(D.size.width-F.width)||0,top:(D.position.top-J.top)||0,left:(D.position.left-J.left)||0},C=function(K,L){B(K).each(function(){var O=B(this).data("resizable-alsoresize"),N={},M=L&&L.length?L:["width","height","top","left"];B.each(M||["width","height","top","left"],function(P,R){var Q=(O[R]||0)+(I[R]||0);if(Q&&Q>=0){N[R]=Q||null}});B(this).css(N)})};if(typeof (H.alsoResize)=="object"&&!H.alsoResize.parentNode){B.each(H.alsoResize,function(K,L){C(K,L)})}else{C(H.alsoResize)}},stop:function(C,D){B(this).removeData("resizable-alsoresize-start")}});B.ui.plugin.add("resizable","animate",{stop:function(G,L){var H=L.options,M=B(this).data("resizable");var F=H.proportionallyResize,C=F&&(/textarea/i).test(F.get(0).nodeName),D=C&&B.ui.hasScroll(F.get(0),"left")?0:M.sizeDiff.height,J=C?0:M.sizeDiff.width;var E={width:(M.size.width-J),height:(M.size.height-D)},I=(parseInt(M.element.css("left"),10)+(M.position.left-M.originalPosition.left))||null,K=(parse
 Int(M.element.css("top"),10)+(M.position.top-M.originalPosition.top))||null;M.element.animate(B.extend(E,K&&I?{top:K,left:I}:{}),{duration:H.animateDuration,easing:H.animateEasing,step:function(){var N={width:parseInt(M.element.css("width"),10),height:parseInt(M.element.css("height"),10),top:parseInt(M.element.css("top"),10),left:parseInt(M.element.css("left"),10)};if(F){F.css({width:N.width,height:N.height})}M._updateCache(N);M._propagate("animate",G)}})}});B.ui.plugin.add("resizable","containment",{start:function(D,N){var H=N.options,P=B(this).data("resizable"),J=P.element;var E=H.containment,I=(E instanceof B)?E.get(0):(/parent/.test(E))?J.parent().get(0):E;if(!I){return }P.containerElement=B(I);if(/document/.test(E)||E==document){P.containerOffset={left:0,top:0};P.containerPosition={left:0,top:0};P.parentData={element:B(document),left:0,top:0,width:B(document).width(),height:B(document).height()||document.body.parentNode.scrollHeight}}else{var L=B(I),G=[];B(["Top","Right","Left"
 ,"Bottom"]).each(function(R,Q){G[R]=A(L.css("padding"+Q))});P.containerOffset=L.offset();P.containerPosition=L.position();P.containerSize={height:(L.innerHeight()-G[3]),width:(L.innerWidth()-G[1])};var M=P.containerOffset,C=P.containerSize.height,K=P.containerSize.width,F=(B.ui.hasScroll(I,"left")?I.scrollWidth:K),O=(B.ui.hasScroll(I)?I.scrollHeight:C);P.parentData={element:I,left:M.left,top:M.top,width:F,height:O}}},resize:function(E,N){var G=N.options,Q=B(this).data("resizable"),D=Q.containerSize,M=Q.containerOffset,K=Q.size,L=Q.position,O=G._aspectRatio||E.shiftKey,C={top:0,left:0},F=Q.containerElement;if(F[0]!=document&&(/static/).test(F.css("position"))){C=M}if(L.left<(G.helper?M.left:0)){Q.size.width=Q.size.width+(G.helper?(Q.position.left-M.left):(Q.position.left-C.left));if(O){Q.size.height=Q.size.width/G.aspectRatio}Q.position.left=G.helper?M.left:0}if(L.top<(G.helper?M.top:0)){Q.size.height=Q.size.height+(G.helper?(Q.position.top-M.top):Q.position.top);if(O){Q.size.width=Q
 .size.height*G.aspectRatio}Q.position.top=G.helper?M.top:0}Q.offset.left=Q.parentData.left+Q.position.left;Q.offset.top=Q.parentData.top+Q.position.top;var J=Math.abs((G.helper?Q.offset.left-C.left:(Q.offset.left-C.left))+Q.sizeDiff.width),P=Math.abs((G.helper?Q.offset.top-C.top:(Q.offset.top-M.top))+Q.sizeDiff.height);var I=Q.containerElement.get(0)==Q.element.parent().get(0),H=/relative|absolute/.test(Q.containerElement.css("position"));if(I&&H){J-=Q.parentData.left}if(J+Q.size.width>=Q.parentData.width){Q.size.width=Q.parentData.width-J;if(O){Q.size.height=Q.size.width/G.aspectRatio}}if(P+Q.size.height>=Q.parentData.height){Q.size.height=Q.parentData.height-P;if(O){Q.size.width=Q.size.height*G.aspectRatio}}},stop:function(D,K){var E=K.options,M=B(this).data("resizable"),I=M.position,J=M.containerOffset,C=M.containerPosition,F=M.containerElement;var G=B(M.helper),N=G.offset(),L=G.outerWidth()-M.sizeDiff.width,H=G.outerHeight()-M.sizeDiff.height;if(E.helper&&!E.animate&&(/relative/
 ).test(F.css("position"))){B(this).css({left:N.left-C.left-J.left,width:L,height:H})}if(E.helper&&!E.animate&&(/static/).test(F.css("position"))){B(this).css({left:N.left-C.left-J.left,width:L,height:H})}}});B.ui.plugin.add("resizable","ghost",{start:function(E,F){var G=F.options,C=B(this).data("resizable"),H=G.proportionallyResize,D=C.size;if(!H){C.ghost=C.element.clone()}else{C.ghost=H.clone()}C.ghost.css({opacity:0.25,display:"block",position:"relative",height:D.height,width:D.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof G.ghost=="string"?G.ghost:"");C.ghost.appendTo(C.helper)},resize:function(D,E){var F=E.options,C=B(this).data("resizable"),G=F.proportionallyResize;if(C.ghost){C.ghost.css({position:"relative",height:C.size.height,width:C.size.width})}},stop:function(D,E){var F=E.options,C=B(this).data("resizable"),G=F.proportionallyResize;if(C.ghost&&C.helper){C.helper.get(0).removeChild(C.ghost.get(0))}}});B.ui.plugin.add("resizable","grid",{resi
 ze:function(C,K){var F=K.options,M=B(this).data("resizable"),I=M.size,G=M.originalSize,H=M.originalPosition,L=M.axis,J=F._aspectRatio||C.shiftKey;F.grid=typeof F.grid=="number"?[F.grid,F.grid]:F.grid;var E=Math.round((I.width-G.width)/(F.grid[0]||1))*(F.grid[0]||1),D=Math.round((I.height-G.height)/(F.grid[1]||1))*(F.grid[1]||1);if(/^(se|s|e)$/.test(L)){M.size.width=G.width+E;M.size.height=G.height+D}else{if(/^(ne)$/.test(L)){M.size.width=G.width+E;M.size.height=G.height+D;M.position.top=H.top-D}else{if(/^(sw)$/.test(L)){M.size.width=G.width+E;M.size.height=G.height+D;M.position.left=H.left-E}else{M.size.width=G.width+E;M.size.height=G.height+D;M.position.top=H.top-D;M.position.left=H.left-E}}}}});var A=function(C){return parseInt(C,10)||0}})(jQuery);/*
 * jQuery UI Selectable 1.6
 *
 * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Selectables
 *
 * De
 pends:
 *	ui.core.js
 */
(function(A){A.widget("ui.selectable",A.extend({},A.ui.mouse,{_init:function(){var B=this;this.element.addClass("ui-selectable");this.dragged=false;var C;this.refresh=function(){C=A(B.options.filter,B.element[0]);C.each(function(){var D=A(this);var E=D.offset();A.data(this,"selectable-item",{element:this,$element:D,left:E.left,top:E.top,right:E.left+D.width(),bottom:E.top+D.height(),startselected:false,selected:D.hasClass("ui-selected"),selecting:D.hasClass("ui-selecting"),unselecting:D.hasClass("ui-unselecting")})})};this.refresh();this.selectees=C.addClass("ui-selectee");this._mouseInit();this.helper=A(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(E){var C=this;this.opos=[E.pageX,E.pageY];if(this.options.disabled){return }var D=this.o
 ptions;this.selectees=A(D.filter,this.element[0]);this.element.triggerHandler("selectablestart",[E,{"selectable":this.element[0],"options":D}],D.start);A("body").append(this.helper);this.helper.css({"z-index":100,"position":"absolute","left":E.clientX,"top":E.clientY,"width":0,"height":0});if(D.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var F=A.data(this,"selectable-item");F.startselected=true;if(!E.metaKey){F.$element.removeClass("ui-selected");F.selected=false;F.$element.addClass("ui-unselecting");F.unselecting=true;C.element.triggerHandler("selectableunselecting",[E,{selectable:C.element[0],unselecting:F.element,options:D}],D.unselecting)}});var B=false;A(E.target).parents().andSelf().each(function(){if(A.data(this,"selectable-item")){B=true}});return this.options.keyboard?!B:true},_mouseDrag:function(I){var C=this;this.dragged=true;if(this.options.disabled){return }var E=this.options;var D=this.opos[0],H=this.opos[1],B=I.pageX,G=I.pageY;if(
 D>B){var F=B;B=D;D=F}if(H>G){var F=G;G=H;H=F}this.helper.css({left:D,top:H,width:B-D,height:G-H});this.selectees.each(function(){var J=A.data(this,"selectable-item");if(!J||J.element==C.element[0]){return }var K=false;if(E.tolerance=="touch"){K=(!(J.left>B||J.right<D||J.top>G||J.bottom<H))}else{if(E.tolerance=="fit"){K=(J.left>D&&J.right<B&&J.top>H&&J.bottom<G)}}if(K){if(J.selected){J.$element.removeClass("ui-selected");J.selected=false}if(J.unselecting){J.$element.removeClass("ui-unselecting");J.unselecting=false}if(!J.selecting){J.$element.addClass("ui-selecting");J.selecting=true;C.element.triggerHandler("selectableselecting",[I,{selectable:C.element[0],selecting:J.element,options:E}],E.selecting)}}else{if(J.selecting){if(I.metaKey&&J.startselected){J.$element.removeClass("ui-selecting");J.selecting=false;J.$element.addClass("ui-selected");J.selected=true}else{J.$element.removeClass("ui-selecting");J.selecting=false;if(J.startselected){J.$element.addClass("ui-unselecting");J.unse
 lecting=true}C.element.triggerHandler("selectableunselecting",[I,{selectable:C.element[0],unselecting:J.element,options:E}],E.unselecting)}}if(J.selected){if(!I.metaKey&&!J.startselected){J.$element.removeClass("ui-selected");J.selected=false;J.$element.addClass("ui-unselecting");J.unselecting=true;C.element.triggerHandler("selectableunselecting",[I,{selectable:C.element[0],unselecting:J.element,options:E}],E.unselecting)}}}});return false},_mouseStop:function(D){var B=this;this.dragged=false;var C=this.options;A(".ui-unselecting",this.element[0]).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-unselecting");E.unselecting=false;E.startselected=false;B.element.triggerHandler("selectableunselected",[D,{selectable:B.element[0],unselected:E.element,options:C}],C.unselected)});A(".ui-selecting",this.element[0]).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-selecting").addClass("ui-selected");E.selecting=false;E.selected=tr
 ue;E.startselected=true;B.element.triggerHandler("selectableselected",[D,{selectable:B.element[0],selected:E.element,options:C}],C.selected)});this.element.triggerHandler("selectablestop",[D,{selectable:B.element[0],options:this.options}],this.options.stop);this.helper.remove();return false}}));A.extend(A.ui.selectable,{version:"1.6",defaults:{appendTo:"body",autoRefresh:true,cancel:":input",delay:0,distance:1,filter:"*",tolerance:"touch"}})})(jQuery);/*
 * jQuery UI Sortable 1.6
 *
 * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Sortables
 *
 * Depends:
 *	ui.core.js
 */
(function(A){A.widget("ui.sortable",A.extend({},A.ui.mouse,{_init:function(){var B=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.elem
 ent.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var B=this.items.length-1;B>=0;B--){this.items[B].item.removeData("sortable-item")}},_mouseCapture:function(E,F){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(E);var D=null,C=this,B=A(E.target).parents().each(function(){if(A.data(this,"sortable-item")==C){D=A(this);return false}});if(A.data(E.target,"sortable-item")==C){D=A(E.target)}if(!D){return false}if(this.options.handle&&!F){var G=false;A(this.options.handle,D).find("*").andSelf().each(function(){if(this==E.target){G=true}});if(!G){return false}}this.currentItem=D;this._removeCurrentsFromItems();return true},_mouseStart:function(D,E,B){var F=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(D);this._cacheHelperProportions();this._cach
 eMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");A.extend(this.offset,{click:{left:D.pageX-this.offset.left,top:D.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});if(F.cursorAt){this._adjustOffsetFromHelper(F.cursorAt)}this.originalPosition=this._generatePosition(D);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(F.containment){this._setContainment()}this._propagate("start",D);if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!B){for(var C=this.containers.length-1;C>=0;C--){this.containers[C]._propagate("activate",D,this)}}if(A.ui.ddmanager){A.ui.ddmanager.current=this}if(A.u
 i.ddmanager&&!F.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,D)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(D);return true},_mouseDrag:function(E){this.position=this._generatePosition(E);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}A.ui.plugin.call(this,"sort",[E,this._ui()]);this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var C=this.items.length-1;C>=0;C--){var D=this.items[C],B=D.item[0],F=this._intersectsWithPointer(D);if(!F){continue}if(B!=this.currentItem[0]&&this.placeholder[F==1?"next":"prev"]()[0]!=B&&!A.ui.contains(this.placeholder[0],B)&&(this.options.type=="semi-dynamic"?!A.ui.contains(this.element[0],B):true)){this.direction=F==1?"down":"up";if(this.options.toleran
 ce=="pointer"||this._intersectsWithSides(D)){this.options.sortIndicator.call(this,E,D)}else{break}this._propagate("change",E);break}}this._contactContainers(E);if(A.ui.ddmanager){A.ui.ddmanager.drag(this,E)}this._trigger("sort",E,this._ui());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(C,D){if(!C){return }if(A.ui.ddmanager&&!this.options.dropBehaviour){A.ui.ddmanager.drop(this,C)}if(this.options.revert){var B=this;var E=B.placeholder.offset();B.reverting=true;A(this.helper).animate({left:E.left-this.offset.parent.left-B.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:E.top-this.offset.parent.top-B.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){B._clear(C)})}else{this._clear(C,D)}return false},cancel:function(){if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui
 -sortable-helper")}else{this.currentItem.show()}for(var B=this.containers.length-1;B>=0;B--){this.containers[B]._propagate("deactivate",null,this);if(this.containers[B].containerCache.over){this.containers[B]._propagate("out",null,this);this.containers[B].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}A.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){A(this.domPosition.prev).after(this.currentItem)}else{A(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(D){var B=this._getItemsAsjQuery(D&&D.connected);var C=[];D=D||{};A(B).each(function(){var E=(A(D.item||this).attr(D.attribute||"id")||"").match(D.expression||(/(.+)[-=_](.+)/));if(E){C.push((D.key||E[1]+"[]")+"="+(D.key&&D.expression?E[1]:E[2]))}});return C.join("&")},toArray:f
 unction(D){var B=this._getItemsAsjQuery(D&&D.connected);var C=[];D=D||{};B.each(function(){C.push(A(D.item||this).attr(D.attribute||"id")||"")});return C},_intersectsWith:function(K){var D=this.positionAbs.left,C=D+this.helperProportions.width,J=this.positionAbs.top,I=J+this.helperProportions.height;var E=K.left,B=E+K.width,L=K.top,H=L+K.height;var M=this.offset.click.top,G=this.offset.click.left;var F=(J+M)>L&&(J+M)<H&&(D+G)>E&&(D+G)<B;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>K[this.floating?"width":"height"])){return F}else{return(E<D+(this.helperProportions.width/2)&&C-(this.helperProportions.width/2)<B&&L<J+(this.helperProportions.height/2)&&I-(this.helperProportions.height/2)<H)}},_intersectsWithPointer:function(D){var E=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,D.top,D.height),C=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.
 left,D.left,D.width),G=E&&C,B=this._getDragVerticalDirection(),F=this._getDragHorizontalDirection();if(!G){return false}return this.floating?(((F&&F=="right")||B=="down")?2:1):(B&&(B=="down"?2:1))},_intersectsWithSides:function(E){var C=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,E.top+(E.height/2),E.height),D=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,E.left+(E.width/2),E.width),B=this._getDragVerticalDirection(),F=this._getDragHorizontalDirection();if(this.floating&&F){return((F=="right"&&D)||(F=="left"&&!D))}else{return B&&((B=="down"&&C)||(B=="up"&&!C))}},_getDragVerticalDirection:function(){var B=this.positionAbs.top-this.lastPositionAbs.top;return B!=0&&(B>0?"down":"up")},_getDragHorizontalDirection:function(){var B=this.positionAbs.left-this.lastPositionAbs.left;return B!=0&&(B>0?"right":"left")},refresh:function(B){this._refreshItems(B);this.refreshPositions()},_getItemsAsjQuery:function(G){var C=this;var B=[];var E=[];if(this.options.connect
 With&&G){for(var F=this.options.connectWith.length-1;F>=0;F--){var I=A(this.options.connectWith[F]);for(var D=I.length-1;D>=0;D--){var H=A.data(I[D],"sortable");if(H&&H!=this&&!H.options.disabled){E.push([A.isFunction(H.options.items)?H.options.items.call(H.element):A(H.options.items,H.element).not(".ui-sortable-helper"),H])}}}}E.push([A.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):A(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var F=E.length-1;F>=0;F--){E[F][0].each(function(){B.push(this)})}return A(B)},_removeCurrentsFromItems:function(){var D=this.currentItem.find(":data(sortable-item)");for(var C=0;C<this.items.length;C++){for(var B=0;B<D.length;B++){if(D[B]==this.items[C].item[0]){this.items.splice(C,1)}}}},_refreshItems:function(B){this.items=[];this.containers=[this];var H=this.items;var M=this;var F=[[A.isFunction(this.options.items)?this.options.items.call(this.element[0],B,
 {item:this.currentItem}):A(this.options.items,this.element),this]];if(this.options.connectWith){for(var E=this.options.connectWith.length-1;E>=0;E--){var J=A(this.options.connectWith[E]);for(var D=J.length-1;D>=0;D--){var G=A.data(J[D],"sortable");if(G&&G!=this&&!G.options.disabled){F.push([A.isFunction(G.options.items)?G.options.items.call(G.element[0],B,{item:this.currentItem}):A(G.options.items,G.element),G]);this.containers.push(G)}}}}for(var E=F.length-1;E>=0;E--){var I=F[E][1];var C=F[E][0];for(var D=0,K=C.length;D<K;D++){var L=A(C[D]);L.data("sortable-item",I);H.push({item:L,instance:I,width:0,height:0,left:0,top:0})}}},refreshPositions:function(B){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var D=this.items.length-1;D>=0;D--){var E=this.items[D];if(E.instance!=this.currentContainer&&this.currentContainer&&E.item[0]!=this.currentItem[0]){continue}var C=this.options.toleranceElement?A(this.options.toleranceElement,E.item):E.item;if(!B){if(
 this.options.accurateIntersection){E.width=C.outerWidth();E.height=C.outerHeight()}else{E.width=C[0].offsetWidth;E.height=C[0].offsetHeight}}var F=C.offset();E.left=F.left;E.top=F.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var D=this.containers.length-1;D>=0;D--){var F=this.containers[D].element.offset();this.containers[D].containerCache.left=F.left;this.containers[D].containerCache.top=F.top;this.containers[D].containerCache.width=this.containers[D].element.outerWidth();this.containers[D].containerCache.height=this.containers[D].element.outerHeight()}}},_createPlaceholder:function(D){var B=D||this,E=B.options;if(!E.placeholder||E.placeholder.constructor==String){var C=E.placeholder;E.placeholder={element:function(){var F=A(document.createElement(B.currentItem[0].nodeName)).addClass(C||B.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!C){F.style.visibility=
 "hidden";document.body.appendChild(F);F.innerHTML=B.currentItem[0].innerHTML.replace(/name\=\"[^\"\']+\"/g,"").replace(/jQuery[0-9]+\=\"[^\"\']+\"/g,"");document.body.removeChild(F)}return F},update:function(F,G){if(C&&!E.forcePlaceholderSize){return }if(!G.height()){G.height(B.currentItem.innerHeight()-parseInt(B.currentItem.css("paddingTop")||0,10)-parseInt(B.currentItem.css("paddingBottom")||0,10))}if(!G.width()){G.width(B.currentItem.innerWidth()-parseInt(B.currentItem.css("paddingLeft")||0,10)-parseInt(B.currentItem.css("paddingRight")||0,10))}}}}B.placeholder=A(E.placeholder.element.call(B.element,B.currentItem));B.currentItem.after(B.placeholder);E.placeholder.update(B,B.placeholder)},_contactContainers:function(D){for(var C=this.containers.length-1;C>=0;C--){if(this._intersectsWith(this.containers[C].containerCache)){if(!this.containers[C].containerCache.over){if(this.currentContainer!=this.containers[C]){var H=10000;var G=null;var E=this.positionAbs[this.containers[C].float
 ing?"left":"top"];for(var B=this.items.length-1;B>=0;B--){if(!A.ui.contains(this.containers[C].element[0],this.items[B].item[0])){continue}var F=this.items[B][this.containers[C].floating?"left":"top"];if(Math.abs(F-E)<H){H=Math.abs(F-E);G=this.items[B]}}if(!G&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[C];G?this.options.sortIndicator.call(this,D,G,null,true):this.options.sortIndicator.call(this,D,null,this.containers[C].element,true);this._propagate("change",D);this.containers[C]._propagate("change",D,this);this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[C]._propagate("over",D,this);this.containers[C].containerCache.over=1}}else{if(this.containers[C].containerCache.over){this.containers[C]._propagate("out",D,this);this.containers[C].containerCache.over=0}}}},_createHelper:function(C){var D=this.options;var B=A.isFunction(D.helper)?A(D.helper.apply(this.element[0],[C,this.currentItem])):(D.helper=="clone"?this.cur
 rentItem.clone():this.currentItem);if(!B.parents("body").length){A(D.appendTo!="parent"?D.appendTo:this.currentItem[0].parentNode)[0].appendChild(B[0])}if(B[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(B[0].style.width==""||D.forceHelperSize){B.width(this.currentItem.width())}if(B[0].style.height==""||D.forceHelperSize){B.height(this.currentItem.height())}return B},_adjustOffsetFromHelper:function(B){if(B.left!=undefined){this.offset.click.left=B.left+this.margins.left}if(B.right!=undefined){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if(B.top!=undefined){this.offset.click.top=B.top+this.margins.top}if(B.bottom!=undefined){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetP
 arent();var B=this.offsetParent.offset();if((this.offsetParent[0]==document.body&&A.browser.mozilla)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie)){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.currentItem.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var E=this.options;if(E.
 containment=="parent"){E.containment=this.helper[0].parentNode}if(E.containment=="document"||E.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(E.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.margins.left-(parseInt(this.currentItem.css("marginRight"),10)||0),(A(E.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.margins.top-(parseInt(this.currentItem.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(E.containment)){var C=A(E.containment)[0];var D=A(E.containment).offset();var B=(A(C).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.margins.left,D.top+(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-
 this.offset.parent.top-this.margins.top,D.left+(B?Math.max(C.scrollWidth,C.offsetWidth):C.offsetWidth)-(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.margins.left,D.top+(B?Math.max(C.scrollHeight,C.offsetHeight):C.offsetHeight)-(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.margins.top]}},_convertPositionTo:function(D,F){if(!F){F=this.position}var C=D=="absolute"?1:-1;var B=this[(this.cssPosition=="absolute"?"offset":"scroll")+"Parent"],E=(/(html|body)/i).test(B[0].tagName);return{top:(F.top+this.offset.relative.top*C+this.offset.parent.top*C+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(E?0:B.scrollTop()))*C+this.margins.top*C),left:(F.left+this.offset.relative.left*C+this.offset.parent.left*C+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():(E?0:B.scrollLeft()))*C+this.margins.left*C)}},_generatePosition:function(D){var G=this.options,C=this[(this.cssPosi
 tion=="absolute"?"offset":"scroll")+"Parent"],H=(/(html|body)/i).test(C[0].tagName);var B={top:(D.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(H?0:C.scrollTop()))),left:(D.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():(H?0:C.scrollLeft())))};if(!this.originalPosition){return B}if(this.containment){if(B.left<this.containment[0]){B.left=this.containment[0]}if(B.top<this.containment[1]){B.top=this.containment[1]}if(B.left+this.helperProportions.width>this.containment[2]){B.left=this.containment[2]-this.helperProportions.width}if(B.top+this.helperProportions.height>this.containment[3]){B.top=this.containment[3]-this.helperProportions.height}}if(G.grid){var F=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/G.grid[1])*G.grid[1];B.top=this.containment?(!(F<this.containment[1]||F>this.cont
 ainment[3])?F:(!(F<this.containment[1])?F-G.grid[1]:F+G.grid[1])):F;var E=this.originalPosition.left+Math.round((B.left-this.originalPosition.left)/G.grid[0])*G.grid[0];B.left=this.containment?(!(E<this.containment[0]||E>this.containment[2])?E:(!(E<this.containment[0])?E-G.grid[0]:E+G.grid[0])):E}return B},_rearrange:function(G,F,C,E){C?C[0].appendChild(this.placeholder[0]):F.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?F.item[0]:F.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var D=this,B=this.counter;window.setTimeout(function(){if(B==D.counter){D.refreshPositions(!E)}},0)},_clear:function(C,D){this.reverting=false;if(!this._noFinalSort){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var B in this._storedCSS){if(this._storedCSS[B]=="auto"||this._storedCSS[B]=="static"){this._storedCSS[B]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{thi
 s.currentItem.show()}if(this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0]){this._propagate("update",C,null,D)}if(!A.ui.contains(this.element[0],this.currentItem[0])){this._propagate("remove",C,null,D);for(var B=this.containers.length-1;B>=0;B--){if(A.ui.contains(this.containers[B].element[0],this.currentItem[0])){this.containers[B]._propagate("update",C,this,D);this.containers[B]._propagate("receive",C,this,D)}}}for(var B=this.containers.length-1;B>=0;B--){this.containers[B]._propagate("deactivate",C,this,D);if(this.containers[B].containerCache.over){this.containers[B]._propagate("out",C,this);this.containers[B].containerCache.over=0}}this.dragging=false;if(this.cancelHelperRemoval){this._propagate("beforeStop",C,null,D);this._propagate("stop",C,null,D);return false}this._propagate("beforeStop",C,null,D);this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.options.helper!="original")
 {this.helper.remove()}this.helper=null;this._propagate("stop",C,null,D);return true},_propagate:function(F,B,C,D){A.ui.plugin.call(this,F,[B,this._ui(C)]);var E=!D?this.element.triggerHandler(F=="sort"?F:"sort"+F,[B,this._ui(C)],this.options[F]):true;if(E===false){this.cancel()}},plugins:{},_ui:function(C){var B=C||this;return{helper:B.helper,placeholder:B.placeholder||A([]),position:B.position,absolutePosition:B.positionAbs,item:B.currentItem,sender:C?C.element:null}}}));A.extend(A.ui.sortable,{getter:"serialize toArray",version:"1.6",defaults:{accurateIntersection:true,appendTo:"parent",cancel:":input",delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,helper:"original",items:"> *",scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,sortIndicator:A.ui.sortable.prototype._rearrange,tolerance:"default",zIndex:1000}});A.ui.plugin.add("sortable","cursor",{start:function(D,E){var C=A("body"),B=A(this).data("sortable");if(C.css("cursor")){B.
 options._cursor=C.css("cursor")}C.css("cursor",B.options.cursor)},beforeStop:function(C,D){var B=A(this).data("sortable");if(B.options._cursor){A("body").css("cursor",B.options._cursor)}}});A.ui.plugin.add("sortable","opacity",{start:function(D,E){var C=E.helper,B=A(this).data("sortable");if(C.css("opacity")){B.options._opacity=C.css("opacity")}C.css("opacity",B.options.opacity)},beforeStop:function(C,D){var B=A(this).data("sortable");if(B.options._opacity){A(D.helper).css("opacity",B.options._opacity)}}});A.ui.plugin.add("sortable","scroll",{start:function(C,D){var B=A(this).data("sortable"),E=B.options;if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){B.overflowOffset=B.scrollParent.offset()}},sort:function(D,E){var C=A(this).data("sortable"),F=C.options,B=false;if(C.scrollParent[0]!=document&&C.scrollParent[0].tagName!="HTML"){if((C.overflowOffset.top+C.scrollParent[0].offsetHeight)-D.pageY<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scro
 llTop+F.scrollSpeed}else{if(D.pageY-C.overflowOffset.top<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop-F.scrollSpeed}}if((C.overflowOffset.left+C.scrollParent[0].offsetWidth)-D.pageX<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft+F.scrollSpeed}else{if(D.pageX-C.overflowOffset.left<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft-F.scrollSpeed}}}else{if(D.pageY-A(document).scrollTop()<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()-F.scrollSpeed)}else{if(A(window).height()-(D.pageY-A(document).scrollTop())<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()+F.scrollSpeed)}}if(D.pageX-A(document).scrollLeft()<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()-F.scrollSpeed)}else{if(A(window).width()-(D.pageX-A(document).scrollLeft())<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()+F.scrollSpeed)}}}if(B!==fal
 se&&A.ui.ddmanager&&!F.dropBehaviour){A.ui.ddmanager.prepareOffsets(C,D)}if(B!==false&&C.cssPosition=="absolute"&&C.scrollParent[0]!=document&&A.ui.contains(C.scrollParent[0],C.offsetParent[0])){C.offset.parent=C._getParentOffset()}if(B!==false&&C.cssPosition=="relative"&&!(C.scrollParent[0]!=document&&C.scrollParent[0]!=C.offsetParent[0])){C.offset.relative=C._getRelativeOffset()}}});A.ui.plugin.add("sortable","zIndex",{start:function(D,E){var C=E.helper,B=A(this).data("sortable");if(C.css("zIndex")){B.options._zIndex=C.css("zIndex")}C.css("zIndex",B.options.zIndex)},beforeStop:function(C,D){var B=A(this).data("sortable");if(B.options._zIndex){A(D.helper).css("zIndex",B.options._zIndex=="auto"?"":B.options._zIndex)}}})})(jQuery);/*
 * jQuery UI Accordion 1.6
 *
 * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Accordion
 *
 * Depends:
 *	ui.core.js
 *
 /
(function(E){E.widget("ui.accordion",{_init:function(){var H=this.options;if(H.navigation){var K=this.element.find("a").filter(H.navigationFilter);if(K.length){if(K.filter(H.header).length){H.active=K}else{H.active=K.parent().parent().prev();K.addClass("current")}}}H.headers=this.element.find(H.header);H.active=C(H.headers,H.active);if(E.browser.msie){this.element.find("a").css("zoom","1")}if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");E('<span class="ui-accordion-left"></span>').insertBefore(H.headers);E('<span class="ui-accordion-right"></span>').appendTo(H.headers);H.headers.addClass("ui-accordion-header")}var J;if(H.fillSpace){J=this.element.parent().height();H.headers.each(function(){J-=E(this).outerHeight()});var I=0;H.headers.next().each(function(){I=Math.max(I,E(this).innerHeight()-E(this).height())}).height(J-I)}else{if(H.autoHeight){J=0;H.headers.next().each(function(){J=Math.max(J,E(this).outerHeight())}).height(J)}}this.element.attr("r
 ole","tablist");var G=this;H.headers.attr("role","tab").bind("keydown",function(L){return G._keydown(L)}).next().attr("role","tabpanel");H.headers.not(H.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!H.active.length){H.headers.eq(0).attr("tabIndex","0")}else{H.active.attr("aria-expanded","true").attr("tabIndex","0").parent().andSelf().addClass(H.selectedClass)}if(!E.browser.safari){H.headers.find("a").attr("tabIndex","-1")}if(H.event){this.element.bind((H.event)+".accordion",F)}},destroy:function(){this.options.headers.parent().andSelf().removeClass(this.options.selectedClass);this.options.headers.prev(".ui-accordion-left").remove();this.options.headers.children(".ui-accordion-right").remove();this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","")}E.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")},_keydown:fu
 nction(J){if(this.options.disabled||J.altKey||J.ctrlKey){return }var K=E.ui.keyCode;var I=this.options.headers.length;var G=this.options.headers.index(J.target);var H=false;switch(J.keyCode){case K.RIGHT:case K.DOWN:H=this.options.headers[(G+1)%I];break;case K.LEFT:case K.UP:H=this.options.headers[(G-1+I)%I];break;case K.SPACE:case K.ENTER:return F.call(this.element[0],{target:J.target})}if(H){E(J.target).attr("tabIndex","-1");E(H).attr("tabIndex","0");H.focus();return false}return true},activate:function(G){F.call(this.element[0],{target:C(this.options.headers,G)[0]})}});function B(H,G){return function(){return H.apply(G,arguments)}}function D(I){if(!E.data(this,"accordion")){return }var G=E.data(this,"accordion");var H=G.options;H.running=I?0:--H.running;if(H.running){return }if(H.clearStyle){H.toShow.add(H.toHide).css({height:"",overflow:""})}G._trigger("change",null,H.data)}function A(G,N,K,L,O){var Q=E.data(this,"accordion").options;Q.toShow=G;Q.toHide=N;Q.data=K;var H=B(D,this
 );E.data(this,"accordion")._trigger("changestart",null,Q.data);Q.running=N.size()===0?G.size():N.size();if(Q.animated){var J={};if(!Q.alwaysOpen&&L){J={toShow:E([]),toHide:N,complete:H,down:O,autoHeight:Q.autoHeight}}else{J={toShow:G,toHide:N,complete:H,down:O,autoHeight:Q.autoHeight}}if(!Q.proxied){Q.proxied=Q.animated}if(!Q.proxiedDuration){Q.proxiedDuration=Q.duration}Q.animated=E.isFunction(Q.proxied)?Q.proxied(J):Q.proxied;Q.duration=E.isFunction(Q.proxiedDuration)?Q.proxiedDuration(J):Q.proxiedDuration;var P=E.ui.accordion.animations,I=Q.duration,M=Q.animated;if(!P[M]){P[M]=function(R){this.slide(R,{easing:M,duration:I||700})}}P[M](J)}else{if(!Q.alwaysOpen&&L){G.toggle()}else{N.hide();G.show()}H(true)}N.prev().attr("aria-expanded","false").attr("tabIndex","-1");G.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()}function F(L){var J=E.data(this,"accordion").options;if(J.disabled){return false}if(!L.target&&!J.alwaysOpen){J.active.parent().andSelf().toggleClass(J.
 selectedClass);var I=J.active.next(),M={options:J,newHeader:E([]),oldHeader:J.active,newContent:E([]),oldContent:I},G=(J.active=E([]));A.call(this,G,I,M);return false}var K=E(L.target);K=E(K.parents(J.header)[0]||K);var H=K[0]==J.active[0];if(J.running||(J.alwaysOpen&&H)){return false}if(!K.is(J.header)){return }J.active.parent().andSelf().toggleClass(J.selectedClass);if(!H){K.parent().andSelf().addClass(J.selectedClass)}var G=K.next(),I=J.active.next(),M={options:J,newHeader:H&&!J.alwaysOpen?E([]):K,oldHeader:J.active,newContent:H&&!J.alwaysOpen?E([]):G,oldContent:I},N=J.headers.index(J.active[0])>J.headers.index(K[0]);J.active=H?E([]):K;A.call(this,G,I,M,H,N);return false}function C(H,G){return G?typeof G=="number"?H.filter(":eq("+G+")"):H.not(H.not(G)):G===false?E([]):H.filter(":eq(0)")}E.extend(E.ui.accordion,{version:"1.6",defaults:{autoHeight:true,alwaysOpen:true,animated:"slide",event:"click",header:"a",navigationFilter:function(){return this.href.toLowerCase()==location.href
 .toLowerCase()},running:0,selectedClass:"selected"},animations:{slide:function(G,J){G=E.extend({easing:"swing",duration:300},G,J);if(!G.toHide.size()){G.toShow.animate({height:"show"},G);return }var I=G.toHide.height(),L=G.toShow.height(),N=L/I,K=G.toShow.outerHeight()-G.toShow.height(),H=G.toShow.css("marginBottom"),M=G.toShow.css("overflow");tmargin=G.toShow.css("marginTop");G.toShow.css({height:0,overflow:"hidden",marginTop:0,marginBottom:-K}).show();G.toHide.filter(":hidden").each(G.complete).end().filter(":visible").animate({height:"hide"},{step:function(O){var P=(I-O)*N;if(E.browser.msie||E.browser.opera){P=Math.ceil(P)}G.toShow.height(P)},duration:G.duration,easing:G.easing,complete:function(){if(!G.autoHeight){G.toShow.css("height","auto")}G.toShow.css({marginTop:tmargin,marginBottom:H,overflow:M});G.complete()}})},bounceslide:function(G){this.slide(G,{easing:G.down?"easeOutBounce":"swing",duration:G.down?1000:200})},easeslide:function(G){this.slide(G,{easing:"easeinout",dur
 ation:700})}}})})(jQuery);/*
 * jQuery UI Dialog 1.6
 *
 * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Dialog
 *
 * Depends:
 *	ui.core.js
 *	ui.draggable.js
 *	ui.resizable.js
 */
(function(B){var A={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"};B.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;var M=this,N=this.options,F=this.element.removeAttr("title").addClass("ui-dialog-content").wrap("<div></div>").wrap("<div></div>"),I=(this.uiDialogContainer=F.parent()).addClass("ui-dialog-container").css({position:"relative",width:"1
 00%",height:"100%"}),E=(this.uiDialogTitlebar=B("<div></div>")).addClass("ui-dialog-titlebar").mousedown(function(){M.moveToTop()}).prependTo(I),J=B('<a href="#"/>').addClass("ui-dialog-titlebar-close").attr("role","button").appendTo(E),G=(this.uiDialogTitlebarCloseText=B("<span/>")).text(N.closeText).appendTo(J),L=N.title||"&nbsp;",D=B.ui.dialog.getTitleId(this.element),C=B("<span/>").addClass("ui-dialog-title").attr("id",D).html(L).prependTo(E),K=(this.uiDialog=I.parent()).appendTo(document.body).hide().addClass("ui-dialog").addClass(N.dialogClass).css({position:"absolute",width:N.width,height:N.height,overflow:"hidden",zIndex:N.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(O){(N.closeOnEscape&&O.keyCode&&O.keyCode==B.ui.keyCode.ESCAPE&&M.close())}).attr({role:"dialog","aria-labelledby":D}).mouseup(function(){M.moveToTop()}),H=(this.uiDialogButtonPane=B("<div></div>")).addClass("ui-dialog-buttonpane").css({position:"absolute",bottom:0}).appendTo(K),J=B(".ui-dialog
 -titlebar-close",E).hover(function(){B(this).addClass("ui-dialog-titlebar-close-hover")},function(){B(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(O){O.stopPropagation()}).click(function(){M.close();return false});E.find("*").add(E).disableSelection();(N.draggable&&B.fn.draggable&&this._makeDraggable());(N.resizable&&B.fn.resizable&&this._makeResizable());this._createButtons(N.buttons);this._isOpen=false;(N.bgiframe&&B.fn.bgiframe&&K.bgiframe());(N.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(){if(false===this._trigger("beforeclose",null,{options:this.options})){return }(this.overlay&&this.overlay.destroy());this.uiDialog.hide(this.options.hide).unbind("keypress.ui-dialog");this._trigge
 r("close",null,{options:this.options});B.ui.dialog.overlay.resize();this._isOpen=false},isO

<TRUNCATED>

[19/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_arrows_leftright.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_arrows_leftright.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_arrows_leftright.gif
new file mode 100644
index 0000000..b26780a
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_arrows_leftright.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_arrows_updown.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_arrows_updown.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_arrows_updown.gif
new file mode 100644
index 0000000..69eb077
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_arrows_updown.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_doc.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_doc.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_doc.gif
new file mode 100644
index 0000000..26db434
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_doc.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_minus.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_minus.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_minus.gif
new file mode 100644
index 0000000..6851f39
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_minus.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_plus.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_plus.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_plus.gif
new file mode 100644
index 0000000..74ac5cb
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_plus.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_resize_se.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_resize_se.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_resize_se.gif
new file mode 100644
index 0000000..251dc16
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_11x11_icon_resize_se.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_down.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_down.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_down.gif
new file mode 100644
index 0000000..29c6c70
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_down.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_left.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_left.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_left.gif
new file mode 100644
index 0000000..9f95efa
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_left.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_right.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_right.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_right.gif
new file mode 100644
index 0000000..bc02050
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_right.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_up.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_up.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_up.gif
new file mode 100644
index 0000000..28169eb
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/222222_7x7_arrow_up.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_arrows_leftright.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_arrows_leftright.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_arrows_leftright.gif
new file mode 100644
index 0000000..136e626
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_arrows_leftright.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_arrows_updown.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_arrows_updown.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_arrows_updown.gif
new file mode 100644
index 0000000..4f00635
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_arrows_updown.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_close.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_close.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_close.gif
new file mode 100644
index 0000000..390a759
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_close.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_doc.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_doc.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_doc.gif
new file mode 100644
index 0000000..e91c733
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_doc.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_folder_closed.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_folder_closed.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_folder_closed.gif
new file mode 100644
index 0000000..85f0e0b
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_folder_closed.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_folder_open.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_folder_open.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_folder_open.gif
new file mode 100644
index 0000000..f6414c7
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_folder_open.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_minus.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_minus.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_minus.gif
new file mode 100644
index 0000000..25b3e17
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_minus.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_plus.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_plus.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_plus.gif
new file mode 100644
index 0000000..41d9534
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_11x11_icon_plus.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_down.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_down.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_down.gif
new file mode 100644
index 0000000..92fdfe0
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_down.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_left.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_left.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_left.gif
new file mode 100644
index 0000000..cf01ff3
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_left.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_right.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_right.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_right.gif
new file mode 100644
index 0000000..3190e7a
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_right.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_up.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_up.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_up.gif
new file mode 100644
index 0000000..7ae34bf
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/454545_7x7_arrow_up.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_arrows_leftright.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_arrows_leftright.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_arrows_leftright.gif
new file mode 100644
index 0000000..19f9d6b
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_arrows_leftright.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_arrows_updown.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_arrows_updown.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_arrows_updown.gif
new file mode 100644
index 0000000..c10451f
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_arrows_updown.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_close.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_close.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_close.gif
new file mode 100644
index 0000000..326d015
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_close.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_doc.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_doc.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_doc.gif
new file mode 100644
index 0000000..7d1b5cb
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_doc.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_folder_closed.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_folder_closed.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_folder_closed.gif
new file mode 100644
index 0000000..71bff05
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_folder_closed.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_folder_open.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_folder_open.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_folder_open.gif
new file mode 100644
index 0000000..33a20b8
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_folder_open.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_minus.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_minus.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_minus.gif
new file mode 100644
index 0000000..777c328
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_minus.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_plus.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_plus.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_plus.gif
new file mode 100644
index 0000000..43531ff
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_11x11_icon_plus.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_down.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_down.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_down.gif
new file mode 100644
index 0000000..c91731d
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_down.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_left.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_left.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_left.gif
new file mode 100644
index 0000000..d6c523b
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_left.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_right.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_right.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_right.gif
new file mode 100644
index 0000000..d65b2ed
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_right.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_up.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_up.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_up.gif
new file mode 100644
index 0000000..165666a
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/888888_7x7_arrow_up.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/dadada_40x100_textures_02_glass_75.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/dadada_40x100_textures_02_glass_75.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/dadada_40x100_textures_02_glass_75.png
new file mode 100644
index 0000000..60ba001
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/dadada_40x100_textures_02_glass_75.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/e6e6e6_40x100_textures_02_glass_75.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/e6e6e6_40x100_textures_02_glass_75.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/e6e6e6_40x100_textures_02_glass_75.png
new file mode 100644
index 0000000..a8b7ba3
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/e6e6e6_40x100_textures_02_glass_75.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/ffffff_40x100_textures_01_flat_75.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/ffffff_40x100_textures_01_flat_75.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/ffffff_40x100_textures_01_flat_75.png
new file mode 100644
index 0000000..ac8b229
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/ffffff_40x100_textures_01_flat_75.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/ffffff_40x100_textures_02_glass_65.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/ffffff_40x100_textures_02_glass_65.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/ffffff_40x100_textures_02_glass_65.png
new file mode 100644
index 0000000..2c16183
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/images/ffffff_40x100_textures_02_glass_65.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/jquery-1.2.6.min.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/jquery-1.2.6.min.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/jquery-1.2.6.min.js
new file mode 100644
index 0000000..82b98e1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/dialog/js/jqueryui/tabs/jquery-1.2.6.min.js
@@ -0,0 +1,32 @@
+/*
+ * jQuery 1.2.6 - New Wave Javascript
+ *
+ * Copyright (c) 2008 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
+ * $Rev: 5685 $
+ */
+(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else
+return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:functio
 n(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.
 domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
+return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
+selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}retu
 rn values;}else
+return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
+this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
+return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script
 "});else
+jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&&copy&&typeof copy=="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQ
 uery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
+script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break
 ;}else
+for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else
+for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback
 .call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
+jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i
 ]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem=="
 string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?
 div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
+ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&&notxml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha
 \([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else
+while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else
+while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.exte
 nd({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,f
 n);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.pa
 rentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseI
 nt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a
 .firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textar
 ea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(node
 Name=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.m
 sie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t)
 ;if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstC
 hild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem
 =window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||
 elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
+for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(eve
 nt){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handle
 rs){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalE
 vent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||
 this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({
 bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this
 .bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
+jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){
 var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(
 typeof url!='string')return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));})
 .map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.
 href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+
 jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="c
 omplete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else
+xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var mo
 dRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
+jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},
 httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
+for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
+s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",op
 acity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(thi
 s);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
+e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,f
 n){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.dis
 play="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hi
 de:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")]
 (this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documen
 tElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(ele
 m){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuer
 y.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();
\ No newline at end of file


[12/52] [partial] forking carbon ui bundle in to stratos code base and removing license incompatible JS and packing the new module to carbon runtime, through dropins

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/elements_functions.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/elements_functions.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/elements_functions.js
new file mode 100644
index 0000000..5a0c92d
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/elements_functions.js
@@ -0,0 +1,336 @@
+/****
+ * This page contains some general usefull functions for javascript
+ *
+ ****/  
+	
+	
+	// need to redefine this functiondue to IE problem
+	function getAttribute( elm, aName ) {
+		var aValue,taName,i;
+		try{
+			aValue = elm.getAttribute( aName );
+		}catch(exept){}
+		
+		if( ! aValue ){
+			for( i = 0; i < elm.attributes.length; i ++ ) {
+				taName = elm.attributes[i] .name.toLowerCase();
+				if( taName == aName ) {
+					aValue = elm.attributes[i] .value;
+					return aValue;
+				}
+			}
+		}
+		return aValue;
+	};
+	
+	// need to redefine this function due to IE problem
+	function setAttribute( elm, attr, val ) {
+		if(attr=="class"){
+			elm.setAttribute("className", val);
+			elm.setAttribute("class", val);
+		}else{
+			elm.setAttribute(attr, val);
+		}
+	};
+	
+	/* return a child element
+		elem: element we are searching in
+		elem_type: type of the eleemnt we are searching (DIV, A, etc...)
+		elem_attribute: attribute of the searched element that must match
+		elem_attribute_match: value that elem_attribute must match
+		option: "all" if must return an array of all children, otherwise return the first match element
+		depth: depth of search (-1 or no set => unlimited)
+	*/
+	function getChildren(elem, elem_type, elem_attribute, elem_attribute_match, option, depth)
+	{           
+		if(!option)
+			var option="single";
+		if(!depth)
+			var depth=-1;
+		if(elem){
+			var children= elem.childNodes;
+			var result=null;
+			var results= [];
+			for (var x=0;x<children.length;x++) {
+				strTagName = new String(children[x].tagName);
+				children_class="?";
+				if(strTagName!= "undefined"){
+					child_attribute= getAttribute(children[x],elem_attribute);
+					if((strTagName.toLowerCase()==elem_type.toLowerCase() || elem_type=="") && (elem_attribute=="" || child_attribute==elem_attribute_match)){
+						if(option=="all"){
+							results.push(children[x]);
+						}else{
+							return children[x];
+						}
+					}
+					if(depth!=0){
+						result=getChildren(children[x], elem_type, elem_attribute, elem_attribute_match, option, depth-1);
+						if(option=="all"){
+							if(result.length>0){
+								results= results.concat(result);
+							}
+						}else if(result!=null){                                                                          
+							return result;
+						}
+					}
+				}
+			}
+			if(option=="all")
+			   return results;
+		}
+		return null;
+	};       
+	
+	function isChildOf(elem, parent){
+		if(elem){
+			if(elem==parent)
+				return true;
+			while(elem.parentNode != 'undefined'){
+				return isChildOf(elem.parentNode, parent);
+			}
+		}
+		return false;
+	};
+	
+	function getMouseX(e){
+
+		if(e!=null && typeof(e.pageX)!="undefined"){
+			return e.pageX;
+		}else{
+			return (e!=null?e.x:event.x)+ document.documentElement.scrollLeft;
+		}
+	};
+	
+	function getMouseY(e){
+		if(e!=null && typeof(e.pageY)!="undefined"){
+			return e.pageY;
+		}else{
+			return (e!=null?e.y:event.y)+ document.documentElement.scrollTop;
+		}
+	};
+	
+	function calculeOffsetLeft(r){
+		return calculeOffset(r,"offsetLeft")
+	};
+	
+	function calculeOffsetTop(r){
+		return calculeOffset(r,"offsetTop")
+	};
+	
+	function calculeOffset(element,attr){
+		var offset=0;
+		while(element){
+			offset+=element[attr];
+			element=element.offsetParent
+		}
+		return offset;
+	};
+	
+	/** return the computed style
+	 *	@param: elem: the reference to the element
+	 *	@param: prop: the name of the css property	 
+	 */
+	function get_css_property(elem, prop)
+	{
+		if(document.defaultView)
+		{
+			return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop);
+		}
+		else if(elem.currentStyle)
+		{
+			var prop = prop.replace(/-\D/gi, function(sMatch)
+			{
+				return sMatch.charAt(sMatch.length - 1).toUpperCase();
+			});
+			return elem.currentStyle[prop];
+		}
+		else return null;
+	}
+	
+/****
+ * Moving an element 
+ ***/  
+	
+	var _mCE;	// currently moving element
+	
+	/* allow to move an element in a window
+		e: the event
+		id: the id of the element
+		frame: the frame of the element 
+		ex of use:
+			in html:	<img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,"area_search_replace", parent.frames["this_frame_id"]);' .../>  
+		or
+			in javascript: document.getElementById("my_div").onmousedown= start_move_element
+	*/
+	function start_move_element(e, id, frame){
+		var elem_id=(e.target || e.srcElement).id;
+		if(id)
+			elem_id=id;		
+		if(!frame)
+			frame=window;
+		if(frame.event)
+			e=frame.event;
+			
+		_mCE= frame.document.getElementById(elem_id);
+		_mCE.frame=frame;
+		frame.document.onmousemove= move_element;
+		frame.document.onmouseup= end_move_element;
+		/*_mCE.onmousemove= move_element;
+		_mCE.onmouseup= end_move_element;*/
+		
+		//alert(_mCE.frame.document.body.offsetHeight);
+		
+		mouse_x= getMouseX(e);
+		mouse_y= getMouseY(e);
+		//window.status=frame+ " elem: "+elem_id+" elem: "+ _mCE + " mouse_x: "+mouse_x;
+		_mCE.start_pos_x = mouse_x - (_mCE.style.left.replace("px","") || calculeOffsetLeft(_mCE));
+		_mCE.start_pos_y = mouse_y - (_mCE.style.top.replace("px","") || calculeOffsetTop(_mCE));
+		return false;
+	};
+	
+	function end_move_element(e){
+		_mCE.frame.document.onmousemove= "";
+		_mCE.frame.document.onmouseup= "";		
+		_mCE=null;
+	};
+	
+	function move_element(e){
+		var newTop,newLeft,maxLeft;
+
+		if( _mCE.frame && _mCE.frame.event )
+			e=_mCE.frame.event;
+		newTop	= getMouseY(e) - _mCE.start_pos_y;
+		newLeft	= getMouseX(e) - _mCE.start_pos_x;
+		
+		maxLeft	= _mCE.frame.document.body.offsetWidth- _mCE.offsetWidth;
+		max_top	= _mCE.frame.document.body.offsetHeight- _mCE.offsetHeight;
+		newTop	= Math.min(Math.max(0, newTop), max_top);
+		newLeft	= Math.min(Math.max(0, newLeft), maxLeft);
+		
+		_mCE.style.top	= newTop+"px";
+		_mCE.style.left	= newLeft+"px";		
+		return false;
+	};
+	
+/***
+ * Managing a textarea (this part need the navigator infos from editAreaLoader
+ ***/ 
+	
+	var nav= editAreaLoader.nav;
+	
+	// allow to get infos on the selection: array(start, end)
+	function getSelectionRange(textarea){
+		return {"start": textarea.selectionStart, "end": textarea.selectionEnd};
+	};
+	
+	// allow to set the selection
+	function setSelectionRange(t, start, end){
+		t.focus();
+		
+		start	= Math.max(0, Math.min(t.value.length, start));
+		end		= Math.max(start, Math.min(t.value.length, end));
+	
+		if( nav.isOpera && nav.isOpera < 9.6 ){	// Opera bug when moving selection start and selection end
+			t.selectionEnd = 1;	
+			t.selectionStart = 0;			
+			t.selectionEnd = 1;	
+			t.selectionStart = 0;		
+		}
+		t.selectionStart	= start;
+		t.selectionEnd		= end;		
+		//textarea.setSelectionRange(start, end);
+		
+		if(nav.isIE)
+			set_IE_selection(t);
+	};
+
+	
+	// set IE position in Firefox mode (textarea.selectionStart and textarea.selectionEnd). should work as a repeated task
+	function get_IE_selection(t){
+		var d=document,div,range,stored_range,elem,scrollTop,relative_top,line_start,line_nb,range_start,range_end,tab;
+		if(t && t.focused)
+		{	
+			if(!t.ea_line_height)
+			{	// calculate the lineHeight
+				div= d.createElement("div");
+				div.style.fontFamily= get_css_property(t, "font-family");
+				div.style.fontSize= get_css_property(t, "font-size");
+				div.style.visibility= "hidden";			
+				div.innerHTML="0";
+				d.body.appendChild(div);
+				t.ea_line_height= div.offsetHeight;
+				d.body.removeChild(div);
+			}
+			//t.focus();
+			range = d.selection.createRange();
+			try
+			{
+				stored_range = range.duplicate();
+				stored_range.moveToElementText( t );
+				stored_range.setEndPoint( 'EndToEnd', range );
+				if(stored_range.parentElement() == t){
+					// the range don't take care of empty lines in the end of the selection
+					elem		= t;
+					scrollTop	= 0;
+					while(elem.parentNode){
+						scrollTop+= elem.scrollTop;
+						elem	= elem.parentNode;
+					}
+				
+				//	var scrollTop= t.scrollTop + document.body.scrollTop;
+					
+				//	var relative_top= range.offsetTop - calculeOffsetTop(t) + scrollTop;
+					relative_top= range.offsetTop - calculeOffsetTop(t)+ scrollTop;
+				//	alert("rangeoffset: "+ range.offsetTop +"\ncalcoffsetTop: "+ calculeOffsetTop(t) +"\nrelativeTop: "+ relative_top);
+					line_start	= Math.round((relative_top / t.ea_line_height) +1);
+					
+					line_nb		= Math.round(range.boundingHeight / t.ea_line_height);
+					
+					range_start	= stored_range.text.length - range.text.length;
+					tab	= t.value.substr(0, range_start).split("\n");			
+					range_start	+= (line_start - tab.length)*2;		// add missing empty lines to the selection
+					t.selectionStart = range_start;
+					
+					range_end	= t.selectionStart + range.text.length;
+					tab	= t.value.substr(0, range_start + range.text.length).split("\n");			
+					range_end	+= (line_start + line_nb - 1 - tab.length)*2;
+					t.selectionEnd = range_end;
+				}
+			}
+			catch(e){}
+		}
+		if( t && t.id )
+		{
+			setTimeout("get_IE_selection(document.getElementById('"+ t.id +"'));", 50);
+		}
+	};
+	
+	function IE_textarea_focus(){
+		event.srcElement.focused= true;
+	}
+	
+	function IE_textarea_blur(){
+		event.srcElement.focused= false;
+	}
+	
+	// select the text for IE (take into account the \r difference)
+	function set_IE_selection( t ){
+		var nbLineStart,nbLineStart,nbLineEnd,range;
+		if(!window.closed){ 
+			nbLineStart=t.value.substr(0, t.selectionStart).split("\n").length - 1;
+			nbLineEnd=t.value.substr(0, t.selectionEnd).split("\n").length - 1;
+			try
+			{
+				range = document.selection.createRange();
+				range.moveToElementText( t );
+				range.setEndPoint( 'EndToStart', range );
+				range.moveStart('character', t.selectionStart - nbLineStart);
+				range.moveEnd('character', t.selectionEnd - nbLineEnd - (t.selectionStart - nbLineStart)  );
+				range.select();
+			}
+			catch(e){}
+		}
+	};
+	
+	
+	editAreaLoader.waiting_loading["elements_functions.js"]= "loaded";

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/highlight.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/highlight.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/highlight.js
new file mode 100644
index 0000000..d0ec749
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/highlight.js
@@ -0,0 +1,407 @@
+	// change_to: "on" or "off"
+	EditArea.prototype.change_highlight= function(change_to){
+		if(this.settings["syntax"].length==0 && change_to==false){
+			this.switchClassSticky(_$("highlight"), 'editAreaButtonDisabled', true);
+			this.switchClassSticky(_$("reset_highlight"), 'editAreaButtonDisabled', true);
+			return false;
+		}
+		
+		if(this.do_highlight==change_to)
+			return false;
+	
+			
+		this.getIESelection();
+		var pos_start= this.textarea.selectionStart;
+		var pos_end= this.textarea.selectionEnd;
+		
+		if(this.do_highlight===true || change_to==false)
+			this.disable_highlight();
+		else
+			this.enable_highlight();
+		this.textarea.focus();
+		this.textarea.selectionStart = pos_start;
+		this.textarea.selectionEnd = pos_end;
+		this.setIESelection();
+				
+	};
+	
+	EditArea.prototype.disable_highlight= function(displayOnly){
+		var t= this, a=t.textarea, new_Obj, old_class, new_class;
+			
+		t.selection_field.innerHTML="";
+		t.selection_field_text.innerHTML="";
+		t.content_highlight.style.visibility="hidden";
+		// replacing the node is far more faster than deleting it's content in firefox
+		new_Obj= t.content_highlight.cloneNode(false);
+		new_Obj.innerHTML= "";			
+		t.content_highlight.parentNode.insertBefore(new_Obj, t.content_highlight);
+		t.content_highlight.parentNode.removeChild(t.content_highlight);	
+		t.content_highlight= new_Obj;
+		old_class= parent.getAttribute( a,"class" );
+		if(old_class){
+			new_class= old_class.replace( "hidden","" );
+			parent.setAttribute( a, "class", new_class );
+		}
+	
+		a.style.backgroundColor="transparent";	// needed in order to see the bracket finders
+		
+		//var icon= document.getElementById("highlight");
+		//setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );
+		//t.restoreClass(icon);
+		//t.switchClass(icon,'editAreaButtonNormal');
+		t.switchClassSticky(_$("highlight"), 'editAreaButtonNormal', true);
+		t.switchClassSticky(_$("reset_highlight"), 'editAreaButtonDisabled', true);
+	
+		t.do_highlight=false;
+	
+		t.switchClassSticky(_$("change_smooth_selection"), 'editAreaButtonSelected', true);
+		if(typeof(t.smooth_selection_before_highlight)!="undefined" && t.smooth_selection_before_highlight===false){
+			t.change_smooth_selection_mode(false);
+		}
+		
+	//	this.textarea.style.backgroundColor="#FFFFFF";
+	};
+
+	EditArea.prototype.enable_highlight= function(){
+		var t=this, a=t.textarea, new_class;
+		t.show_waiting_screen();
+			
+		t.content_highlight.style.visibility="visible";
+		new_class	=parent.getAttribute(a,"class")+" hidden";
+		parent.setAttribute( a, "class", new_class );
+		
+		// IE can't manage mouse click outside text range without this
+		if( t.isIE )
+			a.style.backgroundColor="#FFFFFF";	
+
+		t.switchClassSticky(_$("highlight"), 'editAreaButtonSelected', false);
+		t.switchClassSticky(_$("reset_highlight"), 'editAreaButtonNormal', false);
+		
+		t.smooth_selection_before_highlight=t.smooth_selection;
+		if(!t.smooth_selection)
+			t.change_smooth_selection_mode(true);
+		t.switchClassSticky(_$("change_smooth_selection"), 'editAreaButtonDisabled', true);
+		
+		
+		t.do_highlight=true;
+		t.resync_highlight();
+					
+		t.hide_waiting_screen();	
+	};
+	
+	/**
+	 * Ask to update highlighted text
+	 * @param Array infos - Array of datas returned by EditArea.get_selection_infos()
+	 */
+	EditArea.prototype.maj_highlight= function(infos){
+		// for speed mesure
+		var debug_opti="",tps_start= new Date().getTime(), tps_middle_opti=new Date().getTime();
+		var t=this, hightlighted_text, updated_highlight;	
+		var textToHighlight=infos["full_text"], doSyntaxOpti = false, doHtmlOpti = false, stay_begin="", stay_end="", trace_new , trace_last;
+		
+		if(t.last_text_to_highlight==infos["full_text"] && t.resync_highlight!==true)
+			return;
+					
+		//  OPTIMISATION: will search to update only changed lines
+		if(t.reload_highlight===true){
+			t.reload_highlight=false;
+		}else if(textToHighlight.length==0){
+			textToHighlight="\n ";
+		}else{
+			// get text change datas
+			changes = t.checkTextEvolution(t.last_text_to_highlight,textToHighlight);
+			
+			// check if it can only reparse the changed text
+			trace_new		= t.get_syntax_trace(changes.newTextLine).replace(/\r/g, '');
+			trace_last		= t.get_syntax_trace(changes.lastTextLine).replace(/\r/g, '');
+			doSyntaxOpti	= ( trace_new == trace_last );
+			
+			// check if the difference comes only from a new line created 
+			// => we have to remember that the editor can automaticaly add tabulation or space after the new line) 
+			if( !doSyntaxOpti && trace_new == "\n"+trace_last && /^[ \t\s]*\n[ \t\s]*$/.test( changes.newText.replace(/\r/g, '') ) && changes.lastText =="" )
+			{
+				doSyntaxOpti	= true;
+			}
+			
+			// we do the syntax optimisation
+			if( doSyntaxOpti ){
+						
+				tps_middle_opti=new Date().getTime();	
+			
+				stay_begin= t.last_hightlighted_text.split("\n").slice(0, changes.lineStart).join("\n");
+				if(changes.lineStart>0)
+					stay_begin+= "\n";
+				stay_end= t.last_hightlighted_text.split("\n").slice(changes.lineLastEnd+1).join("\n");
+				if(stay_end.length>0)
+					stay_end= "\n"+stay_end;
+					
+				// Final check to see that we're not in the middle of span tags
+				if( stay_begin.split('<span').length != stay_begin.split('</span').length 
+					|| stay_end.split('<span').length != stay_end.split('</span').length )
+				{
+					doSyntaxOpti	= false;
+					stay_end		= '';
+					stay_begin		= '';
+				}
+				else
+				{
+					if(stay_begin.length==0 && changes.posLastEnd==-1)
+						changes.newTextLine+="\n";
+					textToHighlight=changes.newTextLine;
+				}
+			}
+			if(t.settings["debug"]){
+				var ch =changes;
+				debug_opti= ( doSyntaxOpti?"Optimisation": "No optimisation" )
+					+" start: "+ch.posStart +"("+ch.lineStart+")"
+					+" end_new: "+ ch.posNewEnd+"("+ch.lineNewEnd+")"
+					+" end_last: "+ ch.posLastEnd+"("+ch.lineLastEnd+")"
+					+"\nchanged_text: "+ch.newText+" => trace: "+trace_new
+					+"\nchanged_last_text: "+ch.lastText+" => trace: "+trace_last
+					//debug_opti+= "\nchanged: "+ infos["full_text"].substring(ch.posStart, ch.posNewEnd);
+					+ "\nchanged_line: "+ch.newTextLine
+					+ "\nlast_changed_line: "+ch.lastTextLine
+					+"\nstay_begin: "+ stay_begin.slice(-100)
+					+"\nstay_end: "+ stay_end.substr( 0, 100 );
+					//debug_opti="start: "+stay_begin_len+ "("+nb_line_start_unchanged+") end: "+ (stay_end_len)+ "("+(splited.length-nb_line_end_unchanged)+") ";
+					//debug_opti+="changed: "+ textToHighlight.substring(stay_begin_len, textToHighlight.length-stay_end_len)+" \n";
+					
+					//debug_opti+="changed: "+ stay_begin.substr(stay_begin.length-200)+ "----------"+ textToHighlight+"------------------"+ stay_end.substr(0,200) +"\n";
+					+"\n";
+			}
+	
+			
+			// END OPTIMISATION
+		}
+
+		tps_end_opti	= new Date().getTime();	
+				
+		// apply highlight
+		updated_highlight	= t.colorize_text(textToHighlight);
+		tpsAfterReg			= new Date().getTime();
+		
+		/***
+		 * see if we can optimize for updating only the required part of the HTML code
+		 * 
+		 * The goal here will be to find the text node concerned by the modification and to update it
+		 */
+		//-------------------------------------------
+		
+		// disable latest optimization tricks (introduced in 0.8.1 and removed in 0.8.2), TODO: check for another try later
+		doSyntaxOpti	= doHtmlOpti = false;
+		if( doSyntaxOpti )
+		{
+			try
+			{
+				var replacedBloc, i, nbStart = '', nbEnd = '', newHtml, lengthOld, lengthNew;
+				replacedBloc		= t.last_hightlighted_text.substring( stay_begin.length, t.last_hightlighted_text.length - stay_end.length );
+				
+				lengthOld	= replacedBloc.length;
+				lengthNew	= updated_highlight.length;
+				
+				// find the identical caracters at the beginning
+				for( i=0; i < lengthOld && i < lengthNew && replacedBloc.charAt(i) == updated_highlight.charAt(i) ; i++ )
+				{
+				}
+				nbStart = i;
+				// find the identical caracters at the end
+				for( i=0; i + nbStart < lengthOld && i + nbStart < lengthNew && replacedBloc.charAt(lengthOld-i-1) == updated_highlight.charAt(lengthNew-i-1) ; i++ )
+				{
+				}
+				nbEnd	= i;
+				//console.log( nbStart, nbEnd, replacedBloc, updated_highlight );
+				// get the changes
+				lastHtml	= replacedBloc.substring( nbStart, lengthOld - nbEnd );
+				newHtml		= updated_highlight.substring( nbStart, lengthNew - nbEnd );
+				
+				// We can do the optimisation only if we havn't touch to span elements
+				if( newHtml.indexOf('<span') == -1 && newHtml.indexOf('</span') == -1 
+					&& lastHtml.indexOf('<span') == -1 && lastHtml.indexOf('</span') == -1 )
+				{
+					var beginStr, nbOpendedSpan, nbClosedSpan, nbUnchangedChars, span, textNode;
+					doHtmlOpti		= true;
+					beginStr		= t.last_hightlighted_text.substr( 0, stay_begin.length + nbStart );
+					// fix special chars
+					newHtml			= newHtml.replace( /&lt;/g, '<').replace( /&gt;/g, '>').replace( /&amp;/g, '&');
+		
+					nbOpendedSpan	= beginStr.split('<span').length - 1;
+					nbClosedSpan	= beginStr.split('</span').length - 1;
+					// retrieve the previously opened span (Add 1 for the first level span?)
+					span 			= t.content_highlight.getElementsByTagName('span')[ nbOpendedSpan ];
+					
+					//--------[
+					// get the textNode to update
+					
+					// if we're inside a span, we'll take the one that is opened (can be a parent of the current span)
+					parentSpan		= span;
+					maxStartOffset	= maxEndOffset = 0;
+					
+					// it will be in the child of the root node 
+					if( nbOpendedSpan == nbClosedSpan )
+					{
+						while( parentSpan.parentNode != t.content_highlight && parentSpan.parentNode.tagName != 'PRE' )
+						{
+							parentSpan	= parentSpan.parentNode;
+						}
+					}
+					// get the last opened span
+					else
+					{
+						maxStartOffset	= maxEndOffset = beginStr.length + 1;
+						// move to parent node for each closed span found after the lastest open span
+						nbClosed = beginStr.substr( Math.max( 0, beginStr.lastIndexOf( '<span', maxStartOffset - 1 ) ) ).split('</span').length - 1;
+						while( nbClosed > 0 )
+						{
+							nbClosed--;
+							parentSpan = parentSpan.parentNode;
+						}
+						
+						// find the position of the last opended tag
+						while( parentSpan.parentNode != t.content_highlight && parentSpan.parentNode.tagName != 'PRE' && ( tmpMaxStartOffset = Math.max( 0, beginStr.lastIndexOf( '<span', maxStartOffset - 1 ) ) ) < ( tmpMaxEndOffset = Math.max( 0, beginStr.lastIndexOf( '</span', maxEndOffset - 1 ) ) ) )
+						{
+							maxStartOffset	= tmpMaxStartOffset;
+							maxEndOffset	= tmpMaxEndOffset;
+						}
+					}
+					// Note: maxEndOffset is no more used but maxStartOffset will be used
+					
+					if( parentSpan.parentNode == t.content_highlight || parentSpan.parentNode.tagName == 'PRE' )
+					{
+						maxStartOffset	= Math.max( 0, beginStr.indexOf( '<span' ) );
+					}
+					
+					// find the matching text node (this will be one that will be at the end of the beginStr
+					if( maxStartOffset == beginStr.length )
+					{
+						nbSubSpanBefore	= 0;
+					}
+					else
+					{
+						lastEndPos 				= Math.max( 0, beginStr.lastIndexOf( '>', maxStartOffset ) );
+		
+						// count the number of sub spans
+						nbSubSpanBefore			= beginStr.substr( lastEndPos ).split('<span').length-1;
+					}
+					
+					// there is no sub-span before
+					if( nbSubSpanBefore == 0 )
+					{
+						textNode	= parentSpan.firstChild;
+					}
+					// we need to find where is the text node modified
+					else
+					{
+						// take the last direct child (no sub-child)
+						lastSubSpan	= parentSpan.getElementsByTagName('span')[ nbSubSpanBefore - 1 ];
+						while( lastSubSpan.parentNode != parentSpan )
+						{
+							lastSubSpan	= lastSubSpan.parentNode;
+						}
+
+						// associate to next text node following the last sub span
+						if( lastSubSpan.nextSibling == null || lastSubSpan.nextSibling.nodeType != 3 )
+						{
+							textNode	= document.createTextNode('');
+							lastSubSpan.parentNode.insertBefore( textNode, lastSubSpan.nextSibling );
+						}
+						else
+						{
+							textNode	= lastSubSpan.nextSibling;
+						}
+					}
+					//--------]
+					
+					
+					//--------[
+					// update the textNode content
+					
+					// number of caracters after the last opened of closed span
+					//nbUnchangedChars = ( lastIndex = beginStr.lastIndexOf( '>' ) ) == -1 ? beginStr.length : beginStr.length - ( lastIndex + 1 );
+					//nbUnchangedChars =  ? beginStr.length : beginStr.substr( lastIndex + 1 ).replace( /&lt;/g, '<').replace( /&gt;/g, '>').replace( /&amp;/g, '&').length;
+					
+					if( ( lastIndex = beginStr.lastIndexOf( '>' ) ) == -1 )
+					{
+						nbUnchangedChars	= beginStr.length;
+					}
+					else
+					{
+						nbUnchangedChars	= beginStr.substr( lastIndex + 1 ).replace( /&lt;/g, '<').replace( /&gt;/g, '>').replace( /&amp;/g, '&').length; 	
+						//nbUnchangedChars	+= beginStr.substr( ).replace( /&/g, '&amp;').replace( /</g, '&lt;').replace( />/g, '&gt;').length - beginStr.length;
+					}
+					//alert( nbUnchangedChars );
+					//	console.log( span, textNode, nbOpendedSpan,nbClosedSpan,  span.nextSibling, textNode.length, nbUnchangedChars, lastHtml, lastHtml.length, newHtml, newHtml.length );
+					//	alert( textNode.parentNode.className +'-'+ textNode.parentNode.tagName+"\n"+ textNode.data +"\n"+ nbUnchangedChars +"\n"+ lastHtml.length +"\n"+ newHtml +"\n"+ newHtml.length  );
+				//	console.log( nbUnchangedChars, lastIndex, beginStr.length, beginStr.replace(/&/g, '&amp;'), lastHtml.length, '|', newHtml.replace( /\t/g, 't').replace( /\n/g, 'n').replace( /\r/g, 'r'), lastHtml.replace( /\t/g, 't').replace( /\n/g, 'n').replace( /\r/, 'r') );
+				//	console.log( textNode.data.replace(/&/g, '&amp;') );
+					// IE only manage \r for cariage return in textNode and not \n or \r\n
+					if( t.isIE )
+					{
+						nbUnchangedChars	-= ( beginStr.substr( beginStr.length - nbUnchangedChars ).split("\n").length - 1 );
+						//alert( textNode.data.replace(/\r/g, '_r').replace(/\n/g, '_n')); 
+						textNode.replaceData( nbUnchangedChars, lastHtml.replace(/\n/g, '').length, newHtml.replace(/\n/g, '') );
+					}
+					else
+					{
+						textNode.replaceData( nbUnchangedChars, lastHtml.length, newHtml );
+					}
+					//--------]
+				}
+			}
+			// an exception shouldn't occured but if replaceData failed at least it won't break everything
+			catch( e )
+			{
+		//		throw e;
+			//	console.log( e );
+				doHtmlOpti	= false;
+			}
+			
+		}
+	
+		/*** END HTML update's optimisation ***/
+		// end test
+		
+	//			console.log(  (TPS6-TPS5), (TPS5-TPS4), (TPS4-TPS3), (TPS3-TPS2), (TPS2-TPS1), _CPT );
+		// get the new highlight content
+		tpsAfterOpti2		= new Date().getTime();
+		hightlighted_text	= stay_begin + updated_highlight + stay_end;
+		if( !doHtmlOpti )
+		{
+			// update the content of the highlight div by first updating a clone node (as there is no display in the same time for t node it's quite faster (5*))
+			var new_Obj= t.content_highlight.cloneNode(false);
+			if( ( t.isIE && t.isIE < 8 ) || ( t.isOpera && t.isOpera < 9.6 ) )
+				new_Obj.innerHTML= "<pre><span class='"+ t.settings["syntax"] +"'>" + hightlighted_text + "</span></pre>";	
+			else
+				new_Obj.innerHTML= "<span class='"+ t.settings["syntax"] +"'>"+ hightlighted_text +"</span>";
+	
+			t.content_highlight.parentNode.replaceChild(new_Obj, t.content_highlight);
+		
+			t.content_highlight= new_Obj;
+		}
+		
+		t.last_text_to_highlight= infos["full_text"];
+		t.last_hightlighted_text= hightlighted_text;
+		
+		tps3=new Date().getTime();
+	
+		if(t.settings["debug"]){
+			//lineNumber=tab_text.length;
+			//t.debug.value+=" \nNB char: "+_$("src").value.length+" Nb line: "+ lineNumber;
+		
+			t.debug.value= "Tps optimisation "+(tps_end_opti-tps_start)
+				+" | tps reg exp: "+ (tpsAfterReg-tps_end_opti)
+				+" | tps opti HTML : "+ (tpsAfterOpti2-tpsAfterReg) + ' '+ ( doHtmlOpti ? 'yes' : 'no' )
+				+" | tps update highlight content: "+ (tps3-tpsAfterOpti2)
+				+" | tpsTotal: "+ (tps3-tps_start)
+				+ "("+tps3+")\n"+ debug_opti;
+		//	t.debug.value+= "highlight\n"+hightlighted_text;*/
+		}
+		
+	};
+	
+	EditArea.prototype.resync_highlight= function(reload_now){
+		this.reload_highlight=true;
+		this.last_text_to_highlight="";
+		this.focus();		
+		if(reload_now)
+			this.check_line_selection(false); 
+	};	

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/autocompletion.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/autocompletion.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/autocompletion.gif
new file mode 100644
index 0000000..f3dfc2e
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/autocompletion.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/close.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/close.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/close.gif
new file mode 100644
index 0000000..679ca2a
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/close.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/fullscreen.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/fullscreen.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/fullscreen.gif
new file mode 100644
index 0000000..66fa6d9
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/fullscreen.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/go_to_line.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/go_to_line.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/go_to_line.gif
new file mode 100644
index 0000000..06042ec
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/go_to_line.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/help.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/help.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/help.gif
new file mode 100644
index 0000000..51a1ee4
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/help.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/highlight.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/highlight.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/highlight.gif
new file mode 100644
index 0000000..16491f6
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/highlight.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/load.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/load.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/load.gif
new file mode 100644
index 0000000..461698f
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/load.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/move.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/move.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/move.gif
new file mode 100644
index 0000000..d15f9f5
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/move.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/newdocument.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/newdocument.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/newdocument.gif
new file mode 100644
index 0000000..a9d2938
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/newdocument.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/opacity.png
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/opacity.png b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/opacity.png
new file mode 100644
index 0000000..b4217cb
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/opacity.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/processing.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/processing.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/processing.gif
new file mode 100644
index 0000000..cce32f2
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/processing.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/redo.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/redo.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/redo.gif
new file mode 100644
index 0000000..3af9069
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/redo.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/reset_highlight.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/reset_highlight.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/reset_highlight.gif
new file mode 100644
index 0000000..0fa3cb7
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/reset_highlight.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/save.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/save.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/save.gif
new file mode 100644
index 0000000..2777beb
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/save.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/search.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/search.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/search.gif
new file mode 100644
index 0000000..cfe76b5
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/search.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/smooth_selection.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/smooth_selection.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/smooth_selection.gif
new file mode 100644
index 0000000..8a532e5
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/smooth_selection.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/spacer.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/spacer.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/spacer.gif
new file mode 100644
index 0000000..3884865
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/spacer.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/statusbar_resize.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/statusbar_resize.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/statusbar_resize.gif
new file mode 100644
index 0000000..af89d80
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/statusbar_resize.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/undo.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/undo.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/undo.gif
new file mode 100644
index 0000000..520796d
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/undo.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/word_wrap.gif
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/word_wrap.gif b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/word_wrap.gif
new file mode 100644
index 0000000..8f256cc
Binary files /dev/null and b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/images/word_wrap.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/keyboard.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/keyboard.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/keyboard.js
new file mode 100644
index 0000000..798a752
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/keyboard.js
@@ -0,0 +1,145 @@
+var EA_keys = {8:"Retour arriere",9:"Tabulation",12:"Milieu (pave numerique)",13:"Entrer",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Verr Maj",27:"Esc",32:"Space",33:"Page up",34:"Page down",35:"End",36:"Begin",37:"Left",38:"Up",39:"Right",40:"Down",44:"Impr ecran",45:"Inser",46:"Suppr",91:"Menu Demarrer Windows / touche pomme Mac",92:"Menu Demarrer Windows",93:"Menu contextuel Windows",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Verr Num",145:"Arret defil"};
+
+
+
+function keyDown(e){
+	if(!e){	// if IE
+		e=event;
+	}
+	
+	// send the event to the plugins
+	for(var i in editArea.plugins){
+		if(typeof(editArea.plugins[i].onkeydown)=="function"){
+			if(editArea.plugins[i].onkeydown(e)===false){ // stop propaging
+				if(editArea.isIE)
+					e.keyCode=0;
+				return false;
+			}
+		}
+	}
+
+	var target_id=(e.target || e.srcElement).id;
+	var use=false;
+	if (EA_keys[e.keyCode])
+		letter=EA_keys[e.keyCode];
+	else
+		letter=String.fromCharCode(e.keyCode);
+	
+	var low_letter= letter.toLowerCase();
+			
+	if(letter=="Page up" && !AltPressed(e) && !editArea.isOpera){
+		editArea.execCommand("scroll_page", {"dir": "up", "shift": ShiftPressed(e)});
+		use=true;
+	}else if(letter=="Page down" && !AltPressed(e) && !editArea.isOpera){
+		editArea.execCommand("scroll_page", {"dir": "down", "shift": ShiftPressed(e)});
+		use=true;
+	}else if(editArea.is_editable==false){
+		// do nothing but also do nothing else (allow to navigate with page up and page down)
+		return true;
+	}else if(letter=="Tabulation" && target_id=="textarea" && !CtrlPressed(e) && !AltPressed(e)){	
+		if(ShiftPressed(e))
+			editArea.execCommand("invert_tab_selection");
+		else
+			editArea.execCommand("tab_selection");
+		
+		use=true;
+		if(editArea.isOpera || (editArea.isFirefox && editArea.isMac) )	// opera && firefox mac can't cancel tabulation events...
+			setTimeout("editArea.execCommand('focus');", 1);
+	}else if(letter=="Entrer" && target_id=="textarea"){
+		if(editArea.press_enter())
+			use=true;
+	}else if(letter=="Entrer" && target_id=="area_search"){
+		editArea.execCommand("area_search");
+		use=true;
+	}else  if(letter=="Esc"){
+		editArea.execCommand("close_all_inline_popup", e);
+		use=true;
+	}else if(CtrlPressed(e) && !AltPressed(e) && !ShiftPressed(e)){
+		switch(low_letter){
+			case "f":				
+				editArea.execCommand("area_search");
+				use=true;
+				break;
+			case "r":
+				editArea.execCommand("area_replace");
+				use=true;
+				break;
+			case "q":
+				editArea.execCommand("close_all_inline_popup", e);
+				use=true;
+				break;
+			case "h":
+				editArea.execCommand("change_highlight");			
+				use=true;
+				break;
+			case "g":
+				setTimeout("editArea.execCommand('go_to_line');", 5);	// the prompt stop the return false otherwise
+				use=true;
+				break;
+			case "e":
+				editArea.execCommand("show_help");
+				use=true;
+				break;
+			case "z":
+				use=true;
+				editArea.execCommand("undo");
+				break;
+			case "y":
+				use=true;
+				editArea.execCommand("redo");
+				break;
+			default:
+				break;			
+		}		
+	}		
+	
+	// check to disable the redo possibility if the textarea content change
+	if(editArea.next.length > 0){
+		setTimeout("editArea.check_redo();", 10);
+	}
+	
+	setTimeout("editArea.check_file_changes();", 10);
+	
+	
+	if(use){
+		// in case of a control that sould'nt be used by IE but that is used => THROW a javascript error that will stop key action
+		if(editArea.isIE)
+			e.keyCode=0;
+		return false;
+	}
+	//alert("Test: "+ letter + " ("+e.keyCode+") ALT: "+ AltPressed(e) + " CTRL "+ CtrlPressed(e) + " SHIFT "+ ShiftPressed(e));
+	
+	return true;
+	
+};
+
+
+// return true if Alt key is pressed
+function AltPressed(e) {
+	if (window.event) {
+		return (window.event.altKey);
+	} else {
+		if(e.modifiers)
+			return (e.altKey || (e.modifiers % 2));
+		else
+			return e.altKey;
+	}
+};
+
+// return true if Ctrl key is pressed
+function CtrlPressed(e) {
+	if (window.event) {
+		return (window.event.ctrlKey);
+	} else {
+		return (e.ctrlKey || (e.modifiers==2) || (e.modifiers==3) || (e.modifiers>5));
+	}
+};
+
+// return true if Shift key is pressed
+function ShiftPressed(e) {
+	if (window.event) {
+		return (window.event.shiftKey);
+	} else {
+		return (e.shiftKey || (e.modifiers>3));
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/bg.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/bg.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/bg.js
new file mode 100644
index 0000000..e088403
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/bg.js
@@ -0,0 +1,54 @@
+/*
+ *	Bulgarian translation
+ *	Author:		Valentin Hristov
+ *	Company:	SOFTKIT Bulgarian
+ *	Site:		http://www.softkit-bg.com
+ */
+editAreaLoader.lang["bg"]={
+new_document: "нов документ",
+search_button: "търсене и замяна",
+search_command: "търси следващия / отвори прозорец с търсачка",
+search: "търсене",
+replace: "замяна",
+replace_command: "замяна / отвори прозорец с търсачка",
+find_next: "намери следващия",
+replace_all: "замени всички",
+reg_exp: "реголярни изрази",
+match_case: "чуствителен към регистъра",
+not_found: "няма резултат.",
+occurrence_replaced: "замяната е осъществена.",
+search_field_empty: "Полето за търсене е празно",
+restart_search_at_begin: "До края на документа. Почни с началото.",
+move_popup: "премести прозореца с търсачката",
+font_size: "--Размер на шрифта--",
+go_to_line: "премени към реда",
+go_to_line_prompt: "премени към номера на реда:",
+undo: "отмени",
+redo: "върни",
+change_smooth_selection: "включи/изключи някой от функциите за преглед (по красиво, но повече натоварва)",
+highlight: "превключване на оцветяване на синтаксиса включена/изключена",
+reset_highlight: "въстанови оцветяване на синтаксиса (ако не е синхронизиран с текста)",
+word_wrap: "режим на пренасяне на дълги редове",
+help: "за програмата",
+save: "съхрани",
+load: "зареди",
+line_abbr: "Стр",
+char_abbr: "Стлб",
+position: "Позиция",
+total: "Всичко",
+close_popup: "затвори прозореца",
+shortcuts: "Бързи клавиши",
+add_tab: "добави табулация в текста",
+remove_tab: "премахни табулацията в текста",
+about_notice: "Внимание: използвайте функцията оцветяване на синтаксиса само за малки текстове",
+toggle: "Превключи редактор",
+accesskey: "Бърз клавиш",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Зареждане...",
+fullscreen: "на цял екран",
+syntax_selection: "--Синтаксис--",
+close_tab: "Затвори файла"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/cs.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/cs.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/cs.js
new file mode 100644
index 0000000..d1a614c
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/cs.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["cs"]={
+new_document: "Nový dokument",
+search_button: "Najdi a nahraď",
+search_command: "Hledej další / otevři vyhledávací pole",
+search: "Hledej",
+replace: "Nahraď",
+replace_command: "Nahraď / otevři vyhledávací pole",
+find_next: "Najdi další",
+replace_all: "Nahraď vše",
+reg_exp: "platné výrazy",
+match_case: "vyhodnocené výrazy",
+not_found: "nenalezené.",
+occurrence_replaced: "výskyty nahrazené.",
+search_field_empty: "Pole vyhledávání je prázdné",
+restart_search_at_begin: "Dosažen konec souboru, začínám od začátku.",
+move_popup: "Přesuň vyhledávací okno",
+font_size: "--Velikost textu--",
+go_to_line: "Přejdi na řádek",
+go_to_line_prompt: "Přejdi na řádek:",
+undo: "krok zpět",
+redo: "znovu",
+change_smooth_selection: "Povolit nebo zakázat některé ze zobrazených funkcí (účelnější zobrazení požaduje větší zatížení procesoru)",
+highlight: "Zvýrazňování syntaxe zap./vyp.",
+reset_highlight: "Obnovit zvýraznění (v případě nesrovnalostí)",
+word_wrap: "toggle word wrapping mode",
+help: "O programu",
+save: "Uložit",
+load: "Otevřít",
+line_abbr: "Ř.",
+char_abbr: "S.",
+position: "Pozice",
+total: "Celkem",
+close_popup: "Zavřít okno",
+shortcuts: "Zkratky",
+add_tab: "Přidat tabulování textu",
+remove_tab: "Odtsranit tabulování textu",
+about_notice: "Upozornění! Funkce zvýrazňování textu je k dispozici pouze pro malý text",
+toggle: "Přepnout editor",
+accesskey: "Přístupová klávesa",
+tab: "Záložka",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Zpracovávám ...",
+fullscreen: "Celá obrazovka",
+syntax_selection: "--vyber zvýrazňovač--",
+close_tab: "Close file"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/de.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/de.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/de.js
new file mode 100644
index 0000000..6ca2ad6
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/de.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["de"]={
+new_document: "Neues Dokument",
+search_button: "Suchen und Ersetzen",
+search_command: "Weitersuchen / &ouml;ffne Suchfeld",
+search: "Suchen",
+replace: "Ersetzen",
+replace_command: "Ersetzen / &ouml;ffne Suchfeld",
+find_next: "Weitersuchen",
+replace_all: "Ersetze alle Treffer",
+reg_exp: "regul&auml;re Ausdr&uuml;cke",
+match_case: "passt auf den Begriff<br />",
+not_found: "Nicht gefunden.",
+occurrence_replaced: "Die Vorkommen wurden ersetzt.",
+search_field_empty: "Leeres Suchfeld",
+restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation
+move_popup: "Suchfenster bewegen",
+font_size: "--Schriftgr&ouml;&szlig;e--",
+go_to_line: "Gehe zu Zeile",
+go_to_line_prompt: "Gehe zu Zeilennummmer:",
+undo: "R&uuml;ckg&auml;ngig",
+redo: "Wiederherstellen",
+change_smooth_selection: "Aktiviere/Deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)",
+highlight: "Syntax Highlighting an- und ausschalten",
+reset_highlight: "Highlighting zur&uuml;cksetzen (falls mit Text nicht konform)",
+word_wrap: "Toggle word wrapping mode",
+help: "Info",
+save: "Speichern",
+load: "&Ouml;ffnen",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Gesamt",
+close_popup: "Popup schlie&szlig;en",
+shortcuts: "Shortcuts",
+add_tab: "Tab zum Text hinzuf&uuml;gen",
+remove_tab: "Tab aus Text entfernen",
+about_notice: "Bemerkung: Syntax Highlighting ist nur f&uuml;r kurze Texte",
+toggle: "Editor an- und ausschalten",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "In Bearbeitung...",
+fullscreen: "Full-Screen",
+syntax_selection: "--Syntax--",
+close_tab: "Close file"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/dk.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/dk.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/dk.js
new file mode 100644
index 0000000..bb1d7b2
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/dk.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["dk"]={
+new_document: "nyt tomt dokument",
+search_button: "s&oslash;g og erstat",
+search_command: "find n&aelig;ste / &aring;ben s&oslash;gefelt",
+search: "s&oslash;g",
+replace: "erstat",
+replace_command: "erstat / &aring;ben s&oslash;gefelt",
+find_next: "find n&aelig;ste",
+replace_all: "erstat alle",
+reg_exp: "regular expressions",
+match_case: "forskel på store/sm&aring; bogstaver<br />",
+not_found: "not found.",
+occurrence_replaced: "occurences replaced.",
+search_field_empty: "Search field empty",
+restart_search_at_begin: "End of area reached. Restart at begin.",
+move_popup: "flyt søgepopup",
+font_size: "--Skriftstørrelse--",
+go_to_line: "g&aring; til linie",
+go_to_line_prompt: "gå til linienummer:",
+undo: "fortryd",
+redo: "gentag",
+change_smooth_selection: "sl&aring; display funktioner til/fra (smartere display men mere CPU kr&aelig;vende)",
+highlight: "sl&aring; syntax highlight til/fra",
+reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)",
+word_wrap: "toggle word wrapping mode",
+help: "om",
+save: "gem",
+load: "hent",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Total",
+close_popup: "luk popup",
+shortcuts: "Genveje",
+add_tab: "tilf&oslash;j tabulation til tekst",
+remove_tab: "fjern tabulation fra tekst",
+about_notice: "Husk: syntax highlight funktionen b&oslash;r kun bruge til sm&aring; tekster",
+toggle: "Sl&aring; editor til / fra",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Skift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Processing...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+close_tab: "Close file"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/en.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/en.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/en.js
new file mode 100644
index 0000000..d2fa561
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/en.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["en"]={
+new_document: "new empty document",
+search_button: "search and replace",
+search_command: "search next / open search area",
+search: "search",
+replace: "replace",
+replace_command: "replace / open search area",
+find_next: "find next",
+replace_all: "replace all",
+reg_exp: "regular expressions",
+match_case: "match case",
+not_found: "not found.",
+occurrence_replaced: "occurences replaced.",
+search_field_empty: "Search field empty",
+restart_search_at_begin: "End of area reached. Restart at begin.",
+move_popup: "move search popup",
+font_size: "--Font size--",
+go_to_line: "go to line",
+go_to_line_prompt: "go to line number:",
+undo: "undo",
+redo: "redo",
+change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)",
+highlight: "toggle syntax highlight on/off",
+reset_highlight: "reset highlight (if desyncronized from text)",
+word_wrap: "toggle word wrapping mode",
+help: "about",
+save: "save",
+load: "load",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Total",
+close_popup: "close popup",
+shortcuts: "Shortcuts",
+add_tab: "add tabulation to text",
+remove_tab: "remove tabulation to text",
+about_notice: "Notice: syntax highlight function is only for small text",
+toggle: "Toggle editor",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Processing...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+close_tab: "Close file"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/eo.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/eo.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/eo.js
new file mode 100644
index 0000000..77230d1
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/eo.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["eo"]={
+new_document: "nova dokumento (vakigas la enhavon)",
+search_button: "ser&#265;i / anstata&#365;igi",
+search_command: "pluser&#265;i / malfermi la ser&#265;o-fenestron",
+search: "ser&#265;i",
+replace: "anstata&#365;igi",
+replace_command: "anstata&#365;igi / malfermi la ser&#265;o-fenestron",
+find_next: "ser&#265;i",
+replace_all: "anstata&#365;igi &#265;ion",
+reg_exp: "regula esprimo",
+match_case: "respekti la usklecon",
+not_found: "ne trovita.",
+occurrence_replaced: "anstata&#365;igoj plenumitaj.",
+search_field_empty: "La kampo estas malplena.",
+restart_search_at_begin: "Fino de teksto &#285;isrirata, &#265;u da&#365;rigi el la komenco?",
+move_popup: "movi la ser&#265;o-fenestron",
+font_size: "--Tipara grando--",
+go_to_line: "iri al la linio",
+go_to_line_prompt: "iri al la linio numero:",
+undo: "rezigni",
+redo: "refari",
+change_smooth_selection: "ebligi/malebligi la funkcioj de vidigo (pli bona vidigo, sed pli da &#349;ar&#285;o de la &#265;eforgano)",
+highlight: "ebligi/malebligi la sintaksan kolorigon",
+reset_highlight: "repravalorizi la sintaksan kolorigon (se malsinkronigon de la teksto)",
+word_wrap: "toggle word wrapping mode",
+help: "pri",
+save: "registri",
+load: "&#349;ar&#285;i",
+line_abbr: "Ln",
+char_abbr: "Sg",
+position: "Pozicio",
+total: "Sumo",
+close_popup: "fermi la &#349;prucfenestron",
+shortcuts: "Fulmoklavo",
+add_tab: "aldoni tabon en la tekston",
+remove_tab: "forigi tablon el la teksto",
+about_notice: "Noto: la sintaksa kolorigo estas nur prikalkulita por mallongaj tekstoj.",
+toggle: "baskuligi la redaktilon",
+accesskey: "Fulmoklavo",
+tab: "Tab",
+shift: "Maj",
+ctrl: "Ktrl",
+esc: "Esk",
+processing: "&#349;argante...",
+fullscreen: "plenekrane",
+syntax_selection: "--Sintakso--",
+close_tab: "Fermi la dosieron"
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/es.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/es.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/es.js
new file mode 100644
index 0000000..83dd507
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/es.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["es"]={
+new_document: "nuevo documento vacío",
+search_button: "buscar y reemplazar",
+search_command: "buscar siguiente / abrir área de búsqueda",
+search: "buscar",
+replace: "reemplazar",
+replace_command: "reemplazar / abrir área de búsqueda",
+find_next: "encontrar siguiente",
+replace_all: "reemplazar todos",
+reg_exp: "expresiones regulares",
+match_case: "coincidir capitalización",
+not_found: "no encontrado.",
+occurrence_replaced: "ocurrencias reemplazadas.",
+search_field_empty: "Campo de búsqueda vacío",
+restart_search_at_begin: "Se ha llegado al final del área. Se va a seguir desde el principio.",
+move_popup: "mover la ventana de búsqueda",
+font_size: "--Tamaño de la fuente--",
+go_to_line: "ir a la línea",
+go_to_line_prompt: "ir a la línea número:",
+undo: "deshacer",
+redo: "rehacer",
+change_smooth_selection: "activar/desactivar algunas características de visualización (visualización más inteligente pero más carga de CPU)",
+highlight: "intercambiar resaltado de sintaxis",
+reset_highlight: "reinicializar resaltado (si no esta sincronizado con el texto)",
+word_wrap: "toggle word wrapping mode",
+help: "acerca",
+save: "guardar",
+load: "cargar",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Posición",
+total: "Total",
+close_popup: "recuadro de cierre",
+shortcuts: "Atajos",
+add_tab: "añadir tabulado al texto",
+remove_tab: "borrar tabulado del texto",
+about_notice: "Aviso: el resaltado de sintaxis sólo funciona para texto pequeño",
+toggle: "Cambiar editor",
+accesskey: "Tecla de acceso",
+tab: "Tab",
+shift: "Mayúsc",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Procesando...",
+fullscreen: "pantalla completa",
+syntax_selection: "--Syntax--",
+close_tab: "Close file"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/fi.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/fi.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/fi.js
new file mode 100644
index 0000000..496b23d
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/fi.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["fi"]={
+new_document: "uusi tyhjä dokumentti",
+search_button: "etsi ja korvaa",
+search_command: "etsi seuraava / avaa etsintävalikko",
+search: "etsi",
+replace: "korvaa",
+replace_command: "korvaa / avaa etsintävalikko",
+find_next: "etsi seuraava",
+replace_all: "korvaa kaikki",
+reg_exp: "säännölliset lausekkeet",
+match_case: "täsmää kirjainkokoon",
+not_found: "ei löytynyt.",
+occurrence_replaced: "esiintymää korvattu.",
+search_field_empty: "Haettava merkkijono on tyhjä",
+restart_search_at_begin: "Alueen loppu saavutettiin. Aloitetaan alusta.",
+move_popup: "siirrä etsintävalikkoa",
+font_size: "--Fontin koko--",
+go_to_line: "siirry riville",
+go_to_line_prompt: "mene riville:",
+undo: "peruuta",
+redo: "tee uudelleen",
+change_smooth_selection: "kytke/sammuta joitakin näyttötoimintoja (Älykkäämpi toiminta, mutta suurempi CPU kuormitus)",
+highlight: "kytke syntaksikorostus päälle/pois",
+reset_highlight: "resetoi syntaksikorostus (jos teksti ei ole synkassa korostuksen kanssa)",
+word_wrap: "toggle word wrapping mode",
+help: "tietoja",
+save: "tallenna",
+load: "lataa",
+line_abbr: "Rv",
+char_abbr: "Pos",
+position: "Paikka",
+total: "Yhteensä",
+close_popup: "sulje valikko",
+shortcuts: "Pikatoiminnot",
+add_tab: "lisää sisennys tekstiin",
+remove_tab: "poista sisennys tekstistä",
+about_notice: "Huomautus: syntaksinkorostus toimii vain pienelle tekstille",
+toggle: "Kytke editori",
+accesskey: "Pikanäppäin",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Odota...",
+fullscreen: "koko ruutu",
+syntax_selection: "--Syntaksi--",
+close_tab: "Sulje tiedosto"
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/fr.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/fr.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/fr.js
new file mode 100644
index 0000000..16cf88f
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/fr.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["fr"]={
+new_document: "nouveau document (efface le contenu)",
+search_button: "rechercher / remplacer",
+search_command: "rechercher suivant / ouvrir la fen&ecirc;tre de recherche",
+search: "rechercher",
+replace: "remplacer",
+replace_command: "remplacer / ouvrir la fen&ecirc;tre de recherche",
+find_next: "rechercher",
+replace_all: "tout remplacer",
+reg_exp: "expr. r&eacute;guli&egrave;re",
+match_case: "respecter la casse",
+not_found: "pas trouv&eacute;.",
+occurrence_replaced: "remplacements &eacute;ffectu&eacute;s.",
+search_field_empty: "Le champ de recherche est vide.",
+restart_search_at_begin: "Fin du texte atteint, poursuite au d&eacute;but.",
+move_popup: "d&eacute;placer la fen&ecirc;tre de recherche",
+font_size: "--Taille police--",
+go_to_line: "aller &agrave; la ligne",
+go_to_line_prompt: "aller a la ligne numero:",
+undo: "annuler",
+redo: "refaire",
+change_smooth_selection: "activer/d&eacute;sactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)",
+highlight: "activer/d&eacute;sactiver la coloration syntaxique",
+reset_highlight: "r&eacute;initialiser la coloration syntaxique (si d&eacute;syncronis&eacute;e du texte)",
+word_wrap: "activer/d&eacute;sactiver les retours &agrave; la ligne automatiques",
+help: "&agrave; propos",
+save: "sauvegarder",
+load: "charger",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Total",
+close_popup: "fermer le popup",
+shortcuts: "Racourcis clavier",
+add_tab: "ajouter une tabulation dans le texte",
+remove_tab: "retirer une tabulation dans le texte",
+about_notice: "Note: la coloration syntaxique n'est pr&eacute;vue que pour de courts textes.",
+toggle: "basculer l'&eacute;diteur",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Maj",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "chargement...",
+fullscreen: "plein &eacute;cran",
+syntax_selection: "--Syntaxe--",
+close_tab: "Fermer le fichier"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/hr.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/hr.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/hr.js
new file mode 100644
index 0000000..0429d3a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/hr.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["hr"]={
+new_document: "Novi dokument",
+search_button: "Traži i izmijeni",
+search_command: "Traži dalje / Otvori prozor za traženje",
+search: "Traži",
+replace: "Izmijeni",
+replace_command: "Izmijeni / Otvori prozor za traženje",
+find_next: "Traži dalje",
+replace_all: "Izmjeni sve",
+reg_exp: "Regularni izrazi",
+match_case: "Bitna vel. slova",
+not_found: "nije naðeno.",
+occurrence_replaced: "izmjenjenih.",
+search_field_empty: "Prazno polje za traženje!",
+restart_search_at_begin: "Došao do kraja. Poèeo od poèetka.",
+move_popup: "Pomakni prozor",
+font_size: "--Velièina teksta--",
+go_to_line: "Odi na redak",
+go_to_line_prompt: "Odi na redak:",
+undo: "Vrati natrag",
+redo: "Napravi ponovo",
+change_smooth_selection: "Ukljuèi/iskljuèi neke moguænosti prikaza (pametniji prikaz, ali zagušeniji CPU)",
+highlight: "Ukljuèi/iskljuèi bojanje sintakse",
+reset_highlight: "Ponovi kolorizaciju (ako je nesinkronizirana s tekstom)",
+word_wrap: "toggle word wrapping mode",
+help: "O edit_area",
+save: "Spremi",
+load: "Uèitaj",
+line_abbr: "Ln",
+char_abbr: "Zn",
+position: "Pozicija",
+total: "Ukupno",
+close_popup: "Zatvori prozor",
+shortcuts: "Kratice",
+add_tab: "Dodaj tabulaciju",
+remove_tab: "Makni tabulaciju",
+about_notice: "Napomena: koloriziranje sintakse je samo za kratke kodove",
+toggle: "Prebaci naèin ureðivanja",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Procesiram...",
+fullscreen: "Cijeli prozor",
+syntax_selection: "--Syntax--",
+close_tab: "Close file"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/it.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/it.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/it.js
new file mode 100644
index 0000000..356e4c8
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/it.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["it"]={
+new_document: "nuovo documento vuoto",
+search_button: "cerca e sostituisci",
+search_command: "trova successivo / apri finestra di ricerca",
+search: "cerca",
+replace: "sostituisci",
+replace_command: "sostituisci / apri finestra di ricerca",
+find_next: "trova successivo",
+replace_all: "sostituisci tutti",
+reg_exp: "espressioni regolari",
+match_case: "confronta maiuscole/minuscole<br />",
+not_found: "non trovato.",
+occurrence_replaced: "occorrenze sostituite.",
+search_field_empty: "Campo ricerca vuoto",
+restart_search_at_begin: "Fine del testo raggiunta. Ricomincio dall'inizio.",
+move_popup: "sposta popup di ricerca",
+font_size: "-- Dimensione --",
+go_to_line: "vai alla linea",
+go_to_line_prompt: "vai alla linea numero:",
+undo: "annulla",
+redo: "ripeti",
+change_smooth_selection: "abilita/disabilita alcune caratteristiche della visualizzazione",
+highlight: "abilita/disabilita colorazione della sintassi",
+reset_highlight: "aggiorna colorazione (se non sincronizzata)",
+word_wrap: "toggle word wrapping mode",
+help: "informazioni su...",
+save: "salva",
+load: "carica",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Posizione",
+total: "Totale",
+close_popup: "chiudi popup",
+shortcuts: "Scorciatoie",
+add_tab: "aggiungi tabulazione",
+remove_tab: "rimuovi tabulazione",
+about_notice: "Avviso: la colorazione della sintassi vale solo con testo piccolo",
+toggle: "Abilita/disabilita editor",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "In corso...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+close_tab: "Close file"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/ja.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/ja.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/ja.js
new file mode 100644
index 0000000..35d5f0a
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/ja.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["ja"]={
+new_document: "新規作成",
+search_button: "検索・置換",
+search_command: "次を検索 / 検索窓を表示",
+search: "検索",
+replace: "置換",
+replace_command: "置換 / 置換窓を表示",
+find_next: "次を検索",
+replace_all: "全置換",
+reg_exp: "正規表現",
+match_case: "大文字小文字の区別",
+not_found: "見つかりません。",
+occurrence_replaced: "置換しました。",
+search_field_empty: "検索対象文字列が空です。",
+restart_search_at_begin: "終端に達しました、始めに戻ります",
+move_popup: "検索窓を移動",
+font_size: "--フォントサイズ--",
+go_to_line: "指定行へ移動",
+go_to_line_prompt: "指定行へ移動します:",
+undo: "元に戻す",
+redo: "やり直し",
+change_smooth_selection: "スムース表示の切り替え(CPUを使います)",
+highlight: "構文強調表示の切り替え",
+reset_highlight: "構文強調表示のリセット",
+word_wrap: "toggle word wrapping mode",
+help: "ヘルプを表示",
+save: "保存",
+load: "読み込み",
+line_abbr: "行",
+char_abbr: "文字",
+position: "位置",
+total: "合計",
+close_popup: "ポップアップを閉じる",
+shortcuts: "ショートカット",
+add_tab: "タブを挿入する",
+remove_tab: "タブを削除する",
+about_notice: "注意:構文強調表示は短いテキストでしか有効に機能しません。",
+toggle: "テキストエリアとeditAreaの切り替え",
+accesskey: "アクセスキー",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "処理中です...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+close_tab: "Close file"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/mk.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/mk.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/mk.js
new file mode 100644
index 0000000..4e14d12
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/mk.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["mk"]={
+new_document: "Нов документ",
+search_button: "Најди и замени",
+search_command: "Барај следно / Отвори нов прозорец за пребарување",
+search: "Барај",
+replace: "Замени",
+replace_command: "Замени / Отвори прозорец за пребарување",
+find_next: "најди следно",
+replace_all: "Замени ги сите",
+reg_exp: "Регуларни изрази",
+match_case: "Битна е големината на буквите",
+not_found: "не е пронајдено.",
+occurrence_replaced: "замени.",
+search_field_empty: "Полето за пребарување е празно",
+restart_search_at_begin: "Крај на областа. Стартувај од почеток.",
+move_popup: "Помести го прозорецот",
+font_size: "--Големина на текстот--",
+go_to_line: "Оди на линија",
+go_to_line_prompt: "Оди на линија со број:",
+undo: "Врати",
+redo: "Повтори",
+change_smooth_selection: "Вклучи/исклучи некои карактеристики за приказ (попаметен приказ, но поголемо оптеретување за процесорот)",
+highlight: "Вклучи/исклучи осветлување на синтакса",
+reset_highlight: "Ресетирај го осветлувањето на синтакса (доколку е десинхронизиранo со текстот)",
+word_wrap: "toggle word wrapping mode",
+help: "За",
+save: "Зачувај",
+load: "Вчитај",
+line_abbr: "Лн",
+char_abbr: "Зн",
+position: "Позиција",
+total: "Вкупно",
+close_popup: "Затвори го прозорецот",
+shortcuts: "Кратенки",
+add_tab: "Додај табулација на текстот",
+remove_tab: "Отстрани ја табулацијата",
+about_notice: "Напомена: Осветлувањето на синтанса е само за краток текст",
+toggle: "Смени начин на уредување",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Обработувам...",
+fullscreen: "Цел прозорец",
+syntax_selection: "--Синтакса--",
+close_tab: "Избери датотека"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/nl.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/nl.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/nl.js
new file mode 100644
index 0000000..bcd13d3
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/nl.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["nl"]={
+new_document: "nieuw leeg document",
+search_button: "zoek en vervang",
+search_command: "zoek volgende / zoekscherm openen",
+search: "zoek",
+replace: "vervang",
+replace_command: "vervang / zoekscherm openen",
+find_next: "volgende vinden",
+replace_all: "alles vervangen",
+reg_exp: "reguliere expressies",
+match_case: "hoofdletter gevoelig",
+not_found: "niet gevonden.",
+occurrence_replaced: "object vervangen.",
+search_field_empty: "Zoek veld leeg",
+restart_search_at_begin: "Niet meer instanties gevonden, begin opnieuw",
+move_popup: "versleep zoek scherm",
+font_size: "--Letter grootte--",
+go_to_line: "Ga naar regel",
+go_to_line_prompt: "Ga naar regel nummer:",
+undo: "Ongedaan maken",
+redo: "Opnieuw doen",
+change_smooth_selection: "zet wat schermopties aan/uit (kan langzamer zijn)",
+highlight: "zet syntax highlight aan/uit",
+reset_highlight: "reset highlight (indien gedesynchronizeerd)",
+word_wrap: "toggle word wrapping mode",
+help: "informatie",
+save: "opslaan",
+load: "laden",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Positie",
+total: "Totaal",
+close_popup: "Popup sluiten",
+shortcuts: "Snelkoppelingen",
+add_tab: "voeg tabs toe in tekst",
+remove_tab: "verwijder tabs uit tekst",
+about_notice: "Notitie: syntax highlight functie is alleen voor kleine tekst",
+toggle: "geavanceerde bewerkingsopties",
+accesskey: "Accessknop",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Verwerken...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+close_tab: "Close file"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/pl.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/pl.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/pl.js
new file mode 100644
index 0000000..c879888
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/pl.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["pl"]={
+new_document: "nowy dokument",
+search_button: "znajdź i zamień",
+search_command: "znajdź następny",
+search: "znajdź",
+replace: "zamień",
+replace_command: "zamień",
+find_next: "następny",
+replace_all: "zamień wszystko",
+reg_exp: "wyrażenie regularne",
+match_case: "uwzględnij wielkość liter<br />",
+not_found: "nie znaleziono.",
+occurrence_replaced: "wystąpień zamieniono.",
+search_field_empty: "Nie wprowadzono tekstu",
+restart_search_at_begin: "Koniec dokumentu. Wyszukiwanie od początku.",
+move_popup: "przesuń okienko wyszukiwania",
+font_size: "Rozmiar",
+go_to_line: "idź do linii",
+go_to_line_prompt: "numer linii:",
+undo: "cofnij",
+redo: "przywróć",
+change_smooth_selection: "włącz/wyłącz niektóre opcje wyglądu (zaawansowane opcje wyglądu obciążają procesor)",
+highlight: "włącz/wyłącz podświetlanie składni",
+reset_highlight: "odśwież podświetlanie składni (jeśli rozsynchronizowało się z tekstem)",
+word_wrap: "toggle word wrapping mode",
+help: "o programie",
+save: "zapisz",
+load: "otwórz",
+line_abbr: "Ln",
+char_abbr: "Zn",
+position: "Pozycja",
+total: "W sumie",
+close_popup: "zamknij okienko",
+shortcuts: "Skróty klawiaturowe",
+add_tab: "dodaj wcięcie do zaznaczonego tekstu",
+remove_tab: "usuń wcięcie",
+about_notice: "Uwaga: podświetlanie składni nie jest zalecane dla długich tekstów",
+toggle: "Włącz/wyłącz edytor",
+accesskey: "Alt+",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Przetwarzanie...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+close_tab: "Close file"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/pt.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/pt.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/pt.js
new file mode 100644
index 0000000..32cf015
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/pt.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["pt"]={
+new_document: "Novo documento",
+search_button: "Localizar e substituir",
+search_command: "Localizar próximo",
+search: "Localizar",
+replace: "Substituir",
+replace_command: "Substituir",
+find_next: "Localizar",
+replace_all: "Subst. tudo",
+reg_exp: "Expressões regulares",
+match_case: "Diferenciar maiúsculas e minúsculas",
+not_found: "Não encontrado.",
+occurrence_replaced: "Ocorrências substituidas",
+search_field_empty: "Campo localizar vazio.",
+restart_search_at_begin: "Fim das ocorrências. Recomeçar do inicio.",
+move_popup: "Mover janela",
+font_size: "--Tamanho da fonte--",
+go_to_line: "Ir para linha",
+go_to_line_prompt: "Ir para a linha:",
+undo: "Desfazer",
+redo: "Refazer",
+change_smooth_selection: "Opções visuais",
+highlight: "Cores de sintaxe",
+reset_highlight: "Resetar cores (se não sincronizado)",
+word_wrap: "toggle word wrapping mode",
+help: "Sobre",
+save: "Salvar",
+load: "Carregar",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Posição",
+total: "Total",
+close_popup: "Fechar",
+shortcuts: "Shortcuts",
+add_tab: "Adicionar tabulação",
+remove_tab: "Remover tabulação",
+about_notice: "Atenção: Cores de sintaxe são indicados somente para textos pequenos",
+toggle: "Exibir editor",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Processando...",
+fullscreen: "fullscreen",
+syntax_selection: "--Syntax--",
+close_tab: "Close file"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/ru.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/ru.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/ru.js
new file mode 100644
index 0000000..fcd381d
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/ru.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["ru"]={
+new_document: "новый пустой документ",
+search_button: "поиск и замена",
+search_command: "искать следующий / открыть панель поиска",
+search: "поиск",
+replace: "замена",
+replace_command: "заменить / открыть панель поиска",
+find_next: "найти следующее",
+replace_all: "заменить все",
+reg_exp: "регулярное выражение",
+match_case: "учитывать регистр",
+not_found: "не найдено.",
+occurrence_replaced: "вхождение заменено.",
+search_field_empty: "Поле поиска пустое",
+restart_search_at_begin: "Достигнут конец документа. Начинаю с начала.",
+move_popup: "переместить окно поиска",
+font_size: "--Размер шрифта--",
+go_to_line: "перейти к строке",
+go_to_line_prompt: "перейти к строке номер:",
+undo: "отменить",
+redo: "вернуть",
+change_smooth_selection: "включить/отключить некоторые функции просмотра (более красиво, но больше использует процессор)",
+highlight: "переключить подсветку синтаксиса включена/выключена",
+reset_highlight: "восстановить подсветку (если разсинхронизирована от текста)",
+word_wrap: "toggle word wrapping mode",
+help: "о программе",
+save: "сохранить",
+load: "загрузить",
+line_abbr: "Стр",
+char_abbr: "Стлб",
+position: "Позиция",
+total: "Всего",
+close_popup: "закрыть всплывающее окно",
+shortcuts: "Горячие клавиши",
+add_tab: "добавить табуляцию в текст",
+remove_tab: "убрать табуляцию из текста",
+about_notice: "Внимание: функция подсветки синтаксиса только для небольших текстов",
+toggle: "Переключить редактор",
+accesskey: "Горячая клавиша",
+tab: "Tab",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Обработка...",
+fullscreen: "полный экран",
+syntax_selection: "--Синтакс--",
+close_tab: "Закрыть файл"
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/6b1dba58/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/sk.js
----------------------------------------------------------------------
diff --git a/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/sk.js b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/sk.js
new file mode 100644
index 0000000..59f18b4
--- /dev/null
+++ b/dependencies/org.wso2.carbon.ui/src/main/resources/web/editarea/langs/sk.js
@@ -0,0 +1,48 @@
+editAreaLoader.lang["sk"]={
+new_document: "nový prázdy dokument",
+search_button: "vyhľadaj a nahraď",
+search_command: "hľadaj ďalsšie / otvor vyhľadávacie pole",
+search: "hľadaj",
+replace: "nahraď",
+replace_command: "nahraď / otvor vyhľadávacie pole",
+find_next: "nájdi ďalšie",
+replace_all: "nahraď všetko",
+reg_exp: "platné výrazy",
+match_case: "zhodujúce sa výrazy",
+not_found: "nenájdené.",
+occurrence_replaced: "výskyty nahradené.",
+search_field_empty: "Pole vyhľadávanie je prádzne",
+restart_search_at_begin: "End of area reached. Restart at begin.",
+move_popup: "presuň vyhľadávacie okno",
+font_size: "--Veľkosť textu--",
+go_to_line: "prejdi na riadok",
+go_to_line_prompt: "prejdi na riadok:",
+undo: "krok späť",
+redo: "prepracovať",
+change_smooth_selection: "povoliť/zamietnúť niektoré zo zobrazených funkcií (účelnejšie zobrazenie vyžaduje  väčšie zaťaženie procesora CPU)",
+highlight: "prepnúť zvýrazňovanie syntaxe zap/vyp",
+reset_highlight: "zrušiť zvýrazňovanie (ak je nesynchronizované s textom)",
+word_wrap: "toggle word wrapping mode",
+help: "o programe",
+save: "uložiť",
+load: "načítať",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Pozícia",
+total: "Spolu",
+close_popup: "zavrieť okno",
+shortcuts: "Skratky",
+add_tab: "pridať tabulovanie textu",
+remove_tab: "odstrániť tabulovanie textu",
+about_notice: "Upozornenie: funkcia zvýrazňovania syntaxe je dostupná iba pre malý text",
+toggle: "Prepnúť editor",
+accesskey: "Accesskey",
+tab: "Záložka",
+shift: "Shift",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "Spracúvam...",
+fullscreen: "cel=a obrazovka",
+syntax_selection: "--Vyber Syntax--",
+close_tab: "Close file"
+};