phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/js/yahoo autocomplete.js container.js ...


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgwapi/js/yahoo autocomplete.js container.js ...
Date: Sat, 15 Jul 2006 14:41:51 +0000

CVSROOT:        /cvsroot/phpgwapi
Module name:    phpgwapi
Changes by:     Dave Hall <skwashd>     06/07/15 14:41:51

Added files:
        js/yahoo       : autocomplete.js container.js container_core.js 
                         logger.js menu.js yahoo.js 

Log message:
        more code clean ups

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/js/yahoo/autocomplete.js?cvsroot=phpgwapi&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/js/yahoo/container.js?cvsroot=phpgwapi&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/js/yahoo/container_core.js?cvsroot=phpgwapi&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/js/yahoo/logger.js?cvsroot=phpgwapi&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/js/yahoo/menu.js?cvsroot=phpgwapi&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/js/yahoo/yahoo.js?cvsroot=phpgwapi&rev=1.1

Patches:
Index: autocomplete.js
===================================================================
RCS file: autocomplete.js
diff -N autocomplete.js
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ autocomplete.js     15 Jul 2006 14:41:51 -0000      1.1
@@ -0,0 +1,2752 @@
+/*

+Copyright (c) 2006, Yahoo! Inc. All rights reserved.

+Code licensed under the BSD License:

+http://developer.yahoo.com/yui/license.txt

+version: 0.11.0

+*/

+

+/****************************************************************************/

+/****************************************************************************/

+/****************************************************************************/

+

+/**

+ * Class providing the customizable functionality of a plug-and-play DHTML

+ * auto complete 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>

+ *

+ * requires YAHOO.util.Dom Dom utility

+ * requires YAHOO.util.Event Event utility

+ * requires YAHOO.widget.DataSource Data source class

+ * see YAHOO.util.Animation Animation utility

+ * see JSON JSON library

+ *

+ * @constructor

+ * @param {element | string} inputEl DOM element reference or string ID of the 
auto complete input field

+ * @param {element | string} containerEl DOM element reference or string ID of 
the auto complete &lt;div&gt;

+ *                              container

+ * @param {object} oDataSource Instance of YAHOO.widget.DataSource for 
query/results

+ * @param {object} oConfigs Optional object literal of config params

+ */

+YAHOO.widget.AutoComplete = function(inputEl,containerEl,oDataSource,oConfigs) 
{

+    if(inputEl && containerEl && oDataSource) {

+        // Validate data source

+        if (oDataSource && (oDataSource instanceof YAHOO.widget.DataSource)) {

+            this.dataSource = oDataSource;

+        }

+        else {

+            return;

+        }

+

+        // Validate input element

+        if(YAHOO.util.Dom.inDocument(inputEl)) {

+            if(typeof inputEl == "string") {

+                    this._sName = "instance" + 
YAHOO.widget.AutoComplete._nIndex + " " + inputEl;

+                    this._oTextbox = document.getElementById(inputEl);

+            }

+            else {

+                this._sName = (inputEl.id) ?

+                    "instance" + YAHOO.widget.AutoComplete._nIndex + " " + 
inputEl.id:

+                    "instance" + YAHOO.widget.AutoComplete._nIndex;

+                this._oTextbox = inputEl;

+            }

+        }

+        else {

+            return;

+        }

+

+        // Validate container element

+        if(YAHOO.util.Dom.inDocument(containerEl)) {

+            if(typeof containerEl == "string") {

+                    this._oContainer = document.getElementById(containerEl);

+            }

+            else {

+                this._oContainer = containerEl;

+            }

+            if(this._oContainer.style.display == "none") {

+            }

+        }

+        else {

+            return;

+        }

+

+        // Set any config params passed in to override defaults

+        if (typeof oConfigs == "object") {

+            for(var sConfig in oConfigs) {

+                if (sConfig) {

+                    this[sConfig] = oConfigs[sConfig];

+                }

+            }

+        }

+

+        // Initialization sequence

+        this._initContainer();

+        this._initProps();

+        this._initList();

+        this._initContainerHelpers();

+

+        // Set up events

+        var oSelf = this;

+        var oTextbox = this._oTextbox;

+        // Events are actually for the content module within the container

+        var oContent = this._oContainer._oContent;

+

+        // Dom events

+        
YAHOO.util.Event.addListener(oTextbox,"keyup",oSelf._onTextboxKeyUp,oSelf);

+        
YAHOO.util.Event.addListener(oTextbox,"keydown",oSelf._onTextboxKeyDown,oSelf);

+        
YAHOO.util.Event.addListener(oTextbox,"keypress",oSelf._onTextboxKeyPress,oSelf);

+        
YAHOO.util.Event.addListener(oTextbox,"focus",oSelf._onTextboxFocus,oSelf);

+        
YAHOO.util.Event.addListener(oTextbox,"blur",oSelf._onTextboxBlur,oSelf);

+        
YAHOO.util.Event.addListener(oContent,"mouseover",oSelf._onContainerMouseover,oSelf);

+        
YAHOO.util.Event.addListener(oContent,"mouseout",oSelf._onContainerMouseout,oSelf);

+        
YAHOO.util.Event.addListener(oContent,"scroll",oSelf._onContainerScroll,oSelf);

+        
YAHOO.util.Event.addListener(oContent,"resize",oSelf._onContainerResize,oSelf);

+        if(oTextbox.form) {

+            
YAHOO.util.Event.addListener(oTextbox.form,"submit",oSelf._onFormSubmit,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.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);

+        

+        // Finish up

+        oTextbox.setAttribute("autocomplete","off");

+        YAHOO.widget.AutoComplete._nIndex++;

+    }

+    // Required arguments were not found

+    else {

+    }

+};

+

+/***************************************************************************

+ * Public member variables

+ ***************************************************************************/

+/**

+ * The data source object that encapsulates the data used for auto completion.

+ * This object should be an inherited object from YAHOO.widget.DataSource.

+ *

+ * @type object

+ */

+YAHOO.widget.AutoComplete.prototype.dataSource = null;

+

+/**

+ * Number of characters that must be entered before querying for results.

+ * Default: 1.

+ *

+ * @type number

+ */

+YAHOO.widget.AutoComplete.prototype.minQueryLength = 1;

+

+/**

+ * Maximum number of results to display in auto complete container. Default: 
10.

+ *

+ * @type number

+ */

+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.

+ * Default: 0.5.

+ *

+ * @type number

+ */

+YAHOO.widget.AutoComplete.prototype.queryDelay = 0.5;

+

+/**

+ * Class name of a highlighted item within the auto complete container.

+ * Default: "yui-ac-highlight".

+ *

+ * @type string

+ */

+YAHOO.widget.AutoComplete.prototype.highlightClassName = "yui-ac-highlight";

+

+/**

+ * Class name of a pre-highlighted item within the auto complete container.

+ * Default: null.

+ *

+ * @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. Default: null.

+ *

+ * @type string or array

+ */

+YAHOO.widget.AutoComplete.prototype.delimChar = null;

+

+/**

+ * Whether or not the first item in the auto complete container should be

+ * automatically highlighted on expand. Default: true.

+ *

+ * @type boolean

+ */

+YAHOO.widget.AutoComplete.prototype.autoHighlight = true;

+

+/**

+ * Whether or not the auto complete input field should be automatically updated

+ * with the first query result as the user types, auto-selecting the substring

+ * that the user has not typed. Default: false.

+ *

+ * @type boolean

+ */

+YAHOO.widget.AutoComplete.prototype.typeAhead = false;

+

+/**

+ * Whether or not to animate the expansion/collapse of the auto complete

+ * container in the horizontal direction. Default: false.

+ *

+ * @type boolean

+ */

+YAHOO.widget.AutoComplete.prototype.animHoriz = false;

+

+/**

+ * Whether or not to animate the expansion/collapse of the auto complete

+ * container in the vertical direction. Default: true.

+ *

+ * @type boolean

+ */

+YAHOO.widget.AutoComplete.prototype.animVert = true;

+

+/**

+ * Speed of container expand/collapse animation, in seconds. Default: 0.3.

+ *

+ * @type number

+ */

+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 auto complete form

+ * input field into a &lt;select&gt; field. This feature is not recommended

+ * with delimiter character(s) defined. Default: false.

+ *

+ * @type boolean

+ */

+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 auto complete 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.

+ * Default: true.

+ *

+ * @type boolean

+ */

+YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete = true;

+

+/**

+ * Whether or not the auto complete container should always be displayed.

+ * Enabling this feature prevents the toggling of the container to a collapsed

+ * state. Default: false.

+ *

+ * @type boolean

+ */

+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 auto complete 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). Default:false.

+ *

+ * @type boolean

+ */

+YAHOO.widget.AutoComplete.prototype.useIFrame = false;

+

+/**

+ * Configurable iFrame src used when useIFrame = true. Implementations over SSL

+ * should set this parameter to an appropriate https location in order to avoid

+ * security-related browser errors. Default:"about:blank".

+ *

+ * @type boolean

+ */

+YAHOO.widget.AutoComplete.prototype.iFrameSrc = "about:blank";

+

+/**

+ * Whether or not the auto complete container should have a shadow. 
Default:false.

+ *

+ * @type boolean

+ */

+YAHOO.widget.AutoComplete.prototype.useShadow = false;

+

+/***************************************************************************

+ * Public methods

+ ***************************************************************************/

+ /**

+ * Public accessor to the unique name of the auto complete instance.

+ *

+ * @return {string} Unique name of the auto complete instance

+ */

+YAHOO.widget.AutoComplete.prototype.getName = function() {

+    return this._sName;

+};

+

+ /**

+ * Public accessor to the unique name of the auto complete instance.

+ *

+ * @return {string} Unique name of the auto complete instance

+ */

+YAHOO.widget.AutoComplete.prototype.toString = function() {

+    return "AutoComplete " + this._sName;

+};

+

+/**

+ * Public accessor to the internal array of DOM &lt;li&gt; elements that

+ * display query results within the auto complete container.

+ *

+ * @return {array} Array of &lt;li&gt; elements within the auto complete

+ *                 container

+ */

+YAHOO.widget.AutoComplete.prototype.getListItems = function() {

+    return this._aListItems;

+};

+

+/**

+ * Public accessor to the data held in an &lt;li&gt; element of the

+ * auto complete container.

+ *

+ * @return {object or array} Object or array of result data or null

+ */

+YAHOO.widget.AutoComplete.prototype.getListItemData = function(oListItem) {

+    if(oListItem._oResultData) {

+        return oListItem._oResultData;

+    }

+    else {

+        return false;

+    }

+};

+

+/**

+ * Sets HTML markup for the auto complete container header. This markup will be

+ * inserted within a &lt;div&gt; tag with a class of "ac_hd".

+ *

+ * @param {string} sHeader HTML markup for container header

+ */

+YAHOO.widget.AutoComplete.prototype.setHeader = function(sHeader) {

+    if(sHeader) {

+        if(this._oContainer._oContent._oHeader) {

+            this._oContainer._oContent._oHeader.innerHTML = sHeader;

+            this._oContainer._oContent._oHeader.style.display = "block";

+        }

+    }

+    else {

+        this._oContainer._oContent._oHeader.innerHTML = "";

+        this._oContainer._oContent._oHeader.style.display = "none";

+    }

+};

+

+/**

+ * Sets HTML markup for the auto complete container footer. This markup will be

+ * inserted within a &lt;div&gt; tag with a class of "ac_ft".

+ *

+ * @param {string} sFooter HTML markup for container footer

+ */

+YAHOO.widget.AutoComplete.prototype.setFooter = function(sFooter) {

+    if(sFooter) {

+        if(this._oContainer._oContent._oFooter) {

+            this._oContainer._oContent._oFooter.innerHTML = sFooter;

+            this._oContainer._oContent._oFooter.style.display = "block";

+        }

+    }

+    else {

+        this._oContainer._oContent._oFooter.innerHTML = "";

+        this._oContainer._oContent._oFooter.style.display = "none";

+    }

+};

+

+/**

+ * Sets HTML markup for the auto complete container body. This markup will be

+ * inserted within a &lt;div&gt; tag with a class of "ac_bd".

+ *

+ * @param {string} sHeader HTML markup for container body

+ */

+YAHOO.widget.AutoComplete.prototype.setBody = function(sBody) {

+    if(sBody) {

+        if(this._oContainer._oContent._oBody) {

+            this._oContainer._oContent._oBody.innerHTML = sBody;

+            this._oContainer._oContent._oBody.style.display = "block";

+            this._oContainer._oContent.style.display = "block";

+        }

+    }

+    else {

+        this._oContainer._oContent._oBody.innerHTML = "";

+        this._oContainer._oContent.style.display = "none";

+    }

+    this._maxResultsDisplayed = 0;

+};

+

+/**

+ * Overridable method that converts a result item object into HTML markup

+ * for display. Return data values are accessible via the oResultItem object,

+ * and the key return value will always be oResultItem[0]. Markup will be

+ * displayed within &lt;li&gt; element tags in the container.

+ *

+ * @param {object} oResultItem Result item object representing one query result

+ * @param {string} sQuery The current query string

+ * @return {string} HTML markup of formatted result data

+ */

+YAHOO.widget.AutoComplete.prototype.formatResult = function(oResultItem, 
sQuery) {

+    var sResult = oResultItem[0];

+    if(sResult) {

+        return sResult;

+    }

+    else {

+        return "";

+    }

+};

+

+/**

+ * Makes query request to the data source.

+ *

+ * @param {string} sQuery Query string.

+ */

+YAHOO.widget.AutoComplete.prototype.sendQuery = function(sQuery) {

+    if(sQuery) {

+        this._sendQuery(sQuery);

+    }

+    else {

+        return;

+    }

+};

+

+/***************************************************************************

+ * Events

+ ***************************************************************************/

+/**

+ * Fired when the auto complete text input box receives focus. Subscribers

+ * receive the following array:<br>

+ *     -  args[0] The auto complete object instance

+ */

+YAHOO.widget.AutoComplete.prototype.textboxFocusEvent = null;

+

+/**

+ * Fired when the auto complete text input box receives key input. Subscribers

+ * receive the following array:<br>

+ *     - args[0] The auto complete object instance

+ *     - args[1] The keycode number

+ */

+YAHOO.widget.AutoComplete.prototype.textboxKeyEvent = null;

+

+/**

+ * Fired when the auto complete instance makes a query to the data source.

+ * Subscribers receive the following array:<br>

+ *     - args[0] The auto complete object instance

+ *     - args[1] The query string

+ */

+YAHOO.widget.AutoComplete.prototype.dataRequestEvent = null;

+

+/**

+ * Fired when the auto complete instance receives query results from the data

+ * source. Subscribers receive the following array:<br>

+ *     - args[0] The auto complete object instance

+ *     - args[1] The query string

+ *     - args[2] Results array

+ */

+YAHOO.widget.AutoComplete.prototype.dataReturnEvent = null;

+

+/**

+ * Fired when the auto complete instance does not receive query results from 
the

+ * data source due to an error. Subscribers receive the following array:<br>

+ *     - args[0] The auto complete object instance

+ *     - args[1] The query string

+ */

+YAHOO.widget.AutoComplete.prototype.dataErrorEvent = null;

+

+/**

+ * Fired when the auto complete container is expanded. If alwaysShowContainer 
is

+ * enabled, then containerExpandEvent will be fired when the container is

+ * populated with results. Subscribers receive the following array:<br>

+ *     - args[0] The auto complete object instance

+ */

+YAHOO.widget.AutoComplete.prototype.containerExpandEvent = null;

+

+/**

+ * Fired when the auto complete textbox has been prefilled by the type-ahead

+ * feature. Subscribers receive the following array:<br>

+ *     - args[0] The auto complete object instance

+ *     - args[1] The query string

+ *     - args[2] The prefill string

+ */

+YAHOO.widget.AutoComplete.prototype.typeAheadEvent = null;

+

+/**

+ * Fired when result item has been moused over. Subscribers receive the 
following

+ * array:<br>

+ *     - args[0] The auto complete object instance

+ *     - args[1] The &lt;li&gt element item moused to

+ */

+YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent = null;

+

+/**

+ * Fired when result item has been moused out. Subscribers receive the

+ * following array:<br>

+ *     - args[0] The auto complete object instance

+ *     - args[1] The &lt;li&gt; element item moused from

+ */

+YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent = null;

+

+/**

+ * Fired when result item has been arrowed to. Subscribers receive the 
following

+ * array:<br>

+ *     - args[0] The auto complete object instance

+ *     - args[1] The &lt;li&gt; element item arrowed to

+ */

+YAHOO.widget.AutoComplete.prototype.itemArrowToEvent = null;

+

+/**

+ * Fired when result item has been arrowed away from. Subscribers receive the

+ * following array:<br>

+ *     - args[0] The auto complete object instance

+ *     - args[1] 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.

+ * Subscribers receive the following array:<br>

+ *     - args[0] The auto complete object instance

+ *     - args[1] The selected &lt;li&gt; element item

+ *     - args[2] 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 an user selection does not match any of the displayed result 
items.

+ * Note that this event may not behave as expected when delimiter characters

+ * have been defined. Subscribers receive the following array:<br>

+ *     - args[0] The auto complete object instance

+ *     - args[1] The user selection

+ */

+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. Subscribers

+ * receive the following array:<br>

+ *     - args[0] The auto complete object instance

+ */

+YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent = null;

+

+/**

+ * Fired when the auto complete container is collapsed. If alwaysShowContainer 
is

+ * enabled, then containerCollapseEvent will be fired when the container is

+ * cleared of results. Subscribers receive the following array:<br>

+ *     - args[0] The auto complete object instance

+ */

+YAHOO.widget.AutoComplete.prototype.containerCollapseEvent = null;

+

+/**

+ * Fired when the auto complete text input box loses focus. Subscribers receive

+ * an array of the following array:<br>

+ *     - args[0] The auto complete object instance

+ */

+YAHOO.widget.AutoComplete.prototype.textboxBlurEvent = null;

+

+/***************************************************************************

+ * Private member variables

+ ***************************************************************************/

+/**

+ * Internal class variable to index multiple auto complete instances.

+ *

+ * @type number

+ * @private

+ */

+YAHOO.widget.AutoComplete._nIndex = 0;

+

+/**

+ * Name of auto complete instance.

+ *

+ * @type string

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._sName = null;

+

+/**

+ * Text input box DOM element.

+ *

+ * @type object

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._oTextbox = null;

+

+/**

+ * Whether or not the textbox is currently in focus. If query results come back

+ * but the user has already moved on, do not proceed with auto complete 
behavior.

+ *

+ * @type boolean

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._bFocused = true;

+

+/**

+ * Animation instance for container expand/collapse.

+ *

+ * @type boolean

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._oAnim = null;

+

+/**

+ * Container DOM element.

+ *

+ * @type object

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._oContainer = null;

+

+/**

+ * Whether or not the auto complete container is currently open.

+ *

+ * @type boolean

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._bContainerOpen = false;

+

+/**

+ * Whether or not the mouse is currently over the auto complete

+ * container. This is necessary in order to prevent clicks on container items

+ * from being text input box blur events.

+ *

+ * @type boolean

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._bOverContainer = false;

+

+/**

+ * Array of &lt;li&gt; elements references that contain query results within 
the

+ * auto complete container.

+ *

+ * @type array

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._aListItems = null;

+

+/**

+ * Number of &lt;li&gt; elements currently displayed in auto complete 
container.

+ *

+ * @type number

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._nDisplayedItems = 0;

+

+/**

+ * Internal count of &lt;li&gt; elements displayed and hidden in auto complete 
container.

+ *

+ * @type number

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._maxResultsDisplayed = 0;

+

+/**

+ * Current query string

+ *

+ * @type string

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._sCurQuery = null;

+

+/**

+ * Past queries this session (for saving delimited queries).

+ *

+ * @type string

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._sSavedQuery = null;

+

+/**

+ * Pointer to the currently highlighted &lt;li&gt; element in the container.

+ *

+ * @type object

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._oCurItem = 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.

+ *

+ * @type boolean

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._bItemSelected = false;

+

+/**

+ * Key code of the last key pressed in textbox.

+ *

+ * @type number

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._nKeyCode = null;

+

+/**

+ * Delay timeout ID.

+ *

+ * @type number

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._nDelayID = -1;

+

+/***************************************************************************

+ * Private methods

+ ***************************************************************************/

+/**

+ * Updates and validates latest public config properties.

+ *

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._initProps = function() {

+    // Correct any invalid values

+    var minQueryLength = this.minQueryLength;

+    if(isNaN(minQueryLength) || (minQueryLength < 1)) {

+        minQueryLength = 1;

+    }

+    var maxResultsDisplayed = this.maxResultsDisplayed;

+    if(isNaN(this.maxResultsDisplayed) || (this.maxResultsDisplayed < 1)) {

+        this.maxResultsDisplayed = 10;

+    }

+    var queryDelay = this.queryDelay;

+    if(isNaN(this.queryDelay) || (this.queryDelay < 0)) {

+        this.queryDelay = 0.5;

+    }

+    var aDelimChar = (this.delimChar) ? this.delimChar : null;

+    if(aDelimChar) {

+        if(typeof aDelimChar == "string") {

+            this.delimChar = [aDelimChar];

+        }

+        else if(aDelimChar.constructor != Array) {

+            this.delimChar = null;

+        }

+    }

+    var animSpeed = this.animSpeed;

+    if((this.animHoriz || this.animVert) && YAHOO.util.Anim) {

+        if(isNaN(animSpeed) || (animSpeed < 0)) {

+            animSpeed = 0.3;

+        }

+        if(!this._oAnim ) {

+            oAnim = new YAHOO.util.Anim(this._oContainer._oContent, {}, 
this.animSpeed);

+            this._oAnim = oAnim;

+        }

+        else {

+            this._oAnim.duration = animSpeed;

+        }

+    }

+    if(this.forceSelection && this.delimChar) {

+    }

+    if(this.alwaysShowContainer && (this.useShadow || this.useIFrame)) {

+    }

+

+    if(this.alwaysShowContainer) {

+        this._bContainerOpen = true;

+    }

+};

+

+/**

+ * Initializes the auto complete container helpers if they are enabled and do

+ * not exist

+ *

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._initContainerHelpers = function() {

+    if(this.useShadow && !this._oContainer._oShadow) {

+        var oShadow = document.createElement("div");

+        oShadow.className = "yui-ac-shadow";

+        this._oContainer._oShadow = this._oContainer.appendChild(oShadow);

+    }

+    if(this.useIFrame && !this._oContainer._oIFrame) {

+        var oIFrame = document.createElement("iframe");

+        oIFrame.src = this.iFrameSrc;

+        oIFrame.frameBorder = 0;

+        oIFrame.scrolling = "no";

+        oIFrame.style.position = "absolute";

+        oIFrame.style.width = "100%";

+        oIFrame.style.height = "100%";

+        this._oContainer._oIFrame = this._oContainer.appendChild(oIFrame);

+    }

+};

+

+/**

+ * Initializes the auto complete container once at object creation

+ *

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._initContainer = function() {

+    if(!this._oContainer._oContent) {

+        // The oContent div helps size the iframe and shadow properly

+        var oContent = document.createElement("div");

+        oContent.className = "yui-ac-content";

+        oContent.style.display = "none";

+        this._oContainer._oContent = this._oContainer.appendChild(oContent);

+

+        var oHeader = document.createElement("div");

+        oHeader.className = "yui-ac-hd";

+        oHeader.style.display = "none";

+        this._oContainer._oContent._oHeader = 
this._oContainer._oContent.appendChild(oHeader);

+

+        var oBody = document.createElement("div");

+        oBody.className = "yui-ac-bd";

+        this._oContainer._oContent._oBody = 
this._oContainer._oContent.appendChild(oBody);

+

+        var oFooter = document.createElement("div");

+        oFooter.className = "yui-ac-ft";

+        oFooter.style.display = "none";

+        this._oContainer._oContent._oFooter = 
this._oContainer._oContent.appendChild(oFooter);

+    }

+    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.

+ *

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._initList = function() {

+    this._aListItems = [];

+    while(this._oContainer._oContent._oBody.hasChildNodes()) {

+        var oldListItems = this.getListItems();

+        if(oldListItems) {

+            for(var oldi = oldListItems.length-1; oldi >= 0; i--) {

+                oldListItems[oldi] = null;

+            }

+        }

+        this._oContainer._oContent._oBody.innerHTML = "";

+    }

+

+    var oList = document.createElement("ul");

+    oList = this._oContainer._oContent._oBody.appendChild(oList);

+    for(var i=0; i<this.maxResultsDisplayed; i++) {

+        var oItem = document.createElement("li");

+        oItem = oList.appendChild(oItem);

+        this._aListItems[i] = oItem;

+        this._initListItem(oItem, i);

+    }

+    this._maxResultsDisplayed = this.maxResultsDisplayed;

+};

+

+/**

+ * Initializes each &lt;li&gt; element in the container list.

+ *

+ * @param {object} oItem The &lt;li&gt; DOM element

+ * @param {number} nItemIndex The index of the element

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._initListItem = function(oItem, 
nItemIndex) {

+    var oSelf = this;

+    oItem.style.display = "none";

+    oItem._nItemIndex = nItemIndex;

+

+    oItem.mouseover = oItem.mouseout = oItem.onclick = null;

+    
YAHOO.util.Event.addListener(oItem,"mouseover",oSelf._onItemMouseover,oSelf);

+    YAHOO.util.Event.addListener(oItem,"mouseout",oSelf._onItemMouseout,oSelf);

+    YAHOO.util.Event.addListener(oItem,"click",oSelf._onItemMouseclick,oSelf);

+};

+

+/**

+ * Handles &lt;li&gt; element mouseover events in the container.

+ *

+ * @param {event} v The mouseover event

+ * @param {object} oSelf The auto complete 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.

+ *

+ * @param {event} v The mouseout event

+ * @param {object} oSelf The auto complete 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.

+ *

+ * @param {event} v The click event

+ * @param {object} oSelf The auto complete 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.

+ *

+ * @param {event} v The mouseover event

+ * @param {object} oSelf The auto complete instance

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._onContainerMouseover = function(v,oSelf) {

+    oSelf._bOverContainer = true;

+};

+

+/**

+ * Handles container mouseout events.

+ *

+ * @param {event} v The mouseout event

+ * @param {object} oSelf The auto complete instance

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._onContainerMouseout = function(v,oSelf) {

+    oSelf._bOverContainer = false;

+    // If container is still active

+    if(oSelf._oCurItem) {

+        oSelf._toggleHighlight(oSelf._oCurItem,"to");

+    }

+};

+

+/**

+ * Handles container scroll events.

+ *

+ * @param {event} v The scroll event

+ * @param {object} oSelf The auto complete instance

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._onContainerScroll = function(v,oSelf) {

+    oSelf._oTextbox.focus();

+};

+

+/**

+ * Handles container resize events.

+ *

+ * @param {event} v The resize event

+ * @param {object} oSelf The auto complete 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.

+ *

+ * @param {event} v The keydown event

+ * @param {object} oSelf The auto complete instance

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown = function(v,oSelf) {

+    var nKeyCode = v.keyCode;

+

+    switch (nKeyCode) {

+        case 9: // tab

+            if(oSelf.delimChar && (oSelf._nKeyCode != nKeyCode)) {

+                if(oSelf._bContainerOpen) {

+                    YAHOO.util.Event.stopEvent(v);

+                }

+            }

+            // select an item or clear out

+            if(oSelf._oCurItem) {

+                oSelf._selectItem(oSelf._oCurItem);

+            }

+            else {

+                oSelf._clearList();

+            }

+            break;

+        case 13: // enter

+            if(oSelf._nKeyCode != nKeyCode) {

+                if(oSelf._bContainerOpen) {

+                    YAHOO.util.Event.stopEvent(v);

+                }

+            }

+            if(oSelf._oCurItem) {

+                oSelf._selectItem(oSelf._oCurItem);

+            }

+            else {

+                oSelf._clearList();

+            }

+            break;

+        case 27: // esc

+            oSelf._clearList();

+            return;

+        case 39: // right

+            oSelf._jumpSelection();

+            break;

+        case 38: // up

+            YAHOO.util.Event.stopEvent(v);

+            oSelf._moveSelection(nKeyCode);

+            break;

+        case 40: // down

+            YAHOO.util.Event.stopEvent(v);

+            oSelf._moveSelection(nKeyCode);

+            break;

+        default:

+            break;

+    }

+};

+

+/**

+ * Handles textbox keypress events, mainly for stopEvent in Safari.

+ *

+ * @param {event} v The keyup event

+ * @param {object} oSelf The auto complete instance

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress = function(v,oSelf) {

+    var nKeyCode = v.keyCode;

+

+    switch (nKeyCode) {

+    case 9: // tab

+    case 13: // enter

+        if((oSelf._nKeyCode != nKeyCode)) {

+                YAHOO.util.Event.stopEvent(v);

+        }

+        break;

+    case 38: // up

+    case 40: // down

+        YAHOO.util.Event.stopEvent(v);

+        break;

+    default:

+        break;

+    }

+};

+

+/**

+ * Handles textbox keyup events that trigger queries.

+ *

+ * @param {event} v The keyup event

+ * @param {object} oSelf The auto complete instance

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp = function(v,oSelf) {

+    // Check to see if any of the public properties have been updated

+    oSelf._initProps();

+

+    var nKeyCode = v.keyCode;

+    oSelf._nKeyCode = nKeyCode;

+    var sChar = String.fromCharCode(nKeyCode);

+    var sText = this.value; //string in textbox

+

+    // Filter out chars that don't trigger queries

+    if (oSelf._isIgnoreKey(nKeyCode) || (sText.toLowerCase() == 
oSelf._sCurQuery)) {

+        return;

+    }

+    else {

+        oSelf.textboxKeyEvent.fire(oSelf, nKeyCode);

+    }

+

+    // Set timeout on the request

+    if (oSelf.queryDelay > 0) {

+        var nDelayID =

+            setTimeout(function(){oSelf._sendQuery(sText);},(oSelf.queryDelay 
* 1000));

+

+        if (oSelf._nDelayID != -1) {

+            clearTimeout(oSelf._nDelayID);

+        }

+

+        oSelf._nDelayID = nDelayID;

+    }

+    else {

+        // No delay so send request immediately

+        oSelf._sendQuery(sText);

+    }

+};

+

+/**

+ * 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.

+ *

+ * @param {number} nKeycode Code of key pressed

+ * @return {boolean} Whether or not to be ignore key

+ * @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 >= 44 && nKeyCode <= 45)) { // print screen,insert

+        return true;

+    }

+    return false;

+};

+

+/**

+ * Handles text input box receiving focus.

+ *

+ * @param {event} v The focus event

+ * @param {object} oSelf The auto complete instance

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._onTextboxFocus = function (v,oSelf) {

+    oSelf._oTextbox.setAttribute("autocomplete","off");

+    oSelf._bFocused = true;

+    oSelf.textboxFocusEvent.fire(oSelf);

+};

+

+/**

+ * Handles text input box losing focus.

+ *

+ * @param {event} v The focus event

+ * @param {object} oSelf The auto complete instance

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._onTextboxBlur = function (v,oSelf) {

+    // Don't treat as a blur if it was a selection via mouse click

+    if(!oSelf._bOverContainer || (oSelf._nKeyCode == 9)) {

+        // Current query needs to be validated

+        if(!oSelf._bItemSelected) {

+            if(!oSelf._bContainerOpen || (oSelf._bContainerOpen && 
!oSelf._textMatchesOption())) {

+                if(oSelf.forceSelection) {

+                    oSelf._clearSelection();

+                }

+                else {

+                    oSelf.unmatchedItemSelectEvent.fire(oSelf, 
oSelf._sCurQuery);

+                }

+            }

+        }

+

+        if(oSelf._bContainerOpen) {

+            oSelf._clearList();

+        }

+        oSelf._bFocused = false;

+        oSelf.textboxBlurEvent.fire(oSelf);

+    }

+};

+

+/**

+ * Handles form submission event.

+ *

+ * @param {event} v The submit event

+ * @param {object} oSelf The auto complete instance

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._onFormSubmit = function(v,oSelf) {

+    if(oSelf.allowBrowserAutocomplete) {

+        oSelf._oTextbox.setAttribute("autocomplete","on");

+    }

+    else {

+        oSelf._oTextbox.setAttribute("autocomplete","off");

+    }

+};

+

+/**

+ * Makes query request to the data source.

+ *

+ * @param {string} sQuery Query string.

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._sendQuery = function(sQuery) {

+    // Delimiter has been enabled

+    var aDelimChar = (this.delimChar) ? this.delimChar : null;

+    if(aDelimChar) {

+        // Loop through all possible delimiters and find the latest one

+        // 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 so extract the latest query

+        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._sSavedQuery = sQuery.substring(0,nQueryStart);

+            // Here is the query itself

+            sQuery = sQuery.substr(nQueryStart);

+        }

+        else if(sQuery.indexOf(this._sSavedQuery) < 0){

+            this._sSavedQuery = null;

+        }

+    }

+

+    // Don't search queries that are too short

+    if (sQuery.length < this.minQueryLength) {

+        if (this._nDelayID != -1) {

+            clearTimeout(this._nDelayID);

+        }

+        this._clearList();

+        return;

+    }

+

+    sQuery = encodeURIComponent(sQuery);

+    this._nDelayID = -1;    // Reset timeout ID because request has been made

+    this.dataRequestEvent.fire(this, sQuery);

+    this.dataSource.getResults(this._populateList, sQuery, this);

+};

+

+/**

+ * Hides all visuals related to the array of &lt;li&gt; elements in the 
container.

+ *

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._clearList = function() {

+    this._oContainer._oContent.scrollTop = 0;

+    var aItems = this._aListItems;

+

+    if(aItems && (aItems.length > 0)) {

+        for(var i = aItems.length-1; i >= 0 ; i--) {

+            aItems[i].style.display = "none";

+        }

+    }

+

+    if (this._oCurItem) {

+        this._toggleHighlight(this._oCurItem,"from");

+    }

+

+    this._oCurItem = null;

+    this._nDisplayedItems = 0;

+    this._sCurQuery = null;

+    this._toggleContainer(false);

+};

+

+/**

+ * Populates the array of &lt;li&gt; elements in the container with query

+ * results. This method is passed to YAHOO.widget.DataSource#getResults as a

+ * callback function so results from the datasource are returned to the

+ * auto complete instance.

+ *

+ * @param {string} sQuery The query string

+ * @param {object} aResults An array of query result objects from the data 
source

+ * @param {string} oSelf The auto complete instance

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._populateList = function(sQuery, aResults, 
oSelf) {

+    if(aResults === null) {

+        oSelf.dataErrorEvent.fire(oSelf, sQuery);

+    }

+    if (!oSelf._bFocused || !aResults) {

+        return;

+    }

+

+    var isOpera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1);

+    var contentStyle = oSelf._oContainer._oContent.style;

+    contentStyle.width = (!isOpera) ? null : "";

+    contentStyle.height = (!isOpera) ? null : "";

+

+    var sCurQuery = decodeURIComponent(sQuery);

+    oSelf._sCurQuery = sCurQuery;

+    oSelf._bItemSelected = false;

+

+    if(oSelf._maxResultsDisplayed != oSelf.maxResultsDisplayed) {

+        oSelf._initList();

+    }

+

+    var nItems = Math.min(aResults.length,oSelf.maxResultsDisplayed);

+    oSelf._nDisplayedItems = nItems;

+    if (nItems > 0) {

+        oSelf._initContainerHelpers();

+        var aItems = oSelf._aListItems;

+

+        // Fill items with data

+        for(var i = nItems-1; i >= 0; i--) {

+            var oItemi = aItems[i];

+            var oResultItemi = aResults[i];

+            oItemi.innerHTML = oSelf.formatResult(oResultItemi, sCurQuery);

+            oItemi.style.display = "list-item";

+            oItemi._sResultKey = oResultItemi[0];

+            oItemi._oResultData = oResultItemi;

+

+        }

+

+        // Empty out remaining items if any

+        for(var j = aItems.length-1; j >= nItems ; j--) {

+            var oItemj = aItems[j];

+            oItemj.innerHTML = null;

+            oItemj.style.display = "none";

+            oItemj._sResultKey = null;

+            oItemj._oResultData = null;

+        }

+

+        if(oSelf.autoHighlight) {

+            // Go to the first item

+            var oFirstItem = aItems[0];

+            oSelf._toggleHighlight(oFirstItem,"to");

+            oSelf.itemArrowToEvent.fire(oSelf, oFirstItem);

+            oSelf._typeAhead(oFirstItem,sQuery);

+        }

+        else {

+            oSelf._oCurItem = null;

+        }

+

+        // Expand the container

+        oSelf._toggleContainer(true);

+    }

+    else {

+        oSelf._clearList();

+    }

+    oSelf.dataReturnEvent.fire(oSelf, sQuery, aResults);

+};

+

+/**

+ * When YAHOO.widget.AutoComplete#bForceSelection is true and the user attempts

+ * leave the text input box without selecting an item from the query results,

+ * the user selection is cleared.

+ *

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._clearSelection = function() {

+    var sValue = this._oTextbox.value;

+    var sChar = (this.delimChar) ? this.delimChar[0] : null;

+    var nIndex = (sChar) ? sValue.lastIndexOf(sChar, sValue.length-2) : -1;

+    if(nIndex > -1) {

+        this._oTextbox.value = sValue.substring(0,nIndex);

+    }

+    else {

+         this._oTextbox.value = "";

+    }

+    this._sSavedQuery = this._oTextbox.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.

+ *

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._textMatchesOption = function() {

+    var foundMatch = false;

+

+    for(var i = this._nDisplayedItems-1; i >= 0 ; i--) {

+        var oItem = this._aListItems[i];

+        var sMatch = oItem._sResultKey.toLowerCase();

+        if (sMatch == this._sCurQuery.toLowerCase()) {

+            foundMatch = true;

+            break;

+        }

+    }

+    return(foundMatch);

+};

+

+/**

+ * Updates in the text input box with the first query result as the user types,

+ * selecting the substring that the user has not typed.

+ *

+ * @param {object} oItem The &lt;li&gt; element item whose data populates the 
input field

+ * @param {string} sQuery Query string

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._typeAhead = function(oItem, sQuery) {

+    // Don't update if turned off

+    if (!this.typeAhead) {

+        return;

+    }

+

+    var oTextbox = this._oTextbox;

+    var sValue = this._oTextbox.value; // any saved queries plus what user has 
typed

+

+    // Don't update with type-ahead if text selection is not supported

+    if(!oTextbox.setSelectionRange && !oTextbox.createTextRange) {

+        return;

+    }

+

+    // Select the portion of text that the user has not typed

+    var nStart = sValue.length;

+    this._updateValue(oItem);

+    var nEnd = oTextbox.value.length;

+    this._selectText(oTextbox,nStart,nEnd);

+    var sPrefill = oTextbox.value.substr(nStart,nEnd);

+    this.typeAheadEvent.fire(this,sQuery,sPrefill);

+};

+

+/**

+ * Selects text in a text input box.

+ *

+ * @param {object} oTextbox Text input box element in which to select text

+ * @param {number} nStart Starting index of text string to select

+ * @param {number} nEnd Ending index of text selection

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._selectText = function(oTextbox, nStart, 
nEnd) {

+    if (oTextbox.setSelectionRange) { // For Mozilla

+        oTextbox.setSelectionRange(nStart,nEnd);

+    }

+    else if (oTextbox.createTextRange) { // For IE

+        var oTextRange = oTextbox.createTextRange();

+        oTextRange.moveStart("character", nStart);

+        oTextRange.moveEnd("character", nEnd-oTextbox.value.length);

+        oTextRange.select();

+    }

+    else {

+        oTextbox.select();

+    }

+};

+

+/**

+ * Syncs auto complete container with its helpers.

+ *

+ * @param {boolean} bShow True if container is expanded, false if collapsed

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers = function(bShow) {

+    var bFireEvent = false;

+    var width = this._oContainer._oContent.offsetWidth + "px";

+    var height = this._oContainer._oContent.offsetHeight + "px";

+

+    if(this.useIFrame && this._oContainer._oIFrame) {

+        bFireEvent = true;

+        if(this.alwaysShowContainer || bShow) {

+            this._oContainer._oIFrame.style.width = width;

+            this._oContainer._oIFrame.style.height = height;

+        }

+        else {

+            this._oContainer._oIFrame.style.width = 0;

+            this._oContainer._oIFrame.style.height = 0;

+        }

+    }

+    if(this.useShadow && this._oContainer._oShadow) {

+        bFireEvent = true;

+        if(this.alwaysShowContainer || bShow) {

+            this._oContainer._oShadow.style.width = width;

+            this._oContainer._oShadow.style.height = height;

+        }

+        else {

+           this._oContainer._oShadow.style.width = 0;

+            this._oContainer._oShadow.style.height = 0;

+        }

+    }

+};

+

+/**

+ * Animates expansion or collapse of the container.

+ *

+ * @param {boolean} bShow True if container should be expanded, false if

+ *                        container should be collapsed

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) {

+    // Implementer has container always open so don't mess with it

+    if(this.alwaysShowContainer) {

+        // Fire these events to give implementers a hook into the container

+        // being populated and being emptied

+        if(bShow) {

+            this.containerExpandEvent.fire(this);

+        }

+        else {

+            this.containerCollapseEvent.fire(this);

+        }

+        this._bContainerOpen = bShow;

+        return;

+    }

+

+    var oContainer = this._oContainer;

+    // Container is already closed

+    if (!bShow && !this._bContainerOpen) {

+        oContainer._oContent.style.display = "none";

+        return;

+    }

+

+    // If animation is enabled...

+    var oAnim = this._oAnim;

+    if (oAnim && oAnim.getEl() && (this.animHoriz || this.animVert)) {

+        // If helpers need to be collapsed, do it right away...

+        // but if helpers need to be expanded, wait until after the container 
expands

+        if(!bShow) {

+            this._toggleContainerHelpers(bShow);

+        }

+

+        if(oAnim.isAnimated()) {

+            oAnim.stop();

+        }

+

+        // Clone container to grab current size offscreen

+        var oClone = oContainer._oContent.cloneNode(true);

+        oContainer.appendChild(oClone);

+        oClone.style.top = "-9000px";

+        oClone.style.display = "block";

+

+        // 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) {

+            oContainer._oContent.style.width = wColl+"px";

+            oContainer._oContent.style.height = hColl+"px";

+        }

+        // Else, set it to its last known size.

+        else {

+            oContainer._oContent.style.width = wExp+"px";

+            oContainer._oContent.style.height = hExp+"px";

+        }

+

+        oContainer.removeChild(oClone);

+        oClone = null;

+

+       var oSelf = this;

+       var onAnimComplete = function() {

+            // Finish the collapse

+               oAnim.onComplete.unsubscribeAll();

+

+            if(bShow) {

+                oSelf.containerExpandEvent.fire(oSelf);

+            }

+            else {

+                oContainer._oContent.style.display = "none";

+                oSelf.containerCollapseEvent.fire(oSelf);

+            }

+            oSelf._toggleContainerHelpers(bShow);

+       };

+

+        // Display container and animate it

+        oContainer._oContent.style.display = "block";

+        oAnim.onComplete.subscribe(onAnimComplete);

+        oAnim.animate();

+        this._bContainerOpen = bShow;

+    }

+    // Else don't animate, just show or hide

+    else {

+        if(bShow) {

+            oContainer._oContent.style.display = "block";

+            this.containerExpandEvent.fire(this);

+        }

+        else {

+            oContainer._oContent.style.display = "none";

+            this.containerCollapseEvent.fire(this);

+        }

+        this._toggleContainerHelpers(bShow);

+        this._bContainerOpen = bShow;

+   }

+

+};

+

+/**

+ * Toggles the highlight on or off for an item in the container, and also 
cleans

+ * up highlighting of any previous item.

+ *

+ * @param {object} oNewItem New The &lt;li&gt; element item to receive 
highlight

+ *                              behavior

+ * @param {string} sType "mouseover" will toggle highlight on, and "mouseout"

+ *                       will toggle highlight off.

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._toggleHighlight = function(oNewItem, 
sType) {

+    var sHighlight = this.highlightClassName;

+    if(this._oCurItem) {

+        // Remove highlight from old item

+        YAHOO.util.Dom.removeClass(this._oCurItem, sHighlight);

+    }

+

+    if((sType == "to") && sHighlight) {

+        // Apply highlight to new item

+        YAHOO.util.Dom.addClass(oNewItem, sHighlight);

+        this._oCurItem = oNewItem;

+    }

+};

+

+/**

+ * Toggles the pre-highlight on or off for an item in the container.

+ *

+ * @param {object} oNewItem New The &lt;li&gt; element item to receive 
highlight

+ *                              behavior

+ * @param {string} sType "mouseover" will toggle highlight on, and "mouseout"

+ *                       will toggle highlight off.

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._togglePrehighlight = function(oNewItem, 
sType) {

+    if(oNewItem == this._oCurItem) {

+        return;

+    }

+

+    var sPrehighlight = this.prehighlightClassName;

+    if((sType == "mouseover") && sPrehighlight) {

+        // Apply prehighlight to new item

+        YAHOO.util.Dom.addClass(oNewItem, sPrehighlight);

+    }

+    else {

+        // Remove prehighlight from old item

+        YAHOO.util.Dom.removeClass(oNewItem, 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.

+ *

+ * @param {object} oItem The &lt;li&gt; element item with which to update the 
value

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._updateValue = function(oItem) {

+    var oTextbox = this._oTextbox;

+    var sDelimChar = (this.delimChar) ? this.delimChar[0] : null;

+    var sSavedQuery = this._sSavedQuery;

+    var sResultKey = oItem._sResultKey;

+    oTextbox.focus();

+

+    // First clear text field

+    oTextbox.value = "";

+    // Grab data to put into text field

+    if(sDelimChar) {

+        if(sSavedQuery) {

+            oTextbox.value = sSavedQuery;

+        }

+        oTextbox.value += sResultKey + sDelimChar;

+        if(sDelimChar != " ") {

+            oTextbox.value += " ";

+        }

+    }

+    else { oTextbox.value = sResultKey; }

+

+    // scroll to bottom of textarea if necessary

+    if(oTextbox.type == "textarea") {

+        oTextbox.scrollTop = oTextbox.scrollHeight;

+    }

+

+    // move cursor to end

+    var end = oTextbox.value.length;

+    this._selectText(oTextbox,end,end);

+

+    this._oCurItem = oItem;

+};

+

+/**

+ * Selects a result item from the container

+ *

+ * @param {object} oItem The selected &lt;li&gt; element item

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._selectItem = function(oItem) {

+    this._bItemSelected = true;

+    this._updateValue(oItem);

+    this.itemSelectEvent.fire(this, oItem, oItem._oResultData);

+    this._clearList();

+};

+

+/**

+ * For values updated by type-ahead, the right arrow key jumps to the end

+ * of the textbox, otherwise the container is closed.

+ *

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._jumpSelection = function() {

+    if(!this.typeAhead) {

+        return;

+    }

+    else {

+        this._clearList();

+    }

+};

+

+/**

+ * Triggered by up and down arrow keys, changes the current highlighted

+ * &lt;li&gt; element item. Scrolls container if necessary.

+ *

+ * @param {number} nKeyCode Code of key pressed

+ * @private

+ */

+YAHOO.widget.AutoComplete.prototype._moveSelection = function(nKeyCode) {

+    if(this._bContainerOpen) {

+        // Determine current item's id number

+        var oCurItem = this._oCurItem;

+        var nCurItemIndex = -1;

+

+        if (oCurItem) {

+            nCurItemIndex = oCurItem._nItemIndex;

+        }

+

+        var nNewItemIndex = (nKeyCode == 40) ?

+                (nCurItemIndex + 1) : (nCurItemIndex - 1);

+

+        // Out of bounds

+        if (nNewItemIndex < -2 || nNewItemIndex >= this._nDisplayedItems) {

+            return;

+        }

+

+        if (oCurItem) {

+            // Unhighlight current item

+            this._toggleHighlight(oCurItem, "from");

+            this.itemArrowFromEvent.fire(this, oCurItem);

+        }

+        if (nNewItemIndex == -1) {

+           // Go back to query (remove type-ahead string)

+            if(this.delimChar && this._sSavedQuery) {

+                if (!this._textMatchesOption()) {

+                    this._oTextbox.value = this._sSavedQuery;

+                }

+                else {

+                    this._oTextbox.value = this._sSavedQuery + this._sCurQuery;

+                }

+            }

+            else {

+                this._oTextbox.value = this._sCurQuery;

+            }

+            this._oCurItem = null;

+            return;

+        }

+        if (nNewItemIndex == -2) {

+            // Close container

+            this._clearList();

+            return;

+        }

+

+        var oNewItem = this._aListItems[nNewItemIndex];

+

+        // Scroll the container if necessary

+        if((YAHOO.util.Dom.getStyle(this._oContainer._oContent,"overflow") == 
"auto") &&

+        (nNewItemIndex > -1) && (nNewItemIndex < this._nDisplayedItems)) {

+            // User is keying down

+            if(nKeyCode == 40) {

+                // Bottom of selected item is below scroll area...

+                if((oNewItem.offsetTop+oNewItem.offsetHeight) > 
(this._oContainer._oContent.scrollTop + 
this._oContainer._oContent.offsetHeight)) {

+                    // Set bottom of scroll area to bottom of selected item

+                    this._oContainer._oContent.scrollTop = 
(oNewItem.offsetTop+oNewItem.offsetHeight) - 
this._oContainer._oContent.offsetHeight;

+                }

+                // Bottom of selected item is above scroll area...

+                else if((oNewItem.offsetTop+oNewItem.offsetHeight) < 
this._oContainer._oContent.scrollTop) {

+                    // Set top of selected item to top of scroll area

+                    this._oContainer._oContent.scrollTop = oNewItem.offsetTop;

+

+                }

+            }

+            // User is keying up

+            else {

+                // Top of selected item is above scroll area

+                if(oNewItem.offsetTop < this._oContainer._oContent.scrollTop) {

+                    // Set top of scroll area to top of selected item

+                    this._oContainer._oContent.scrollTop = oNewItem.offsetTop;

+                }

+                // Top of selected item is below scroll area

+                else if(oNewItem.offsetTop > 
(this._oContainer._oContent.scrollTop + 
this._oContainer._oContent.offsetHeight)) {

+                    // Set bottom of selected item to bottom of scroll area

+                    this._oContainer._oContent.scrollTop = 
(oNewItem.offsetTop+oNewItem.offsetHeight) - 
this._oContainer._oContent.offsetHeight;

+                }

+            }

+        }

+

+        this._toggleHighlight(oNewItem, "to");

+        this.itemArrowToEvent.fire(this, oNewItem);

+        if(this.typeAhead) {

+            this._updateValue(oNewItem);

+        }

+    }

+};

+

+/****************************************************************************/

+/****************************************************************************/

+/****************************************************************************/

+

+/**

+ * Class providing encapsulation of a data source. 

+ *  

+ * @constructor

+ *

+ */

+YAHOO.widget.DataSource = function() { 

+    /* abstract class */

+};

+

+

+/***************************************************************************

+ * Public constants

+ ***************************************************************************/

+/**

+ * Error message for null data responses.

+ *

+ * @type constant

+ * @final

+ */

+YAHOO.widget.DataSource.prototype.ERROR_DATANULL = "Response data was null";

+

+/**

+ * Error message for data responses with parsing errors.

+ *

+ * @type constant

+ * @final

+ */

+YAHOO.widget.DataSource.prototype.ERROR_DATAPARSE = "Response data could not 
be parsed";

+

+

+/***************************************************************************

+ * Public member variables

+ ***************************************************************************/

+/**

+ * Max size of the local cache.  Set to 0 to turn off caching.  Caching is

+ * useful to reduce the number of server connections.  Recommended only for 
data

+ * sources that return comprehensive results for queries or when stale data is

+ * not an issue. Default: 15.

+ *

+ * @type number

+ */

+YAHOO.widget.DataSource.prototype.maxCacheEntries = 15;

+

+/**

+ * Use this to equate cache matching with the type of matching done by your 
live

+ * data source. If caching is on and queryMatchContains is true, the cache

+ * returns results that "contain" the query string. By default,

+ * queryMatchContains is set to false, meaning the cache only returns results

+ * that "start with" the query string. Default: false.

+ *

+ * @type boolean

+ */

+YAHOO.widget.DataSource.prototype.queryMatchContains = false;

+

+/**

+ * Data source query subset matching. If caching is on 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 data sources that return comprehensive results

+ * for queries with very few characters. Default: false.

+ *

+ * @type boolean

+ */

+YAHOO.widget.DataSource.prototype.queryMatchSubset = false;

+

+/**

+ * Data source query case-sensitivity matching. If caching is on and

+ * queryMatchCase is true, queries will only return results for case-sensitive

+ * matches. Default: false.

+ *

+ * @type boolean

+ */

+YAHOO.widget.DataSource.prototype.queryMatchCase = false;

+

+

+/***************************************************************************

+ * Public methods

+ ***************************************************************************/

+ /**

+ * Public accessor to the unique name of the data source instance.

+ *

+ * @return {string} Unique name of the data source instance

+ */

+YAHOO.widget.DataSource.prototype.getName = function() {

+    return this._sName;

+};

+

+ /**

+ * Public accessor to the unique name of the data source instance.

+ *

+ * @return {string} Unique name of the data source instance

+ */

+YAHOO.widget.DataSource.prototype.toString = function() {

+    return "DataSource " + this._sName;

+};

+

+/**

+ * Retrieves query results, first checking the local cache, then making the

+ * query request to the live data source as defined by the function doQuery.

+ *

+ * @param {object} oCallbackFn Callback function defined by oParent object to

+ *                             which to return results 

+ * @param {string} sQuery Query string

+ * @param {object} oParent The object instance that has requested data

+ */

+YAHOO.widget.DataSource.prototype.getResults = function(oCallbackFn, sQuery, 
oParent) {

+    

+    // First look in cache

+    var aResults = this._doQueryCache(oCallbackFn,sQuery,oParent);

+    

+    // Not in cache, so get results from server

+    if(aResults.length === 0) {

+        this.queryEvent.fire(this, oParent, sQuery);

+        this.doQuery(oCallbackFn, sQuery, oParent);

+    }

+};

+

+/**

+ * Abstract method implemented by subclasses to make a query to the live data

+ * source. Must call the callback function with the response returned from the

+ * query. Populates cache (if enabled).

+ *

+ * @param {object} oCallbackFn Callback function implemented by oParent to

+ *                             which to return results 

+ * @param {string} sQuery Query string

+ * @param {object} oParent The object instance that has requested data

+ */

+YAHOO.widget.DataSource.prototype.doQuery = function(oCallbackFn, sQuery, 
oParent) {

+    /* override this */ 

+};

+

+/**

+ * Flushes cache.

+ */

+YAHOO.widget.DataSource.prototype.flushCache = function() {

+    if(this._aCache) {

+        this._aCache = [];

+    }

+    if(this._aCacheHelper) {

+        this._aCacheHelper = [];

+    }

+    this.cacheFlushEvent.fire(this);

+};

+

+/***************************************************************************

+ * Events

+ ***************************************************************************/

+/**

+ * Fired when a query is made to the live data source. Subscribers receive the

+ * following array:<br>

+ *     - args[0] The data source instance

+ *     - args[1] The requesting object

+ *     - args[2] The query string

+ */

+YAHOO.widget.DataSource.prototype.queryEvent = null;

+

+/**

+ * Fired when a query is made to the local cache. Subscribers receive the

+ * following array:<br>

+ *     - args[0] The data source instance

+ *     - args[1] The requesting object

+ *     - args[2] The query string

+ */

+YAHOO.widget.DataSource.prototype.cacheQueryEvent = null;

+

+/**

+ * Fired when data is retrieved from the live data source. Subscribers receive

+ * the following array:<br>

+ *     - args[0] The data source instance

+ *     - args[1] The requesting object

+ *     - args[2] The query string

+ *     - args[3] Array of result objects

+ */

+YAHOO.widget.DataSource.prototype.getResultsEvent = null;

+    

+/**

+ * Fired when data is retrieved from the local cache. Subscribers receive the

+ * following array :<br>

+ *     - args[0] The data source instance

+ *     - args[1] The requesting object

+ *     - args[2] The query string

+ *     - args[3] Array of result objects

+ */

+YAHOO.widget.DataSource.prototype.getCachedResultsEvent = null;

+

+/**

+ * Fired when an error is encountered with the live data source. Subscribers

+ * receive the following array:<br>

+ *     - args[0] The data source instance

+ *     - args[1] The requesting object

+ *     - args[2] The query string

+ *     - args[3] Error message string

+ */

+YAHOO.widget.DataSource.prototype.dataErrorEvent = null;

+

+/**

+ * Fired when the local cache is flushed. Subscribers receive the following

+ * array :<br>

+ *     - args[0] The data source instance

+ */

+YAHOO.widget.DataSource.prototype.cacheFlushEvent = null;

+

+/***************************************************************************

+ * Private member variables

+ ***************************************************************************/

+/**

+ * Internal class variable to index multiple data source instances.

+ *

+ * @type number

+ * @private

+ */

+YAHOO.widget.DataSource._nIndex = 0;

+

+/**

+ * Name of data source instance.

+ *

+ * @type string

+ * @private

+ */

+YAHOO.widget.DataSource.prototype._sName = null;

+

+/**

+ * Local cache of data result objects indexed chronologically.

+ *

+ * @type array

+ * @private

+ */

+YAHOO.widget.DataSource.prototype._aCache = null;

+

+

+/***************************************************************************

+ * Private methods

+ ***************************************************************************/

+/**

+ * Initializes data source instance.

+ *  

+ * @private

+ */

+YAHOO.widget.DataSource.prototype._init = function() {

+    // Validate and initialize public configs

+    var maxCacheEntries = this.maxCacheEntries;

+    if(isNaN(maxCacheEntries) || (maxCacheEntries < 0)) {

+        maxCacheEntries = 0;

+    }

+    // Initialize local cache

+    if(maxCacheEntries > 0 && !this._aCache) {

+        this._aCache = [];

+    }

+    

+    this._sName = "instance" + YAHOO.widget.DataSource._nIndex;

+    YAHOO.widget.DataSource._nIndex++;

+    

+    this.queryEvent = new YAHOO.util.CustomEvent("query", this);

+    this.cacheQueryEvent = new YAHOO.util.CustomEvent("cacheQuery", this);

+    this.getResultsEvent = new YAHOO.util.CustomEvent("getResults", this);

+    this.getCachedResultsEvent = new 
YAHOO.util.CustomEvent("getCachedResults", this);

+    this.dataErrorEvent = new YAHOO.util.CustomEvent("dataError", this);

+    this.cacheFlushEvent = new YAHOO.util.CustomEvent("cacheFlush", this);

+};

+

+/**

+ * Adds a result object to the local cache, evicting the oldest element if the 

+ * cache is full. Newer items will have higher indexes, the oldest item will 
have

+ * index of 0. 

+ *

+ * @param {object} resultObj  Object literal of data results, including 
internal

+ *                            properties and an array of result objects

+ * @private

+ */

+YAHOO.widget.DataSource.prototype._addCacheElem = function(resultObj) {

+    var aCache = this._aCache;

+    // Don't add if anything important is missing.

+    if(!aCache || !resultObj || !resultObj.query || !resultObj.results) {

+        return;

+    }

+    

+    // If the cache is full, make room by removing from index=0

+    if(aCache.length >= this.maxCacheEntries) {

+        aCache.shift();

+    }

+        

+    // Add to cache, at the end of the array

+    aCache.push(resultObj);

+};

+

+/**

+ * Queries the local cache for results. If query has been cached, the callback

+ * function is called with the results, and the cached is refreshed so that it

+ * is now the newest element.  

+ *

+ * @param {object} oCallbackFn Callback function defined by oParent object to 

+ *                             which to return results 

+ * @param {string} sQuery Query string

+ * @param {object} oParent The object instance that has requested data

+ * @return {array} aResults Result object from local cache if found, otherwise 

+ *                          null

+ * @private 

+ */

+YAHOO.widget.DataSource.prototype._doQueryCache = function(oCallbackFn, 
sQuery, oParent) {

+    var aResults = [];

+    var bMatchFound = false;

+    var aCache = this._aCache;

+    var nCacheLength = (aCache) ? aCache.length : 0;

+    var bMatchContains = this.queryMatchContains;

+    

+    // If cache is enabled...

+    if((this.maxCacheEntries > 0) && aCache && (nCacheLength > 0)) {

+        this.cacheQueryEvent.fire(this, oParent, sQuery);

+        // If case is unimportant, normalize query now instead of in loops

+        if(!this.queryMatchCase) {

+            var sOrigQuery = sQuery;

+            sQuery = sQuery.toLowerCase();

+        }

+

+        // Loop through each cached element's query property...

+        for(var i = nCacheLength-1; i >= 0; i--) {

+            var resultObj = aCache[i];

+            var aAllResultItems = resultObj.results;

+            // If case is unimportant, normalize match key for comparison

+            var matchKey = (!this.queryMatchCase) ?

+                encodeURIComponent(resultObj.query.toLowerCase()):

+                encodeURIComponent(resultObj.query);

+            

+            // If a cached match key exactly matches the query...

+            if(matchKey == sQuery) {

+                    // Stash all result objects into aResult[] and stop 
looping through the cache.

+                    bMatchFound = true;

+                    aResults = aAllResultItems;

+                    

+                    // The matching cache element was not the most recent,

+                    // so now we need to refresh the cache.

+                    if(i != nCacheLength-1) {                        

+                        // Remove element from its original location

+                        aCache.splice(i,1);

+                        // Add element as newest

+                        this._addCacheElem(resultObj);

+                    }

+                    break;

+            }

+            // Else if this query is not an exact match and subset matching is 
enabled...

+            else if(this.queryMatchSubset) {

+                // Loop through substrings of each cached element's query 
property...

+                for(var j = sQuery.length-1; j >= 0 ; j--) {

+                    var subQuery = sQuery.substr(0,j);

+                    

+                    // If a substring of a cached sQuery exactly matches the 
query...

+                    if(matchKey == subQuery) {                    

+                        bMatchFound = true;

+                        

+                        // Go through each cached result object to match 
against the query...

+                        for(var k = aAllResultItems.length-1; k >= 0; k--) {

+                            var aRecord = aAllResultItems[k];

+                            var sKeyIndex = (this.queryMatchCase) ?

+                                encodeURIComponent(aRecord[0]).indexOf(sQuery):

+                                
encodeURIComponent(aRecord[0]).toLowerCase().indexOf(sQuery);

+                            

+                            // 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 a match into aResults[].

+                                aResults.unshift(aRecord);

+                            }

+                        }

+                        

+                        // Add the subset match result set object as the 
newest element to cache,

+                        // and stop looping through the cache.

+                        resultObj = {};

+                        resultObj.query = sQuery;

+                        resultObj.results = aResults;

+                        this._addCacheElem(resultObj);

+                        break;

+                    }

+                }

+                if(bMatchFound) {

+                    break;

+                }

+            }

+        }

+        

+        // If there was a match, send along the results.

+        if(bMatchFound) {

+            this.getCachedResultsEvent.fire(this, oParent, sOrigQuery, 
aResults);

+            oCallbackFn(sOrigQuery, aResults, oParent);

+        }

+    }

+    return aResults;

+};

+

+

+/****************************************************************************/

+/****************************************************************************/

+/****************************************************************************/

+

+/**

+ * Implementation of YAHOO.widget.DataSource using XML HTTP requests that 
return

+ * query results.

+ * requires YAHOO.util.Connect XMLHTTPRequest library

+ * extends YAHOO.widget.DataSource

+ *  

+ * @constructor

+ * @param {string} sScriptURI Absolute or relative URI to script that returns 

+ *                            query results as JSON, XML, or delimited flat 
data

+ * @param {array} aSchema Data schema definition of results

+ * @param {object} oConfigs Optional object literal of config params

+ */

+YAHOO.widget.DS_XHR = function(sScriptURI, aSchema, oConfigs) {

+    // Set any config params passed in to override defaults

+    if(typeof oConfigs == "object") {

+        for(var sConfig in oConfigs) {

+            this[sConfig] = oConfigs[sConfig];

+        }

+    }

+    

+    // Initialization sequence

+    if(!aSchema || (aSchema.constructor != Array)) {

+        return;

+    }

+    else {

+        this.schema = aSchema;

+    }

+    this.scriptURI = sScriptURI;

+    this._init();

+};

+

+YAHOO.widget.DS_XHR.prototype = new YAHOO.widget.DataSource();

+

+/***************************************************************************

+ * Public constants

+ ***************************************************************************/

+/**

+ * JSON data type

+ *

+ * @type constant

+ * @final

+ */

+YAHOO.widget.DS_XHR.prototype.TYPE_JSON = 0;

+

+/**

+ * XML data type

+ *

+ * @type constant

+ * @final

+ */

+YAHOO.widget.DS_XHR.prototype.TYPE_XML = 1;

+

+/**

+ * Flat file data type

+ *

+ * @type constant

+ * @final

+ */

+YAHOO.widget.DS_XHR.prototype.TYPE_FLAT = 2;

+

+/**

+ * Error message for XHR failure.

+ *

+ * @type constant

+ * @final

+ */

+YAHOO.widget.DS_XHR.prototype.ERROR_DATAXHR = "XHR response failed";

+

+/***************************************************************************

+ * Public member variables

+ ***************************************************************************/

+/**

+ * Number of milliseconds the XHR connection will wait for a server response. A

+ * a value of zero indicates the XHR connection will wait forever. Any value

+ * greater than zero will use the Connection utility's Auto-Abort feature.

+ * Default: 0.

+ *

+ * @type number

+ */

+YAHOO.widget.DS_XHR.prototype.connTimeout = 0;

+

+

+/**

+ * Absolute or relative URI to script that returns query results. For instance,

+ * queries will be sent to

+ *   <scriptURI>?<scriptQueryParam>=userinput

+ *

+ * @type string

+ */

+YAHOO.widget.DS_XHR.prototype.scriptURI = null;

+

+/**

+ * Query string parameter name sent to scriptURI. For instance, queries will be

+ * sent to

+ *   <scriptURI>?<scriptQueryParam>=userinput

+ * Default: "query".

+ *

+ * @type string

+ */

+YAHOO.widget.DS_XHR.prototype.scriptQueryParam = "query";

+

+/**

+ * String of key/value pairs to append to requests made to scriptURI. Define

+ * this string when you want to send additional query parameters to your 
script.

+ * When defined, queries will be sent to

+ *   <scriptURI>?<scriptQueryParam>=userinput&<scriptQueryAppend>

+ * Default: "".

+ *

+ * @type string

+ */

+YAHOO.widget.DS_XHR.prototype.scriptQueryAppend = "";

+

+/**

+ * XHR response data type. Other types that may be defined are TYPE_XML and

+ * TYPE_FLAT. Default: TYPE_JSON.

+ *

+ * @type type

+ */

+YAHOO.widget.DS_XHR.prototype.responseType = 
YAHOO.widget.DS_XHR.prototype.TYPE_JSON;

+

+/**

+ * String after which to strip results. If the results from the XHR are sent

+ * back as HTML, the gzip HTML comment appears at the end of the data and 
should

+ * be ignored.  Default: "\n&lt;!--"

+ *

+ * @type string

+ */

+YAHOO.widget.DS_XHR.prototype.responseStripAfter = "\n<!--";

+

+/***************************************************************************

+ * Public methods

+ ***************************************************************************/

+/**

+ * Queries the live data source defined by scriptURI for results. Results are

+ * passed back to a callback function.

+ *  

+ * @param {object} oCallbackFn Callback function defined by oParent object to 

+ *                             which to return results 

+ * @param {string} sQuery Query string

+ * @param {object} oParent The object instance that has requested data

+ */

+YAHOO.widget.DS_XHR.prototype.doQuery = function(oCallbackFn, sQuery, oParent) 
{

+    var isXML = (this.responseType == this.TYPE_XML);

+    var sUri = this.scriptURI+"?"+this.scriptQueryParam+"="+sQuery;

+    if(this.scriptQueryAppend.length > 0) {

+        sUri += "&" + this.scriptQueryAppend;

+    }

+    var oResponse = null;

+    

+    var oSelf = this;

+    /**

+     * Sets up ajax request callback

+     *

+     * @param {object} oReq          HTTPXMLRequest object

+     * @private

+     */

+    var responseSuccess = function(oResp) {

+        // Response ID does not match last made request ID.

+        if(!oSelf._oConn || (oResp.tId != oSelf._oConn.tId)) {

+            oSelf.dataErrorEvent.fire(oSelf, oParent, sQuery, 
oSelf.ERROR_DATANULL);

+            return;

+        }

+//DEBUG

+for(var foo in oResp) {

+}

+        if(!isXML) {

+            oResp = oResp.responseText;

+        }

+        else { 

+            oResp = oResp.responseXML;

+        }

+        if(oResp === null) {

+            oSelf.dataErrorEvent.fire(oSelf, oParent, sQuery, 
oSelf.ERROR_DATANULL);

+            return;

+        }

+

+        var aResults = oSelf.parseResponse(sQuery, oResp, oParent);

+        var resultObj = {};

+        resultObj.query = decodeURIComponent(sQuery);

+        resultObj.results = aResults;

+        if(aResults === null) {

+            oSelf.dataErrorEvent.fire(oSelf, oParent, sQuery, 
oSelf.ERROR_DATAPARSE);

+            return;

+        }

+        else {

+            oSelf.getResultsEvent.fire(oSelf, oParent, sQuery, aResults);

+            oSelf._addCacheElem(resultObj);

+            oCallbackFn(sQuery, aResults, oParent);

+        }

+    };

+

+    var responseFailure = function(oResp) {

+        oSelf.dataErrorEvent.fire(oSelf, oParent, sQuery, oSelf.ERROR_DATAXHR);

+        return;

+    };

+    

+    var oCallback = {

+        success:responseSuccess,

+        failure:responseFailure

+    };

+    

+    if(!isNaN(this.connTimeout) && this.connTimeout > 0) {

+        oCallback.timeout = this.connTimeout;

+    }

+    

+    if(this._oConn) {

+        YAHOO.util.Connect.abort(this._oConn);

+    }

+    

+    oSelf._oConn = YAHOO.util.Connect.asyncRequest("GET", sUri, oCallback, 
null);

+};

+

+/**

+ * Parses raw response data into an array of result objects. The result data 
key

+ * is always stashed in the [0] element of each result object. 

+ *

+ * @param {string} sQuery Query string

+ * @param {object} oResponse The raw response data to parse

+ * @param {object} oParent The object instance that has requested data

+ * @returns {array} Array of result objects

+ */

+YAHOO.widget.DS_XHR.prototype.parseResponse = function(sQuery, oResponse, 
oParent) {

+    var aSchema = this.schema;

+    var aResults = [];

+    var bError = false;

+

+    // Strip out comment at the end of results

+    var nEnd = ((this.responseStripAfter !== "") && (oResponse.indexOf)) ?

+        oResponse.indexOf(this.responseStripAfter) : -1;

+    if(nEnd != -1) {

+        oResponse = oResponse.substring(0,nEnd);

+    }

+

+    switch (this.responseType) {

+        case this.TYPE_JSON:

+            var jsonList;

+            // Divert KHTML clients from JSON lib

+            if(window.JSON && 
(navigator.userAgent.toLowerCase().indexOf('khtml')== -1)) {

+                // Use the JSON utility if available

+                var jsonObjParsed = JSON.parse(oResponse);

+                if(!jsonObjParsed) {

+                    bError = true;

+                    break;

+                }

+                else {

+                    // eval is necessary here since aSchema[0] is of unknown 
depth

+                    jsonList = eval("jsonObjParsed." + aSchema[0]);

+                }

+            }

+            else {

+                // Parse the JSON response as a string

+                try {

+                    // Trim leading spaces

+                    while (oResponse.substring(0,1) == " ") {

+                        oResponse = oResponse.substring(1, oResponse.length);

+                    }

+

+                    // Invalid JSON response

+                    if(oResponse.indexOf("{") < 0) {

+                        bError = true;

+                        break;

+                    }

+

+                    // Empty (but not invalid) JSON response

+                    if(oResponse.indexOf("{}") === 0) {

+                        break;

+                    }

+

+                    // Turn the string into an object literal...

+                    // ...eval is necessary here

+                    var jsonObjRaw = eval("(" + oResponse + ")");

+                    if(!jsonObjRaw) {

+                        bError = true;

+                        break;

+                    }

+

+                    // Grab the object member that contains an array of all 
reponses...

+                    // ...eval is necessary here since aSchema[0] is of 
unknown depth

+                    jsonList = eval("(jsonObjRaw." + aSchema[0]+")");

+                }

+                catch(e) {

+                    bError = true;

+                    break;

+               }

+            }

+

+            if(!jsonList) {

+                bError = true;

+                break;

+            }

+

+            // Loop through the array of all responses...

+            for(var i = jsonList.length-1; i >= 0 ; i--) {

+                var aResultItem = [];

+                var jsonResult = jsonList[i];

+                // ...and loop through each data field value of each response

+                for(var j = aSchema.length-1; j >= 1 ; j--) {

+                    // ...and capture data into an array mapped according to 
the schema...

+                    var dataFieldValue = jsonResult[aSchema[j]];

+                    if(!dataFieldValue) {

+                        dataFieldValue = "";

+                    }

+                    aResultItem.unshift(dataFieldValue);

+                }

+                // Capture the array of data field values in an array of 
results

+                aResults.unshift(aResultItem);

+            }

+            break;

+        case this.TYPE_XML:

+            // Get the collection of results

+            var xmlList = oResponse.getElementsByTagName(aSchema[0]);

+            if(!xmlList) {

+                bError = true;

+                break;

+            }

+            // Loop through each result

+            for(var k = xmlList.length-1; k >= 0 ; k--) {

+                var result = xmlList.item(k);

+                var aFieldSet = [];

+                // Loop through each data field in each result using the schema

+                for(var m = aSchema.length-1; m >= 1 ; m--) {

+                    var sValue = null;

+                    // Values may be held in an attribute...

+                    var xmlAttr = result.attributes.getNamedItem(aSchema[m]);

+                    if(xmlAttr) {

+                        sValue = xmlAttr.value;

+                    }

+                    // ...or in a node

+                    else{

+                        var xmlNode = result.getElementsByTagName(aSchema[m]);

+                        if(xmlNode && xmlNode.item(0) && 
xmlNode.item(0).firstChild) {

+                            sValue = xmlNode.item(0).firstChild.nodeValue;

+                        }

+                        else {

+                            sValue = "";

+                        }

+                    }

+                    // Capture the schema-mapped data field values into an 
array

+                    aFieldSet.unshift(sValue);

+                }

+                // Capture each array of values into an array of results

+                aResults.unshift(aFieldSet);

+            }

+            break;

+        case this.TYPE_FLAT:

+            if(oResponse.length > 0) {

+                // Delete the last line delimiter at the end of the data if it 
exists

+                var newLength = oResponse.length-aSchema[0].length;

+                if(oResponse.substr(newLength) == aSchema[0]) {

+                    oResponse = oResponse.substr(0, newLength);

+                }

+                var aRecords = oResponse.split(aSchema[0]);

+                for(var n = aRecords.length-1; n >= 0; n--) {

+                    aResults[n] = aRecords[n].split(aSchema[1]);

+                }

+            }

+            break;

+        default:

+            break;

+    }

+    sQuery = null;

+    oResponse = null;

+    oParent = null;

+    if(bError) {

+        return null;

+    }

+    else {

+        return aResults;

+    }

+};            

+

+

+/***************************************************************************

+ * Private member variables

+ ***************************************************************************/

+/**

+ * XHR connection object.

+ *

+ * @type object

+ * @private

+ */

+YAHOO.widget.DS_XHR.prototype._oConn = null;

+

+

+/****************************************************************************/

+/****************************************************************************/

+/****************************************************************************/

+

+/**

+ * Implementation of YAHOO.widget.DataSource using a native Javascript struct 
as

+ * its live data source.

+ *  

+ * @constructor

+ * extends YAHOO.widget.DataSource 

+ *  

+ * @param {string} oFunction In-memory Javascript function that returns query

+ *                           results as an array of objects

+ * @param {object} oConfigs Optional object literal of config params

+ */

+YAHOO.widget.DS_JSFunction = function(oFunction, oConfigs) {

+    // Set any config params passed in to override defaults

+    if(typeof oConfigs == "object") {

+        for(var sConfig in oConfigs) {

+            this[sConfig] = oConfigs[sConfig];

+        }

+    }

+

+    // Initialization sequence

+    if(!oFunction  || (oFunction.constructor != Function)) {

+        return;

+    }

+    else {

+        this.dataFunction = oFunction;

+        this._init();

+    }

+};

+

+YAHOO.widget.DS_JSFunction.prototype = new YAHOO.widget.DataSource();

+

+/***************************************************************************

+ * Public member variables

+ ***************************************************************************/

+/**

+ * In-memory Javascript function that returns query results.

+ *

+ * @type function

+ */

+YAHOO.widget.DS_JSFunction.prototype.dataFunction = null;

+

+

+/***************************************************************************

+ * Public methods

+ ***************************************************************************/

+/**

+ * Queries the live data source defined by function for results. Results are

+ * passed back to a callback function.

+ *  

+ * @param {object} oCallbackFn Callback function defined by oParent object to 

+ *                             which to return results 

+ * @param {string} sQuery Query string

+ * @param {object} oParent The object instance that has requested data

+ */

+YAHOO.widget.DS_JSFunction.prototype.doQuery = function(oCallbackFn, sQuery, 
oParent) {

+    var oFunction = this.dataFunction;

+    var aResults = [];

+    

+    aResults = oFunction(sQuery);

+    if(aResults === null) {

+        this.dataErrorEvent.fire(this, oParent, sQuery, this.ERROR_DATANULL);

+        return;

+    }

+    

+    var resultObj = {};

+    resultObj.query = decodeURIComponent(sQuery);

+    resultObj.results = aResults;

+    this._addCacheElem(resultObj);

+    

+    this.getResultsEvent.fire(this, oParent, sQuery, aResults);

+    oCallbackFn(sQuery, aResults, oParent);

+    return;

+};

+

+/****************************************************************************/

+/****************************************************************************/

+/****************************************************************************/

+

+/**

+ * Implementation of YAHOO.widget.DataSource using a native Javascript array as

+ * its live data source.

+ *

+ * @constructor

+ * extends YAHOO.widget.DataSource

+ *

+ * @param {string} aData In-memory Javascript array of simple string data

+ * @param {object} oConfigs Optional object literal of config params

+ */

+YAHOO.widget.DS_JSArray = function(aData, oConfigs) {

+    // Set any config params passed in to override defaults

+    if(typeof oConfigs == "object") {

+        for(var sConfig in oConfigs) {

+            this[sConfig] = oConfigs[sConfig];

+        }

+    }

+

+    // Initialization sequence

+    if(!aData || (aData.constructor != Array)) {

+        return;

+    }

+    else {

+        this.data = aData;

+        this._init();

+    }

+};

+

+YAHOO.widget.DS_JSArray.prototype = new YAHOO.widget.DataSource();

+

+/***************************************************************************

+ * Public member variables

+ ***************************************************************************/

+/**

+ * In-memory Javascript array of strings.

+ *

+ * @type array

+ */

+YAHOO.widget.DS_JSArray.prototype.data = null;

+

+/***************************************************************************

+ * Public methods

+ ***************************************************************************/

+/**

+ * Queries the live data source defined by data for results. Results are passed

+ * back to a callback function.

+ *

+ * @param {object} oCallbackFn Callback function defined by oParent object to

+ *                             which to return results

+ * @param {string} sQuery Query string

+ * @param {object} oParent The object instance that has requested data

+ */

+YAHOO.widget.DS_JSArray.prototype.doQuery = function(oCallbackFn, sQuery, 
oParent) {

+    var aData = this.data;

+    var aResults = [];

+    var bMatchFound = false;

+    var bMatchContains = this.queryMatchContains;

+    if(!this.queryMatchCase) {

+        sQuery = sQuery.toLowerCase();

+    }

+

+    // Loop through each element of the array...

+    for(var i = aData.length-1; i >= 0; i--) {

+        var aDataset = [];

+        if(typeof aData[i] == "string") {

+            aDataset[0] = aData[i];

+        }

+        else {

+            aDataset = aData[i];

+        }

+

+        var sKeyIndex = (this.queryMatchCase) ?

+            encodeURIComponent(aDataset[0]).indexOf(sQuery):

+            encodeURIComponent(aDataset[0]).toLowerCase().indexOf(sQuery);

+

+        // 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 a match into aResults[].

+            aResults.unshift(aDataset);

+        }

+    }

+

+    this.getResultsEvent.fire(this, oParent, sQuery, aResults);

+    oCallbackFn(sQuery, aResults, oParent);

+};


Index: container.js
===================================================================
RCS file: container.js
diff -N container.js
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ container.js        15 Jul 2006 14:41:51 -0000      1.1
@@ -0,0 +1,3930 @@
+/*
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+Version 0.11.0
+*/
+
+/**
+* @class 
+* Config is a utility used within an object to allow the implementer to 
maintain a list of local configuration properties and listen for changes to 
those properties dynamically using CustomEvent. The initial values are also 
maintained so that the configuration can be reset at any given point to its 
initial state.
+* @param {object}      owner   The owner object to which this Config object 
belongs
+* @constructor
+*/
+YAHOO.util.Config = function(owner) {
+       if (owner) {
+               this.init(owner);
+       }
+}
+
+YAHOO.util.Config.prototype = {
+       
+       /**
+       * Object reference to the owner of this Config object
+       * @type object
+       */
+       owner : null,
+
+       /**
+       * Object reference to the owner of this Config object
+       * args: key, value
+       * @type YAHOO.util.CustomEvent
+       */
+       configChangedEvent : null,
+
+       /**
+       * Boolean flag that specifies whether a queue is currently being 
executed
+       * @type boolean
+       */
+       queueInProgress : false,
+
+       /**
+       * Adds a property to the Config object's private config hash. 
+       * @param {string}       key     The configuration property's name
+       * @param {object}       propertyObject  The object containing all of 
this property's arguments
+       */
+       addProperty : function(key, propertyObject){},
+
+       /**
+       * Returns a key-value configuration map of the values currently set in 
the Config object.
+       * @return {object} The current config, represented in a key-value map
+       */
+       getConfig : function(){},
+
+       /**
+       * Returns the value of specified property.
+       * @param {key}          The name of the property
+       * @return {object}      The value of the specified property
+       */
+       getProperty : function(key){},
+
+       /**
+       * Resets the specified property's value to its initial value.
+       * @param {key}          The name of the property
+       */
+       resetProperty : function(key){},
+
+       /**
+       * Sets the value of a property. If the silent property is passed as 
true, the property's event will not be fired.
+       * @param {key}          The name of the property
+       * @param {value}        The value to set the property to
+       * @param {boolean}      Whether the value should be set silently, 
without firing the property event.
+       * @return {boolean}     true, if the set was successful, false if it 
failed.
+       */
+       setProperty : function(key,value,silent){},
+
+       /**
+       * Sets the value of a property and queues its event to execute. If the 
event is already scheduled to execute, it is
+       * moved from its current position to the end of the queue.
+       * @param {key}          The name of the property
+       * @param {value}        The value to set the property to
+       * @return {boolean}     true, if the set was successful, false if it 
failed.
+       */      
+       queueProperty : function(key,value){},
+
+       /**
+       * Fires the event for a property using the property's current value.
+       * @param {key}          The name of the property
+       */
+       refireEvent : function(key){},
+
+       /**
+       * Applies a key-value object literal to the configuration, replacing 
any existing values, and queueing the property events.
+       * Although the values will be set, fireQueue() must be called for their 
associated events to execute.
+       * @param {object}       userConfig      The configuration object literal
+       * @param {boolean}      init            When set to true, the 
initialConfig will be set to the userConfig passed in, so that calling a reset 
will reset the properties to the passed values.
+       */
+       applyConfig : function(userConfig,init){},
+
+       /**
+       * Refires the events for all configuration properties using their 
current values.
+       */
+       refresh : function(){},
+
+       /**
+       * Fires the normalized list of queued property change events
+       */
+       fireQueue : function(){},
+
+       /**
+       * Subscribes an external handler to the change event for any given 
property. 
+       * @param {string}       key                     The property name
+       * @param {Function}     handler         The handler function to use 
subscribe to the property's event
+       * @param {object}       obj                     The object to use for 
scoping the event handler (see CustomEvent documentation)
+       * @param {boolean}      override        Optional. If true, will 
override "this" within the handler to map to the scope object passed into the 
method.
+       */      
+       subscribeToConfigEvent : function(key,handler,obj,override){},
+
+       /**
+       * Unsubscribes an external handler from the change event for any given 
property. 
+       * @param {string}       key                     The property name
+       * @param {Function}     handler         The handler function to use 
subscribe to the property's event
+       * @param {object}       obj                     The object to use for 
scoping the event handler (see CustomEvent documentation)
+       */
+       unsubscribeFromConfigEvent: function(key,handler,obj){},
+
+       /**
+       * Validates that the value passed in is a boolean.
+       * @param        {object}        val     The value to validate
+       * @return       {boolean}       true, if the value is valid
+       */      
+       checkBoolean: function(val) {
+               if (typeof val == 'boolean') {
+                       return true;
+               } else {
+                       return false;
+               }
+       },
+
+       /**
+       * Validates that the value passed in is a number.
+       * @param        {object}        val     The value to validate
+       * @return       {boolean}       true, if the value is valid
+       */
+       checkNumber: function(val) {
+               if (isNaN(val)) {
+                       return false;
+               } else {
+                       return true;
+               }
+       }
+}
+
+
+/**
+* Initializes the configuration object and all of its local members.
+* @param {object}      owner   The owner object to which this Config object 
belongs
+*/
+YAHOO.util.Config.prototype.init = function(owner) {
+
+       this.owner = owner;
+       this.configChangedEvent = new YAHOO.util.CustomEvent("configChanged");
+       this.queueInProgress = false;
+
+       /* Private Members */
+
+       var config = {};
+       var initialConfig = {};
+       var eventQueue = [];
+
+       /**
+       * @private
+       * Fires a configuration property event using the specified value. 
+       * @param {string}       key                     The configuration 
property's name
+       * @param {value}        object          The value of the correct type 
for the property
+       */ 
+       var fireEvent = function( key, value ) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+
+               if (typeof property != 'undefined' && property.event) {
+                       property.event.fire(value);
+               }       
+       }
+       /* End Private Members */
+
+       this.addProperty = function( key, propertyObject ) {
+               key = key.toLowerCase();
+
+               config[key] = propertyObject;
+
+               propertyObject.event = new YAHOO.util.CustomEvent(key);
+               propertyObject.key = key;
+
+               if (propertyObject.handler) {
+                       propertyObject.event.subscribe(propertyObject.handler, 
this.owner, true);
+               }
+
+               this.setProperty(key, propertyObject.value, true);
+               
+               if (! propertyObject.suppressEvent) {
+                       this.queueProperty(key, propertyObject.value);
+               }
+       }
+
+       this.getConfig = function() {
+               var cfg = {};
+                       
+               for (var prop in config) {
+                       var property = config[prop]
+                       if (typeof property != 'undefined' && property.event) {
+                               cfg[prop] = property.value;
+                       }
+               }
+               
+               return cfg;
+       }
+
+       this.getProperty = function(key) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+               if (typeof property != 'undefined' && property.event) {
+                       return property.value;
+               } else {
+                       return undefined;
+               }
+       }
+
+       this.resetProperty = function(key) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+               if (typeof property != 'undefined' && property.event) {
+                       this.setProperty(key, initialConfig[key].value);
+               } else {
+                       return undefined;
+               }
+       }
+
+       this.setProperty = function(key, value, silent) {
+               key = key.toLowerCase();
+
+               if (this.queueInProgress && ! silent) {
+                       this.queueProperty(key,value); // Currently running 
through a queue... 
+                       return true;
+               } else {
+                       var property = config[key];
+                       if (typeof property != 'undefined' && property.event) {
+                               if (property.validator && ! 
property.validator(value)) { // validator
+                                       return false;
+                               } else {
+                                       property.value = value;
+                                       if (! silent) {
+                                               fireEvent(key, value);
+                                               
this.configChangedEvent.fire([key, value]);
+                                       }
+                                       return true;
+                               }
+                       } else {
+                               return false;
+                       }
+               }
+       }
+
+       this.queueProperty = function(key, value) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+                                                       
+               if (typeof property != 'undefined' && property.event) {
+                       if (typeof value != 'undefined' && property.validator 
&& ! property.validator(value)) { // validator
+                               return false;
+                       } else {
+
+                               if (typeof value != 'undefined') {
+                                       property.value = value;
+                               } else {
+                                       value = property.value;
+                               }
+
+                               var foundDuplicate = false;
+
+                               for (var i=0;i<eventQueue.length;i++) {
+                                       var queueItem = eventQueue[i];
+
+                                       if (queueItem) {
+                                               var queueItemKey = queueItem[0];
+                                               var queueItemValue = 
queueItem[1];
+                                               
+                                               if (queueItemKey.toLowerCase() 
== key) {
+                                                       // found a dupe... push 
to end of queue, null current item, and break
+                                                       eventQueue[i] = null;
+                                                       eventQueue.push([key, 
(typeof value != 'undefined' ? value : queueItemValue)]);
+                                                       foundDuplicate = true;
+                                                       break;
+                                               }
+                                       }
+                               }
+                               
+                               if (! foundDuplicate && typeof value != 
'undefined') { // this is a refire, or a new property in the queue
+                                       eventQueue.push([key, value]);
+                               }
+                       }
+
+                       if (property.supercedes) {
+                               for (var s=0;s<property.supercedes.length;s++) {
+                                       var supercedesCheck = 
property.supercedes[s];
+
+                                       for (var q=0;q<eventQueue.length;q++) {
+                                               var queueItemCheck = 
eventQueue[q];
+
+                                               if (queueItemCheck) {
+                                                       var queueItemCheckKey = 
queueItemCheck[0];
+                                                       var queueItemCheckValue 
= queueItemCheck[1];
+                                                       
+                                                       if ( 
queueItemCheckKey.toLowerCase() == supercedesCheck.toLowerCase() ) {
+                                                               
eventQueue.push([queueItemCheckKey, queueItemCheckValue]);
+                                                               eventQueue[q] = 
null;
+                                                               break;
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+
+                       return true;
+               } else {
+                       return false;
+               }
+       }
+
+       this.refireEvent = function(key) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+               if (typeof property != 'undefined' && property.event && typeof 
property.value != 'undefined') {
+                       if (this.queueInProgress) {
+                               this.queueProperty(key);
+                       } else {
+                               fireEvent(key, property.value);
+                       }
+               }
+       }
+
+       this.applyConfig = function(userConfig, init) {
+               if (init) {
+                       initialConfig = userConfig;
+               }
+               for (var prop in userConfig) {
+                       this.queueProperty(prop, userConfig[prop]);
+               }
+       }
+
+       this.refresh = function() {
+               for (var prop in config) {
+                       this.refireEvent(prop);
+               }
+       }
+
+       this.fireQueue = function() {
+               this.queueInProgress = true;
+               for (var i=0;i<eventQueue.length;i++) {
+                       var queueItem = eventQueue[i];
+                       if (queueItem) {
+                               var key = queueItem[0];
+                               var value = queueItem[1];
+                               
+                               var property = config[key];
+                               property.value = value;
+
+                               fireEvent(key,value);
+                       }
+               }
+               
+               this.queueInProgress = false;
+               eventQueue = new Array();
+       }
+
+       this.subscribeToConfigEvent = function(key, handler, obj, override) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+               if (typeof property != 'undefined' && property.event) {
+                       if (! 
YAHOO.util.Config.alreadySubscribed(property.event, handler, obj)) {
+                               property.event.subscribe(handler, obj, 
override);
+                       }
+                       return true;
+               } else {
+                       return false;
+               }
+       }
+
+
+       this.unsubscribeFromConfigEvent = function(key, handler, obj) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+               if (typeof property != 'undefined' && property.event) {
+                       return property.event.unsubscribe(handler, obj);
+               } else {
+                       return false;
+               }
+       }
+
+       this.toString = function() {
+               var output = "Config";
+               if (this.owner) {
+                       output += " [" + this.owner.toString() + "]";
+               }
+               return output;
+       }
+
+       this.outputEventQueue = function() {
+               var output = "";
+               for (var q=0;q<eventQueue.length;q++) {
+                       var queueItem = eventQueue[q];
+                       if (queueItem) {
+                               output += queueItem[0] + "=" + queueItem[1] + 
", ";
+                       }
+               }
+               return output;
+       }
+}
+
+/**
+* Checks to determine if a particular function/object pair are already 
subscribed to the specified CustomEvent
+* @param {YAHOO.util.CustomEvent} evt  The CustomEvent for which to check the 
subscriptions
+* @param {Function}    fn      The function to look for in the subscribers list
+* @param {object}      obj     The execution scope object for the subscription
+* @return {boolean}    true, if the function/object pair is already subscribed 
to the CustomEvent passed in
+*/
+YAHOO.util.Config.alreadySubscribed = function(evt, fn, obj) {
+       for (var e=0;e<evt.subscribers.length;e++) {
+               var subsc = evt.subscribers[e];
+               if (subsc && subsc.obj == obj && subsc.fn == fn) {
+                       return true;
+                       break;
+               }
+       }
+       return false;
+}/**
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+* @class 
+* Module is a JavaScript representation of the Standard Module Format. 
Standard Module Format is a simple standard for markup containers where child 
nodes representing the header, body, and footer of the content are denoted 
using the CSS classes "hd", "bd", and "ft" respectively. Module is the base 
class for all other classes in the YUI Container package.
+* @param {string}      el      The element ID representing the Module 
<em>OR</em>
+* @param {Element}     el      The element representing the Module
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this module. See 
configuration documentation for more details.
+* @constructor
+*/
+YAHOO.widget.Module = function(el, userConfig) {
+       if (el) { 
+               this.init(el, userConfig); 
+       }
+}
+
+/**
+* Constant representing the prefix path to use for non-secure images
+* @type string
+*/
+YAHOO.widget.Module.IMG_ROOT = "http://us.i1.yimg.com/us.yimg.com/i/";;
+
+/**
+* Constant representing the prefix path to use for securely served images
+* @type string
+*/
+YAHOO.widget.Module.IMG_ROOT_SSL = "https://a248.e.akamai.net/sec.yimg.com/i/";;
+
+/**
+* Constant for the default CSS class name that represents a Module
+* @type string
+* @final
+*/
+YAHOO.widget.Module.CSS_MODULE = "module";
+
+/**
+* Constant representing the module header
+* @type string
+* @final
+*/
+YAHOO.widget.Module.CSS_HEADER = "hd";
+
+/**
+* Constant representing the module body
+* @type string
+* @final
+*/
+YAHOO.widget.Module.CSS_BODY = "bd";
+
+/**
+* Constant representing the module footer
+* @type string
+* @final
+*/
+YAHOO.widget.Module.CSS_FOOTER = "ft";
+
+/**
+* Constant representing the url for the "src" attribute of the iframe used to 
monitor changes to the browser's base font size
+* @type string
+* @final
+*/
+YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL = null;
+
+YAHOO.widget.Module.prototype = {
+
+       /**
+       * The class's constructor function
+       * @type function
+       */
+       constructor : YAHOO.widget.Module,
+
+       /**
+       * The main module element that contains the header, body, and footer
+       * @type Element
+       */
+       element : null, 
+
+       /**
+       * The header element, denoted with CSS class "hd"
+       * @type Element
+       */
+       header : null,
+
+       /**
+       * The body element, denoted with CSS class "bd"
+       * @type Element
+       */
+       body : null,
+
+       /**
+       * The footer element, denoted with CSS class "ft"
+       * @type Element
+       */
+       footer : null,
+
+       /**
+       * The id of the element
+       * @type string
+       */
+       id : null,
+
+       /**
+       * Array of elements
+       * @type Element[]
+       */
+       childNodesInDOM : null,
+
+       /**
+       * The string representing the image root
+       * @type string
+       */
+       imageRoot : YAHOO.widget.Module.IMG_ROOT,
+
+       /**
+       * CustomEvent fired prior to class initalization.
+       * args: class reference of the initializing class, such as 
this.beforeInitEvent.fire(YAHOO.widget.Module)
+       * @type YAHOO.util.CustomEvent
+       */
+       beforeInitEvent : null,
+
+       /**
+       * CustomEvent fired after class initalization.
+       * args: class reference of the initializing class, such as 
this.initEvent.fire(YAHOO.widget.Module)
+       * @type YAHOO.util.CustomEvent
+       */
+       initEvent : null,
+
+       /**
+       * CustomEvent fired when the Module is appended to the DOM
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       appendEvent : null,
+
+       /**
+       * CustomEvent fired before the Module is rendered
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       beforeRenderEvent : null,
+
+       /**
+       * CustomEvent fired after the Module is rendered
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       renderEvent : null,
+
+       /**
+       * CustomEvent fired when the header content of the Module is modified
+       * args: string/element representing the new header content
+       * @type YAHOO.util.CustomEvent
+       */
+       changeHeaderEvent : null,
+
+       /**
+       * CustomEvent fired when the body content of the Module is modified
+       * args: string/element representing the new body content
+       * @type YAHOO.util.CustomEvent
+       */
+       changeBodyEvent : null,
+
+       /**
+       * CustomEvent fired when the footer content of the Module is modified
+       * args: string/element representing the new footer content
+       * @type YAHOO.util.CustomEvent
+       */
+       changeFooterEvent : null,
+
+       /**
+       * CustomEvent fired when the content of the Module is modified
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       changeContentEvent : null,
+
+       /**
+       * CustomEvent fired when the Module is destroyed
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       destroyEvent : null,
+
+       /**
+       * CustomEvent fired before the Module is shown
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       beforeShowEvent : null,
+
+       /**
+       * CustomEvent fired after the Module is shown
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       showEvent : null,
+
+       /**
+       * CustomEvent fired before the Module is hidden
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       beforeHideEvent : null,
+       
+       /**
+       * CustomEvent fired after the Module is hidden
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       hideEvent : null,
+               
+       /**
+       * Initializes the custom events for Module which are fired 
automatically at appropriate times by the Module class.
+       */
+       initEvents : function() {
+
+               this.beforeInitEvent            = new 
YAHOO.util.CustomEvent("beforeInit");
+               this.initEvent                          = new 
YAHOO.util.CustomEvent("init");
+
+               this.appendEvent                        = new 
YAHOO.util.CustomEvent("append");
+
+               this.beforeRenderEvent          = new 
YAHOO.util.CustomEvent("beforeRender");
+               this.renderEvent                        = new 
YAHOO.util.CustomEvent("render");
+
+               this.changeHeaderEvent          = new 
YAHOO.util.CustomEvent("changeHeader");
+               this.changeBodyEvent            = new 
YAHOO.util.CustomEvent("changeBody");
+               this.changeFooterEvent          = new 
YAHOO.util.CustomEvent("changeFooter");
+
+               this.changeContentEvent         = new 
YAHOO.util.CustomEvent("changeContent");
+
+               this.destroyEvent                       = new 
YAHOO.util.CustomEvent("destroy");
+               this.beforeShowEvent            = new 
YAHOO.util.CustomEvent("beforeShow");
+               this.showEvent                          = new 
YAHOO.util.CustomEvent("show");
+               this.beforeHideEvent            = new 
YAHOO.util.CustomEvent("beforeHide");
+               this.hideEvent                          = new 
YAHOO.util.CustomEvent("hide");
+       }, 
+
+       /**
+       * String representing the current user-agent platform
+       * @type string
+       */
+       platform : function() {
+                                       var ua = 
navigator.userAgent.toLowerCase();
+                                       if (ua.indexOf("windows") != -1 || 
ua.indexOf("win32") != -1) {
+                                               return "windows";
+                                       } else if (ua.indexOf("macintosh") != 
-1) {
+                                               return "mac";
+                                       } else {
+                                               return false;
+                                       }
+                               }(),
+
+       /**
+       * String representing the current user-agent browser
+       * @type string
+       */
+       browser : 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;
+                                 }
+                       }(),
+
+       /**
+       * Boolean representing whether or not the current browsing context is 
secure (https)
+       * @type boolean
+       */
+       isSecure : function() {
+               if (window.location.href.toLowerCase().indexOf("https") == 0) {
+                       return true;
+               } else {
+                       return false;
+               }
+       }(),
+
+       /**
+       * Initializes the custom events for Module which are fired 
automatically at appropriate times by the Module class.
+       */
+       initDefaultConfig : function() {
+               // Add properties //
+
+               this.cfg.addProperty("visible", { value:true, 
handler:this.configVisible, validator:this.cfg.checkBoolean } );
+               this.cfg.addProperty("effect", { suppressEvent:true, 
supercedes:["visible"] } );
+               this.cfg.addProperty("monitorresize", { value:true, 
handler:this.configMonitorResize } );
+       },
+
+       /**
+       * The Module class's initialization method, which is executed for 
Module and all of its subclasses. This method is automatically called by the 
constructor, and  sets up all DOM references for pre-existing markup, and 
creates required markup if it is not already present.
+       * @param {string}       el      The element ID representing the Module 
<em>OR</em>
+       * @param {Element}      el      The element representing the Module
+       * @param {object}       userConfig      The configuration object 
literal containing the configuration that should be set for this module. See 
configuration documentation for more details.
+       */
+       init : function(el, userConfig) {
+
+               this.initEvents();
+
+               this.beforeInitEvent.fire(YAHOO.widget.Module);
+
+               this.cfg = new YAHOO.util.Config(this);
+               
+               if (this.isSecure) {
+                       this.imageRoot = YAHOO.widget.Module.IMG_ROOT_SSL;
+               }
+
+               if (typeof el == "string") {
+                       var elId = el;
+
+                       el = document.getElementById(el);
+                       if (! el) {
+                               el = document.createElement("DIV");
+                               el.id = elId;
+                       }
+               }
+
+               this.element = el;
+               
+               if (el.id) {
+                       this.id = el.id;
+               } 
+
+               var childNodes = this.element.childNodes;
+
+               if (childNodes) {
+                       for (var i=0;i<childNodes.length;i++) {
+                               var child = childNodes[i];
+                               switch (child.className) {
+                                       case YAHOO.widget.Module.CSS_HEADER:
+                                               this.header = child;
+                                               break;
+                                       case YAHOO.widget.Module.CSS_BODY:
+                                               this.body = child;
+                                               break;
+                                       case YAHOO.widget.Module.CSS_FOOTER:
+                                               this.footer = child;
+                                               break;
+                               }
+                       }
+               }
+
+               this.initDefaultConfig();
+
+               YAHOO.util.Dom.addClass(this.element, 
YAHOO.widget.Module.CSS_MODULE);
+
+               if (userConfig) {
+                       this.cfg.applyConfig(userConfig, true);
+               }
+
+               // Subscribe to the fireQueue() method of Config so that any 
queued configuration changes are
+               // excecuted upon render of the Module
+               if (! YAHOO.util.Config.alreadySubscribed(this.renderEvent, 
this.cfg.fireQueue, this.cfg)) {
+                       this.renderEvent.subscribe(this.cfg.fireQueue, 
this.cfg, true);
+               }
+
+               this.initEvent.fire(YAHOO.widget.Module);
+       },
+
+       /**
+       * Initialized an empty DOM element that is placed out of the visible 
area that can be used to detect text resize.
+       */
+       initResizeMonitor : function() {
+
+        if(this.browser != "opera") {
+
+            var resizeMonitor = document.getElementById("_yuiResizeMonitor");
+    
+            if (! resizeMonitor) {
+    
+                resizeMonitor = document.createElement("iframe");
+    
+                var bIE = (this.browser.indexOf("ie") === 0);
+    
+                if(this.isSecure && this.RESIZE_MONITOR_SECURE_URL && bIE) {
+    
+                    resizeMonitor.src = this.RESIZE_MONITOR_SECURE_URL;
+    
+                }
+                
+                resizeMonitor.id = "_yuiResizeMonitor";
+                resizeMonitor.style.visibility = "hidden";
+                
+                document.body.appendChild(resizeMonitor);
+    
+                resizeMonitor.style.width = "10em";
+                resizeMonitor.style.height = "10em";
+                resizeMonitor.style.position = "absolute";
+                
+                var nLeft = -1 * resizeMonitor.offsetWidth,
+                    nTop = -1 * resizeMonitor.offsetHeight;
+    
+                resizeMonitor.style.top = nTop + "px";
+                resizeMonitor.style.left =  nLeft + "px";
+                resizeMonitor.style.borderStyle = "none";
+                resizeMonitor.style.borderWidth = "0";
+                YAHOO.util.Dom.setStyle(resizeMonitor, "opacity", "0");
+                
+                resizeMonitor.style.visibility = "visible";
+    
+                if(!bIE) {
+    
+                    var doc = resizeMonitor.contentWindow.document;
+    
+                    doc.open();
+                    doc.close();
+                
+                }
+    
+            }
+    
+            if(resizeMonitor && resizeMonitor.contentWindow) {
+    
+                this.resizeMonitor = resizeMonitor;
+    
+                YAHOO.util.Event.addListener(this.resizeMonitor.contentWindow, 
"resize", this.onDomResize, this, true);
+    
+            }
+        
+        }
+
+       },
+
+       /**
+       * Event handler fired when the resize monitor element is resized.
+       */
+       onDomResize : function(e, obj) { 
+
+        var nLeft = -1 * this.resizeMonitor.offsetWidth,
+            nTop = -1 * this.resizeMonitor.offsetHeight;
+        
+        this.resizeMonitor.style.top = nTop + "px";
+        this.resizeMonitor.style.left =  nLeft + "px";
+       
+       },
+
+       /**
+       * Sets the Module's header content to the HTML specified, or appends 
the passed element to the header. If no header is present, one will be 
automatically created.
+       * @param {string}       headerContent   The HTML used to set the header 
<em>OR</em>
+       * @param {Element}      headerContent   The Element to append to the 
header
+       */      
+       setHeader : function(headerContent) {
+               if (! this.header) {
+                       this.header = document.createElement("DIV");
+                       this.header.className = YAHOO.widget.Module.CSS_HEADER;
+               }
+               
+               if (typeof headerContent == "string") {
+                       this.header.innerHTML = headerContent;
+               } else {
+                       this.header.innerHTML = "";
+                       this.header.appendChild(headerContent);
+               }
+
+               this.changeHeaderEvent.fire(headerContent);
+               this.changeContentEvent.fire();
+       },
+
+       /**
+       * Appends the passed element to the header. If no header is present, 
one will be automatically created.
+       * @param {Element}      element The element to append to the header
+       */      
+       appendToHeader : function(element) {
+               if (! this.header) {
+                       this.header = document.createElement("DIV");
+                       this.header.className = YAHOO.widget.Module.CSS_HEADER;
+               }
+               
+               this.header.appendChild(element);
+               this.changeHeaderEvent.fire(element);
+               this.changeContentEvent.fire();
+       },
+
+       /**
+       * Sets the Module's body content to the HTML specified, or appends the 
passed element to the body. If no body is present, one will be automatically 
created.
+       * @param {string}       bodyContent     The HTML used to set the body 
<em>OR</em>
+       * @param {Element}      bodyContent     The Element to append to the 
body
+       */              
+       setBody : function(bodyContent) {
+               if (! this.body) {
+                       this.body = document.createElement("DIV");
+                       this.body.className = YAHOO.widget.Module.CSS_BODY;
+               }
+
+               if (typeof bodyContent == "string")
+               {
+                       this.body.innerHTML = bodyContent;
+               } else {
+                       this.body.innerHTML = "";
+                       this.body.appendChild(bodyContent);
+               }
+
+               this.changeBodyEvent.fire(bodyContent);
+               this.changeContentEvent.fire();
+       },
+
+       /**
+       * Appends the passed element to the body. If no body is present, one 
will be automatically created.
+       * @param {Element}      element The element to append to the body
+       */
+       appendToBody : function(element) {
+               if (! this.body) {
+                       this.body = document.createElement("DIV");
+                       this.body.className = YAHOO.widget.Module.CSS_BODY;
+               }
+
+               this.body.appendChild(element);
+               this.changeBodyEvent.fire(element);
+               this.changeContentEvent.fire();
+       },
+
+       /**
+       * Sets the Module's footer content to the HTML specified, or appends 
the passed element to the footer. If no footer is present, one will be 
automatically created.
+       * @param {string}       footerContent   The HTML used to set the footer 
<em>OR</em>
+       * @param {Element}      footerContent   The Element to append to the 
footer
+       */      
+       setFooter : function(footerContent) {
+               if (! this.footer) {
+                       this.footer = document.createElement("DIV");
+                       this.footer.className = YAHOO.widget.Module.CSS_FOOTER;
+               }
+
+               if (typeof footerContent == "string") {
+                       this.footer.innerHTML = footerContent;
+               } else {
+                       this.footer.innerHTML = "";
+                       this.footer.appendChild(footerContent);
+               }
+
+               this.changeFooterEvent.fire(footerContent);
+               this.changeContentEvent.fire();
+       },
+
+       /**
+       * Appends the passed element to the footer. If no footer is present, 
one will be automatically created.
+       * @param {Element}      element The element to append to the footer
+       */
+       appendToFooter : function(element) {
+               if (! this.footer) {
+                       this.footer = document.createElement("DIV");
+                       this.footer.className = YAHOO.widget.Module.CSS_FOOTER;
+               }
+
+               this.footer.appendChild(element);
+               this.changeFooterEvent.fire(element);
+               this.changeContentEvent.fire();
+       },
+
+       /**
+       * Renders the Module by inserting the elements that are not already in 
the main Module into their correct places. Optionally appends the Module to the 
specified node prior to the render's execution. NOTE: For Modules without 
existing markup, the appendToNode argument is REQUIRED. If this argument is 
ommitted and the current element is not present in the document, the function 
will return false, indicating that the render was a failure.
+       * @param {string}       appendToNode    The element id to which the 
Module should be appended to prior to rendering <em>OR</em>
+       * @param {Element}      appendToNode    The element to which the Module 
should be appended to prior to rendering        
+       * @param {Element}      moduleElement   OPTIONAL. The element that 
represents the actual Standard Module container. 
+       * @return {boolean} Success or failure of the render
+       */
+       render : function(appendToNode, moduleElement) {
+               this.beforeRenderEvent.fire();
+
+               if (! moduleElement) {
+                       moduleElement = this.element;
+               }
+
+               var me = this;
+               var appendTo = function(element) {
+                       if (typeof element == "string") {
+                               element = document.getElementById(element);
+                       }
+                       
+                       if (element) {
+                               element.appendChild(me.element);
+                               me.appendEvent.fire();
+                       }
+               }
+
+               if (appendToNode) {
+                       appendTo(appendToNode);
+               } else { // No node was passed in. If the element is not 
pre-marked up, this fails
+                       if (! YAHOO.util.Dom.inDocument(this.element)) {
+                               return false;
+                       }
+               }
+
+               // Need to get everything into the DOM if it isn't already
+               
+               if (this.header && ! YAHOO.util.Dom.inDocument(this.header)) {
+                       // There is a header, but it's not in the DOM yet... 
need to add it
+                       var firstChild = moduleElement.firstChild;
+                       if (firstChild) { // Insert before first child if exists
+                               moduleElement.insertBefore(this.header, 
firstChild);
+                       } else { // Append to empty body because there are no 
children
+                               moduleElement.appendChild(this.header);
+                       }
+               }
+
+               if (this.body && ! YAHOO.util.Dom.inDocument(this.body)) {
+                       // There is a body, but it's not in the DOM yet... need 
to add it
+                       if (this.footer && 
YAHOO.util.Dom.isAncestor(this.moduleElement, this.footer)) { // Insert before 
footer if exists in DOM
+                               moduleElement.insertBefore(this.body, 
this.footer);
+                       } else { // Append to element because there is no footer
+                               moduleElement.appendChild(this.body);
+                       }
+               }
+
+               if (this.footer && ! YAHOO.util.Dom.inDocument(this.footer)) {
+                       // There is a footer, but it's not in the DOM yet... 
need to add it
+                       moduleElement.appendChild(this.footer);
+               }
+
+               this.renderEvent.fire();
+               return true;
+       },
+
+       /**
+       * Removes the Module element from the DOM and sets all child elements 
to null.
+       */
+       destroy : function() {
+               if (this.element) {
+                       var parent = this.element.parentNode;
+               }
+               if (parent) {
+                       parent.removeChild(this.element);
+               }
+
+               this.element = null;
+               this.header = null;
+               this.body = null;
+               this.footer = null;
+
+               this.destroyEvent.fire();
+       },
+
+       /**
+       * Shows the Module element by setting the visible configuration 
property to true. Also fires two events: beforeShowEvent prior to the 
visibility change, and showEvent after.
+       */
+       show : function() {
+               this.cfg.setProperty("visible", true);
+       },
+
+       /**
+       * Hides the Module element by setting the visible configuration 
property to false. Also fires two events: beforeHideEvent prior to the 
visibility change, and hideEvent after.
+       */
+       hide : function() {
+               this.cfg.setProperty("visible", false);
+       },
+
+       // BUILT-IN EVENT HANDLERS FOR MODULE //
+
+       /**
+       * Default event handler for changing the visibility property of a 
Module. By default, this is achieved by switching the "display" style between 
"block" and "none".
+       * This method is responsible for firing showEvent and hideEvent.
+       */
+       configVisible : function(type, args, obj) {
+               var visible = args[0];
+               if (visible) {
+                       this.beforeShowEvent.fire();
+                       YAHOO.util.Dom.setStyle(this.element, "display", 
"block");
+                       this.showEvent.fire();
+               } else {
+                       this.beforeHideEvent.fire();
+                       YAHOO.util.Dom.setStyle(this.element, "display", 
"none");
+                       this.hideEvent.fire();
+               }
+       },
+
+       /**
+       * Default event handler for the "monitorresize" configuration property
+       */
+       configMonitorResize : function(type, args, obj) {
+               var monitor = args[0];
+               if (monitor) {
+                       this.initResizeMonitor();
+               } else {
+                       YAHOO.util.Event.removeListener(this.resizeMonitor, 
"resize", this.onDomResize);
+                       this.resizeMonitor = null;
+               }
+       }
+}
+
+/**
+* Returns a string representation of the object.
+* @type string
+*/ 
+YAHOO.widget.Module.prototype.toString = function() {
+       return "Module " + this.id;
+}/**
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+* @class Overlay is a Module that is absolutely positioned above the page 
flow. It has convenience methods for positioning and sizing, as well as options 
for controlling zIndex and constraining the Overlay's position to the current 
visible viewport. Overlay also contains a dynamicly generated IFRAME which is 
placed beneath it for Internet Explorer 6 and 5.x so that it will be properly 
rendered above SELECT elements.
+* @param {string}      el      The element ID representing the Overlay 
<em>OR</em>
+* @param {Element}     el      The element representing the Overlay
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this Overlay. See 
configuration documentation for more details.
+* @constructor
+*/
+YAHOO.widget.Overlay = function(el, userConfig) {
+       YAHOO.widget.Overlay.superclass.constructor.call(this, el, userConfig);
+}
+
+YAHOO.extend(YAHOO.widget.Overlay, YAHOO.widget.Module);
+
+/**
+* The URL of the blank image that will be placed in the iframe
+* @type string
+* @final
+*/
+YAHOO.widget.Overlay.IFRAME_SRC = "promo/m/irs/blank.gif";
+
+/**
+* Constant representing the top left corner of an element, used for 
configuring the context element alignment
+* @type string
+* @final
+*/
+YAHOO.widget.Overlay.TOP_LEFT = "tl";
+
+/**
+* Constant representing the top right corner of an element, used for 
configuring the context element alignment
+* @type string
+* @final
+*/
+YAHOO.widget.Overlay.TOP_RIGHT = "tr";
+
+/**
+* Constant representing the top bottom left corner of an element, used for 
configuring the context element alignment
+* @type string
+* @final
+*/
+YAHOO.widget.Overlay.BOTTOM_LEFT = "bl";
+
+/**
+* Constant representing the bottom right corner of an element, used for 
configuring the context element alignment
+* @type string
+* @final
+*/
+YAHOO.widget.Overlay.BOTTOM_RIGHT = "br";
+
+/**
+* Constant representing the default CSS class used for an Overlay
+* @type string
+* @final
+*/
+YAHOO.widget.Overlay.CSS_OVERLAY = "overlay";
+
+/**
+* CustomEvent fired before the Overlay is moved.
+* args: x,y that the Overlay will be moved to
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Overlay.prototype.beforeMoveEvent = null;
+
+/**
+* CustomEvent fired after the Overlay is moved.
+* args: x,y that the Overlay was moved to
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Overlay.prototype.moveEvent = null;
+
+/**
+* The Overlay initialization method, which is executed for Overlay and all of 
its subclasses. This method is automatically called by the constructor, and  
sets up all DOM references for pre-existing markup, and creates required markup 
if it is not already present.
+* @param {string}      el      The element ID representing the Overlay 
<em>OR</em>
+* @param {Element}     el      The element representing the Overlay
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this Overlay. See 
configuration documentation for more details.
+*/
+YAHOO.widget.Overlay.prototype.init = function(el, userConfig) {
+       YAHOO.widget.Overlay.superclass.init.call(this, el/*, userConfig*/);  
// Note that we don't pass the user config in here yet because we only want it 
executed once, at the lowest subclass level
+       
+       this.beforeInitEvent.fire(YAHOO.widget.Overlay);
+
+       YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Overlay.CSS_OVERLAY);
+
+       if (userConfig) {
+               this.cfg.applyConfig(userConfig, true);
+       }
+
+       if (this.platform == "mac" && this.browser == "gecko") {
+               if (! 
YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this))
 {
+                       
this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);
+               }
+               if (! 
YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this))
 {
+                       
this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);
+               }
+       }
+
+       this.initEvent.fire(YAHOO.widget.Overlay);
+
+}
+
+/**
+* Initializes the custom events for Overlay which are fired automatically at 
appropriate times by the Overlay class.
+*/
+YAHOO.widget.Overlay.prototype.initEvents = function() {
+       YAHOO.widget.Overlay.superclass.initEvents.call(this);
+
+       this.beforeMoveEvent = new YAHOO.util.CustomEvent("beforeMove", this);
+       this.moveEvent = new YAHOO.util.CustomEvent("move", this);
+}
+
+/**
+* Initializes the class's configurable properties which can be changed using 
the Overlay's Config object (cfg).
+*/
+YAHOO.widget.Overlay.prototype.initDefaultConfig = function() {
+       YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);
+
+       // Add overlay config properties //
+       this.cfg.addProperty("x", { handler:this.configX, 
validator:this.cfg.checkNumber, suppressEvent:true, supercedes:["iframe"] } );
+       this.cfg.addProperty("y", { handler:this.configY, 
validator:this.cfg.checkNumber, suppressEvent:true, supercedes:["iframe"] } );
+       this.cfg.addProperty("xy",{ handler:this.configXY, suppressEvent:true, 
supercedes:["iframe"] } );
+
+       this.cfg.addProperty("context", { handler:this.configContext, 
suppressEvent:true, supercedes:["iframe"] } );
+       this.cfg.addProperty("fixedcenter", { value:false, 
handler:this.configFixedCenter, validator:this.cfg.checkBoolean, 
supercedes:["iframe","visible"] } );
+
+       this.cfg.addProperty("width", { handler:this.configWidth, 
suppressEvent:true, supercedes:["iframe"] } );
+       this.cfg.addProperty("height", { handler:this.configHeight, 
suppressEvent:true, supercedes:["iframe"] } );
+
+       this.cfg.addProperty("zIndex", { value:null, handler:this.configzIndex 
} );
+
+       this.cfg.addProperty("constraintoviewport", { value:false, 
handler:this.configConstrainToViewport, validator:this.cfg.checkBoolean, 
supercedes:["iframe","x","y","xy"] } );
+       this.cfg.addProperty("iframe", { value:(this.browser == "ie" ? true : 
false), handler:this.configIframe, validator:this.cfg.checkBoolean, 
supercedes:["zIndex"] } );
+}
+
+/**
+* Moves the Overlay to the specified position. This function is identical to 
calling this.cfg.setProperty("xy", [x,y]);
+* @param {int} x       The Overlay's new x position
+* @param {int} y       The Overlay's new y position
+*/
+YAHOO.widget.Overlay.prototype.moveTo = function(x, y) {
+       this.cfg.setProperty("xy",[x,y]);
+}
+
+/**
+* Adds a special CSS class to the Overlay when Mac/Gecko is in use, to work 
around a Gecko bug where
+* scrollbars cannot be hidden. See 
https://bugzilla.mozilla.org/show_bug.cgi?id=187435
+*/
+YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars = function() {
+       YAHOO.util.Dom.removeClass(this.element, "show-scrollbars");
+       YAHOO.util.Dom.addClass(this.element, "hide-scrollbars");
+}
+
+/**
+* Removes a special CSS class from the Overlay when Mac/Gecko is in use, to 
work around a Gecko bug where
+* scrollbars cannot be hidden. See 
https://bugzilla.mozilla.org/show_bug.cgi?id=187435
+*/
+YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars = function() {
+       YAHOO.util.Dom.removeClass(this.element, "hide-scrollbars");
+       YAHOO.util.Dom.addClass(this.element, "show-scrollbars");
+}
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* The default event handler fired when the "visible" property is changed. This 
method is responsible for firing showEvent and hideEvent.
+*/
+YAHOO.widget.Overlay.prototype.configVisible = function(type, args, obj) {
+       var visible = args[0];
+       var currentVis = YAHOO.util.Dom.getStyle(this.element, "visibility");
+
+       var effect = this.cfg.getProperty("effect");
+
+       var effectInstances = new Array();
+       if (effect) {
+               if (effect instanceof Array) {
+                       for (var i=0;i<effect.length;i++) {
+                               var eff = effect[i];
+                               effectInstances[effectInstances.length] = 
eff.effect(this, eff.duration);
+                       }
+               } else {
+                       effectInstances[effectInstances.length] = 
effect.effect(this, effect.duration);
+               }
+       }
+
+       var isMacGecko = (this.platform == "mac" && this.browser == "gecko");
+
+       if (visible) { // Show
+               if (isMacGecko) {
+                       this.showMacGeckoScrollbars();
+               }       
+
+               if (effect) { // Animate in
+                       if (visible) { // Animate in if not showing
+                               if (currentVis != "visible") {
+                                       this.beforeShowEvent.fire();
+                                       for (var 
i=0;i<effectInstances.length;i++) {
+                                               var e = effectInstances[i];
+                                               if (i == 0 && ! 
YAHOO.util.Config.alreadySubscribed(e.animateInCompleteEvent,this.showEvent.fire,this.showEvent))
 {
+                                                       
e.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true); // 
Delegate showEvent until end of animateInComplete
+                                               }
+                                               e.animateIn();
+                                       }
+                               }
+                       }
+               } else { // Show
+                       if (currentVis != "visible") {
+                               this.beforeShowEvent.fire();
+                               YAHOO.util.Dom.setStyle(this.element, 
"visibility", "visible");
+                               this.cfg.refireEvent("iframe");
+                               this.showEvent.fire();
+                       }
+               }
+
+       } else { // Hide
+               if (isMacGecko) {
+                       this.hideMacGeckoScrollbars();
+               }       
+
+               if (effect) { // Animate out if showing
+                       if (currentVis != "hidden") {
+                               this.beforeHideEvent.fire();
+                               for (var i=0;i<effectInstances.length;i++) {
+                                       var e = effectInstances[i];
+                                       if (i == 0 && ! 
YAHOO.util.Config.alreadySubscribed(e.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent))
 {                            
+                                               
e.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true); 
// Delegate hideEvent until end of animateOutComplete
+                                       }
+                                       e.animateOut();
+                               }
+                       }
+               } else { // Simple hide
+                       if (currentVis != "hidden") {
+                               this.beforeHideEvent.fire();
+                               YAHOO.util.Dom.setStyle(this.element, 
"visibility", "hidden");
+                               this.cfg.refireEvent("iframe");
+                               this.hideEvent.fire();
+                       }
+               }       
+       }
+}
+
+/**
+* Center event handler used for centering on scroll/resize, but only if the 
Overlay is visible
+*/
+YAHOO.widget.Overlay.prototype.doCenterOnDOMEvent = function() {
+       if (this.cfg.getProperty("visible")) {
+               this.center();
+       }
+}
+
+/**
+* The default event handler fired when the "fixedcenter" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configFixedCenter = function(type, args, obj) {
+       var val = args[0];
+
+       if (val) {
+               this.center();
+                       
+               if (! YAHOO.util.Config.alreadySubscribed(this.beforeShowEvent, 
this.center, this)) {
+                       this.beforeShowEvent.subscribe(this.center, this, true);
+               }
+               
+               if (! 
YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent, 
this.doCenterOnDOMEvent, this)) {
+                       
YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.doCenterOnDOMEvent, this, 
true);
+               }
+
+               if (! 
YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowScrollEvent, 
this.doCenterOnDOMEvent, this)) {
+                       YAHOO.widget.Overlay.windowScrollEvent.subscribe( 
this.doCenterOnDOMEvent, this, true);
+               }
+       } else {
+               
YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent, 
this);
+               
YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent, 
this);
+       }
+}
+
+/**
+* The default event handler fired when the "height" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configHeight = function(type, args, obj) {
+       var height = args[0];
+       var el = this.element;
+       YAHOO.util.Dom.setStyle(el, "height", height);
+       this.cfg.refireEvent("iframe");
+}
+
+/**
+* The default event handler fired when the "width" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configWidth = function(type, args, obj) {
+       var width = args[0];
+       var el = this.element;
+       YAHOO.util.Dom.setStyle(el, "width", width);
+       this.cfg.refireEvent("iframe");
+}
+
+/**
+* The default event handler fired when the "zIndex" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configzIndex = function(type, args, obj) {
+       var zIndex = args[0];
+
+       var el = this.element;
+
+       if (! zIndex) {
+               zIndex = YAHOO.util.Dom.getStyle(el, "zIndex");
+               if (! zIndex || isNaN(zIndex)) {
+                       zIndex = 0;
+               }
+       }
+
+       if (this.iframe) {
+               if (zIndex <= 0) {
+                       zIndex = 1;
+               }
+               YAHOO.util.Dom.setStyle(this.iframe, "zIndex", (zIndex-1));
+       }
+
+       YAHOO.util.Dom.setStyle(el, "zIndex", zIndex);
+       this.cfg.setProperty("zIndex", zIndex, true);
+}
+
+/**
+* The default event handler fired when the "xy" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configXY = function(type, args, obj) {
+       var pos = args[0];
+       var x = pos[0];
+       var y = pos[1];
+
+       this.cfg.setProperty("x", x);
+       this.cfg.setProperty("y", y);
+
+       this.beforeMoveEvent.fire([x,y]);
+
+       x = this.cfg.getProperty("x");
+       y = this.cfg.getProperty("y");
+
+       this.cfg.refireEvent("iframe");
+       this.moveEvent.fire([x,y]);
+}
+
+/**
+* The default event handler fired when the "x" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configX = function(type, args, obj) {
+       var x = args[0];
+       var y = this.cfg.getProperty("y");
+
+       this.cfg.setProperty("x", x, true);
+       this.cfg.setProperty("y", y, true);
+
+       this.beforeMoveEvent.fire([x,y]);
+
+       x = this.cfg.getProperty("x");
+       y = this.cfg.getProperty("y");
+
+       YAHOO.util.Dom.setX(this.element, x, true);
+       
+       this.cfg.setProperty("xy", [x, y], true);
+
+       this.cfg.refireEvent("iframe");
+       this.moveEvent.fire([x, y]);
+}
+
+/**
+* The default event handler fired when the "y" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configY = function(type, args, obj) {
+       var x = this.cfg.getProperty("x");
+       var y = args[0];
+
+       this.cfg.setProperty("x", x, true);
+       this.cfg.setProperty("y", y, true);
+
+       this.beforeMoveEvent.fire([x,y]);
+
+       x = this.cfg.getProperty("x");
+       y = this.cfg.getProperty("y");
+
+       YAHOO.util.Dom.setY(this.element, y, true);
+
+       this.cfg.setProperty("xy", [x, y], true);
+
+       this.cfg.refireEvent("iframe");
+       this.moveEvent.fire([x, y]);
+}
+
+/**
+* The default event handler fired when the "iframe" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configIframe = function(type, args, obj) {
+
+       var val = args[0];
+
+       var el = this.element;
+       
+       var showIframe = function() {
+               if (this.iframe) {
+                       this.iframe.style.display = "block";
+               }
+       }
+
+       var hideIframe = function() {
+               if (this.iframe) {
+                       this.iframe.style.display = "none";
+               }
+       }
+
+       if (val) { // IFRAME shim is enabled
+
+               if (! YAHOO.util.Config.alreadySubscribed(this.showEvent, 
showIframe, this)) {
+                       this.showEvent.subscribe(showIframe, this, true);
+               }
+               if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent, 
hideIframe, this)) {
+                       this.hideEvent.subscribe(hideIframe, this, true);
+               }
+
+               var x = this.cfg.getProperty("x");
+               var y = this.cfg.getProperty("y");
+
+               if (! x || ! y) {
+                       this.syncPosition();
+                       x = this.cfg.getProperty("x");
+                       y = this.cfg.getProperty("y");
+               }
+
+               if (! isNaN(x) && ! isNaN(y)) {
+                       if (! this.iframe) {
+                               this.iframe = document.createElement("iframe");
+                               if (this.isSecure) {
+                                       this.iframe.src = this.imageRoot + 
YAHOO.widget.Overlay.IFRAME_SRC;
+                               }
+                               
+                               var parent = el.parentNode;
+                               if (parent) {
+                                       parent.appendChild(this.iframe);
+                               } else {
+                                       document.body.appendChild(this.iframe);
+                               }
+
+                               YAHOO.util.Dom.setStyle(this.iframe, 
"position", "absolute");
+                               YAHOO.util.Dom.setStyle(this.iframe, "border", 
"none");
+                               YAHOO.util.Dom.setStyle(this.iframe, "margin", 
"0");
+                               YAHOO.util.Dom.setStyle(this.iframe, "padding", 
"0");
+                               YAHOO.util.Dom.setStyle(this.iframe, "opacity", 
"0");
+                               if (this.cfg.getProperty("visible")) {
+                                       showIframe.call(this);
+                               } else {
+                                       hideIframe.call(this);
+                               }
+                       }
+                       
+                       var iframeDisplay = 
YAHOO.util.Dom.getStyle(this.iframe, "display");
+
+                       if (iframeDisplay == "none") {
+                               this.iframe.style.display = "block";
+                       }
+
+                       YAHOO.util.Dom.setXY(this.iframe, [x,y]);
+
+                       var width = el.clientWidth;
+                       var height = el.clientHeight;
+
+                       YAHOO.util.Dom.setStyle(this.iframe, "width", (width+2) 
+ "px");
+                       YAHOO.util.Dom.setStyle(this.iframe, "height", 
(height+2) + "px");
+
+                       if (iframeDisplay == "none") {
+                               this.iframe.style.display = "none";
+                       }
+               }
+       } else {
+               if (this.iframe) {
+                       this.iframe.style.display = "none";
+               }
+               this.showEvent.unsubscribe(showIframe, this);
+               this.hideEvent.unsubscribe(hideIframe, this);
+       }
+}
+
+
+/**
+* The default event handler fired when the "constraintoviewport" property is 
changed.
+*/
+YAHOO.widget.Overlay.prototype.configConstrainToViewport = function(type, 
args, obj) {
+       var val = args[0];
+       if (val) {
+               if (! YAHOO.util.Config.alreadySubscribed(this.beforeMoveEvent, 
this.enforceConstraints, this)) {
+                       this.beforeMoveEvent.subscribe(this.enforceConstraints, 
this, true);
+               }
+       } else {
+               this.beforeMoveEvent.unsubscribe(this.enforceConstraints, this);
+       }
+}
+
+/**
+* The default event handler fired when the "context" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configContext = function(type, args, obj) {
+       var contextArgs = args[0];
+
+       if (contextArgs) {
+               var contextEl = contextArgs[0];
+               var elementMagnetCorner = contextArgs[1];
+               var contextMagnetCorner = contextArgs[2];
+
+               if (contextEl) {
+                       if (typeof contextEl == "string") {
+                               this.cfg.setProperty("context", 
[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner], 
true);
+                       }
+                       
+                       if (elementMagnetCorner && contextMagnetCorner) {
+                               this.align(elementMagnetCorner, 
contextMagnetCorner);
+                       }
+               }       
+       }
+}
+
+
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* Aligns the Overlay to its context element using the specified corner points 
(represented by the constants TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, and 
BOTTOM_RIGHT.
+* @param {string} elementAlign         The string representing the corner of 
the Overlay that should be aligned to the context element
+* @param {string} contextAlign         The corner of the context element that 
the elementAlign corner should stick to.
+*/
+YAHOO.widget.Overlay.prototype.align = function(elementAlign, contextAlign) {
+       var contextArgs = this.cfg.getProperty("context");
+       if (contextArgs) {
+               var context = contextArgs[0];
+               
+               var element = this.element;
+               var me = this;
+
+               if (! elementAlign) {
+                       elementAlign = contextArgs[1];
+               }
+
+               if (! contextAlign) {
+                       contextAlign = contextArgs[2];
+               }
+
+               if (element && context) {
+                       var elementRegion = YAHOO.util.Dom.getRegion(element);
+                       var contextRegion = YAHOO.util.Dom.getRegion(context);
+
+                       var doAlign = function(v,h) {
+                               switch (elementAlign) {
+                                       case YAHOO.widget.Overlay.TOP_LEFT:
+                                               me.moveTo(h,v);
+                                               break;
+                                       case YAHOO.widget.Overlay.TOP_RIGHT:
+                                               
me.moveTo(h-element.offsetWidth,v);
+                                               break;
+                                       case YAHOO.widget.Overlay.BOTTOM_LEFT:
+                                               
me.moveTo(h,v-element.offsetHeight);
+                                               break;
+                                       case YAHOO.widget.Overlay.BOTTOM_RIGHT:
+                                               
me.moveTo(h-element.offsetWidth,v-element.offsetHeight);
+                                               break;
+                               }
+                       }
+
+                       switch (contextAlign) {
+                               case YAHOO.widget.Overlay.TOP_LEFT:
+                                       doAlign(contextRegion.top, 
contextRegion.left);
+                                       break;
+                               case YAHOO.widget.Overlay.TOP_RIGHT:
+                                       doAlign(contextRegion.top, 
contextRegion.right);
+                                       break;          
+                               case YAHOO.widget.Overlay.BOTTOM_LEFT:
+                                       doAlign(contextRegion.bottom, 
contextRegion.left);
+                                       break;
+                               case YAHOO.widget.Overlay.BOTTOM_RIGHT:
+                                       doAlign(contextRegion.bottom, 
contextRegion.right);
+                                       break;
+                       }
+               }
+       }
+}
+
+/**
+* The default event handler executed when the moveEvent is fired, if the 
"constraintoviewport" is set to true.
+*/
+YAHOO.widget.Overlay.prototype.enforceConstraints = function(type, args, obj) {
+       var pos = args[0];
+
+       var x = pos[0];
+       var y = pos[1];
+
+       var width = parseInt(this.cfg.getProperty("width"));
+
+       if (isNaN(width)) {
+               width = 0;
+       }
+
+       var offsetHeight = this.element.offsetHeight;
+       var offsetWidth = (width>0?width:this.element.offsetWidth); 
//this.element.offsetWidth;
+
+       var viewPortWidth = YAHOO.util.Dom.getViewportWidth();
+       var viewPortHeight = YAHOO.util.Dom.getViewportHeight();
+
+       var scrollX = window.scrollX || document.documentElement.scrollLeft;
+       var scrollY = window.scrollY || document.documentElement.scrollTop;
+
+       var topConstraint = scrollY + 10;
+       var leftConstraint = scrollX + 10;
+       var bottomConstraint = scrollY + viewPortHeight - offsetHeight - 10;
+       var rightConstraint = scrollX + viewPortWidth - offsetWidth - 10;
+       
+       if (x < leftConstraint) {
+               x = leftConstraint;
+       } else if (x > rightConstraint) {
+               x = rightConstraint;
+       }
+
+       if (y < topConstraint) {
+               y = topConstraint;
+       } else if (y > bottomConstraint) {
+               y = bottomConstraint;
+       }
+
+       this.cfg.setProperty("x", x, true);
+       this.cfg.setProperty("y", y, true);
+       this.cfg.setProperty("xy", [x,y], true);
+}
+
+/**
+* Centers the container in the viewport.
+*/
+YAHOO.widget.Overlay.prototype.center = function() {
+       var scrollX = document.documentElement.scrollLeft || 
document.body.scrollLeft;
+       var scrollY = document.documentElement.scrollTop || 
document.body.scrollTop;
+
+       var viewPortWidth = YAHOO.util.Dom.getClientWidth();
+       var viewPortHeight = YAHOO.util.Dom.getClientHeight();
+
+       var elementWidth = this.element.offsetWidth;
+       var elementHeight = this.element.offsetHeight;
+
+       var x = (viewPortWidth / 2) - (elementWidth / 2) + scrollX;
+       var y = (viewPortHeight / 2) - (elementHeight / 2) + scrollY;
+       
+       this.element.style.left = parseInt(x) + "px";
+       this.element.style.top = parseInt(y) + "px";
+       this.syncPosition();
+
+       this.cfg.refireEvent("iframe");
+}
+
+/**
+* Synchronizes the Panel's "xy", "x", and "y" properties with the Panel's 
position in the DOM. This is primarily used to update position information 
during drag & drop.
+*/
+YAHOO.widget.Overlay.prototype.syncPosition = function() {
+       var pos = YAHOO.util.Dom.getXY(this.element);
+       this.cfg.setProperty("x", pos[0], true);
+       this.cfg.setProperty("y", pos[1], true);
+       this.cfg.setProperty("xy", pos, true);
+}
+
+/**
+* Event handler fired when the resize monitor element is resized.
+*/
+YAHOO.widget.Overlay.prototype.onDomResize = function(e, obj) {
+       YAHOO.widget.Overlay.superclass.onDomResize.call(this, e, obj);
+       this.cfg.refireEvent("iframe");
+}
+
+/**
+* Removes the Overlay element from the DOM and sets all child elements to null.
+*/
+YAHOO.widget.Overlay.prototype.destroy = function() {
+       if (this.iframe) {
+               this.iframe.parentNode.removeChild(this.iframe);
+       }
+       
+       this.iframe = null;
+
+       YAHOO.widget.Overlay.superclass.destroy.call(this);  
+};
+
+/**
+* Returns a string representation of the object.
+* @type string
+*/ 
+YAHOO.widget.Overlay.prototype.toString = function() {
+       return "Overlay " + this.id;
+}
+
+/**
+* A singleton CustomEvent used for reacting to the DOM event for window scroll
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Overlay.windowScrollEvent = new 
YAHOO.util.CustomEvent("windowScroll");
+
+/**
+* A singleton CustomEvent used for reacting to the DOM event for window resize
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Overlay.windowResizeEvent = new 
YAHOO.util.CustomEvent("windowResize");
+
+/**
+* The DOM event handler used to fire the CustomEvent for window scroll
+* @type Function
+*/
+YAHOO.widget.Overlay.windowScrollHandler = function(e) {
+       YAHOO.widget.Overlay.windowScrollEvent.fire();
+}
+
+/**
+* The DOM event handler used to fire the CustomEvent for window resize
+* @type Function
+*/
+YAHOO.widget.Overlay.windowResizeHandler = function(e) {
+       YAHOO.widget.Overlay.windowResizeEvent.fire();
+}
+
+/**
+* @private
+*/
+YAHOO.widget.Overlay._initialized == null;
+
+if (YAHOO.widget.Overlay._initialized == null) {
+       YAHOO.util.Event.addListener(window, "scroll", 
YAHOO.widget.Overlay.windowScrollHandler);
+       YAHOO.util.Event.addListener(window, "resize", 
YAHOO.widget.Overlay.windowResizeHandler);
+
+       YAHOO.widget.Overlay._initialized = true;
+}
+/**
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+* @class
+* OverlayManager is used for maintaining the focus status of multiple Overlays.
+* @param {Array}       overlays        Optional. A collection of Overlays to 
register with the manager.
+* @param {object}      userConfig              The object literal representing 
the user configuration of the OverlayManager
+* @constructor
+*/
+YAHOO.widget.OverlayManager = function(userConfig) {
+       this.init(userConfig);
+}
+
+/**
+* The CSS class representing a focused Overlay
+* @type string
+*/
+YAHOO.widget.OverlayManager.CSS_FOCUSED = "focused";
+
+YAHOO.widget.OverlayManager.prototype = {
+
+       constructor : YAHOO.widget.OverlayManager,
+
+       /**
+       * The array of Overlays that are currently registered
+       * @type Array
+       */
+       overlays : null,
+
+       /**
+       * Initializes the default configuration of the OverlayManager
+       */      
+       initDefaultConfig : function() {
+               this.cfg.addProperty("overlays", { suppressEvent:true } );
+               this.cfg.addProperty("focusevent", { value:"mousedown" } );
+       }, 
+
+       /**
+       * Returns the currently focused Overlay
+       * @return {Overlay}     The currently focused Overlay
+       */
+       getActive : function() {},
+
+       /**
+       * Focuses the specified Overlay
+       * @param {Overlay}      The Overlay to focus
+       * @param {string}       The id of the Overlay to focus
+       */
+       focus : function(overlay) {},
+
+       /**
+       * Removes the specified Overlay from the manager
+       * @param {Overlay}      The Overlay to remove
+       * @param {string}       The id of the Overlay to remove
+       */
+       remove: function(overlay) {},
+
+       /**
+       * Removes focus from all registered Overlays in the manager
+       */
+       blurAll : function() {},
+
+       /**
+       * Initializes the OverlayManager
+       * @param {Array}        overlays        Optional. A collection of 
Overlays to register with the manager.
+       * @param {object}       userConfig              The object literal 
representing the user configuration of the OverlayManager
+       */
+       init : function(userConfig) {
+               this.cfg = new YAHOO.util.Config(this);
+
+               this.initDefaultConfig();
+
+               if (userConfig) {
+                       this.cfg.applyConfig(userConfig, true);
+               }
+               this.cfg.fireQueue();
+
+               var activeOverlay = null;
+
+               this.getActive = function() {
+                       return activeOverlay;
+               }
+
+               this.focus = function(overlay) {
+                       var o = this.find(overlay);
+                       if (o) {
+                               this.blurAll();
+                               activeOverlay = o;
+                               YAHOO.util.Dom.addClass(activeOverlay.element, 
YAHOO.widget.OverlayManager.CSS_FOCUSED);
+                               this.overlays.sort(this.compareZIndexDesc);
+                               var topZIndex = 
YAHOO.util.Dom.getStyle(this.overlays[0].element, "zIndex");
+                               if (! isNaN(topZIndex) && this.overlays[0] != 
overlay) {
+                                       activeOverlay.cfg.setProperty("zIndex", 
(parseInt(topZIndex) + 1));
+                               }
+                               this.overlays.sort(this.compareZIndexDesc);
+                       }
+               }
+
+               this.remove = function(overlay) {
+                       var o = this.find(overlay);
+                       if (o) {
+                               var originalZ = 
YAHOO.util.Dom.getStyle(o.element, "zIndex");
+                               o.cfg.setProperty("zIndex", -1000, true);
+                               this.overlays.sort(this.compareZIndexDesc);
+                               this.overlays = this.overlays.slice(0, 
this.overlays.length-1);
+                               o.cfg.setProperty("zIndex", originalZ, true);
+
+                               o.cfg.setProperty("manager", null);
+                               o.focusEvent = null
+                               o.blurEvent = null;
+                               o.focus = null;
+                               o.blur = null;
+                       }
+               }
+
+               this.blurAll = function() {
+                       activeOverlay = null;
+                       for (var o=0;o<this.overlays.length;o++) {
+                               
YAHOO.util.Dom.removeClass(this.overlays[o].element, 
YAHOO.widget.OverlayManager.CSS_FOCUSED);
+                       }               
+               }
+
+               var overlays = this.cfg.getProperty("overlays");
+               
+               if (! this.overlays) {
+                       this.overlays = new Array();
+               }
+
+               if (overlays) {
+                       this.register(overlays);
+                       this.overlays.sort(this.compareZIndexDesc);
+               }
+       },
+
+       /**
+       * Registers an Overlay or an array of Overlays with the manager. Upon 
registration, the Overlay receives functions for focus and blur, along with 
CustomEvents for each.
+       * @param {Overlay}      overlay         An Overlay to register with the 
manager.
+       * @param {Overlay[]}    overlay         An array of Overlays to 
register with the manager.
+       * @return       {boolean}       True if any Overlays are registered.
+       */
+       register : function(overlay) {
+               if (overlay instanceof YAHOO.widget.Overlay) {
+                       overlay.cfg.addProperty("manager", { value:this } );
+
+                       overlay.focusEvent = new 
YAHOO.util.CustomEvent("focus");
+                       overlay.blurEvent = new YAHOO.util.CustomEvent("blur");
+                       
+                       var mgr=this;
+
+                       overlay.focus = function() {
+                               mgr.focus(this);
+                               this.focusEvent.fire();
+                       } 
+
+                       overlay.blur = function() {
+                               mgr.blurAll();
+                               this.blurEvent.fire();
+                       }
+
+                       var focusOnDomEvent = function(e,obj) {
+                               overlay.focus();
+                       }
+                       
+                       var focusevent = this.cfg.getProperty("focusevent");
+                       
YAHOO.util.Event.addListener(overlay.element,focusevent,focusOnDomEvent,this,true);
+
+                       var zIndex = YAHOO.util.Dom.getStyle(overlay.element, 
"zIndex");
+                       if (! isNaN(zIndex)) {
+                               overlay.cfg.setProperty("zIndex", 
parseInt(zIndex));
+                       } else {
+                               overlay.cfg.setProperty("zIndex", 0);
+                       }
+                       
+                       this.overlays.push(overlay);
+                       return true;
+               } else if (overlay instanceof Array) {
+                       var regcount = 0;
+                       for (var i=0;i<overlay.length;i++) {
+                               if (this.register(overlay[i])) {
+                                       regcount++;
+                               }
+                       }
+                       if (regcount > 0) {
+                               return true;
+                       }
+               } else {
+                       return false;
+               }
+       },
+
+       /**
+       * Attempts to locate an Overlay by instance or ID.
+       * @param {Overlay}      overlay         An Overlay to locate within the 
manager
+       * @param {string}       overlay         An Overlay id to locate within 
the manager
+       * @return       {Overlay}       The requested Overlay, if found, or 
null if it cannot be located.
+       */
+       find : function(overlay) {
+               if (overlay instanceof YAHOO.widget.Overlay) {
+                       for (var o=0;o<this.overlays.length;o++) {
+                               if (this.overlays[o] == overlay) {
+                                       return this.overlays[o];
+                               }
+                       }
+               } else if (typeof overlay == "string") {
+                       for (var o=0;o<this.overlays.length;o++) {
+                               if (this.overlays[o].id == overlay) {
+                                       return this.overlays[o];
+                               }
+                       }                       
+               }
+               return null;
+       },
+
+       /**
+       * Used for sorting the manager's Overlays by z-index.
+       * @private
+       */
+       compareZIndexDesc : function(o1, o2) {
+               var zIndex1 = o1.cfg.getProperty("zIndex");
+               var zIndex2 = o2.cfg.getProperty("zIndex");
+
+               if (zIndex1 > zIndex2) {
+                       return -1;
+               } else if (zIndex1 < zIndex2) {
+                       return 1;
+               } else {
+                       return 0;
+               }
+       },
+
+       /**
+       * Shows all Overlays in the manager.
+       */
+       showAll : function() {
+               for (var o=0;o<this.overlays.length;o++) {
+                       this.overlays[o].show();
+               }
+       },
+
+       /**
+       * Hides all Overlays in the manager.
+       */
+       hideAll : function() {
+               for (var o=0;o<this.overlays.length;o++) {
+                       this.overlays[o].hide();
+               }
+       },
+
+       /**
+       * Returns a string representation of the object.
+       * @type string
+       */ 
+       toString : function() {
+               return "OverlayManager";
+       }
+
+}/**
+* Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+* Code licensed under the BSD License:
+* http://developer.yahoo.net/yui/license.txt
+* KeyListener is a utility that provides an easy interface for listening for 
keydown/keyup events fired against DOM elements.
+* @param {Element}     attachTo        The element or element ID to which the 
key event should be attached
+* @param {string}      attachTo        The element or element ID to which the 
key event should be attached
+* @param {object}      keyData         The object literal representing the 
key(s) to detect. Possible attributes are shift(boolean), alt(boolean), 
ctrl(boolean) and keys(either an int or an array of ints representing keycodes).
+* @param {function}    handler         The CustomEvent handler to fire when 
the key event is detected
+* @param {object}      handler         An object literal representing the 
handler. 
+* @param {string}      event           Optional. The event (keydown or keyup) 
to listen for. Defaults automatically to keydown.
+* @constructor
+*/
+YAHOO.util.KeyListener = function(attachTo, keyData, handler, event) {
+       if (! event) {
+               event = YAHOO.util.KeyListener.KEYDOWN;
+       }
+
+       var keyEvent = new YAHOO.util.CustomEvent("keyPressed");
+       
+       this.enabledEvent = new YAHOO.util.CustomEvent("enabled");
+       this.disabledEvent = new YAHOO.util.CustomEvent("disabled");
+
+       if (typeof attachTo == 'string') {
+               attachTo = document.getElementById(attachTo);
+       }
+
+       if (typeof handler == 'function') {
+               keyEvent.subscribe(handler);
+       } else {
+               keyEvent.subscribe(handler.fn, handler.scope, 
handler.correctScope);
+       }
+
+       /**
+       * Handles the key event when a key is pressed.
+       * @private
+       */
+       function handleKeyPress(e, obj) {
+               var keyPressed = e.charCode || e.keyCode;
+               
+               if (! keyData.shift)    keyData.shift = false;
+               if (! keyData.alt)              keyData.alt = false;
+               if (! keyData.ctrl)             keyData.ctrl = false;
+
+               // check held down modifying keys first
+               if (e.shiftKey == keyData.shift && 
+                       e.altKey   == keyData.alt &&
+                       e.ctrlKey  == keyData.ctrl) { // if we pass this, all 
modifiers match
+
+                       if (keyData.keys instanceof Array) {
+                               for (var i=0;i<keyData.keys.length;i++) {
+                                       if (keyPressed == keyData.keys[i]) {
+                                               keyEvent.fire(keyPressed, e);
+                                               break;
+                                       }
+                               }
+                       } else {
+                               if (keyPressed == keyData.keys) {
+                                       keyEvent.fire(keyPressed, e);
+                               }
+                       }
+               }
+       }
+
+       this.enable = function() {
+               if (! this.enabled) {
+                       YAHOO.util.Event.addListener(attachTo, event, 
handleKeyPress);
+                       this.enabledEvent.fire(keyData);
+               }
+               this.enabled = true;
+       }
+
+       this.disable = function() {
+               if (this.enabled) {
+                       YAHOO.util.Event.removeListener(attachTo, event, 
handleKeyPress);
+                       this.disabledEvent.fire(keyData);
+               }
+               this.enabled = false;
+       }
+
+       /**
+       * Returns a string representation of the object.
+       * @type string
+       */ 
+       this.toString = function() {
+               return "KeyListener [" + keyData.keys + "] " + attachTo.tagName 
+ (attachTo.id ? "[" + attachTo.id + "]" : "");
+       }
+
+}
+
+/**
+* Constant representing the DOM "keydown" event.
+* @final
+*/
+YAHOO.util.KeyListener.KEYDOWN = "keydown";
+
+/**
+* Constant representing the DOM "keyup" event.
+* @final
+*/
+YAHOO.util.KeyListener.KEYUP = "keyup";
+
+/**
+* Boolean indicating the enabled/disabled state of the Tooltip
+* @type Booleam
+*/
+YAHOO.util.KeyListener.prototype.enabled = null;
+
+/**
+* Enables the KeyListener, by dynamically attaching the key event to the 
appropriate DOM element.
+*/
+YAHOO.util.KeyListener.prototype.enable = function() {};
+
+/**
+* Disables the KeyListener, by dynamically removing the key event from the 
appropriate DOM element.
+*/
+YAHOO.util.KeyListener.prototype.disable = function() {};
+
+/**
+* CustomEvent fired when the KeyListener is enabled
+* args: keyData
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.util.KeyListener.prototype.enabledEvent = null;
+
+/**
+* CustomEvent fired when the KeyListener is disabled
+* args: keyData
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.util.KeyListener.prototype.disabledEvent = null;
+/**
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+* @class
+* Tooltip is an implementation of Overlay that behaves like an OS tooltip, 
displaying when the user mouses over a particular element, and disappearing on 
mouse out.
+* @param {string}      el      The element ID representing the Tooltip 
<em>OR</em>
+* @param {Element}     el      The element representing the Tooltip
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this Overlay. See 
configuration documentation for more details.
+* @constructor
+*/
+YAHOO.widget.Tooltip = function(el, userConfig) {
+       YAHOO.widget.Tooltip.superclass.constructor.call(this, el, userConfig);
+}
+
+YAHOO.extend(YAHOO.widget.Tooltip, YAHOO.widget.Overlay);
+
+/**
+* Constant representing the Tooltip CSS class
+* @type string
+* @final
+*/
+YAHOO.widget.Tooltip.CSS_TOOLTIP = "tt";
+
+/**
+* The Tooltip initialization method. This method is automatically called by 
the constructor. A Tooltip is automatically rendered by the init method, and it 
also is set to be invisible by default, and constrained to viewport by default 
as well.
+* @param {string}      el      The element ID representing the Tooltip 
<em>OR</em>
+* @param {Element}     el      The element representing the Tooltip
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this Tooltip. See 
configuration documentation for more details.
+*/
+YAHOO.widget.Tooltip.prototype.init = function(el, userConfig) {
+       if (document.readyState && document.readyState != "complete") {
+               var deferredInit = function() {
+                       this.init(el, userConfig);
+               }
+               YAHOO.util.Event.addListener(window, "load", deferredInit, 
this, true);
+       } else {
+               YAHOO.widget.Tooltip.superclass.init.call(this, el);
+
+               this.beforeInitEvent.fire(YAHOO.widget.Tooltip);
+
+               YAHOO.util.Dom.addClass(this.element, 
YAHOO.widget.Tooltip.CSS_TOOLTIP);
+
+               if (userConfig) {
+                       this.cfg.applyConfig(userConfig, true);
+               }
+               
+               this.cfg.queueProperty("visible",false);
+               this.cfg.queueProperty("constraintoviewport",true);
+
+               this.setBody("");
+               this.render(this.cfg.getProperty("container"));
+
+               this.initEvent.fire(YAHOO.widget.Tooltip);
+       }
+}
+
+/**
+* Initializes the class's configurable properties which can be changed using 
the Overlay's Config object (cfg).
+*/
+YAHOO.widget.Tooltip.prototype.initDefaultConfig = function() {
+       YAHOO.widget.Tooltip.superclass.initDefaultConfig.call(this);
+
+       this.cfg.addProperty("preventoverlap",          { value:true, 
validator:this.cfg.checkBoolean, supercedes:["x","y","xy"] } );
+
+       this.cfg.addProperty("showdelay",                       { value:200, 
handler:this.configShowDelay, validator:this.cfg.checkNumber } );
+       this.cfg.addProperty("autodismissdelay",        { value:5000, 
handler:this.configAutoDismissDelay, validator:this.cfg.checkNumber } );
+       this.cfg.addProperty("hidedelay",                       { value:250, 
handler:this.configHideDelay, validator:this.cfg.checkNumber } );
+
+       this.cfg.addProperty("text",                            { 
handler:this.configText, suppressEvent:true } );
+       this.cfg.addProperty("container",                       { 
value:document.body, handler:this.configContainer } );
+}
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* The default event handler fired when the "text" property is changed.
+*/
+YAHOO.widget.Tooltip.prototype.configText = function(type, args, obj) {
+       var text = args[0];
+       if (text) {
+               this.setBody(text);
+       }
+}
+
+/**
+* The default event handler fired when the "container" property is changed.
+*/
+YAHOO.widget.Tooltip.prototype.configContainer = function(type, args, obj) {
+       var container = args[0];
+       if (typeof container == 'string') {
+               this.cfg.setProperty("container", 
document.getElementById(container), true);
+       }
+}
+
+/**
+* The default event handler fired when the "context" property is changed.
+*/
+YAHOO.widget.Tooltip.prototype.configContext = function(type, args, obj) {
+       var context = args[0];
+       if (context) {
+               
+               // Normalize parameter into an array
+               if (! (context instanceof Array)) {
+                       if (typeof context == "string") {
+                               this.cfg.setProperty("context", 
[document.getElementById(context)], true);
+                       } else { // Assuming this is an element
+                               this.cfg.setProperty("context", [context], 
true);
+                       }
+                       context = this.cfg.getProperty("context");
+               }
+
+
+               // Remove any existing mouseover/mouseout listeners
+               if (this._context) {
+                       for (var c=0;c<this._context.length;++c) {
+                               var el = this._context[c];
+                               YAHOO.util.Event.removeListener(el, 
"mouseover", this.onContextMouseOver);
+                               YAHOO.util.Event.removeListener(el, 
"mousemove", this.onContextMouseMove);
+                               YAHOO.util.Event.removeListener(el, "mouseout", 
this.onContextMouseOut);
+                       }
+               }
+
+               // Add mouseover/mouseout listeners to context elements
+               this._context = context;
+               for (var c=0;c<this._context.length;++c) {
+                       var el = this._context[c];
+                       YAHOO.util.Event.addListener(el, "mouseover", 
this.onContextMouseOver, this);
+                       YAHOO.util.Event.addListener(el, "mousemove", 
this.onContextMouseMove, this);
+                       YAHOO.util.Event.addListener(el, "mouseout", 
this.onContextMouseOut, this);
+               }
+       }
+}
+
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+// BEGIN BUILT-IN DOM EVENT HANDLERS //
+
+/**
+* The default event handler fired when the user moves the mouse while over the 
context element.
+* @param {DOMEvent} e  The current DOM event
+* @param {object}      obj     The object argument
+*/
+YAHOO.widget.Tooltip.prototype.onContextMouseMove = function(e, obj) {
+       obj.pageX = YAHOO.util.Event.getPageX(e);
+       obj.pageY = YAHOO.util.Event.getPageY(e);
+
+}
+
+/**
+* The default event handler fired when the user mouses over the context 
element.
+* @param {DOMEvent} e  The current DOM event
+* @param {object}      obj     The object argument
+*/
+YAHOO.widget.Tooltip.prototype.onContextMouseOver = function(e, obj) {
+
+       if (obj.hideProcId) {
+               clearTimeout(obj.hideProcId);
+               obj.hideProcId = null;
+       }
+       
+       var context = this;
+       YAHOO.util.Event.addListener(context, "mousemove", 
obj.onContextMouseMove, obj);
+
+       if (context.title) {
+               obj._tempTitle = context.title;
+               context.title = "";
+       }
+
+       /**
+       * The unique process ID associated with the thread responsible for 
showing the Tooltip.
+       * @type int
+       */
+       obj.showProcId = obj.doShow(e, context);
+}
+
+/**
+* The default event handler fired when the user mouses out of the context 
element.
+* @param {DOMEvent} e  The current DOM event
+* @param {object}      obj     The object argument
+*/
+YAHOO.widget.Tooltip.prototype.onContextMouseOut = function(e, obj) {
+       var el = this;
+
+       if (obj._tempTitle) {
+               el.title = obj._tempTitle;
+               obj._tempTitle = null;
+       }
+       
+       if (obj.showProcId) {
+               clearTimeout(obj.showProcId);
+               obj.showProcId = null;
+       }
+
+       if (obj.hideProcId) {
+               clearTimeout(obj.hideProcId);
+               obj.hideProcId = null;
+       }
+
+
+       obj.hideProcId = setTimeout(function() {
+                               obj.hide();
+                               }, obj.cfg.getProperty("hidedelay"));
+}
+
+// END BUILT-IN DOM EVENT HANDLERS //
+
+/**
+* Processes the showing of the Tooltip by setting the timeout delay and offset 
of the Tooltip.
+* @param {DOMEvent} e  The current DOM event
+* @return {int}        The process ID of the timeout function associated with 
doShow
+*/
+YAHOO.widget.Tooltip.prototype.doShow = function(e, context) {
+       
+       var yOffset = 25;
+       if (this.browser == "opera" && context.tagName == "A") {
+               yOffset += 12;
+       }
+
+       var me = this;
+       return setTimeout(
+               function() {
+                       if (me._tempTitle) {
+                               me.setBody(me._tempTitle);
+                       } else {
+                               me.cfg.refireEvent("text");
+                       }
+
+                       me.moveTo(me.pageX, me.pageY + yOffset);
+                       if (me.cfg.getProperty("preventoverlap")) {
+                               me.preventOverlap(me.pageX, me.pageY);
+                       }
+                       
+                       YAHOO.util.Event.removeListener(context, "mousemove", 
me.onContextMouseMove);
+
+                       me.show();
+                       me.hideProcId = me.doHide();
+               },
+       this.cfg.getProperty("showdelay"));
+}
+
+/**
+* Sets the timeout for the auto-dismiss delay, which by default is 5 seconds, 
meaning that a tooltip will automatically dismiss itself after 5 seconds of 
being displayed.
+*/
+YAHOO.widget.Tooltip.prototype.doHide = function() {
+       var me = this;
+       return setTimeout(
+               function() {
+                       me.hide();
+               },
+               this.cfg.getProperty("autodismissdelay"));
+}
+
+/**
+* Fired when the Tooltip is moved, this event handler is used to prevent the 
Tooltip from overlapping with its context element.
+*/
+YAHOO.widget.Tooltip.prototype.preventOverlap = function(pageX, pageY) {
+       
+       var height = this.element.offsetHeight;
+       
+       var elementRegion = YAHOO.util.Dom.getRegion(this.element);
+
+       elementRegion.top -= 5;
+       elementRegion.left -= 5;
+       elementRegion.right += 5;
+       elementRegion.bottom += 5;
+
+       var mousePoint = new YAHOO.util.Point(pageX, pageY);
+       
+       if (elementRegion.contains(mousePoint)) {
+               this.logger.log("OVERLAP", "warn");
+               this.cfg.setProperty("y", (pageY-height-5))
+       }
+}
+
+/**
+* Returns a string representation of the object.
+* @type string
+*/ 
+YAHOO.widget.Tooltip.prototype.toString = function() {
+       return "Tooltip " + this.id;
+}/**
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+* @class
+* Panel is an implementation of Overlay that behaves like an OS window, with a 
draggable header and an optional close icon at the top right.
+* @param {string}      el      The element ID representing the Panel 
<em>OR</em>
+* @param {Element}     el      The element representing the Panel
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this Panel. See 
configuration documentation for more details.
+* @constructor
+*/
+YAHOO.widget.Panel = function(el, userConfig) {
+       YAHOO.widget.Panel.superclass.constructor.call(this, el, userConfig);
+}
+
+YAHOO.extend(YAHOO.widget.Panel, YAHOO.widget.Overlay);
+
+/**
+* Constant representing the default CSS class used for a Panel
+* @type string
+* @final
+*/
+YAHOO.widget.Panel.CSS_PANEL = "panel";
+
+/**
+* Constant representing the default CSS class used for a Panel's wrapping 
container
+* @type string
+* @final
+*/
+YAHOO.widget.Panel.CSS_PANEL_CONTAINER = "panel-container";
+
+/**
+* CustomEvent fired after the modality mask is shown
+* args: none
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Panel.prototype.showMaskEvent = null;
+
+/**
+* CustomEvent fired after the modality mask is hidden
+* args: none
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Panel.prototype.hideMaskEvent = null;
+
+/**
+* The Overlay initialization method, which is executed for Overlay and all of 
its subclasses. This method is automatically called by the constructor, and  
sets up all DOM references for pre-existing markup, and creates required markup 
if it is not already present.
+* @param {string}      el      The element ID representing the Overlay 
<em>OR</em>
+* @param {Element}     el      The element representing the Overlay
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this Overlay. See 
configuration documentation for more details.
+*/
+YAHOO.widget.Panel.prototype.init = function(el, userConfig) {
+       YAHOO.widget.Panel.superclass.init.call(this, el/*, userConfig*/);  // 
Note that we don't pass the user config in here yet because we only want it 
executed once, at the lowest subclass level
+       
+       this.beforeInitEvent.fire(YAHOO.widget.Panel);
+
+       YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Panel.CSS_PANEL);
+
+       this.buildWrapper();                    
+       
+       if (userConfig) {
+               this.cfg.applyConfig(userConfig, true);
+       }
+
+       this.beforeRenderEvent.subscribe(function() {
+               var draggable = this.cfg.getProperty("draggable");
+               if (draggable) {
+                       if (! this.header) {
+                               this.setHeader("&nbsp;");
+                       }
+               }
+       }, this, true);
+
+       this.initEvent.fire(YAHOO.widget.Panel);
+
+}
+
+/**
+* Initializes the custom events for Module which are fired automatically at 
appropriate times by the Module class.
+*/
+YAHOO.widget.Panel.prototype.initEvents = function() {
+       YAHOO.widget.Panel.superclass.initEvents.call(this);
+
+       this.showMaskEvent = new YAHOO.util.CustomEvent("showMask");
+       this.hideMaskEvent = new YAHOO.util.CustomEvent("hideMask");
+
+       this.dragEvent = new YAHOO.util.CustomEvent("drag");
+}
+
+/**
+* Initializes the class's configurable properties which can be changed using 
the Panel's Config object (cfg).
+*/
+YAHOO.widget.Panel.prototype.initDefaultConfig = function() {
+       YAHOO.widget.Panel.superclass.initDefaultConfig.call(this);
+
+       // Add panel config properties //
+
+       this.cfg.addProperty("close", { value:true, handler:this.configClose, 
validator:this.cfg.checkBoolean, supercedes:["visible"] } );
+       this.cfg.addProperty("draggable", { value:true, 
handler:this.configDraggable, validator:this.cfg.checkBoolean, 
supercedes:["visible"] } );
+
+       this.cfg.addProperty("underlay", { value:"shadow", 
handler:this.configUnderlay, supercedes:["visible"] } );
+       this.cfg.addProperty("modal",   { value:false, 
handler:this.configModal, validator:this.cfg.checkBoolean, 
supercedes:["visible"] } );
+
+       this.cfg.addProperty("keylisteners", { handler:this.configKeyListeners, 
suppressEvent:true, supercedes:["visible"] } );
+}
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* The default event handler fired when the "close" property is changed. The 
method controls the appending or hiding of the close icon at the top right of 
the Panel.
+*/
+YAHOO.widget.Panel.prototype.configClose = function(type, args, obj) {
+       var val = args[0];
+
+       var doHide = function(e, obj) {
+               obj.hide();
+       }
+
+       if (val) {
+               if (! this.close) {
+                       this.close = document.createElement("DIV");
+                       YAHOO.util.Dom.addClass(this.close, "close");
+
+                       if (this.isSecure) {
+                               YAHOO.util.Dom.addClass(this.close, "secure");
+                       } else {
+                               YAHOO.util.Dom.addClass(this.close, 
"nonsecure");
+                       }
+
+                       this.close.innerHTML = "&nbsp;";
+                       this.innerElement.appendChild(this.close);
+                       YAHOO.util.Event.addListener(this.close, "click", 
doHide, this);        
+               } else {
+                       this.close.style.display = "block";
+               }
+       } else {
+               if (this.close) {
+                       this.close.style.display = "none";
+               }
+       }
+}
+
+/**
+* The default event handler fired when the "draggable" property is changed.
+*/
+YAHOO.widget.Panel.prototype.configDraggable = function(type, args, obj) {
+       var val = args[0];
+       if (val) {
+               if (this.header) {
+                       YAHOO.util.Dom.setStyle(this.header,"cursor","move");
+                       this.registerDragDrop();
+               }
+       } else {
+               if (this.dd) {
+                       this.dd.unreg();
+               }
+               if (this.header) {
+                       YAHOO.util.Dom.setStyle(this.header,"cursor","auto");
+               }
+       }
+}
+
+/**
+* The default event handler fired when the "underlay" property is changed.
+*/
+YAHOO.widget.Panel.prototype.configUnderlay = function(type, args, obj) {
+       var val = args[0];
+
+       switch (val.toLowerCase()) {
+               case "shadow":
+                       YAHOO.util.Dom.removeClass(this.element, "matte");
+                       YAHOO.util.Dom.addClass(this.element, "shadow");
+
+                       if (! this.underlay) { // create if not already in DOM
+                               this.underlay = document.createElement("DIV");
+                               this.underlay.className = "underlay";
+                               this.underlay.innerHTML = "&nbsp;";
+                               this.element.appendChild(this.underlay);
+                       } 
+
+                       this.sizeUnderlay();
+                       break;
+               case "matte":
+                       YAHOO.util.Dom.removeClass(this.element, "shadow");
+                       YAHOO.util.Dom.addClass(this.element, "matte");
+                       break;
+               case "none":
+               default:
+                       YAHOO.util.Dom.removeClass(this.element, "shadow");
+                       YAHOO.util.Dom.removeClass(this.element, "matte");
+                       break;
+       }
+}
+
+/**
+* The default event handler fired when the "modal" property is changed. This 
handler subscribes or unsubscribes to the show and hide events to handle the 
display or hide of the modality mask.
+*/
+YAHOO.widget.Panel.prototype.configModal = function(type, args, obj) {
+       var modal = args[0];
+
+       if (modal) {
+               this.buildMask();
+
+               if (! YAHOO.util.Config.alreadySubscribed( this.showEvent, 
this.showMask, this ) ) {
+                       this.showEvent.subscribe(this.showMask, this, true);
+               }
+               if (! YAHOO.util.Config.alreadySubscribed( this.hideEvent, 
this.hideMask, this) ) {
+                       this.hideEvent.subscribe(this.hideMask, this, true);
+               }
+               if (! YAHOO.util.Config.alreadySubscribed( 
YAHOO.widget.Overlay.windowResizeEvent, this.sizeMask, this ) ) {
+                       
YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.sizeMask, this, true);
+               }
+               if (! YAHOO.util.Config.alreadySubscribed( 
YAHOO.widget.Overlay.windowScrollEvent, this.sizeMask, this ) ) {
+                       
YAHOO.widget.Overlay.windowScrollEvent.subscribe(this.sizeMask, this, true);
+               }
+       } else {
+               this.beforeShowEvent.unsubscribe(this.showMask, this);
+               this.hideEvent.unsubscribe(this.hideMask, this);
+               
YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.sizeMask);
+               
YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.sizeMask);
+       }
+}
+
+/**
+* The default event handler fired when the "keylisteners" property is changed. 
+*/
+YAHOO.widget.Panel.prototype.configKeyListeners = function(type, args, obj) {
+       var listeners = args[0];
+
+       if (listeners) {
+               if (listeners instanceof Array) {
+                       for (var i=0;i<listeners.length;i++) {
+                               var listener = listeners[i];
+
+                               if (! 
YAHOO.util.Config.alreadySubscribed(this.showEvent, listener.enable, listener)) 
{
+                                       
this.showEvent.subscribe(listener.enable, listener, true);
+                               }
+                               if (! 
YAHOO.util.Config.alreadySubscribed(this.hideEvent, listener.disable, 
listener)) {
+                                       
this.hideEvent.subscribe(listener.disable, listener, true);
+                                       
this.destroyEvent.subscribe(listener.disable, listener, true);
+                               }
+                       }
+               } else {
+                       if (! 
YAHOO.util.Config.alreadySubscribed(this.showEvent, listeners.enable, 
listeners)) {
+                               this.showEvent.subscribe(listeners.enable, 
listeners, true);
+                       }
+                       if (! 
YAHOO.util.Config.alreadySubscribed(this.hideEvent, listeners.disable, 
listeners)) {
+                               this.hideEvent.subscribe(listeners.disable, 
listeners, true);
+                               this.destroyEvent.subscribe(listeners.disable, 
listeners, true); 
+                       }
+               }
+       } 
+}
+
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+
+/**
+* Builds the wrapping container around the Panel that is used for positioning 
the shadow and matte underlays. The container element is assigned to a  local 
instance variable called container, and the element is reinserted inside of it.
+*/
+YAHOO.widget.Panel.prototype.buildWrapper = function() {
+       var elementParent = this.element.parentNode;
+
+       var elementClone = this.element.cloneNode(true);
+       this.innerElement = elementClone;
+       this.innerElement.style.visibility = "inherit";
+
+       YAHOO.util.Dom.addClass(this.innerElement, 
YAHOO.widget.Panel.CSS_PANEL);
+
+       var wrapper = document.createElement("DIV");
+       wrapper.className = YAHOO.widget.Panel.CSS_PANEL_CONTAINER;
+       wrapper.id = elementClone.id + "_c";
+       
+       wrapper.appendChild(elementClone);
+       
+       if (elementParent) {
+               elementParent.replaceChild(wrapper, this.element);
+       }
+
+       this.element = wrapper;
+
+       // Resynchronize the local field references
+
+       var childNodes = this.innerElement.childNodes;
+       if (childNodes) {
+               for (var i=0;i<childNodes.length;i++) {
+                       var child = childNodes[i];
+                       switch (child.className) {
+                               case YAHOO.widget.Module.CSS_HEADER:
+                                       this.header = child;
+                                       break;
+                               case YAHOO.widget.Module.CSS_BODY:
+                                       this.body = child;
+                                       break;
+                               case YAHOO.widget.Module.CSS_FOOTER:
+                                       this.footer = child;
+                                       break;
+                       }
+               }
+       }
+
+       this.initDefaultConfig(); // We've changed the DOM, so the 
configuration must be re-tooled to get the DOM references right
+}
+
+/**
+* Adjusts the size of the shadow based on the size of the element.
+*/
+YAHOO.widget.Panel.prototype.sizeUnderlay = function() {
+       if (this.underlay && this.browser != "gecko" && this.browser != 
"safari") {
+               this.underlay.style.width = this.innerElement.offsetWidth + 
"px";
+               this.underlay.style.height = this.innerElement.offsetHeight + 
"px";
+       }
+}
+
+/**
+* Event handler fired when the resize monitor element is resized.
+*/
+YAHOO.widget.Panel.prototype.onDomResize = function(e, obj) { 
+       YAHOO.widget.Panel.superclass.onDomResize.call(this, e, obj);
+       var me = this;
+       setTimeout(function() {
+               me.sizeUnderlay();
+       }, 0);
+};
+
+/**
+* Registers the Panel's header for drag & drop capability.
+*/
+YAHOO.widget.Panel.prototype.registerDragDrop = function() {
+       if (this.header) {
+               this.dd = new YAHOO.util.DD(this.element.id, this.id);
+
+               if (! this.header.id) {
+                       this.header.id = this.id + "_h";
+               }
+               
+               var me = this;
+
+               this.dd.startDrag = function() {
+
+                       if (me.browser == "ie") {
+                               YAHOO.util.Dom.addClass(me.element,"drag");
+                       }
+
+                       if (me.cfg.getProperty("constraintoviewport")) {
+                               var offsetHeight = me.element.offsetHeight;
+                               var offsetWidth = me.element.offsetWidth;
+
+                               var viewPortWidth = 
YAHOO.util.Dom.getViewportWidth();
+                               var viewPortHeight = 
YAHOO.util.Dom.getViewportHeight();
+
+                               var scrollX = window.scrollX || 
document.documentElement.scrollLeft;
+                               var scrollY = window.scrollY || 
document.documentElement.scrollTop;
+
+                               var topConstraint = scrollY + 10;
+                               var leftConstraint = scrollX + 10;
+                               var bottomConstraint = scrollY + viewPortHeight 
- offsetHeight - 10;
+                               var rightConstraint = scrollX + viewPortWidth - 
offsetWidth - 10;
+
+                               this.minX = leftConstraint
+                               this.maxX = rightConstraint;
+                               this.constrainX = true;
+
+                               this.minY = topConstraint;
+                               this.maxY = bottomConstraint;
+                               this.constrainY = true;
+                       } else {
+                               this.constrainX = false;
+                               this.constrainY = false;
+                       }
+
+                       me.dragEvent.fire("startDrag", arguments);
+               }
+               
+               this.dd.onDrag = function() {
+                       me.syncPosition();
+                       me.cfg.refireEvent("iframe");
+                       if (this.platform == "mac" && this.browser == "gecko") {
+                               this.showMacGeckoScrollbars();
+                       }
+
+                       me.dragEvent.fire("onDrag", arguments);
+               }
+
+               this.dd.endDrag = function() {
+                       if (me.browser == "ie") {
+                               YAHOO.util.Dom.removeClass(me.element,"drag");
+                       }
+
+                       me.dragEvent.fire("endDrag", arguments);
+               }
+
+               this.dd.setHandleElId(this.header.id);
+               this.dd.addInvalidHandleType("INPUT");
+               this.dd.addInvalidHandleType("SELECT");
+               this.dd.addInvalidHandleType("TEXTAREA");
+       }
+}
+
+/**
+* Builds the mask that is laid over the document when the Panel is configured 
to be modal.
+*/
+YAHOO.widget.Panel.prototype.buildMask = function() {
+       if (! this.mask) {
+               this.mask = document.createElement("DIV");
+               this.mask.id = this.id + "_mask";
+               this.mask.className = "mask";
+               this.mask.innerHTML = "&nbsp;";
+
+               var maskClick = function(e, obj) {
+                       YAHOO.util.Event.stopEvent(e);
+               }
+
+               YAHOO.util.Event.addListener(this.mask, maskClick, this);
+
+               document.body.appendChild(this.mask);
+       }
+}
+
+/**
+* Hides the modality mask.
+*/
+YAHOO.widget.Panel.prototype.hideMask = function() {
+       if (this.cfg.getProperty("modal") && this.mask) {
+               this.mask.style.display = "none";
+               this.hideMaskEvent.fire();
+               YAHOO.util.Dom.removeClass(document.body, "masked");
+       }
+}
+
+/**
+* Shows the modality mask.
+*/
+YAHOO.widget.Panel.prototype.showMask = function() {
+       if (this.cfg.getProperty("modal") && this.mask) {
+               YAHOO.util.Dom.addClass(document.body, "masked");
+               this.sizeMask();
+               this.mask.style.display = "block";
+               this.showMaskEvent.fire();
+       }
+}
+
+/**
+* Sets the size of the modality mask to cover the entire scrollable area of 
the document
+*/
+YAHOO.widget.Panel.prototype.sizeMask = function() {
+       if (this.mask) {
+               this.mask.style.height = 
YAHOO.util.Dom.getDocumentHeight()+"px";
+               this.mask.style.width = YAHOO.util.Dom.getDocumentWidth()+"px";
+       }
+}
+
+/**
+* The default event handler fired when the "height" property is changed.
+*/
+YAHOO.widget.Panel.prototype.configHeight = function(type, args, obj) {
+       var height = args[0];
+       var el = this.innerElement;
+       YAHOO.util.Dom.setStyle(el, "height", height);
+       this.cfg.refireEvent("underlay");
+       this.cfg.refireEvent("iframe");
+}
+
+/**
+* The default event handler fired when the "width" property is changed.
+*/
+YAHOO.widget.Panel.prototype.configWidth = function(type, args, obj) {
+       var width = args[0];
+       var el = this.innerElement;
+       YAHOO.util.Dom.setStyle(el, "width", width);
+       this.cfg.refireEvent("underlay");
+       this.cfg.refireEvent("iframe");
+}
+
+/**
+* Renders the Panel by inserting the elements that are not already in the main 
Panel into their correct places. Optionally appends the Panel to the specified 
node prior to the render's execution. NOTE: For Panels without existing markup, 
the appendToNode argument is REQUIRED. If this argument is ommitted and the 
current element is not present in the document, the function will return false, 
indicating that the render was a failure.
+* @param {string}      appendToNode    The element id to which the Module 
should be appended to prior to rendering <em>OR</em>
+* @param {Element}     appendToNode    The element to which the Module should 
be appended to prior to rendering        
+* @return {boolean} Success or failure of the render
+*/
+YAHOO.widget.Panel.prototype.render = function(appendToNode) {
+       return YAHOO.widget.Panel.superclass.render.call(this, appendToNode, 
this.innerElement);
+}
+
+/**
+* Returns a string representation of the object.
+* @type string
+*/ 
+YAHOO.widget.Panel.prototype.toString = function() {
+       return "Panel " + this.id;
+}/**
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+* @class
+* Dialog is an implementation of Panel that can be used to submit form data. 
Built-in functionality for buttons with event handlers is included, and button 
sets can be build dynamically, or the preincluded ones for Submit/Cancel and 
OK/Cancel can be utilized. Forms can be processed in 3 ways -- via an 
asynchronous Connection utility call, a simple form POST or GET, or manually.
+* @param {string}      el      The element ID representing the Dialog 
<em>OR</em>
+* @param {Element}     el      The element representing the Dialog
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this Dialog. See 
configuration documentation for more details.
+* @constructor
+*/
+YAHOO.widget.Dialog = function(el, userConfig) {
+       YAHOO.widget.Dialog.superclass.constructor.call(this, el, userConfig);
+}
+
+YAHOO.extend(YAHOO.widget.Dialog, YAHOO.widget.Panel);
+
+/**
+* Constant representing the default CSS class used for a Dialog
+* @type string
+* @final
+*/
+YAHOO.widget.Dialog.CSS_DIALOG = "dialog";
+
+
+/**
+* CustomEvent fired prior to submission
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Dialog.prototype.beforeSubmitEvent = null;
+
+/**
+* CustomEvent fired after submission
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Dialog.prototype.submitEvent = null;
+
+/**
+* CustomEvent fired prior to manual submission
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Dialog.prototype.manualSubmitEvent = null;
+
+/**
+* CustomEvent fired prior to asynchronous submission
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Dialog.prototype.asyncSubmitEvent = null;
+
+/**
+* CustomEvent fired prior to form-based submission
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Dialog.prototype.formSubmitEvent = null;
+
+/**
+* CustomEvent fired after cancel
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Dialog.prototype.cancelEvent = null;
+
+
+/**
+* Initializes the class's configurable properties which can be changed using 
the Dialog's Config object (cfg).
+*/
+YAHOO.widget.Dialog.prototype.initDefaultConfig = function() {
+       YAHOO.widget.Dialog.superclass.initDefaultConfig.call(this);
+
+       /**
+       * The internally maintained callback object for use with the Connection 
utility
+       * @type object
+       * @private
+       */
+       this.callback = {
+               success : null,
+               failure : null,
+               argument: null,
+               scope : this
+       }
+
+       this.doSubmit = function() {
+               var method = this.cfg.getProperty("postmethod");
+               switch (method) {
+                       case "async":
+                               YAHOO.util.Connect.setForm(this.form.name);
+                               var cObj = 
YAHOO.util.Connect.asyncRequest('POST', this.form.action, this.callback);
+                               this.asyncSubmitEvent.fire();
+                               break;
+                       case "form":
+                               this.form.submit();
+                               this.formSubmitEvent.fire();
+                               break;
+                       case "none":
+                       case "manual":
+                               this.manualSubmitEvent.fire();
+                               break;
+               }
+       }
+
+       // Add form dialog config properties //
+       this.cfg.addProperty("postmethod", { value:"async", 
validator:function(val) { 
+                                                                               
                        if (val != "form" && val != "async" && val != "none" && 
val != "manual") {
+                                                                               
                                return false;
+                                                                               
                        } else {
+                                                                               
                                return true;
+                                                                               
                        }
+                                                                               
                } });
+
+       this.cfg.addProperty("buttons",         { value:"none", 
handler:this.configButtons } );
+}
+
+/**
+* Initializes the custom events for Dialog which are fired automatically at 
appropriate times by the Dialog class.
+*/
+YAHOO.widget.Dialog.prototype.initEvents = function() {
+       YAHOO.widget.Dialog.superclass.initEvents.call(this);
+       
+       this.beforeSubmitEvent  = new YAHOO.util.CustomEvent("beforeSubmit");
+       this.submitEvent                = new YAHOO.util.CustomEvent("submit");
+
+       this.manualSubmitEvent  = new YAHOO.util.CustomEvent("manualSubmit");
+       this.asyncSubmitEvent   = new YAHOO.util.CustomEvent("asyncSubmit");
+       this.formSubmitEvent    = new YAHOO.util.CustomEvent("formSubmit");
+
+       this.cancelEvent                = new YAHOO.util.CustomEvent("cancel");
+}
+
+/**
+* The Dialog initialization method, which is executed for Dialog and all of 
its subclasses. This method is automatically called by the constructor, and  
sets up all DOM references for pre-existing markup, and creates required markup 
if it is not already present.
+* @param {string}      el      The element ID representing the Dialog 
<em>OR</em>
+* @param {Element}     el      The element representing the Dialog
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this Dialog. See 
configuration documentation for more details.
+*/
+YAHOO.widget.Dialog.prototype.init = function(el, userConfig) {
+       YAHOO.widget.Dialog.superclass.init.call(this, el/*, userConfig*/);  // 
Note that we don't pass the user config in here yet because we only want it 
executed once, at the lowest subclass level
+       
+       this.beforeInitEvent.fire(YAHOO.widget.Dialog);
+
+       YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Dialog.CSS_DIALOG);
+
+       this.cfg.setProperty("visible", false);
+
+       if (userConfig) {
+               this.cfg.applyConfig(userConfig, true);
+       }
+
+       this.renderEvent.subscribe(this.registerForm, this, true);
+
+       this.showEvent.subscribe(this.focusFirst, this, true);
+       this.beforeHideEvent.subscribe(this.blurButtons, this, true);
+
+       this.beforeRenderEvent.subscribe(function() {
+               var buttonCfg = this.cfg.getProperty("buttons");
+               if (buttonCfg && buttonCfg != "none") {
+                       if (! this.footer) {
+                               this.setFooter("");
+                       }
+               }
+       }, this, true);
+
+       this.initEvent.fire(YAHOO.widget.Dialog);
+}
+
+/**
+* Prepares the Dialog's internal FORM object, creating one if one is not 
currently present.
+*/
+YAHOO.widget.Dialog.prototype.registerForm = function() {
+       var form = this.element.getElementsByTagName("FORM")[0];
+
+       if (! form) {
+               var formHTML = "<form name=\"frm_" + this.id + "\" 
action=\"\"></form>";
+               this.body.innerHTML += formHTML;
+               form = this.element.getElementsByTagName("FORM")[0];
+       }
+
+       this.firstFormElement = function() {
+               for (var f=0;f<form.elements.length;f++ ) {
+                       var el = form.elements[f];
+                       if (el.focus) {
+                               if (el.type && el.type != "hidden") {
+                                       return el;
+                                       break;
+                               }
+                       }
+               }
+               return null;
+       }();
+
+       this.lastFormElement = function() {
+               for (var f=form.elements.length-1;f>=0;f-- ) {
+                       var el = form.elements[f];
+                       if (el.focus) {
+                               if (el.type && el.type != "hidden") {
+                                       return el;
+                                       break;
+                               }
+                       }
+               }
+               return null;
+       }();
+
+       this.form = form;
+
+       if (this.cfg.getProperty("modal") && this.form) {
+
+               var me = this;
+               
+               var firstElement = this.firstFormElement || this.firstButton;
+               if (firstElement) {
+                       this.preventBackTab = new 
YAHOO.util.KeyListener(firstElement, { shift:true, keys:9 }, {fn:me.focusLast, 
scope:me, correctScope:true} );
+                       this.showEvent.subscribe(this.preventBackTab.enable, 
this.preventBackTab, true);
+                       this.hideEvent.subscribe(this.preventBackTab.disable, 
this.preventBackTab, true);
+               }
+
+               var lastElement = this.lastButton || this.lastFormElement;
+               if (lastElement) {
+                       this.preventTabOut = new 
YAHOO.util.KeyListener(lastElement, { shift:false, keys:9 }, {fn:me.focusFirst, 
scope:me, correctScope:true} );
+                       this.showEvent.subscribe(this.preventTabOut.enable, 
this.preventTabOut, true);
+                       this.hideEvent.subscribe(this.preventTabOut.disable, 
this.preventTabOut, true);
+               }
+       }
+}
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* The default event handler for the "buttons" configuration property
+*/
+YAHOO.widget.Dialog.prototype.configButtons = function(type, args, obj) {
+       var buttons = args[0];
+       if (buttons != "none") {
+               this.buttonSpan = null;
+               this.buttonSpan = document.createElement("SPAN");
+               this.buttonSpan.className = "button-group";
+
+               for (var b=0;b<buttons.length;b++) {
+                       var button = buttons[b];
+
+                       var htmlButton = document.createElement("BUTTON");
+
+                       if (button.isDefault) {
+                               htmlButton.className = "default";
+                               this.defaultHtmlButton = htmlButton;
+                       }
+
+                       
htmlButton.appendChild(document.createTextNode(button.text));
+                       YAHOO.util.Event.addListener(htmlButton, "click", 
button.handler, this, true);
+
+                       this.buttonSpan.appendChild(htmlButton);                
+                       button.htmlButton = htmlButton;
+
+                       if (b == 0) {
+                               this.firstButton = button.htmlButton;
+                       }
+
+                       if (b == (buttons.length-1)) {
+                               this.lastButton = button.htmlButton;
+                       }
+
+               }
+
+               this.setFooter(this.buttonSpan);
+
+               this.cfg.refireEvent("iframe");
+               this.cfg.refireEvent("underlay");
+       } else { // Do cleanup
+               if (this.buttonSpan) {
+                       if (this.buttonSpan.parentNode) {
+                               
this.buttonSpan.parentNode.removeChild(this.buttonSpan);
+                       }
+
+                       this.buttonSpan = null;
+                       this.firstButtom = null;
+                       this.lastButton = null;
+                       this.defaultHtmlButton = null;
+               }
+       }
+}
+
+/**
+* The default handler fired when the "success" property is changed. Used for 
asynchronous submission only.
+*/ 
+YAHOO.widget.Dialog.prototype.configOnSuccess = function(type,args,obj){};
+
+/**
+* The default handler fired when the "failure" property is changed. Used for 
asynchronous submission only.
+*/ 
+YAHOO.widget.Dialog.prototype.configOnFailure = function(type,args,obj){};
+
+/**
+* Executes a submission of the form based on the value of the postmethod 
property.
+*/
+YAHOO.widget.Dialog.prototype.doSubmit = function() {};
+
+/**
+* The default event handler used to focus the first field of the form when the 
Dialog is shown.
+*/
+YAHOO.widget.Dialog.prototype.focusFirst = function(type,args,obj) {
+       if (args) {
+               var e = args[1];
+               if (e) {
+                       YAHOO.util.Event.stopEvent(e);
+               }
+       }
+
+       if (this.firstFormElement) {
+               this.firstFormElement.focus();
+       } else {
+               this.focusDefaultButton();
+       }
+}
+
+/**
+* Sets the focus to the last button in the button or form element in the Dialog
+*/
+YAHOO.widget.Dialog.prototype.focusLast = function(type,args,obj) {
+       if (args) {
+               var e = args[1];
+               if (e) {
+                       YAHOO.util.Event.stopEvent(e);
+               }
+       }
+
+       var buttons = this.cfg.getProperty("buttons");
+       if (buttons && buttons instanceof Array) {
+               this.focusLastButton();
+       } else {
+               if (this.lastFormElement) {
+                       this.lastFormElement.focus();
+               }
+       }
+}
+
+/**
+* Sets the focus to the button that is designated as the default. By default, 
his handler is executed when the show event is fired.
+*/
+YAHOO.widget.Dialog.prototype.focusDefaultButton = function() {
+       if (this.defaultHtmlButton) {
+               this.defaultHtmlButton.focus();
+       }
+}
+
+/**
+* Blurs all the html buttons
+*/
+YAHOO.widget.Dialog.prototype.blurButtons = function() {
+       var buttons = this.cfg.getProperty("buttons");
+       if (buttons && buttons instanceof Array) {
+               var html = buttons[0].htmlButton;
+               if (html) {
+                       html.blur();
+               }
+       }
+}
+
+/**
+* Sets the focus to the first button in the button list
+*/
+YAHOO.widget.Dialog.prototype.focusFirstButton = function() {
+       var buttons = this.cfg.getProperty("buttons");
+       if (buttons && buttons instanceof Array) {
+               var html = buttons[0].htmlButton;
+               if (html) {
+                       html.focus();
+               }
+       }
+}
+
+/**
+* Sets the focus to the first button in the button list
+*/
+YAHOO.widget.Dialog.prototype.focusLastButton = function() {
+       var buttons = this.cfg.getProperty("buttons");
+       if (buttons && buttons instanceof Array) {
+               var html = buttons[buttons.length-1].htmlButton;
+               if (html) {
+                       html.focus();
+               }
+       }
+}
+
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* Built-in function hook for writing a validation function that will be 
checked for a "true" value prior to a submit. This function, as implemented by 
default, always returns true, so it should be overridden if validation is 
necessary.
+*/
+YAHOO.widget.Dialog.prototype.validate = function() {
+       return true;
+}
+
+/**
+* Executes a submit of the Dialog followed by a hide, if validation is 
successful.
+*/
+YAHOO.widget.Dialog.prototype.submit = function() {
+       if (this.validate()) {
+               this.beforeSubmitEvent.fire();
+               this.doSubmit();
+               this.submitEvent.fire();
+               this.hide();
+               return true;
+       } else {
+               return false;
+       }
+}
+
+/**
+* Executes the cancel of the Dialog followed by a hide.
+*/
+YAHOO.widget.Dialog.prototype.cancel = function() {
+       this.cancelEvent.fire();
+       this.hide();    
+}
+
+/**
+* Returns a JSON-compatible data structure representing the data currently 
contained in the form.
+* @return {object} A JSON object reprsenting the data of the current form.
+*/
+YAHOO.widget.Dialog.prototype.getData = function() {
+       var form = this.form;
+       var data = {};
+
+       if (form) {
+               for (var i in this.form) {
+                       var formItem = form[i];
+                       if (formItem) {
+                               if (formItem.tagName) { // Got a single form 
item
+                                       switch (formItem.tagName) {
+                                               case "INPUT":
+                                                       switch (formItem.type) {
+                                                               case 
"checkbox": 
+                                                                       data[i] 
= formItem.checked;
+                                                                       break;
+                                                               case "textbox":
+                                                               case "text":
+                                                               case "hidden":
+                                                                       data[i] 
= formItem.value;
+                                                                       break;
+                                                       }
+                                                       break;
+                                               case "TEXTAREA":
+                                                       data[i] = 
formItem.value;
+                                                       break;
+                                               case "SELECT":
+                                                       var val = new Array();
+                                                       for (var 
x=0;x<formItem.options.length;x++)     {
+                                                               var option = 
formItem.options[x];
+                                                               if 
(option.selected) {
+                                                                       var 
selval = option.value;
+                                                                       if (! 
selval || selval == "") {
+                                                                               
selval = option.text;
+                                                                       }
+                                                                       
val[val.length] = selval;
+                                                               }
+                                                       }
+                                                       data[i] = val;
+                                                       break;
+                                       }
+                               } else if (formItem[0] && formItem[0].tagName) 
{ // this is an array of form items
+                                       switch (formItem[0].tagName) {
+                                               case "INPUT" :
+                                                       switch 
(formItem[0].type) {
+                                                               case "radio":
+                                                                       for 
(var r=0; r<formItem.length; r++) {
+                                                                               
var radio = formItem[r];
+                                                                               
if (radio.checked) {
+                                                                               
        data[radio.name] = radio.value;
+                                                                               
        break;
+                                                                               
}
+                                                                       }
+                                                                       break;
+                                                               case "checkbox":
+                                                                       var 
cbArray = new Array();
+                                                                       for 
(var c=0; c<formItem.length; c++) {
+                                                                               
var check = formItem[c];
+                                                                               
if (check.checked) {
+                                                                               
        cbArray[cbArray.length] = check.value;
+                                                                               
}
+                                                                       }
+                                                                       
data[formItem[0].name] = cbArray;
+                                                                       break;
+                                                       }
+                                       }
+                               }
+                       }
+               }       
+       }
+       return data;
+}
+
+/**
+* Returns a string representation of the object.
+* @type string
+*/ 
+YAHOO.widget.Dialog.prototype.toString = function() {
+       return "Dialog " + this.id;
+}/**
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+* @class
+* SimpleDialog is a simple implementation of Dialog that can be used to submit 
a single value. Forms can be processed in 3 ways -- via an asynchronous 
Connection utility call, a simple form POST or GET, or manually.
+* @param {string}      el      The element ID representing the SimpleDialog 
<em>OR</em>
+* @param {Element}     el      The element representing the SimpleDialog
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this SimpleDialog. See 
configuration documentation for more details.
+* @constructor
+*/
+YAHOO.widget.SimpleDialog = function(el, userConfig) {
+       YAHOO.widget.SimpleDialog.superclass.constructor.call(this, el, 
userConfig);
+}
+
+YAHOO.extend(YAHOO.widget.SimpleDialog, YAHOO.widget.Dialog);
+
+/**
+* Constant for the standard network icon for a blocking action
+* @type string
+* @final
+*/
+YAHOO.widget.SimpleDialog.ICON_BLOCK = "nt/ic/ut/bsc/blck16_1.gif";
+
+/**
+* Constant for the standard network icon for alarm
+* @type string
+* @final
+*/
+YAHOO.widget.SimpleDialog.ICON_ALARM = "nt/ic/ut/bsc/alrt16_1.gif";
+
+/**
+* Constant for the standard network icon for help
+* @type string
+* @final
+*/
+YAHOO.widget.SimpleDialog.ICON_HELP  = "nt/ic/ut/bsc/hlp16_1.gif";
+
+/**
+* Constant for the standard network icon for info
+* @type string
+* @final
+*/
+YAHOO.widget.SimpleDialog.ICON_INFO  = "nt/ic/ut/bsc/info16_1.gif";
+
+/**
+* Constant for the standard network icon for warn
+* @type string
+* @final
+*/
+YAHOO.widget.SimpleDialog.ICON_WARN  = "nt/ic/ut/bsc/warn16_1.gif";
+
+/**
+* Constant for the standard network icon for a tip
+* @type string
+* @final
+*/
+YAHOO.widget.SimpleDialog.ICON_TIP   = "nt/ic/ut/bsc/tip16_1.gif";
+
+/**
+* Constant representing the default CSS class used for a SimpleDialog
+* @type string
+* @final
+*/
+YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG = "simple-dialog";
+
+/**
+* Initializes the class's configurable properties which can be changed using 
the SimpleDialog's Config object (cfg).
+*/
+YAHOO.widget.SimpleDialog.prototype.initDefaultConfig = function() {
+       YAHOO.widget.SimpleDialog.superclass.initDefaultConfig.call(this);
+
+       // Add dialog config properties //
+       this.cfg.addProperty("icon",    { value:"none", 
handler:this.configIcon, suppressEvent:true } );
+       this.cfg.addProperty("text",    { value:"", handler:this.configText, 
suppressEvent:true, supercedes:["icon"] } );
+}
+
+
+/**
+* The SimpleDialog initialization method, which is executed for SimpleDialog 
and all of its subclasses. This method is automatically called by the 
constructor, and  sets up all DOM references for pre-existing markup, and 
creates required markup if it is not already present.
+* @param {string}      el      The element ID representing the SimpleDialog 
<em>OR</em>
+* @param {Element}     el      The element representing the SimpleDialog
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this SimpleDialog. See 
configuration documentation for more details.
+*/
+YAHOO.widget.SimpleDialog.prototype.init = function(el, userConfig) {
+       YAHOO.widget.SimpleDialog.superclass.init.call(this, el/*, 
userConfig*/);  // Note that we don't pass the user config in here yet because 
we only want it executed once, at the lowest subclass level
+
+       this.beforeInitEvent.fire(YAHOO.widget.SimpleDialog);
+
+       YAHOO.util.Dom.addClass(this.element, 
YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG);
+
+       this.cfg.queueProperty("postmethod", "manual");
+
+       if (userConfig) {
+               this.cfg.applyConfig(userConfig, true);
+       }
+
+       this.beforeRenderEvent.subscribe(function() {
+               if (! this.body) {
+                       this.setBody("");
+               }
+       }, this, true);
+
+       this.initEvent.fire(YAHOO.widget.SimpleDialog);
+
+}
+/**
+* Prepares the SimpleDialog's internal FORM object, creating one if one is not 
currently present, and adding the value hidden field.
+*/
+YAHOO.widget.SimpleDialog.prototype.registerForm = function() {
+       YAHOO.widget.SimpleDialog.superclass.registerForm.call(this);
+       this.form.innerHTML += "<input type=\"hidden\" name=\"" + this.id + "\" 
value=\"\"/>";
+}
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* Fired when the "icon" property is set.
+*/
+YAHOO.widget.SimpleDialog.prototype.configIcon = function(type,args,obj) {
+       var icon = args[0];
+       if (icon && icon != "none") {
+               var iconHTML = "<img src=\"" + this.imageRoot + icon + "\" 
class=\"icon\" />";
+               this.body.innerHTML = iconHTML + this.body.innerHTML;
+       }
+}
+
+/**
+* Fired when the "text" property is set.
+*/
+YAHOO.widget.SimpleDialog.prototype.configText = function(type,args,obj) {
+       var text = args[0];
+       if (text) {
+               this.setBody(text);
+               this.cfg.refireEvent("icon");
+       }
+}
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* Returns a string representation of the object.
+* @type string
+*/ 
+YAHOO.widget.SimpleDialog.prototype.toString = function() {
+       return "SimpleDialog " + this.id;
+}/**
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+* @class
+* ContainerEffect encapsulates animation transitions that are executed when an 
Overlay is shown or hidden.
+* @param {Overlay}     overlay         The Overlay that the animation should 
be associated with
+* @param {object}      attrIn          The object literal representing the 
animation arguments to be used for the animate-in transition. The arguments for 
this literal are: attributes(object, see YAHOO.util.Anim for description), 
duration(float), and method(i.e. YAHOO.util.Easing.easeIn).
+* @param {object}      attrOut         The object literal representing the 
animation arguments to be used for the animate-out transition. The arguments 
for this literal are: attributes(object, see YAHOO.util.Anim for description), 
duration(float), and method(i.e. YAHOO.util.Easing.easeIn).
+* @param {Element}     targetElement   Optional. The target element that 
should be animated during the transition. Defaults to overlay.element.
+* @param {class}       Optional. The animation class to instantiate. Defaults 
to YAHOO.util.Anim. Other options include YAHOO.util.Motion.
+* @constructor
+*/
+YAHOO.widget.ContainerEffect = function(overlay, attrIn, attrOut, 
targetElement, animClass) {
+       if (! animClass) {
+               animClass = YAHOO.util.Anim;
+       }
+
+       /**
+       * The overlay to animate
+       */
+       this.overlay = overlay;
+       /**
+       * The animation attributes to use when transitioning into view
+       */
+       this.attrIn = attrIn;
+       /**
+       * The animation attributes to use when transitioning out of view
+       */
+       this.attrOut = attrOut;
+       /**
+       * The target element to be animated
+       */
+       this.targetElement = targetElement || overlay.element;
+       /**
+       * The animation class to use for animating the overlay
+       */
+       this.animClass = animClass;
+}
+
+/**
+* Initializes the animation classes and events.
+*/
+YAHOO.widget.ContainerEffect.prototype.init = function() {
+       this.beforeAnimateInEvent = new 
YAHOO.util.CustomEvent("beforeAnimateIn");
+       this.beforeAnimateOutEvent = new 
YAHOO.util.CustomEvent("beforeAnimateOut");
+
+       this.animateInCompleteEvent = new 
YAHOO.util.CustomEvent("animateInComplete");
+       this.animateOutCompleteEvent = new 
YAHOO.util.CustomEvent("animateOutComplete");
+
+       this.animIn = new this.animClass(this.targetElement, 
this.attrIn.attributes, this.attrIn.duration, this.attrIn.method);
+       this.animIn.onStart.subscribe(this.handleStartAnimateIn, this);
+       this.animIn.onTween.subscribe(this.handleTweenAnimateIn, this);
+       this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn, this);
+
+       this.animOut = new this.animClass(this.targetElement, 
this.attrOut.attributes, this.attrOut.duration, this.attrOut.method);
+       this.animOut.onStart.subscribe(this.handleStartAnimateOut, this);
+       this.animOut.onTween.subscribe(this.handleTweenAnimateOut, this);
+       this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut, this);
+}
+
+/**
+* Triggers the in-animation.
+*/
+YAHOO.widget.ContainerEffect.prototype.animateIn = function() {
+       this.beforeAnimateInEvent.fire();
+       this.animIn.animate();
+}
+
+/**
+* Triggers the out-animation.
+*/
+YAHOO.widget.ContainerEffect.prototype.animateOut = function() {
+       this.beforeAnimateOutEvent.fire();
+       this.animOut.animate();
+}
+
+/**
+* The default onStart handler for the in-animation.
+*/
+YAHOO.widget.ContainerEffect.prototype.handleStartAnimateIn = function(type, 
args, obj) { }
+/**
+* The default onTween handler for the in-animation.
+*/
+YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateIn = function(type, 
args, obj) { }
+/**
+* The default onComplete handler for the in-animation.
+*/
+YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateIn = 
function(type, args, obj) { }
+
+/**
+* The default onStart handler for the out-animation.
+*/
+YAHOO.widget.ContainerEffect.prototype.handleStartAnimateOut = function(type, 
args, obj) { }
+/**
+* The default onTween handler for the out-animation.
+*/
+YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateOut = function(type, 
args, obj) { }
+/**
+* The default onComplete handler for the out-animation.
+*/
+YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateOut = 
function(type, args, obj) { }
+
+/**
+* Returns a string representation of the object.
+* @type string
+*/ 
+YAHOO.widget.ContainerEffect.prototype.toString = function() {
+       var output = "ContainerEffect";
+       if (this.overlay) {
+               output += " [" + this.overlay.toString() + "]";
+       }
+       return output;
+}
+
+/**
+* A pre-configured ContainerEffect instance that can be used for fading an 
overlay in and out.
+* @param {Overlay}     The Overlay object to animate
+* @param {float}       The duration of the animation
+* @type ContainerEffect
+*/
+YAHOO.widget.ContainerEffect.FADE = function(overlay, dur) {
+       var fade = new YAHOO.widget.ContainerEffect(overlay, { 
attributes:{opacity: {from:0, to:1}}, duration:dur, 
method:YAHOO.util.Easing.easeIn }, { attributes:{opacity: {to:0}}, 
duration:dur, method:YAHOO.util.Easing.easeOut}, overlay.element );
+
+       fade.handleStartAnimateIn = function(type,args,obj) {
+               YAHOO.util.Dom.addClass(obj.overlay.element, "hide-select");
+               
+               if (! obj.overlay.underlay) {
+                       obj.overlay.cfg.refireEvent("underlay");
+               }
+
+               if (obj.overlay.underlay) {
+                       obj.initialUnderlayOpacity = 
YAHOO.util.Dom.getStyle(obj.overlay.underlay, "opacity");
+                       obj.overlay.underlay.style.filter = null;
+               }
+
+               YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", 
"visible"); 
+               YAHOO.util.Dom.setStyle(obj.overlay.element, "opacity", 0);
+       }
+
+       fade.handleCompleteAnimateIn = function(type,args,obj) {
+               YAHOO.util.Dom.removeClass(obj.overlay.element, "hide-select");
+
+               if (obj.overlay.element.style.filter) {
+                       obj.overlay.element.style.filter = null;
+               }                       
+               
+               if (obj.overlay.underlay) {
+                       YAHOO.util.Dom.setStyle(obj.overlay.underlay, 
"opacity", obj.initialUnderlayOpacity);
+               }
+
+               obj.overlay.cfg.refireEvent("iframe");
+               obj.animateInCompleteEvent.fire();
+       }
+
+       fade.handleStartAnimateOut = function(type, args, obj) {
+               YAHOO.util.Dom.addClass(obj.overlay.element, "hide-select");
+
+               if (obj.overlay.underlay) {
+                       obj.overlay.underlay.style.filter = null;
+               }
+       }
+
+       fade.handleCompleteAnimateOut =  function(type, args, obj) { 
+               YAHOO.util.Dom.removeClass(obj.overlay.element, "hide-select");
+               if (obj.overlay.element.style.filter) {
+                       obj.overlay.element.style.filter = null;
+               }                               
+               YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", 
"hidden");
+               YAHOO.util.Dom.setStyle(obj.overlay.element, "opacity", 1); 
+
+               obj.overlay.cfg.refireEvent("iframe");
+
+               obj.animateOutCompleteEvent.fire();
+       };      
+
+       fade.init();
+       return fade;
+};
+
+
+/**
+* A pre-configured ContainerEffect instance that can be used for sliding an 
overlay in and out.
+* @param {Overlay}     The Overlay object to animate
+* @param {float}       The duration of the animation
+* @type ContainerEffect
+*/
+YAHOO.widget.ContainerEffect.SLIDE = function(overlay, dur) {
+       var x = overlay.cfg.getProperty("x") || 
YAHOO.util.Dom.getX(overlay.element);
+       var y = overlay.cfg.getProperty("y") || 
YAHOO.util.Dom.getY(overlay.element);
+
+       var clientWidth = YAHOO.util.Dom.getClientWidth();
+       var offsetWidth = overlay.element.offsetWidth;
+
+       var slide = new YAHOO.widget.ContainerEffect(overlay, { 
+                                                                               
                                        attributes:{ points: { to:[x, y] } }, 
+                                                                               
                                        duration:dur, 
+                                                                               
                                        method:YAHOO.util.Easing.easeIn 
+                                                                               
                                }, 
+                                                                               
                                { 
+                                                                               
                                        attributes:{ points: { 
to:[(clientWidth+25), y] } },
+                                                                               
                                        duration:dur, 
+                                                                               
                                        method:YAHOO.util.Easing.easeOut
+                                                                               
                                },
+                                                                               
                                overlay.element,
+                                                                               
                                YAHOO.util.Motion
+                                                                               
                );
+
+       slide.handleStartAnimateIn = function(type,args,obj) {
+               obj.overlay.element.style.left = (-25-offsetWidth) + "px";
+               obj.overlay.element.style.top  = y + "px";
+       }
+       
+       slide.handleTweenAnimateIn = function(type, args, obj) {
+
+
+               var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
+
+               var currentX = pos[0];
+               var currentY = pos[1];
+
+               if (YAHOO.util.Dom.getStyle(obj.overlay.element, "visibility") 
== "hidden" && currentX < x) {
+                       YAHOO.util.Dom.setStyle(obj.overlay.element, 
"visibility", "visible");
+               }
+
+               obj.overlay.cfg.setProperty("xy", [currentX,currentY], true);
+               obj.overlay.cfg.refireEvent("iframe");
+       }
+       
+       slide.handleCompleteAnimateIn = function(type, args, obj) {
+               obj.overlay.cfg.setProperty("xy", [x,y], true);
+               obj.startX = x;
+               obj.startY = y;
+               obj.overlay.cfg.refireEvent("iframe");
+               obj.animateInCompleteEvent.fire();
+       }
+
+       slide.handleStartAnimateOut = function(type, args, obj) {
+               var clientWidth = YAHOO.util.Dom.getViewportWidth();
+               
+               var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
+
+               var x = pos[0];
+               var y = pos[1];
+
+               var currentTo = obj.animOut.attributes.points.to;
+               obj.animOut.attributes.points.to = [(clientWidth+25), y];
+       }
+
+       slide.handleTweenAnimateOut = function(type, args, obj) {
+               var pos = YAHOO.util.Dom.getXY(obj.overlay.element);
+
+               var x = pos[0];
+               var y = pos[1];
+
+               obj.overlay.cfg.setProperty("xy", [x,y], true);
+               obj.overlay.cfg.refireEvent("iframe");
+       }
+
+       slide.handleCompleteAnimateOut = function(type, args, obj) { 
+               YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", 
"hidden");           
+               var offsetWidth = obj.overlay.element.offsetWidth;
+
+               obj.overlay.cfg.setProperty("xy", [x,y]);
+               obj.animateOutCompleteEvent.fire();
+       };      
+
+       slide.init();
+       return slide;
+}
\ No newline at end of file

Index: container_core.js
===================================================================
RCS file: container_core.js
diff -N container_core.js
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ container_core.js   15 Jul 2006 14:41:51 -0000      1.1
@@ -0,0 +1,2248 @@
+/*
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+Version 0.11.0
+*/
+
+/**
+* Config is a utility used within an object to allow the implementer to 
maintain a list of local configuration properties and listen for changes to 
those properties dynamically using CustomEvent. The initial values are also 
maintained so that the configuration can be reset at any given point to its 
initial state.
+* @param {object}      owner   The owner object to which this Config object 
belongs
+* @constructor
+*/
+YAHOO.util.Config = function(owner) {
+       if (owner) {
+               this.init(owner);
+       }
+}
+
+YAHOO.util.Config.prototype = {
+       
+       /**
+       * Object reference to the owner of this Config object
+       * @type object
+       */
+       owner : null,
+
+       /**
+       * Object reference to the owner of this Config object
+       * args: key, value
+       * @type YAHOO.util.CustomEvent
+       */
+       configChangedEvent : null,
+
+       /**
+       * Boolean flag that specifies whether a queue is currently being 
executed
+       * @type boolean
+       */
+       queueInProgress : false,
+
+       /**
+       * Adds a property to the Config object's private config hash. 
+       * @param {string}       key     The configuration property's name
+       * @param {object}       propertyObject  The object containing all of 
this property's arguments
+       */
+       addProperty : function(key, propertyObject){},
+
+       /**
+       * Returns a key-value configuration map of the values currently set in 
the Config object.
+       * @return {object} The current config, represented in a key-value map
+       */
+       getConfig : function(){},
+
+       /**
+       * Returns the value of specified property.
+       * @param {key}          The name of the property
+       * @return {object}      The value of the specified property
+       */
+       getProperty : function(key){},
+
+       /**
+       * Resets the specified property's value to its initial value.
+       * @param {key}          The name of the property
+       */
+       resetProperty : function(key){},
+
+       /**
+       * Sets the value of a property. If the silent property is passed as 
true, the property's event will not be fired.
+       * @param {key}          The name of the property
+       * @param {value}        The value to set the property to
+       * @param {boolean}      Whether the value should be set silently, 
without firing the property event.
+       * @return {boolean}     true, if the set was successful, false if it 
failed.
+       */
+       setProperty : function(key,value,silent){},
+
+       /**
+       * Sets the value of a property and queues its event to execute. If the 
event is already scheduled to execute, it is
+       * moved from its current position to the end of the queue.
+       * @param {key}          The name of the property
+       * @param {value}        The value to set the property to
+       * @return {boolean}     true, if the set was successful, false if it 
failed.
+       */      
+       queueProperty : function(key,value){},
+
+       /**
+       * Fires the event for a property using the property's current value.
+       * @param {key}          The name of the property
+       */
+       refireEvent : function(key){},
+
+       /**
+       * Applies a key-value object literal to the configuration, replacing 
any existing values, and queueing the property events.
+       * Although the values will be set, fireQueue() must be called for their 
associated events to execute.
+       * @param {object}       userConfig      The configuration object literal
+       * @param {boolean}      init            When set to true, the 
initialConfig will be set to the userConfig passed in, so that calling a reset 
will reset the properties to the passed values.
+       */
+       applyConfig : function(userConfig,init){},
+
+       /**
+       * Refires the events for all configuration properties using their 
current values.
+       */
+       refresh : function(){},
+
+       /**
+       * Fires the normalized list of queued property change events
+       */
+       fireQueue : function(){},
+
+       /**
+       * Subscribes an external handler to the change event for any given 
property. 
+       * @param {string}       key                     The property name
+       * @param {Function}     handler         The handler function to use 
subscribe to the property's event
+       * @param {object}       obj                     The object to use for 
scoping the event handler (see CustomEvent documentation)
+       * @param {boolean}      override        Optional. If true, will 
override "this" within the handler to map to the scope object passed into the 
method.
+       */      
+       subscribeToConfigEvent : function(key,handler,obj,override){},
+
+       /**
+       * Unsubscribes an external handler from the change event for any given 
property. 
+       * @param {string}       key                     The property name
+       * @param {Function}     handler         The handler function to use 
subscribe to the property's event
+       * @param {object}       obj                     The object to use for 
scoping the event handler (see CustomEvent documentation)
+       */
+       unsubscribeFromConfigEvent: function(key,handler,obj){},
+
+       /**
+       * Validates that the value passed in is a boolean.
+       * @param        {object}        val     The value to validate
+       * @return       {boolean}       true, if the value is valid
+       */      
+       checkBoolean: function(val) {
+               if (typeof val == 'boolean') {
+                       return true;
+               } else {
+                       return false;
+               }
+       },
+
+       /**
+       * Validates that the value passed in is a number.
+       * @param        {object}        val     The value to validate
+       * @return       {boolean}       true, if the value is valid
+       */
+       checkNumber: function(val) {
+               if (isNaN(val)) {
+                       return false;
+               } else {
+                       return true;
+               }
+       }
+}
+
+
+/**
+* Initializes the configuration object and all of its local members.
+* @param {object}      owner   The owner object to which this Config object 
belongs
+*/
+YAHOO.util.Config.prototype.init = function(owner) {
+
+       this.owner = owner;
+       this.configChangedEvent = new YAHOO.util.CustomEvent("configChanged");
+       this.queueInProgress = false;
+
+       /* Private Members */
+
+       var config = {};
+       var initialConfig = {};
+       var eventQueue = [];
+
+       /**
+       * @private
+       * Fires a configuration property event using the specified value. 
+       * @param {string}       key                     The configuration 
property's name
+       * @param {value}        object          The value of the correct type 
for the property
+       */ 
+       var fireEvent = function( key, value ) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+
+               if (typeof property != 'undefined' && property.event) {
+                       property.event.fire(value);
+               }       
+       }
+       /* End Private Members */
+
+       this.addProperty = function( key, propertyObject ) {
+               key = key.toLowerCase();
+
+               config[key] = propertyObject;
+
+               propertyObject.event = new YAHOO.util.CustomEvent(key);
+               propertyObject.key = key;
+
+               if (propertyObject.handler) {
+                       propertyObject.event.subscribe(propertyObject.handler, 
this.owner, true);
+               }
+
+               this.setProperty(key, propertyObject.value, true);
+               
+               if (! propertyObject.suppressEvent) {
+                       this.queueProperty(key, propertyObject.value);
+               }
+       }
+
+       this.getConfig = function() {
+               var cfg = {};
+                       
+               for (var prop in config) {
+                       var property = config[prop]
+                       if (typeof property != 'undefined' && property.event) {
+                               cfg[prop] = property.value;
+                       }
+               }
+               
+               return cfg;
+       }
+
+       this.getProperty = function(key) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+               if (typeof property != 'undefined' && property.event) {
+                       return property.value;
+               } else {
+                       return undefined;
+               }
+       }
+
+       this.resetProperty = function(key) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+               if (typeof property != 'undefined' && property.event) {
+                       this.setProperty(key, initialConfig[key].value);
+               } else {
+                       return undefined;
+               }
+       }
+
+       this.setProperty = function(key, value, silent) {
+               key = key.toLowerCase();
+
+               if (this.queueInProgress && ! silent) {
+                       this.queueProperty(key,value); // Currently running 
through a queue... 
+                       return true;
+               } else {
+                       var property = config[key];
+                       if (typeof property != 'undefined' && property.event) {
+                               if (property.validator && ! 
property.validator(value)) { // validator
+                                       return false;
+                               } else {
+                                       property.value = value;
+                                       if (! silent) {
+                                               fireEvent(key, value);
+                                               
this.configChangedEvent.fire([key, value]);
+                                       }
+                                       return true;
+                               }
+                       } else {
+                               return false;
+                       }
+               }
+       }
+
+       this.queueProperty = function(key, value) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+                                                       
+               if (typeof property != 'undefined' && property.event) {
+                       if (typeof value != 'undefined' && property.validator 
&& ! property.validator(value)) { // validator
+                               return false;
+                       } else {
+
+                               if (typeof value != 'undefined') {
+                                       property.value = value;
+                               } else {
+                                       value = property.value;
+                               }
+
+                               var foundDuplicate = false;
+
+                               for (var i=0;i<eventQueue.length;i++) {
+                                       var queueItem = eventQueue[i];
+
+                                       if (queueItem) {
+                                               var queueItemKey = queueItem[0];
+                                               var queueItemValue = 
queueItem[1];
+                                               
+                                               if (queueItemKey.toLowerCase() 
== key) {
+                                                       // found a dupe... push 
to end of queue, null current item, and break
+                                                       eventQueue[i] = null;
+                                                       eventQueue.push([key, 
(typeof value != 'undefined' ? value : queueItemValue)]);
+                                                       foundDuplicate = true;
+                                                       break;
+                                               }
+                                       }
+                               }
+                               
+                               if (! foundDuplicate && typeof value != 
'undefined') { // this is a refire, or a new property in the queue
+                                       eventQueue.push([key, value]);
+                               }
+                       }
+
+                       if (property.supercedes) {
+                               for (var s=0;s<property.supercedes.length;s++) {
+                                       var supercedesCheck = 
property.supercedes[s];
+
+                                       for (var q=0;q<eventQueue.length;q++) {
+                                               var queueItemCheck = 
eventQueue[q];
+
+                                               if (queueItemCheck) {
+                                                       var queueItemCheckKey = 
queueItemCheck[0];
+                                                       var queueItemCheckValue 
= queueItemCheck[1];
+                                                       
+                                                       if ( 
queueItemCheckKey.toLowerCase() == supercedesCheck.toLowerCase() ) {
+                                                               
eventQueue.push([queueItemCheckKey, queueItemCheckValue]);
+                                                               eventQueue[q] = 
null;
+                                                               break;
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+
+                       return true;
+               } else {
+                       return false;
+               }
+       }
+
+       this.refireEvent = function(key) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+               if (typeof property != 'undefined' && property.event && typeof 
property.value != 'undefined') {
+                       if (this.queueInProgress) {
+                               this.queueProperty(key);
+                       } else {
+                               fireEvent(key, property.value);
+                       }
+               }
+       }
+
+       this.applyConfig = function(userConfig, init) {
+               if (init) {
+                       initialConfig = userConfig;
+               }
+               for (var prop in userConfig) {
+                       this.queueProperty(prop, userConfig[prop]);
+               }
+       }
+
+       this.refresh = function() {
+               for (var prop in config) {
+                       this.refireEvent(prop);
+               }
+       }
+
+       this.fireQueue = function() {
+               this.queueInProgress = true;
+               for (var i=0;i<eventQueue.length;i++) {
+                       var queueItem = eventQueue[i];
+                       if (queueItem) {
+                               var key = queueItem[0];
+                               var value = queueItem[1];
+                               
+                               var property = config[key];
+                               property.value = value;
+
+                               fireEvent(key,value);
+                       }
+               }
+               
+               this.queueInProgress = false;
+               eventQueue = new Array();
+       }
+
+       this.subscribeToConfigEvent = function(key, handler, obj, override) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+               if (typeof property != 'undefined' && property.event) {
+                       if (! 
YAHOO.util.Config.alreadySubscribed(property.event, handler, obj)) {
+                               property.event.subscribe(handler, obj, 
override);
+                       }
+                       return true;
+               } else {
+                       return false;
+               }
+       }
+
+
+       this.unsubscribeFromConfigEvent = function(key, handler, obj) {
+               key = key.toLowerCase();
+
+               var property = config[key];
+               if (typeof property != 'undefined' && property.event) {
+                       return property.event.unsubscribe(handler, obj);
+               } else {
+                       return false;
+               }
+       }
+
+       this.toString = function() {
+               var output = "Config";
+               if (this.owner) {
+                       output += " [" + this.owner.toString() + "]";
+               }
+               return output;
+       }
+
+       this.outputEventQueue = function() {
+               var output = "";
+               for (var q=0;q<eventQueue.length;q++) {
+                       var queueItem = eventQueue[q];
+                       if (queueItem) {
+                               output += queueItem[0] + "=" + queueItem[1] + 
", ";
+                       }
+               }
+               return output;
+       }
+}
+
+/**
+* Checks to determine if a particular function/object pair are already 
subscribed to the specified CustomEvent
+* @param {YAHOO.util.CustomEvent} evt  The CustomEvent for which to check the 
subscriptions
+* @param {Function}    fn      The function to look for in the subscribers list
+* @param {object}      obj     The execution scope object for the subscription
+* @return {boolean}    true, if the function/object pair is already subscribed 
to the CustomEvent passed in
+*/
+YAHOO.util.Config.alreadySubscribed = function(evt, fn, obj) {
+       for (var e=0;e<evt.subscribers.length;e++) {
+               var subsc = evt.subscribers[e];
+               if (subsc && subsc.obj == obj && subsc.fn == fn) {
+                       return true;
+                       break;
+               }
+       }
+       return false;
+}/**
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+* @class 
+* Module is a JavaScript representation of the Standard Module Format. 
Standard Module Format is a simple standard for markup containers where child 
nodes representing the header, body, and footer of the content are denoted 
using the CSS classes "hd", "bd", and "ft" respectively. Module is the base 
class for all other classes in the YUI Container package.
+* @param {string}      el      The element ID representing the Module 
<em>OR</em>
+* @param {Element}     el      The element representing the Module
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this module. See 
configuration documentation for more details.
+* @constructor
+*/
+YAHOO.widget.Module = function(el, userConfig) {
+       if (el) { 
+               this.init(el, userConfig); 
+       }
+}
+
+/**
+* Constant representing the prefix path to use for non-secure images
+* @type string
+*/
+YAHOO.widget.Module.IMG_ROOT = "http://us.i1.yimg.com/us.yimg.com/i/";;
+
+/**
+* Constant representing the prefix path to use for securely served images
+* @type string
+*/
+YAHOO.widget.Module.IMG_ROOT_SSL = "https://a248.e.akamai.net/sec.yimg.com/i/";;
+
+/**
+* Constant for the default CSS class name that represents a Module
+* @type string
+* @final
+*/
+YAHOO.widget.Module.CSS_MODULE = "module";
+
+/**
+* Constant representing the module header
+* @type string
+* @final
+*/
+YAHOO.widget.Module.CSS_HEADER = "hd";
+
+/**
+* Constant representing the module body
+* @type string
+* @final
+*/
+YAHOO.widget.Module.CSS_BODY = "bd";
+
+/**
+* Constant representing the module footer
+* @type string
+* @final
+*/
+YAHOO.widget.Module.CSS_FOOTER = "ft";
+
+/**
+* Constant representing the url for the "src" attribute of the iframe used to 
monitor changes to the browser's base font size
+* @type string
+* @final
+*/
+YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL = null;
+
+YAHOO.widget.Module.prototype = {
+
+       /**
+       * The class's constructor function
+       * @type function
+       */
+       constructor : YAHOO.widget.Module,
+
+       /**
+       * The main module element that contains the header, body, and footer
+       * @type Element
+       */
+       element : null, 
+
+       /**
+       * The header element, denoted with CSS class "hd"
+       * @type Element
+       */
+       header : null,
+
+       /**
+       * The body element, denoted with CSS class "bd"
+       * @type Element
+       */
+       body : null,
+
+       /**
+       * The footer element, denoted with CSS class "ft"
+       * @type Element
+       */
+       footer : null,
+
+       /**
+       * The id of the element
+       * @type string
+       */
+       id : null,
+
+       /**
+       * Array of elements
+       * @type Element[]
+       */
+       childNodesInDOM : null,
+
+       /**
+       * The string representing the image root
+       * @type string
+       */
+       imageRoot : YAHOO.widget.Module.IMG_ROOT,
+
+       /**
+       * CustomEvent fired prior to class initalization.
+       * args: class reference of the initializing class, such as 
this.beforeInitEvent.fire(YAHOO.widget.Module)
+       * @type YAHOO.util.CustomEvent
+       */
+       beforeInitEvent : null,
+
+       /**
+       * CustomEvent fired after class initalization.
+       * args: class reference of the initializing class, such as 
this.initEvent.fire(YAHOO.widget.Module)
+       * @type YAHOO.util.CustomEvent
+       */
+       initEvent : null,
+
+       /**
+       * CustomEvent fired when the Module is appended to the DOM
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       appendEvent : null,
+
+       /**
+       * CustomEvent fired before the Module is rendered
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       beforeRenderEvent : null,
+
+       /**
+       * CustomEvent fired after the Module is rendered
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       renderEvent : null,
+
+       /**
+       * CustomEvent fired when the header content of the Module is modified
+       * args: string/element representing the new header content
+       * @type YAHOO.util.CustomEvent
+       */
+       changeHeaderEvent : null,
+
+       /**
+       * CustomEvent fired when the body content of the Module is modified
+       * args: string/element representing the new body content
+       * @type YAHOO.util.CustomEvent
+       */
+       changeBodyEvent : null,
+
+       /**
+       * CustomEvent fired when the footer content of the Module is modified
+       * args: string/element representing the new footer content
+       * @type YAHOO.util.CustomEvent
+       */
+       changeFooterEvent : null,
+
+       /**
+       * CustomEvent fired when the content of the Module is modified
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       changeContentEvent : null,
+
+       /**
+       * CustomEvent fired when the Module is destroyed
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       destroyEvent : null,
+
+       /**
+       * CustomEvent fired before the Module is shown
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       beforeShowEvent : null,
+
+       /**
+       * CustomEvent fired after the Module is shown
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       showEvent : null,
+
+       /**
+       * CustomEvent fired before the Module is hidden
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       beforeHideEvent : null,
+       
+       /**
+       * CustomEvent fired after the Module is hidden
+       * args: none
+       * @type YAHOO.util.CustomEvent
+       */
+       hideEvent : null,
+               
+       /**
+       * Initializes the custom events for Module which are fired 
automatically at appropriate times by the Module class.
+       */
+       initEvents : function() {
+
+               this.beforeInitEvent            = new 
YAHOO.util.CustomEvent("beforeInit");
+               this.initEvent                          = new 
YAHOO.util.CustomEvent("init");
+
+               this.appendEvent                        = new 
YAHOO.util.CustomEvent("append");
+
+               this.beforeRenderEvent          = new 
YAHOO.util.CustomEvent("beforeRender");
+               this.renderEvent                        = new 
YAHOO.util.CustomEvent("render");
+
+               this.changeHeaderEvent          = new 
YAHOO.util.CustomEvent("changeHeader");
+               this.changeBodyEvent            = new 
YAHOO.util.CustomEvent("changeBody");
+               this.changeFooterEvent          = new 
YAHOO.util.CustomEvent("changeFooter");
+
+               this.changeContentEvent         = new 
YAHOO.util.CustomEvent("changeContent");
+
+               this.destroyEvent                       = new 
YAHOO.util.CustomEvent("destroy");
+               this.beforeShowEvent            = new 
YAHOO.util.CustomEvent("beforeShow");
+               this.showEvent                          = new 
YAHOO.util.CustomEvent("show");
+               this.beforeHideEvent            = new 
YAHOO.util.CustomEvent("beforeHide");
+               this.hideEvent                          = new 
YAHOO.util.CustomEvent("hide");
+       }, 
+
+       /**
+       * String representing the current user-agent platform
+       * @type string
+       */
+       platform : function() {
+                                       var ua = 
navigator.userAgent.toLowerCase();
+                                       if (ua.indexOf("windows") != -1 || 
ua.indexOf("win32") != -1) {
+                                               return "windows";
+                                       } else if (ua.indexOf("macintosh") != 
-1) {
+                                               return "mac";
+                                       } else {
+                                               return false;
+                                       }
+                               }(),
+
+       /**
+       * String representing the current user-agent browser
+       * @type string
+       */
+       browser : 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;
+                                 }
+                       }(),
+
+       /**
+       * Boolean representing whether or not the current browsing context is 
secure (https)
+       * @type boolean
+       */
+       isSecure : function() {
+               if (window.location.href.toLowerCase().indexOf("https") == 0) {
+                       return true;
+               } else {
+                       return false;
+               }
+       }(),
+
+       /**
+       * Initializes the custom events for Module which are fired 
automatically at appropriate times by the Module class.
+       */
+       initDefaultConfig : function() {
+               // Add properties //
+
+               this.cfg.addProperty("visible", { value:true, 
handler:this.configVisible, validator:this.cfg.checkBoolean } );
+               this.cfg.addProperty("effect", { suppressEvent:true, 
supercedes:["visible"] } );
+               this.cfg.addProperty("monitorresize", { value:true, 
handler:this.configMonitorResize } );
+       },
+
+       /**
+       * The Module class's initialization method, which is executed for 
Module and all of its subclasses. This method is automatically called by the 
constructor, and  sets up all DOM references for pre-existing markup, and 
creates required markup if it is not already present.
+       * @param {string}       el      The element ID representing the Module 
<em>OR</em>
+       * @param {Element}      el      The element representing the Module
+       * @param {object}       userConfig      The configuration object 
literal containing the configuration that should be set for this module. See 
configuration documentation for more details.
+       */
+       init : function(el, userConfig) {
+
+               this.initEvents();
+
+               this.beforeInitEvent.fire(YAHOO.widget.Module);
+
+               this.cfg = new YAHOO.util.Config(this);
+               
+               if (this.isSecure) {
+                       this.imageRoot = YAHOO.widget.Module.IMG_ROOT_SSL;
+               }
+
+               if (typeof el == "string") {
+                       var elId = el;
+
+                       el = document.getElementById(el);
+                       if (! el) {
+                               el = document.createElement("DIV");
+                               el.id = elId;
+                       }
+               }
+
+               this.element = el;
+               
+               if (el.id) {
+                       this.id = el.id;
+               } 
+
+               var childNodes = this.element.childNodes;
+
+               if (childNodes) {
+                       for (var i=0;i<childNodes.length;i++) {
+                               var child = childNodes[i];
+                               switch (child.className) {
+                                       case YAHOO.widget.Module.CSS_HEADER:
+                                               this.header = child;
+                                               break;
+                                       case YAHOO.widget.Module.CSS_BODY:
+                                               this.body = child;
+                                               break;
+                                       case YAHOO.widget.Module.CSS_FOOTER:
+                                               this.footer = child;
+                                               break;
+                               }
+                       }
+               }
+
+               this.initDefaultConfig();
+
+               YAHOO.util.Dom.addClass(this.element, 
YAHOO.widget.Module.CSS_MODULE);
+
+               if (userConfig) {
+                       this.cfg.applyConfig(userConfig, true);
+               }
+
+               // Subscribe to the fireQueue() method of Config so that any 
queued configuration changes are
+               // excecuted upon render of the Module
+               if (! YAHOO.util.Config.alreadySubscribed(this.renderEvent, 
this.cfg.fireQueue, this.cfg)) {
+                       this.renderEvent.subscribe(this.cfg.fireQueue, 
this.cfg, true);
+               }
+
+               this.initEvent.fire(YAHOO.widget.Module);
+       },
+
+       /**
+       * Initialized an empty DOM element that is placed out of the visible 
area that can be used to detect text resize.
+       */
+       initResizeMonitor : function() {
+
+        if(this.browser != "opera") {
+
+            var resizeMonitor = document.getElementById("_yuiResizeMonitor");
+    
+            if (! resizeMonitor) {
+    
+                resizeMonitor = document.createElement("iframe");
+    
+                var bIE = (this.browser.indexOf("ie") === 0);
+    
+                if(this.isSecure && this.RESIZE_MONITOR_SECURE_URL && bIE) {
+    
+                    resizeMonitor.src = this.RESIZE_MONITOR_SECURE_URL;
+    
+                }
+                
+                resizeMonitor.id = "_yuiResizeMonitor";
+                resizeMonitor.style.visibility = "hidden";
+                
+                document.body.appendChild(resizeMonitor);
+    
+                resizeMonitor.style.width = "10em";
+                resizeMonitor.style.height = "10em";
+                resizeMonitor.style.position = "absolute";
+                
+                var nLeft = -1 * resizeMonitor.offsetWidth,
+                    nTop = -1 * resizeMonitor.offsetHeight;
+    
+                resizeMonitor.style.top = nTop + "px";
+                resizeMonitor.style.left =  nLeft + "px";
+                resizeMonitor.style.borderStyle = "none";
+                resizeMonitor.style.borderWidth = "0";
+                YAHOO.util.Dom.setStyle(resizeMonitor, "opacity", "0");
+                
+                resizeMonitor.style.visibility = "visible";
+    
+                if(!bIE) {
+    
+                    var doc = resizeMonitor.contentWindow.document;
+    
+                    doc.open();
+                    doc.close();
+                
+                }
+    
+            }
+    
+            if(resizeMonitor && resizeMonitor.contentWindow) {
+    
+                this.resizeMonitor = resizeMonitor;
+    
+                YAHOO.util.Event.addListener(this.resizeMonitor.contentWindow, 
"resize", this.onDomResize, this, true);
+    
+            }
+        
+        }
+
+       },
+
+       /**
+       * Event handler fired when the resize monitor element is resized.
+       */
+       onDomResize : function(e, obj) { 
+
+        var nLeft = -1 * this.resizeMonitor.offsetWidth,
+            nTop = -1 * this.resizeMonitor.offsetHeight;
+        
+        this.resizeMonitor.style.top = nTop + "px";
+        this.resizeMonitor.style.left =  nLeft + "px";
+       
+       },
+
+       /**
+       * Sets the Module's header content to the HTML specified, or appends 
the passed element to the header. If no header is present, one will be 
automatically created.
+       * @param {string}       headerContent   The HTML used to set the header 
<em>OR</em>
+       * @param {Element}      headerContent   The Element to append to the 
header
+       */      
+       setHeader : function(headerContent) {
+               if (! this.header) {
+                       this.header = document.createElement("DIV");
+                       this.header.className = YAHOO.widget.Module.CSS_HEADER;
+               }
+               
+               if (typeof headerContent == "string") {
+                       this.header.innerHTML = headerContent;
+               } else {
+                       this.header.innerHTML = "";
+                       this.header.appendChild(headerContent);
+               }
+
+               this.changeHeaderEvent.fire(headerContent);
+               this.changeContentEvent.fire();
+       },
+
+       /**
+       * Appends the passed element to the header. If no header is present, 
one will be automatically created.
+       * @param {Element}      element The element to append to the header
+       */      
+       appendToHeader : function(element) {
+               if (! this.header) {
+                       this.header = document.createElement("DIV");
+                       this.header.className = YAHOO.widget.Module.CSS_HEADER;
+               }
+               
+               this.header.appendChild(element);
+               this.changeHeaderEvent.fire(element);
+               this.changeContentEvent.fire();
+       },
+
+       /**
+       * Sets the Module's body content to the HTML specified, or appends the 
passed element to the body. If no body is present, one will be automatically 
created.
+       * @param {string}       bodyContent     The HTML used to set the body 
<em>OR</em>
+       * @param {Element}      bodyContent     The Element to append to the 
body
+       */              
+       setBody : function(bodyContent) {
+               if (! this.body) {
+                       this.body = document.createElement("DIV");
+                       this.body.className = YAHOO.widget.Module.CSS_BODY;
+               }
+
+               if (typeof bodyContent == "string")
+               {
+                       this.body.innerHTML = bodyContent;
+               } else {
+                       this.body.innerHTML = "";
+                       this.body.appendChild(bodyContent);
+               }
+
+               this.changeBodyEvent.fire(bodyContent);
+               this.changeContentEvent.fire();
+       },
+
+       /**
+       * Appends the passed element to the body. If no body is present, one 
will be automatically created.
+       * @param {Element}      element The element to append to the body
+       */
+       appendToBody : function(element) {
+               if (! this.body) {
+                       this.body = document.createElement("DIV");
+                       this.body.className = YAHOO.widget.Module.CSS_BODY;
+               }
+
+               this.body.appendChild(element);
+               this.changeBodyEvent.fire(element);
+               this.changeContentEvent.fire();
+       },
+
+       /**
+       * Sets the Module's footer content to the HTML specified, or appends 
the passed element to the footer. If no footer is present, one will be 
automatically created.
+       * @param {string}       footerContent   The HTML used to set the footer 
<em>OR</em>
+       * @param {Element}      footerContent   The Element to append to the 
footer
+       */      
+       setFooter : function(footerContent) {
+               if (! this.footer) {
+                       this.footer = document.createElement("DIV");
+                       this.footer.className = YAHOO.widget.Module.CSS_FOOTER;
+               }
+
+               if (typeof footerContent == "string") {
+                       this.footer.innerHTML = footerContent;
+               } else {
+                       this.footer.innerHTML = "";
+                       this.footer.appendChild(footerContent);
+               }
+
+               this.changeFooterEvent.fire(footerContent);
+               this.changeContentEvent.fire();
+       },
+
+       /**
+       * Appends the passed element to the footer. If no footer is present, 
one will be automatically created.
+       * @param {Element}      element The element to append to the footer
+       */
+       appendToFooter : function(element) {
+               if (! this.footer) {
+                       this.footer = document.createElement("DIV");
+                       this.footer.className = YAHOO.widget.Module.CSS_FOOTER;
+               }
+
+               this.footer.appendChild(element);
+               this.changeFooterEvent.fire(element);
+               this.changeContentEvent.fire();
+       },
+
+       /**
+       * Renders the Module by inserting the elements that are not already in 
the main Module into their correct places. Optionally appends the Module to the 
specified node prior to the render's execution. NOTE: For Modules without 
existing markup, the appendToNode argument is REQUIRED. If this argument is 
ommitted and the current element is not present in the document, the function 
will return false, indicating that the render was a failure.
+       * @param {string}       appendToNode    The element id to which the 
Module should be appended to prior to rendering <em>OR</em>
+       * @param {Element}      appendToNode    The element to which the Module 
should be appended to prior to rendering        
+       * @param {Element}      moduleElement   OPTIONAL. The element that 
represents the actual Standard Module container. 
+       * @return {boolean} Success or failure of the render
+       */
+       render : function(appendToNode, moduleElement) {
+               this.beforeRenderEvent.fire();
+
+               if (! moduleElement) {
+                       moduleElement = this.element;
+               }
+
+               var me = this;
+               var appendTo = function(element) {
+                       if (typeof element == "string") {
+                               element = document.getElementById(element);
+                       }
+                       
+                       if (element) {
+                               element.appendChild(me.element);
+                               me.appendEvent.fire();
+                       }
+               }
+
+               if (appendToNode) {
+                       appendTo(appendToNode);
+               } else { // No node was passed in. If the element is not 
pre-marked up, this fails
+                       if (! YAHOO.util.Dom.inDocument(this.element)) {
+                               return false;
+                       }
+               }
+
+               // Need to get everything into the DOM if it isn't already
+               
+               if (this.header && ! YAHOO.util.Dom.inDocument(this.header)) {
+                       // There is a header, but it's not in the DOM yet... 
need to add it
+                       var firstChild = moduleElement.firstChild;
+                       if (firstChild) { // Insert before first child if exists
+                               moduleElement.insertBefore(this.header, 
firstChild);
+                       } else { // Append to empty body because there are no 
children
+                               moduleElement.appendChild(this.header);
+                       }
+               }
+
+               if (this.body && ! YAHOO.util.Dom.inDocument(this.body)) {
+                       // There is a body, but it's not in the DOM yet... need 
to add it
+                       if (this.footer && 
YAHOO.util.Dom.isAncestor(this.moduleElement, this.footer)) { // Insert before 
footer if exists in DOM
+                               moduleElement.insertBefore(this.body, 
this.footer);
+                       } else { // Append to element because there is no footer
+                               moduleElement.appendChild(this.body);
+                       }
+               }
+
+               if (this.footer && ! YAHOO.util.Dom.inDocument(this.footer)) {
+                       // There is a footer, but it's not in the DOM yet... 
need to add it
+                       moduleElement.appendChild(this.footer);
+               }
+
+               this.renderEvent.fire();
+               return true;
+       },
+
+       /**
+       * Removes the Module element from the DOM and sets all child elements 
to null.
+       */
+       destroy : function() {
+               if (this.element) {
+                       var parent = this.element.parentNode;
+               }
+               if (parent) {
+                       parent.removeChild(this.element);
+               }
+
+               this.element = null;
+               this.header = null;
+               this.body = null;
+               this.footer = null;
+
+               this.destroyEvent.fire();
+       },
+
+       /**
+       * Shows the Module element by setting the visible configuration 
property to true. Also fires two events: beforeShowEvent prior to the 
visibility change, and showEvent after.
+       */
+       show : function() {
+               this.cfg.setProperty("visible", true);
+       },
+
+       /**
+       * Hides the Module element by setting the visible configuration 
property to false. Also fires two events: beforeHideEvent prior to the 
visibility change, and hideEvent after.
+       */
+       hide : function() {
+               this.cfg.setProperty("visible", false);
+       },
+
+       // BUILT-IN EVENT HANDLERS FOR MODULE //
+
+       /**
+       * Default event handler for changing the visibility property of a 
Module. By default, this is achieved by switching the "display" style between 
"block" and "none".
+       * This method is responsible for firing showEvent and hideEvent.
+       */
+       configVisible : function(type, args, obj) {
+               var visible = args[0];
+               if (visible) {
+                       this.beforeShowEvent.fire();
+                       YAHOO.util.Dom.setStyle(this.element, "display", 
"block");
+                       this.showEvent.fire();
+               } else {
+                       this.beforeHideEvent.fire();
+                       YAHOO.util.Dom.setStyle(this.element, "display", 
"none");
+                       this.hideEvent.fire();
+               }
+       },
+
+       /**
+       * Default event handler for the "monitorresize" configuration property
+       */
+       configMonitorResize : function(type, args, obj) {
+               var monitor = args[0];
+               if (monitor) {
+                       this.initResizeMonitor();
+               } else {
+                       YAHOO.util.Event.removeListener(this.resizeMonitor, 
"resize", this.onDomResize);
+                       this.resizeMonitor = null;
+               }
+       }
+}
+
+/**
+* Returns a string representation of the object.
+* @type string
+*/ 
+YAHOO.widget.Module.prototype.toString = function() {
+       return "Module " + this.id;
+}/**
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+* @class Overlay is a Module that is absolutely positioned above the page 
flow. It has convenience methods for positioning and sizing, as well as options 
for controlling zIndex and constraining the Overlay's position to the current 
visible viewport. Overlay also contains a dynamicly generated IFRAME which is 
placed beneath it for Internet Explorer 6 and 5.x so that it will be properly 
rendered above SELECT elements.
+* @param {string}      el      The element ID representing the Overlay 
<em>OR</em>
+* @param {Element}     el      The element representing the Overlay
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this Overlay. See 
configuration documentation for more details.
+* @constructor
+*/
+YAHOO.widget.Overlay = function(el, userConfig) {
+       YAHOO.widget.Overlay.superclass.constructor.call(this, el, userConfig);
+}
+
+YAHOO.extend(YAHOO.widget.Overlay, YAHOO.widget.Module);
+
+/**
+* The URL of the blank image that will be placed in the iframe
+* @type string
+* @final
+*/
+YAHOO.widget.Overlay.IFRAME_SRC = "promo/m/irs/blank.gif";
+
+/**
+* Constant representing the top left corner of an element, used for 
configuring the context element alignment
+* @type string
+* @final
+*/
+YAHOO.widget.Overlay.TOP_LEFT = "tl";
+
+/**
+* Constant representing the top right corner of an element, used for 
configuring the context element alignment
+* @type string
+* @final
+*/
+YAHOO.widget.Overlay.TOP_RIGHT = "tr";
+
+/**
+* Constant representing the top bottom left corner of an element, used for 
configuring the context element alignment
+* @type string
+* @final
+*/
+YAHOO.widget.Overlay.BOTTOM_LEFT = "bl";
+
+/**
+* Constant representing the bottom right corner of an element, used for 
configuring the context element alignment
+* @type string
+* @final
+*/
+YAHOO.widget.Overlay.BOTTOM_RIGHT = "br";
+
+/**
+* Constant representing the default CSS class used for an Overlay
+* @type string
+* @final
+*/
+YAHOO.widget.Overlay.CSS_OVERLAY = "overlay";
+
+/**
+* CustomEvent fired before the Overlay is moved.
+* args: x,y that the Overlay will be moved to
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Overlay.prototype.beforeMoveEvent = null;
+
+/**
+* CustomEvent fired after the Overlay is moved.
+* args: x,y that the Overlay was moved to
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Overlay.prototype.moveEvent = null;
+
+/**
+* The Overlay initialization method, which is executed for Overlay and all of 
its subclasses. This method is automatically called by the constructor, and  
sets up all DOM references for pre-existing markup, and creates required markup 
if it is not already present.
+* @param {string}      el      The element ID representing the Overlay 
<em>OR</em>
+* @param {Element}     el      The element representing the Overlay
+* @param {object}      userConfig      The configuration object literal 
containing the configuration that should be set for this Overlay. See 
configuration documentation for more details.
+*/
+YAHOO.widget.Overlay.prototype.init = function(el, userConfig) {
+       YAHOO.widget.Overlay.superclass.init.call(this, el/*, userConfig*/);  
// Note that we don't pass the user config in here yet because we only want it 
executed once, at the lowest subclass level
+       
+       this.beforeInitEvent.fire(YAHOO.widget.Overlay);
+
+       YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Overlay.CSS_OVERLAY);
+
+       if (userConfig) {
+               this.cfg.applyConfig(userConfig, true);
+       }
+
+       if (this.platform == "mac" && this.browser == "gecko") {
+               if (! 
YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this))
 {
+                       
this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);
+               }
+               if (! 
YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this))
 {
+                       
this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);
+               }
+       }
+
+       this.initEvent.fire(YAHOO.widget.Overlay);
+
+}
+
+/**
+* Initializes the custom events for Overlay which are fired automatically at 
appropriate times by the Overlay class.
+*/
+YAHOO.widget.Overlay.prototype.initEvents = function() {
+       YAHOO.widget.Overlay.superclass.initEvents.call(this);
+
+       this.beforeMoveEvent = new YAHOO.util.CustomEvent("beforeMove", this);
+       this.moveEvent = new YAHOO.util.CustomEvent("move", this);
+}
+
+/**
+* Initializes the class's configurable properties which can be changed using 
the Overlay's Config object (cfg).
+*/
+YAHOO.widget.Overlay.prototype.initDefaultConfig = function() {
+       YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);
+
+       // Add overlay config properties //
+       this.cfg.addProperty("x", { handler:this.configX, 
validator:this.cfg.checkNumber, suppressEvent:true, supercedes:["iframe"] } );
+       this.cfg.addProperty("y", { handler:this.configY, 
validator:this.cfg.checkNumber, suppressEvent:true, supercedes:["iframe"] } );
+       this.cfg.addProperty("xy",{ handler:this.configXY, suppressEvent:true, 
supercedes:["iframe"] } );
+
+       this.cfg.addProperty("context", { handler:this.configContext, 
suppressEvent:true, supercedes:["iframe"] } );
+       this.cfg.addProperty("fixedcenter", { value:false, 
handler:this.configFixedCenter, validator:this.cfg.checkBoolean, 
supercedes:["iframe","visible"] } );
+
+       this.cfg.addProperty("width", { handler:this.configWidth, 
suppressEvent:true, supercedes:["iframe"] } );
+       this.cfg.addProperty("height", { handler:this.configHeight, 
suppressEvent:true, supercedes:["iframe"] } );
+
+       this.cfg.addProperty("zIndex", { value:null, handler:this.configzIndex 
} );
+
+       this.cfg.addProperty("constraintoviewport", { value:false, 
handler:this.configConstrainToViewport, validator:this.cfg.checkBoolean, 
supercedes:["iframe","x","y","xy"] } );
+       this.cfg.addProperty("iframe", { value:(this.browser == "ie" ? true : 
false), handler:this.configIframe, validator:this.cfg.checkBoolean, 
supercedes:["zIndex"] } );
+}
+
+/**
+* Moves the Overlay to the specified position. This function is identical to 
calling this.cfg.setProperty("xy", [x,y]);
+* @param {int} x       The Overlay's new x position
+* @param {int} y       The Overlay's new y position
+*/
+YAHOO.widget.Overlay.prototype.moveTo = function(x, y) {
+       this.cfg.setProperty("xy",[x,y]);
+}
+
+/**
+* Adds a special CSS class to the Overlay when Mac/Gecko is in use, to work 
around a Gecko bug where
+* scrollbars cannot be hidden. See 
https://bugzilla.mozilla.org/show_bug.cgi?id=187435
+*/
+YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars = function() {
+       YAHOO.util.Dom.removeClass(this.element, "show-scrollbars");
+       YAHOO.util.Dom.addClass(this.element, "hide-scrollbars");
+}
+
+/**
+* Removes a special CSS class from the Overlay when Mac/Gecko is in use, to 
work around a Gecko bug where
+* scrollbars cannot be hidden. See 
https://bugzilla.mozilla.org/show_bug.cgi?id=187435
+*/
+YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars = function() {
+       YAHOO.util.Dom.removeClass(this.element, "hide-scrollbars");
+       YAHOO.util.Dom.addClass(this.element, "show-scrollbars");
+}
+
+// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* The default event handler fired when the "visible" property is changed. This 
method is responsible for firing showEvent and hideEvent.
+*/
+YAHOO.widget.Overlay.prototype.configVisible = function(type, args, obj) {
+       var visible = args[0];
+       var currentVis = YAHOO.util.Dom.getStyle(this.element, "visibility");
+
+       var effect = this.cfg.getProperty("effect");
+
+       var effectInstances = new Array();
+       if (effect) {
+               if (effect instanceof Array) {
+                       for (var i=0;i<effect.length;i++) {
+                               var eff = effect[i];
+                               effectInstances[effectInstances.length] = 
eff.effect(this, eff.duration);
+                       }
+               } else {
+                       effectInstances[effectInstances.length] = 
effect.effect(this, effect.duration);
+               }
+       }
+
+       var isMacGecko = (this.platform == "mac" && this.browser == "gecko");
+
+       if (visible) { // Show
+               if (isMacGecko) {
+                       this.showMacGeckoScrollbars();
+               }       
+
+               if (effect) { // Animate in
+                       if (visible) { // Animate in if not showing
+                               if (currentVis != "visible") {
+                                       this.beforeShowEvent.fire();
+                                       for (var 
i=0;i<effectInstances.length;i++) {
+                                               var e = effectInstances[i];
+                                               if (i == 0 && ! 
YAHOO.util.Config.alreadySubscribed(e.animateInCompleteEvent,this.showEvent.fire,this.showEvent))
 {
+                                                       
e.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true); // 
Delegate showEvent until end of animateInComplete
+                                               }
+                                               e.animateIn();
+                                       }
+                               }
+                       }
+               } else { // Show
+                       if (currentVis != "visible") {
+                               this.beforeShowEvent.fire();
+                               YAHOO.util.Dom.setStyle(this.element, 
"visibility", "visible");
+                               this.cfg.refireEvent("iframe");
+                               this.showEvent.fire();
+                       }
+               }
+
+       } else { // Hide
+               if (isMacGecko) {
+                       this.hideMacGeckoScrollbars();
+               }       
+
+               if (effect) { // Animate out if showing
+                       if (currentVis != "hidden") {
+                               this.beforeHideEvent.fire();
+                               for (var i=0;i<effectInstances.length;i++) {
+                                       var e = effectInstances[i];
+                                       if (i == 0 && ! 
YAHOO.util.Config.alreadySubscribed(e.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent))
 {                            
+                                               
e.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true); 
// Delegate hideEvent until end of animateOutComplete
+                                       }
+                                       e.animateOut();
+                               }
+                       }
+               } else { // Simple hide
+                       if (currentVis != "hidden") {
+                               this.beforeHideEvent.fire();
+                               YAHOO.util.Dom.setStyle(this.element, 
"visibility", "hidden");
+                               this.cfg.refireEvent("iframe");
+                               this.hideEvent.fire();
+                       }
+               }       
+       }
+}
+
+/**
+* Center event handler used for centering on scroll/resize, but only if the 
Overlay is visible
+*/
+YAHOO.widget.Overlay.prototype.doCenterOnDOMEvent = function() {
+       if (this.cfg.getProperty("visible")) {
+               this.center();
+       }
+}
+
+/**
+* The default event handler fired when the "fixedcenter" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configFixedCenter = function(type, args, obj) {
+       var val = args[0];
+
+       if (val) {
+               this.center();
+                       
+               if (! YAHOO.util.Config.alreadySubscribed(this.beforeShowEvent, 
this.center, this)) {
+                       this.beforeShowEvent.subscribe(this.center, this, true);
+               }
+               
+               if (! 
YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent, 
this.doCenterOnDOMEvent, this)) {
+                       
YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.doCenterOnDOMEvent, this, 
true);
+               }
+
+               if (! 
YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowScrollEvent, 
this.doCenterOnDOMEvent, this)) {
+                       YAHOO.widget.Overlay.windowScrollEvent.subscribe( 
this.doCenterOnDOMEvent, this, true);
+               }
+       } else {
+               
YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent, 
this);
+               
YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent, 
this);
+       }
+}
+
+/**
+* The default event handler fired when the "height" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configHeight = function(type, args, obj) {
+       var height = args[0];
+       var el = this.element;
+       YAHOO.util.Dom.setStyle(el, "height", height);
+       this.cfg.refireEvent("iframe");
+}
+
+/**
+* The default event handler fired when the "width" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configWidth = function(type, args, obj) {
+       var width = args[0];
+       var el = this.element;
+       YAHOO.util.Dom.setStyle(el, "width", width);
+       this.cfg.refireEvent("iframe");
+}
+
+/**
+* The default event handler fired when the "zIndex" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configzIndex = function(type, args, obj) {
+       var zIndex = args[0];
+
+       var el = this.element;
+
+       if (! zIndex) {
+               zIndex = YAHOO.util.Dom.getStyle(el, "zIndex");
+               if (! zIndex || isNaN(zIndex)) {
+                       zIndex = 0;
+               }
+       }
+
+       if (this.iframe) {
+               if (zIndex <= 0) {
+                       zIndex = 1;
+               }
+               YAHOO.util.Dom.setStyle(this.iframe, "zIndex", (zIndex-1));
+       }
+
+       YAHOO.util.Dom.setStyle(el, "zIndex", zIndex);
+       this.cfg.setProperty("zIndex", zIndex, true);
+}
+
+/**
+* The default event handler fired when the "xy" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configXY = function(type, args, obj) {
+       var pos = args[0];
+       var x = pos[0];
+       var y = pos[1];
+
+       this.cfg.setProperty("x", x);
+       this.cfg.setProperty("y", y);
+
+       this.beforeMoveEvent.fire([x,y]);
+
+       x = this.cfg.getProperty("x");
+       y = this.cfg.getProperty("y");
+
+       this.cfg.refireEvent("iframe");
+       this.moveEvent.fire([x,y]);
+}
+
+/**
+* The default event handler fired when the "x" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configX = function(type, args, obj) {
+       var x = args[0];
+       var y = this.cfg.getProperty("y");
+
+       this.cfg.setProperty("x", x, true);
+       this.cfg.setProperty("y", y, true);
+
+       this.beforeMoveEvent.fire([x,y]);
+
+       x = this.cfg.getProperty("x");
+       y = this.cfg.getProperty("y");
+
+       YAHOO.util.Dom.setX(this.element, x, true);
+       
+       this.cfg.setProperty("xy", [x, y], true);
+
+       this.cfg.refireEvent("iframe");
+       this.moveEvent.fire([x, y]);
+}
+
+/**
+* The default event handler fired when the "y" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configY = function(type, args, obj) {
+       var x = this.cfg.getProperty("x");
+       var y = args[0];
+
+       this.cfg.setProperty("x", x, true);
+       this.cfg.setProperty("y", y, true);
+
+       this.beforeMoveEvent.fire([x,y]);
+
+       x = this.cfg.getProperty("x");
+       y = this.cfg.getProperty("y");
+
+       YAHOO.util.Dom.setY(this.element, y, true);
+
+       this.cfg.setProperty("xy", [x, y], true);
+
+       this.cfg.refireEvent("iframe");
+       this.moveEvent.fire([x, y]);
+}
+
+/**
+* The default event handler fired when the "iframe" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configIframe = function(type, args, obj) {
+
+       var val = args[0];
+
+       var el = this.element;
+       
+       var showIframe = function() {
+               if (this.iframe) {
+                       this.iframe.style.display = "block";
+               }
+       }
+
+       var hideIframe = function() {
+               if (this.iframe) {
+                       this.iframe.style.display = "none";
+               }
+       }
+
+       if (val) { // IFRAME shim is enabled
+
+               if (! YAHOO.util.Config.alreadySubscribed(this.showEvent, 
showIframe, this)) {
+                       this.showEvent.subscribe(showIframe, this, true);
+               }
+               if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent, 
hideIframe, this)) {
+                       this.hideEvent.subscribe(hideIframe, this, true);
+               }
+
+               var x = this.cfg.getProperty("x");
+               var y = this.cfg.getProperty("y");
+
+               if (! x || ! y) {
+                       this.syncPosition();
+                       x = this.cfg.getProperty("x");
+                       y = this.cfg.getProperty("y");
+               }
+
+               if (! isNaN(x) && ! isNaN(y)) {
+                       if (! this.iframe) {
+                               this.iframe = document.createElement("iframe");
+                               if (this.isSecure) {
+                                       this.iframe.src = this.imageRoot + 
YAHOO.widget.Overlay.IFRAME_SRC;
+                               }
+                               
+                               var parent = el.parentNode;
+                               if (parent) {
+                                       parent.appendChild(this.iframe);
+                               } else {
+                                       document.body.appendChild(this.iframe);
+                               }
+
+                               YAHOO.util.Dom.setStyle(this.iframe, 
"position", "absolute");
+                               YAHOO.util.Dom.setStyle(this.iframe, "border", 
"none");
+                               YAHOO.util.Dom.setStyle(this.iframe, "margin", 
"0");
+                               YAHOO.util.Dom.setStyle(this.iframe, "padding", 
"0");
+                               YAHOO.util.Dom.setStyle(this.iframe, "opacity", 
"0");
+                               if (this.cfg.getProperty("visible")) {
+                                       showIframe.call(this);
+                               } else {
+                                       hideIframe.call(this);
+                               }
+                       }
+                       
+                       var iframeDisplay = 
YAHOO.util.Dom.getStyle(this.iframe, "display");
+
+                       if (iframeDisplay == "none") {
+                               this.iframe.style.display = "block";
+                       }
+
+                       YAHOO.util.Dom.setXY(this.iframe, [x,y]);
+
+                       var width = el.clientWidth;
+                       var height = el.clientHeight;
+
+                       YAHOO.util.Dom.setStyle(this.iframe, "width", (width+2) 
+ "px");
+                       YAHOO.util.Dom.setStyle(this.iframe, "height", 
(height+2) + "px");
+
+                       if (iframeDisplay == "none") {
+                               this.iframe.style.display = "none";
+                       }
+               }
+       } else {
+               if (this.iframe) {
+                       this.iframe.style.display = "none";
+               }
+               this.showEvent.unsubscribe(showIframe, this);
+               this.hideEvent.unsubscribe(hideIframe, this);
+       }
+}
+
+
+/**
+* The default event handler fired when the "constraintoviewport" property is 
changed.
+*/
+YAHOO.widget.Overlay.prototype.configConstrainToViewport = function(type, 
args, obj) {
+       var val = args[0];
+       if (val) {
+               if (! YAHOO.util.Config.alreadySubscribed(this.beforeMoveEvent, 
this.enforceConstraints, this)) {
+                       this.beforeMoveEvent.subscribe(this.enforceConstraints, 
this, true);
+               }
+       } else {
+               this.beforeMoveEvent.unsubscribe(this.enforceConstraints, this);
+       }
+}
+
+/**
+* The default event handler fired when the "context" property is changed.
+*/
+YAHOO.widget.Overlay.prototype.configContext = function(type, args, obj) {
+       var contextArgs = args[0];
+
+       if (contextArgs) {
+               var contextEl = contextArgs[0];
+               var elementMagnetCorner = contextArgs[1];
+               var contextMagnetCorner = contextArgs[2];
+
+               if (contextEl) {
+                       if (typeof contextEl == "string") {
+                               this.cfg.setProperty("context", 
[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner], 
true);
+                       }
+                       
+                       if (elementMagnetCorner && contextMagnetCorner) {
+                               this.align(elementMagnetCorner, 
contextMagnetCorner);
+                       }
+               }       
+       }
+}
+
+
+// END BUILT-IN PROPERTY EVENT HANDLERS //
+
+/**
+* Aligns the Overlay to its context element using the specified corner points 
(represented by the constants TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, and 
BOTTOM_RIGHT.
+* @param {string} elementAlign         The string representing the corner of 
the Overlay that should be aligned to the context element
+* @param {string} contextAlign         The corner of the context element that 
the elementAlign corner should stick to.
+*/
+YAHOO.widget.Overlay.prototype.align = function(elementAlign, contextAlign) {
+       var contextArgs = this.cfg.getProperty("context");
+       if (contextArgs) {
+               var context = contextArgs[0];
+               
+               var element = this.element;
+               var me = this;
+
+               if (! elementAlign) {
+                       elementAlign = contextArgs[1];
+               }
+
+               if (! contextAlign) {
+                       contextAlign = contextArgs[2];
+               }
+
+               if (element && context) {
+                       var elementRegion = YAHOO.util.Dom.getRegion(element);
+                       var contextRegion = YAHOO.util.Dom.getRegion(context);
+
+                       var doAlign = function(v,h) {
+                               switch (elementAlign) {
+                                       case YAHOO.widget.Overlay.TOP_LEFT:
+                                               me.moveTo(h,v);
+                                               break;
+                                       case YAHOO.widget.Overlay.TOP_RIGHT:
+                                               
me.moveTo(h-element.offsetWidth,v);
+                                               break;
+                                       case YAHOO.widget.Overlay.BOTTOM_LEFT:
+                                               
me.moveTo(h,v-element.offsetHeight);
+                                               break;
+                                       case YAHOO.widget.Overlay.BOTTOM_RIGHT:
+                                               
me.moveTo(h-element.offsetWidth,v-element.offsetHeight);
+                                               break;
+                               }
+                       }
+
+                       switch (contextAlign) {
+                               case YAHOO.widget.Overlay.TOP_LEFT:
+                                       doAlign(contextRegion.top, 
contextRegion.left);
+                                       break;
+                               case YAHOO.widget.Overlay.TOP_RIGHT:
+                                       doAlign(contextRegion.top, 
contextRegion.right);
+                                       break;          
+                               case YAHOO.widget.Overlay.BOTTOM_LEFT:
+                                       doAlign(contextRegion.bottom, 
contextRegion.left);
+                                       break;
+                               case YAHOO.widget.Overlay.BOTTOM_RIGHT:
+                                       doAlign(contextRegion.bottom, 
contextRegion.right);
+                                       break;
+                       }
+               }
+       }
+}
+
+/**
+* The default event handler executed when the moveEvent is fired, if the 
"constraintoviewport" is set to true.
+*/
+YAHOO.widget.Overlay.prototype.enforceConstraints = function(type, args, obj) {
+       var pos = args[0];
+
+       var x = pos[0];
+       var y = pos[1];
+
+       var width = parseInt(this.cfg.getProperty("width"));
+
+       if (isNaN(width)) {
+               width = 0;
+       }
+
+       var offsetHeight = this.element.offsetHeight;
+       var offsetWidth = (width>0?width:this.element.offsetWidth); 
//this.element.offsetWidth;
+
+       var viewPortWidth = YAHOO.util.Dom.getViewportWidth();
+       var viewPortHeight = YAHOO.util.Dom.getViewportHeight();
+
+       var scrollX = window.scrollX || document.documentElement.scrollLeft;
+       var scrollY = window.scrollY || document.documentElement.scrollTop;
+
+       var topConstraint = scrollY + 10;
+       var leftConstraint = scrollX + 10;
+       var bottomConstraint = scrollY + viewPortHeight - offsetHeight - 10;
+       var rightConstraint = scrollX + viewPortWidth - offsetWidth - 10;
+       
+       if (x < leftConstraint) {
+               x = leftConstraint;
+       } else if (x > rightConstraint) {
+               x = rightConstraint;
+       }
+
+       if (y < topConstraint) {
+               y = topConstraint;
+       } else if (y > bottomConstraint) {
+               y = bottomConstraint;
+       }
+
+       this.cfg.setProperty("x", x, true);
+       this.cfg.setProperty("y", y, true);
+       this.cfg.setProperty("xy", [x,y], true);
+}
+
+/**
+* Centers the container in the viewport.
+*/
+YAHOO.widget.Overlay.prototype.center = function() {
+       var scrollX = document.documentElement.scrollLeft || 
document.body.scrollLeft;
+       var scrollY = document.documentElement.scrollTop || 
document.body.scrollTop;
+
+       var viewPortWidth = YAHOO.util.Dom.getClientWidth();
+       var viewPortHeight = YAHOO.util.Dom.getClientHeight();
+
+       var elementWidth = this.element.offsetWidth;
+       var elementHeight = this.element.offsetHeight;
+
+       var x = (viewPortWidth / 2) - (elementWidth / 2) + scrollX;
+       var y = (viewPortHeight / 2) - (elementHeight / 2) + scrollY;
+       
+       this.element.style.left = parseInt(x) + "px";
+       this.element.style.top = parseInt(y) + "px";
+       this.syncPosition();
+
+       this.cfg.refireEvent("iframe");
+}
+
+/**
+* Synchronizes the Panel's "xy", "x", and "y" properties with the Panel's 
position in the DOM. This is primarily used to update position information 
during drag & drop.
+*/
+YAHOO.widget.Overlay.prototype.syncPosition = function() {
+       var pos = YAHOO.util.Dom.getXY(this.element);
+       this.cfg.setProperty("x", pos[0], true);
+       this.cfg.setProperty("y", pos[1], true);
+       this.cfg.setProperty("xy", pos, true);
+}
+
+/**
+* Event handler fired when the resize monitor element is resized.
+*/
+YAHOO.widget.Overlay.prototype.onDomResize = function(e, obj) {
+       YAHOO.widget.Overlay.superclass.onDomResize.call(this, e, obj);
+       this.cfg.refireEvent("iframe");
+}
+
+/**
+* Removes the Overlay element from the DOM and sets all child elements to null.
+*/
+YAHOO.widget.Overlay.prototype.destroy = function() {
+       if (this.iframe) {
+               this.iframe.parentNode.removeChild(this.iframe);
+       }
+       
+       this.iframe = null;
+
+       YAHOO.widget.Overlay.superclass.destroy.call(this);  
+};
+
+/**
+* Returns a string representation of the object.
+* @type string
+*/ 
+YAHOO.widget.Overlay.prototype.toString = function() {
+       return "Overlay " + this.id;
+}
+
+/**
+* A singleton CustomEvent used for reacting to the DOM event for window scroll
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Overlay.windowScrollEvent = new 
YAHOO.util.CustomEvent("windowScroll");
+
+/**
+* A singleton CustomEvent used for reacting to the DOM event for window resize
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.widget.Overlay.windowResizeEvent = new 
YAHOO.util.CustomEvent("windowResize");
+
+/**
+* The DOM event handler used to fire the CustomEvent for window scroll
+* @type Function
+*/
+YAHOO.widget.Overlay.windowScrollHandler = function(e) {
+       YAHOO.widget.Overlay.windowScrollEvent.fire();
+}
+
+/**
+* The DOM event handler used to fire the CustomEvent for window resize
+* @type Function
+*/
+YAHOO.widget.Overlay.windowResizeHandler = function(e) {
+       YAHOO.widget.Overlay.windowResizeEvent.fire();
+}
+
+/**
+* @private
+*/
+YAHOO.widget.Overlay._initialized == null;
+
+if (YAHOO.widget.Overlay._initialized == null) {
+       YAHOO.util.Event.addListener(window, "scroll", 
YAHOO.widget.Overlay.windowScrollHandler);
+       YAHOO.util.Event.addListener(window, "resize", 
YAHOO.widget.Overlay.windowResizeHandler);
+
+       YAHOO.widget.Overlay._initialized = true;
+}
+/**
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+* @class
+* OverlayManager is used for maintaining the focus status of multiple Overlays.
+* @param {Array}       overlays        Optional. A collection of Overlays to 
register with the manager.
+* @param {object}      userConfig              The object literal representing 
the user configuration of the OverlayManager
+* @constructor
+*/
+YAHOO.widget.OverlayManager = function(userConfig) {
+       this.init(userConfig);
+}
+
+/**
+* The CSS class representing a focused Overlay
+* @type string
+*/
+YAHOO.widget.OverlayManager.CSS_FOCUSED = "focused";
+
+YAHOO.widget.OverlayManager.prototype = {
+
+       constructor : YAHOO.widget.OverlayManager,
+
+       /**
+       * The array of Overlays that are currently registered
+       * @type Array
+       */
+       overlays : null,
+
+       /**
+       * Initializes the default configuration of the OverlayManager
+       */      
+       initDefaultConfig : function() {
+               this.cfg.addProperty("overlays", { suppressEvent:true } );
+               this.cfg.addProperty("focusevent", { value:"mousedown" } );
+       }, 
+
+       /**
+       * Returns the currently focused Overlay
+       * @return {Overlay}     The currently focused Overlay
+       */
+       getActive : function() {},
+
+       /**
+       * Focuses the specified Overlay
+       * @param {Overlay}      The Overlay to focus
+       * @param {string}       The id of the Overlay to focus
+       */
+       focus : function(overlay) {},
+
+       /**
+       * Removes the specified Overlay from the manager
+       * @param {Overlay}      The Overlay to remove
+       * @param {string}       The id of the Overlay to remove
+       */
+       remove: function(overlay) {},
+
+       /**
+       * Removes focus from all registered Overlays in the manager
+       */
+       blurAll : function() {},
+
+       /**
+       * Initializes the OverlayManager
+       * @param {Array}        overlays        Optional. A collection of 
Overlays to register with the manager.
+       * @param {object}       userConfig              The object literal 
representing the user configuration of the OverlayManager
+       */
+       init : function(userConfig) {
+               this.cfg = new YAHOO.util.Config(this);
+
+               this.initDefaultConfig();
+
+               if (userConfig) {
+                       this.cfg.applyConfig(userConfig, true);
+               }
+               this.cfg.fireQueue();
+
+               var activeOverlay = null;
+
+               this.getActive = function() {
+                       return activeOverlay;
+               }
+
+               this.focus = function(overlay) {
+                       var o = this.find(overlay);
+                       if (o) {
+                               this.blurAll();
+                               activeOverlay = o;
+                               YAHOO.util.Dom.addClass(activeOverlay.element, 
YAHOO.widget.OverlayManager.CSS_FOCUSED);
+                               this.overlays.sort(this.compareZIndexDesc);
+                               var topZIndex = 
YAHOO.util.Dom.getStyle(this.overlays[0].element, "zIndex");
+                               if (! isNaN(topZIndex) && this.overlays[0] != 
overlay) {
+                                       activeOverlay.cfg.setProperty("zIndex", 
(parseInt(topZIndex) + 1));
+                               }
+                               this.overlays.sort(this.compareZIndexDesc);
+                       }
+               }
+
+               this.remove = function(overlay) {
+                       var o = this.find(overlay);
+                       if (o) {
+                               var originalZ = 
YAHOO.util.Dom.getStyle(o.element, "zIndex");
+                               o.cfg.setProperty("zIndex", -1000, true);
+                               this.overlays.sort(this.compareZIndexDesc);
+                               this.overlays = this.overlays.slice(0, 
this.overlays.length-1);
+                               o.cfg.setProperty("zIndex", originalZ, true);
+
+                               o.cfg.setProperty("manager", null);
+                               o.focusEvent = null
+                               o.blurEvent = null;
+                               o.focus = null;
+                               o.blur = null;
+                       }
+               }
+
+               this.blurAll = function() {
+                       activeOverlay = null;
+                       for (var o=0;o<this.overlays.length;o++) {
+                               
YAHOO.util.Dom.removeClass(this.overlays[o].element, 
YAHOO.widget.OverlayManager.CSS_FOCUSED);
+                       }               
+               }
+
+               var overlays = this.cfg.getProperty("overlays");
+               
+               if (! this.overlays) {
+                       this.overlays = new Array();
+               }
+
+               if (overlays) {
+                       this.register(overlays);
+                       this.overlays.sort(this.compareZIndexDesc);
+               }
+       },
+
+       /**
+       * Registers an Overlay or an array of Overlays with the manager. Upon 
registration, the Overlay receives functions for focus and blur, along with 
CustomEvents for each.
+       * @param {Overlay}      overlay         An Overlay to register with the 
manager.
+       * @param {Overlay[]}    overlay         An array of Overlays to 
register with the manager.
+       * @return       {boolean}       True if any Overlays are registered.
+       */
+       register : function(overlay) {
+               if (overlay instanceof YAHOO.widget.Overlay) {
+                       overlay.cfg.addProperty("manager", { value:this } );
+
+                       overlay.focusEvent = new 
YAHOO.util.CustomEvent("focus");
+                       overlay.blurEvent = new YAHOO.util.CustomEvent("blur");
+                       
+                       var mgr=this;
+
+                       overlay.focus = function() {
+                               mgr.focus(this);
+                               this.focusEvent.fire();
+                       } 
+
+                       overlay.blur = function() {
+                               mgr.blurAll();
+                               this.blurEvent.fire();
+                       }
+
+                       var focusOnDomEvent = function(e,obj) {
+                               overlay.focus();
+                       }
+                       
+                       var focusevent = this.cfg.getProperty("focusevent");
+                       
YAHOO.util.Event.addListener(overlay.element,focusevent,focusOnDomEvent,this,true);
+
+                       var zIndex = YAHOO.util.Dom.getStyle(overlay.element, 
"zIndex");
+                       if (! isNaN(zIndex)) {
+                               overlay.cfg.setProperty("zIndex", 
parseInt(zIndex));
+                       } else {
+                               overlay.cfg.setProperty("zIndex", 0);
+                       }
+                       
+                       this.overlays.push(overlay);
+                       return true;
+               } else if (overlay instanceof Array) {
+                       var regcount = 0;
+                       for (var i=0;i<overlay.length;i++) {
+                               if (this.register(overlay[i])) {
+                                       regcount++;
+                               }
+                       }
+                       if (regcount > 0) {
+                               return true;
+                       }
+               } else {
+                       return false;
+               }
+       },
+
+       /**
+       * Attempts to locate an Overlay by instance or ID.
+       * @param {Overlay}      overlay         An Overlay to locate within the 
manager
+       * @param {string}       overlay         An Overlay id to locate within 
the manager
+       * @return       {Overlay}       The requested Overlay, if found, or 
null if it cannot be located.
+       */
+       find : function(overlay) {
+               if (overlay instanceof YAHOO.widget.Overlay) {
+                       for (var o=0;o<this.overlays.length;o++) {
+                               if (this.overlays[o] == overlay) {
+                                       return this.overlays[o];
+                               }
+                       }
+               } else if (typeof overlay == "string") {
+                       for (var o=0;o<this.overlays.length;o++) {
+                               if (this.overlays[o].id == overlay) {
+                                       return this.overlays[o];
+                               }
+                       }                       
+               }
+               return null;
+       },
+
+       /**
+       * Used for sorting the manager's Overlays by z-index.
+       * @private
+       */
+       compareZIndexDesc : function(o1, o2) {
+               var zIndex1 = o1.cfg.getProperty("zIndex");
+               var zIndex2 = o2.cfg.getProperty("zIndex");
+
+               if (zIndex1 > zIndex2) {
+                       return -1;
+               } else if (zIndex1 < zIndex2) {
+                       return 1;
+               } else {
+                       return 0;
+               }
+       },
+
+       /**
+       * Shows all Overlays in the manager.
+       */
+       showAll : function() {
+               for (var o=0;o<this.overlays.length;o++) {
+                       this.overlays[o].show();
+               }
+       },
+
+       /**
+       * Hides all Overlays in the manager.
+       */
+       hideAll : function() {
+               for (var o=0;o<this.overlays.length;o++) {
+                       this.overlays[o].hide();
+               }
+       },
+
+       /**
+       * Returns a string representation of the object.
+       * @type string
+       */ 
+       toString : function() {
+               return "OverlayManager";
+       }
+
+}/**
+* Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+* Code licensed under the BSD License:
+* http://developer.yahoo.net/yui/license.txt
+* KeyListener is a utility that provides an easy interface for listening for 
keydown/keyup events fired against DOM elements.
+* @param {Element}     attachTo        The element or element ID to which the 
key event should be attached
+* @param {string}      attachTo        The element or element ID to which the 
key event should be attached
+* @param {object}      keyData         The object literal representing the 
key(s) to detect. Possible attributes are shift(boolean), alt(boolean), 
ctrl(boolean) and keys(either an int or an array of ints representing keycodes).
+* @param {function}    handler         The CustomEvent handler to fire when 
the key event is detected
+* @param {object}      handler         An object literal representing the 
handler. 
+* @param {string}      event           Optional. The event (keydown or keyup) 
to listen for. Defaults automatically to keydown.
+* @constructor
+*/
+YAHOO.util.KeyListener = function(attachTo, keyData, handler, event) {
+       if (! event) {
+               event = YAHOO.util.KeyListener.KEYDOWN;
+       }
+
+       var keyEvent = new YAHOO.util.CustomEvent("keyPressed");
+       
+       this.enabledEvent = new YAHOO.util.CustomEvent("enabled");
+       this.disabledEvent = new YAHOO.util.CustomEvent("disabled");
+
+       if (typeof attachTo == 'string') {
+               attachTo = document.getElementById(attachTo);
+       }
+
+       if (typeof handler == 'function') {
+               keyEvent.subscribe(handler);
+       } else {
+               keyEvent.subscribe(handler.fn, handler.scope, 
handler.correctScope);
+       }
+
+       /**
+       * Handles the key event when a key is pressed.
+       * @private
+       */
+       function handleKeyPress(e, obj) {
+               var keyPressed = e.charCode || e.keyCode;
+               
+               if (! keyData.shift)    keyData.shift = false;
+               if (! keyData.alt)              keyData.alt = false;
+               if (! keyData.ctrl)             keyData.ctrl = false;
+
+               // check held down modifying keys first
+               if (e.shiftKey == keyData.shift && 
+                       e.altKey   == keyData.alt &&
+                       e.ctrlKey  == keyData.ctrl) { // if we pass this, all 
modifiers match
+
+                       if (keyData.keys instanceof Array) {
+                               for (var i=0;i<keyData.keys.length;i++) {
+                                       if (keyPressed == keyData.keys[i]) {
+                                               keyEvent.fire(keyPressed, e);
+                                               break;
+                                       }
+                               }
+                       } else {
+                               if (keyPressed == keyData.keys) {
+                                       keyEvent.fire(keyPressed, e);
+                               }
+                       }
+               }
+       }
+
+       this.enable = function() {
+               if (! this.enabled) {
+                       YAHOO.util.Event.addListener(attachTo, event, 
handleKeyPress);
+                       this.enabledEvent.fire(keyData);
+               }
+               this.enabled = true;
+       }
+
+       this.disable = function() {
+               if (this.enabled) {
+                       YAHOO.util.Event.removeListener(attachTo, event, 
handleKeyPress);
+                       this.disabledEvent.fire(keyData);
+               }
+               this.enabled = false;
+       }
+
+       /**
+       * Returns a string representation of the object.
+       * @type string
+       */ 
+       this.toString = function() {
+               return "KeyListener [" + keyData.keys + "] " + attachTo.tagName 
+ (attachTo.id ? "[" + attachTo.id + "]" : "");
+       }
+
+}
+
+/**
+* Constant representing the DOM "keydown" event.
+* @final
+*/
+YAHOO.util.KeyListener.KEYDOWN = "keydown";
+
+/**
+* Constant representing the DOM "keyup" event.
+* @final
+*/
+YAHOO.util.KeyListener.KEYUP = "keyup";
+
+/**
+* Boolean indicating the enabled/disabled state of the Tooltip
+* @type Booleam
+*/
+YAHOO.util.KeyListener.prototype.enabled = null;
+
+/**
+* Enables the KeyListener, by dynamically attaching the key event to the 
appropriate DOM element.
+*/
+YAHOO.util.KeyListener.prototype.enable = function() {};
+
+/**
+* Disables the KeyListener, by dynamically removing the key event from the 
appropriate DOM element.
+*/
+YAHOO.util.KeyListener.prototype.disable = function() {};
+
+/**
+* CustomEvent fired when the KeyListener is enabled
+* args: keyData
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.util.KeyListener.prototype.enabledEvent = null;
+
+/**
+* CustomEvent fired when the KeyListener is disabled
+* args: keyData
+* @type YAHOO.util.CustomEvent
+*/
+YAHOO.util.KeyListener.prototype.disabledEvent = null;
\ No newline at end of file

Index: logger.js
===================================================================
RCS file: logger.js
diff -N logger.js
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ logger.js   15 Jul 2006 14:41:51 -0000      1.1
@@ -0,0 +1,1186 @@
+/*
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 0.11.0
+*/
+
+/****************************************************************************/

+/****************************************************************************/

+/****************************************************************************/

+/**

+ * Singleton providing core logging functionality. Saves logs written through 
the

+ * global YAHOO.log function or written by LogWriter. Provides access to logs

+ * for reading by LogReader. Log messages are automatically output to Firebug,

+ * if present.

+ *

+ * requires YAHOO.util.Event Event utility

+ */

+YAHOO.widget.Logger = {

+    // Initialize members

+    loggerEnabled: true,

+    _firebugEnabled: true,

+    categories: ["info","warn","error","time","window"],

+    sources: ["global"],

+    _stack: [], // holds all log msgs

+    _startTime: new Date().getTime(), // static start timestamp

+    _lastTime: null // timestamp of last logged message

+};

+

+/***************************************************************************

+ * Events

+ ***************************************************************************/

+/**

+ * Fired when a new category has been created. Subscribers receive the 
following

+ * array:<br>

+ *     - args[0] The category name

+ */

+YAHOO.widget.Logger.categoryCreateEvent = new 
YAHOO.util.CustomEvent("categoryCreate", this, true);

+

+/**

+ * Fired when a new source has been named. Subscribers receive the following

+ * array:<br>

+ *     - args[0] The source name

+ */

+YAHOO.widget.Logger.sourceCreateEvent = new 
YAHOO.util.CustomEvent("sourceCreate", this, true);

+

+/**

+ * Fired when a new log message has been created. Subscribers receive the

+ * following array:<br>

+ *     - args[0] The log message

+ */

+YAHOO.widget.Logger.newLogEvent = new YAHOO.util.CustomEvent("newLog", this, 
true);

+

+/**

+ * Fired when the Logger has been reset has been created.

+ */

+YAHOO.widget.Logger.logResetEvent = new YAHOO.util.CustomEvent("logReset", 
this, true);

+

+/***************************************************************************

+ * Public methods

+ ***************************************************************************/

+/**

+ * Saves a log message to the stack and fires newLogEvent. If the log message 
is

+ * assigned to an unknown category, creates a new category. If the log message 
is

+ * from an unknown source, creates a new source.  If Firebug is enabled,

+ * outputs the log message to Firebug.

+ *

+ * @param {string} sMsg The log message

+ * @param {string} sCategory Category of log message, or null

+ * @param {string} sSource Source of LogWriter, or null if global

+ */

+YAHOO.widget.Logger.log = function(sMsg, sCategory, sSource) {

+    if(this.loggerEnabled) {

+        if(!sCategory) {

+            sCategory = "info"; // default category

+        }

+        else if(this._isNewCategory(sCategory)) {

+            this._createNewCategory(sCategory);

+        }

+        var sClass = "global"; // default source

+        var sDetail = null;

+        if(sSource) {

+            var spaceIndex = sSource.indexOf(" ");

+            if(spaceIndex > 0) {

+                sClass = sSource.substring(0,spaceIndex);// substring until 
first space

+                sDetail = sSource.substring(spaceIndex,sSource.length);// the 
rest of the source

+            }

+            else {

+                sClass = sSource;

+            }

+            if(this._isNewSource(sClass)) {

+                this._createNewSource(sClass);

+            }

+        }

+

+        var timestamp = new Date();

+        var logEntry = {

+            time: timestamp,

+            category: sCategory,

+            source: sClass,

+            sourceDetail: sDetail,

+            msg: sMsg

+        };

+

+        this._stack.push(logEntry);

+        this.newLogEvent.fire(logEntry);

+

+        if(this._firebugEnabled) {

+            this._printToFirebug(logEntry);

+        }

+        return true;

+    }

+    else {

+        return false;

+    }

+};

+

+/**

+ * Resets internal stack and startTime, enables Logger, and fires 
logResetEvent.

+ *

+ */

+YAHOO.widget.Logger.reset = function() {

+    this._stack = [];

+    this._startTime = new Date().getTime();

+    this.loggerEnabled = true;

+    this.log(null, "Logger reset");

+    this.logResetEvent.fire();

+};

+

+/**

+ * Public accessor to internal stack of log messages.

+ *

+ * @return {array} Array of log messages.

+ */

+YAHOO.widget.Logger.getStack = function() {

+    return this._stack;

+};

+

+/**

+ * Public accessor to internal start time.

+ *

+ * @return {date} Internal date of when Logger singleton was initialized.

+ */

+YAHOO.widget.Logger.getStartTime = function() {

+    return this._startTime;

+};

+

+/**

+ * Disables output to the Firebug Firefox extension.

+ */

+YAHOO.widget.Logger.disableFirebug = function() {

+    YAHOO.log("YAHOO.Logger output to Firebug has been disabled.");

+    this._firebugEnabled = false;

+};

+

+/**

+ * Enables output to the Firebug Firefox extension.

+ */

+YAHOO.widget.Logger.enableFirebug = function() {

+    this._firebugEnabled = true;

+    YAHOO.log("YAHOO.Logger output to Firebug has been enabled.");

+};

+

+/***************************************************************************

+ * Private methods

+ ***************************************************************************/

+/**

+ * Creates a new category of log messages and fires categoryCreateEvent.

+ *

+ * @param {string} category Category name

+ * @private

+ */

+YAHOO.widget.Logger._createNewCategory = function(category) {

+    this.categories.push(category);

+    this.categoryCreateEvent.fire(category);

+};

+

+/**

+ * Checks to see if a category has already been created.

+ *

+ * @param {string} category Category name

+ * @return {boolean} Returns true if category is unknown, else returns false

+ * @private

+ */

+YAHOO.widget.Logger._isNewCategory = function(category) {

+    for(var i=0; i < this.categories.length; i++) {

+        if(category == this.categories[i]) {

+            return false;

+        }

+    }

+    return true;

+};

+

+/**

+ * Creates a new source of log messages and fires sourceCreateEvent.

+ *

+ * @param {string} source Source name

+ * @private

+ */

+YAHOO.widget.Logger._createNewSource = function(source) {

+    this.sources.push(source);

+    this.sourceCreateEvent.fire(source);

+};

+

+/**

+ * Checks to see if a source has already been created.

+ *

+ * @param {string} source Source name

+ * @return {boolean} Returns true if source is unknown, else returns false

+ * @private

+ */

+YAHOO.widget.Logger._isNewSource = function(source) {

+    if(source) {

+        for(var i=0; i < this.sources.length; i++) {

+            if(source == this.sources[i]) {

+                return false;

+            }

+        }

+        return true;

+    }

+};

+

+/**

+ * Outputs a log message to Firebug.

+ *

+ * @param {object} entry Log entry object

+ * @private

+ */

+YAHOO.widget.Logger._printToFirebug = function(entry) {

+    if(window.console && console.log) {

+        var category = entry.category;

+        var label = entry.category.substring(0,4).toUpperCase();

+

+        var time = entry.time;

+        if (time.toLocaleTimeString) {

+            var localTime  = time.toLocaleTimeString();

+        }

+        else {

+            localTime = time.toString();

+        }

+

+        var msecs = time.getTime();

+        var elapsedTime = (YAHOO.widget.Logger._lastTime) ?

+            (msecs - YAHOO.widget.Logger._lastTime) : 0;

+        YAHOO.widget.Logger._lastTime = msecs;

+

+        var output = //Firebug doesn't support HTML "<span 
class='"+category+"'>"+label+"</span> " +

+            localTime + " (" +

+            elapsedTime + "ms): " +

+            entry.source + ": " +

+            entry.msg;

+

+        

+        console.log(output);

+    }

+};

+

+/***************************************************************************

+ * Private event handlers

+ ***************************************************************************/

+/**

+ * Handles logging of messages due to window error events.

+ *

+ * @param {string} msg The error message

+ * @param {string} url URL of the error

+ * @param {string} line Line number of the error

+ * @private

+ */

+YAHOO.widget.Logger._onWindowError = function(msg,url,line) {

+    // Logger is not in scope of this event handler

+    try {

+        YAHOO.widget.Logger.log(msg+' ('+url+', line '+line+')', "window");

+        if(YAHOO.widget.Logger._origOnWindowError) {

+            YAHOO.widget.Logger._origOnWindowError();

+        }

+    }

+    catch(e) {

+        return false;

+    }

+};

+

+/**

+ * Handle native JavaScript errors

+ */

+//NB: Not all browsers support the window.onerror event

+if(window.onerror) {

+    // Save any previously defined handler to call

+    YAHOO.widget.Logger._origOnWindowError = window.onerror;

+}

+window.onerror = YAHOO.widget.Logger._onWindowError;

+

+/**

+ * First log

+ */

+YAHOO.widget.Logger.log("Logger initialized");

+

+/****************************************************************************/

+/****************************************************************************/

+/****************************************************************************/

+/**

+ * Class providing ability to log messages through YAHOO.widget.Logger from a

+ * named source.

+ *

+ * @constructor

+ * @param {string} sSource Source of LogWriter instance

+ */

+YAHOO.widget.LogWriter = function(sSource) {

+    if(!sSource) {

+        YAHOO.log("Could not instantiate LogWriter due to invalid source.", 
"error", "LogWriter");

+        return;

+    }

+    this._source = sSource;

+ };

+

+/***************************************************************************

+ * Public methods

+ ***************************************************************************/

+ /**

+ * Public accessor to the unique name of the LogWriter instance.

+ *

+ * @return {string} Unique name of the LogWriter instance

+ */

+YAHOO.widget.LogWriter.prototype.toString = function() {

+    return "LogWriter " + this._sSource;

+};

+

+/**

+ * Logs a message attached to the source of the LogWriter.

+ *

+ * @param {string} sMsg The log message

+ * @param {string} sCategory Category name

+ */

+YAHOO.widget.LogWriter.prototype.log = function(sMsg, sCategory) {

+    YAHOO.widget.Logger.log(sMsg, sCategory, this._source);

+};

+

+/**

+ * Public accessor to get the source name.

+ *

+ * @return {string} The LogWriter source

+ */

+YAHOO.widget.LogWriter.prototype.getSource = function() {

+    return this._sSource;

+};

+

+/**

+ * Public accessor to set the source name.

+ *

+ * @param {string} sSource Source of LogWriter instance

+ */

+YAHOO.widget.LogWriter.prototype.setSource = function(sSource) {

+    if(!sSource) {

+        YAHOO.log("Could not set source due to invalid source.", "error", 
this.toString());

+        return;

+    }

+    else {

+        this._sSource = sSource;

+    }

+};

+/***************************************************************************

+ * Private members

+ ***************************************************************************/

+/**

+ * Source of the log writer instance.

+ *

+ * @type string

+ * @private

+ */

+YAHOO.widget.LogWriter.prototype._source = null;

+

+

+

+/****************************************************************************/

+/****************************************************************************/

+/****************************************************************************/

+

+/**

+ * Class providing UI to read messages logged to YAHOO.widget.Logger.

+ *

+ * requires YAHOO.util.Dom DOM utility

+ * requires YAHOO.util.Event Event utility

+ * optional YAHOO.util.DragDrop Drag and drop utility

+ *

+ * @constructor

+ * @param {el or ID} containerEl DOM element object or ID of container to wrap 
reader UI

+ * @param {object} oConfig Optional object literal of configuration params

+ */

+YAHOO.widget.LogReader = function(containerEl, oConfig) {

+    var oSelf = this;

+

+    // Parse config vars here

+    if (typeof oConfig == "object") {

+        for(var param in oConfig) {

+            this[param] = oConfig[param];

+        }

+    }

+

+    // Attach container...

+    if(containerEl) {

+        if(typeof containerEl == "string") {

+            this._containerEl = document.getElementById(containerEl);

+        }

+        else if(containerEl.tagName) {

+            this._containerEl = containerEl;

+        }

+        this._containerEl.className = "yui-log";

+    }

+    // ...or create container from scratch

+    if(!this._containerEl) {

+        if(YAHOO.widget.LogReader._defaultContainerEl) {

+            this._containerEl =  YAHOO.widget.LogReader._defaultContainerEl;

+        }

+        else {

+            this._containerEl = 
document.body.appendChild(document.createElement("div"));

+            this._containerEl.id = "yui-log";

+            this._containerEl.className = "yui-log";

+

+            YAHOO.widget.LogReader._defaultContainerEl = this._containerEl;

+        }

+

+        // If implementer has provided container values, trust and set those

+        var containerStyle = this._containerEl.style;

+        if(this.width) {

+            containerStyle.width = this.width;

+        }

+        if(this.left) {

+            containerStyle.left = this.left;

+        }

+        if(this.right) {

+            containerStyle.right = this.right;

+        }

+        if(this.bottom) {

+            containerStyle.bottom = this.bottom;

+        }

+        if(this.top) {

+            containerStyle.top = this.top;

+        }

+        if(this.fontSize) {

+            containerStyle.fontSize = this.fontSize;

+        }

+    }

+

+    if(this._containerEl) {

+        // Create header

+        if(!this._hdEl) {

+            this._hdEl = 
this._containerEl.appendChild(document.createElement("div"));

+            this._hdEl.id = "yui-log-hd" + YAHOO.widget.LogReader._index;

+            this._hdEl.className = "yui-log-hd";

+

+            this._collapseEl = 
this._hdEl.appendChild(document.createElement("div"));

+            this._collapseEl.className = "yui-log-btns";

+

+            this._collapseBtn = document.createElement("input");

+            this._collapseBtn.type = "button";

+            this._collapseBtn.style.fontSize = 
YAHOO.util.Dom.getStyle(this._containerEl,"fontSize");

+            this._collapseBtn.className = "yui-log-button";

+            this._collapseBtn.value = "Collapse";

+            this._collapseBtn = 
this._collapseEl.appendChild(this._collapseBtn);

+            
YAHOO.util.Event.addListener(oSelf._collapseBtn,'click',oSelf._onClickCollapseBtn,oSelf);

+

+            this._title = this._hdEl.appendChild(document.createElement("h4"));

+            this._title.innerHTML = "Logger Console";

+

+            // If Drag and Drop utility is available...

+            // ...and this container was created from scratch...

+            // ...then make the header draggable

+            if(YAHOO.util.DD &&

+            (YAHOO.widget.LogReader._defaultContainerEl == this._containerEl)) 
{

+                var ylog_dd = new YAHOO.util.DD(this._containerEl.id);

+                ylog_dd.setHandleElId(this._hdEl.id);

+                this._hdEl.style.cursor = "move";

+            }

+        }

+        // Ceate console

+        if(!this._consoleEl) {

+            this._consoleEl = 
this._containerEl.appendChild(document.createElement("div"));

+            this._consoleEl.className = "yui-log-bd";

+            

+            // If implementer has provided console, trust and set those

+            if(this.height) {

+                this._consoleEl.style.height = this.height;

+            }

+        }

+        // Don't create footer if disabled

+        if(!this._ftEl && this.footerEnabled) {

+            this._ftEl = 
this._containerEl.appendChild(document.createElement("div"));

+            this._ftEl.className = "yui-log-ft";

+

+            this._btnsEl = 
this._ftEl.appendChild(document.createElement("div"));

+            this._btnsEl.className = "yui-log-btns";

+

+            this._pauseBtn = document.createElement("input");

+            this._pauseBtn.type = "button";

+            this._pauseBtn.style.fontSize = 
YAHOO.util.Dom.getStyle(this._containerEl,"fontSize");

+            this._pauseBtn.className = "yui-log-button";

+            this._pauseBtn.value = "Pause";

+            this._pauseBtn = this._btnsEl.appendChild(this._pauseBtn);

+            
YAHOO.util.Event.addListener(oSelf._pauseBtn,'click',oSelf._onClickPauseBtn,oSelf);

+

+            this._clearBtn = document.createElement("input");

+            this._clearBtn.type = "button";

+            this._clearBtn.style.fontSize = 
YAHOO.util.Dom.getStyle(this._containerEl,"fontSize");

+            this._clearBtn.className = "yui-log-button";

+            this._clearBtn.value = "Clear";

+            this._clearBtn = this._btnsEl.appendChild(this._clearBtn);

+            
YAHOO.util.Event.addListener(oSelf._clearBtn,'click',oSelf._onClickClearBtn,oSelf);

+

+            this._categoryFiltersEl = 
this._ftEl.appendChild(document.createElement("div"));

+            this._categoryFiltersEl.className = "yui-log-categoryfilters";

+            this._sourceFiltersEl = 
this._ftEl.appendChild(document.createElement("div"));

+            this._sourceFiltersEl.className = "yui-log-sourcefilters";

+        }

+    }

+

+    // Initialize buffer

+    if(!this._buffer) {

+        this._buffer = []; // output buffer

+    }

+    YAHOO.widget.Logger.newLogEvent.subscribe(this._onNewLog, this);

+    this._lastTime = YAHOO.widget.Logger.getStartTime(); // timestamp of last 
log message to console

+

+    // Initialize category filters

+    this._categoryFilters = [];

+    var catsLen = YAHOO.widget.Logger.categories.length;

+    if(this._categoryFiltersEl) {

+        for(var i=0; i < catsLen; i++) {

+            this._createCategoryCheckbox(YAHOO.widget.Logger.categories[i]);

+        }

+    }

+    // Initialize source filters

+    this._sourceFilters = [];

+    var sourcesLen = YAHOO.widget.Logger.sources.length;

+    if(this._sourceFiltersEl) {

+        for(var j=0; j < sourcesLen; j++) {

+            this._createSourceCheckbox(YAHOO.widget.Logger.sources[j]);

+        }

+    }

+    YAHOO.widget.Logger.categoryCreateEvent.subscribe(this._onCategoryCreate, 
this);

+    YAHOO.widget.Logger.sourceCreateEvent.subscribe(this._onSourceCreate, 
this);

+

+    YAHOO.widget.LogReader._index++;

+    this._filterLogs();

+};

+

+/***************************************************************************

+ * Public members

+ ***************************************************************************/

+/**

+ * Whether or not the log reader is enabled to output log messages. Default:

+ * true.

+ *

+ * @type boolean

+ */

+YAHOO.widget.LogReader.prototype.logReaderEnabled = true;

+

+/**

+ * Public member to access CSS width of the log reader container.

+ *

+ * @type string

+ */

+YAHOO.widget.LogReader.prototype.width = null;

+

+/**

+ * Public member to access CSS height of the log reader container.

+ *

+ * @type string

+ */

+YAHOO.widget.LogReader.prototype.height = null;

+

+/**

+ * Public member to access CSS top position of the log reader container.

+ *

+ * @type string

+ */

+YAHOO.widget.LogReader.prototype.top = null;

+

+/**

+ * Public member to access CSS left position of the log reader container.

+ *

+ * @type string

+ */

+YAHOO.widget.LogReader.prototype.left = null;

+

+/**

+ * Public member to access CSS right position of the log reader container.

+ *

+ * @type string

+ */

+YAHOO.widget.LogReader.prototype.right = null;

+

+/**

+ * Public member to access CSS bottom position of the log reader container.

+ *

+ * @type string

+ */

+YAHOO.widget.LogReader.prototype.bottom = null;

+

+/**

+ * Public member to access CSS font size of the log reader container.

+ *

+ * @type string

+ */

+YAHOO.widget.LogReader.prototype.fontSize = null;

+

+/**

+ * Whether or not the footer UI is enabled for the log reader. Default: true.

+ *

+ * @type boolean

+ */

+YAHOO.widget.LogReader.prototype.footerEnabled = true;

+

+/**

+ * Whether or not output is verbose (more readable). Setting to true will make

+ * output more compact (less readable). Default: true.

+ *

+ * @type boolean

+ */

+YAHOO.widget.LogReader.prototype.verboseOutput = true;

+

+/**

+ * Whether or not newest message is printed on top. Default: true.

+ *

+ * @type boolean

+ */

+YAHOO.widget.LogReader.prototype.newestOnTop = true;

+

+/***************************************************************************

+ * Public methods

+ ***************************************************************************/

+/**

+ * Pauses output of log messages. While paused, log messages are not lost, but

+ * get saved to a buffer and then output upon resume of log reader.

+ */

+YAHOO.widget.LogReader.prototype.pause = function() {

+    this._timeout = null;

+    this.logReaderEnabled = false;

+};

+

+/**

+ * Resumes output of log messages, including outputting any log messages that

+ * have been saved to buffer while paused.

+ */

+YAHOO.widget.LogReader.prototype.resume = function() {

+    this.logReaderEnabled = true;

+    this._printBuffer();

+};

+

+/**

+ * Hides UI of log reader. Logging functionality is not disrupted.

+ */

+YAHOO.widget.LogReader.prototype.hide = function() {

+    this._containerEl.style.display = "none";

+};

+

+/**

+ * Shows UI of log reader. Logging functionality is not disrupted.

+ */

+YAHOO.widget.LogReader.prototype.show = function() {

+    this._containerEl.style.display = "block";

+};

+

+/**

+ * Updates title to given string.

+ *

+ * @param {string} sTitle String to display in log reader's title bar.

+ */

+YAHOO.widget.LogReader.prototype.setTitle = function(sTitle) {

+    var regEx = />/g;

+    sTitle = sTitle.replace(regEx,"&gt;");

+    regEx = /</g;

+    sTitle = sTitle.replace(regEx,"&lt;");

+    this._title.innerHTML = (sTitle);

+};

+ /***************************************************************************

+ * Private members

+ ***************************************************************************/

+/**

+ * Internal class member to index multiple log reader instances.

+ *

+ * @type number

+ * @private

+ */

+YAHOO.widget.LogReader._index = 0;

+

+/**

+ * A class member shared by all log readers if a container needs to be

+ * created during instantiation. Will be null if a container element never 
needs to

+ * be created on the fly, such as when the implementer passes in their own 
element.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader._defaultContainerEl = null;

+

+/**

+ * Buffer of log messages for batch output.

+ *

+ * @type array

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._buffer = null;

+

+/**

+ * Date of last output log message.

+ *

+ * @type date

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._lastTime = null;

+

+/**

+ * Batched output timeout ID.

+ *

+ * @type number

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._timeout = null;

+

+/**

+ * Array of filters for log message categories.

+ *

+ * @type array

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._categoryFilters = null;

+

+/**

+ * Array of filters for log message sources.

+ *

+ * @type array

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._sourceFilters = null;

+

+/**

+ * Log reader container element.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._containerEl = null;

+

+/**

+ * Log reader header element.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._hdEl = null;

+

+/**

+ * Log reader collapse element.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._collapseEl = null;

+

+/**

+ * Log reader collapse button element.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._collapseBtn = null;

+

+/**

+ * Log reader title header element.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._title = null;

+

+/**

+ * Log reader console element.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._consoleEl = null;

+

+/**

+ * Log reader footer element.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._ftEl = null;

+

+/**

+ * Log reader buttons container element.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._btnsEl = null;

+

+/**

+ * Container element for log reader category filter checkboxes.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._categoryFiltersEl = null;

+

+/**

+ * Container element for log reader source filter checkboxes.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._sourceFiltersEl = null;

+

+/**

+ * Log reader pause button element.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._pauseBtn = null;

+

+/**

+ * lear button element.

+ *

+ * @type HTMLElement

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._clearBtn = null;

+/***************************************************************************

+ * Private methods

+ ***************************************************************************/

+/**

+ * Creates the UI for a category filter in the log reader footer element.

+ *

+ * @param {string} category Category name

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._createCategoryCheckbox = function(category) {

+    var oSelf = this;

+    

+    if(this._ftEl) {

+        var parentEl = this._categoryFiltersEl;

+        var filters = this._categoryFilters;

+

+        var filterEl = parentEl.appendChild(document.createElement("span"));

+        filterEl.className = "yui-log-filtergrp";

+            // Append el at the end so IE 5.5 can set "type" attribute

+            // and THEN set checked property

+            var categoryChk = document.createElement("input");

+            categoryChk.id = "yui-log-filter-" + category + 
YAHOO.widget.LogReader._index;

+            categoryChk.className = "yui-log-filter-" + category;

+            categoryChk.type = "checkbox";

+            categoryChk.category = category;

+            categoryChk = filterEl.appendChild(categoryChk);

+            categoryChk.checked = true;

+

+            // Add this checked filter to the internal array of filters

+            filters.push(category);

+            // Subscribe to the click event

+            
YAHOO.util.Event.addListener(categoryChk,'click',oSelf._onCheckCategory,oSelf);

+

+            // Create and class the text label

+            var categoryChkLbl = 
filterEl.appendChild(document.createElement("label"));

+            categoryChkLbl.htmlFor = categoryChk.id;

+            categoryChkLbl.className = category;

+            categoryChkLbl.innerHTML = category;

+    }

+};

+

+YAHOO.widget.LogReader.prototype._createSourceCheckbox = function(source) {

+    var oSelf = this;

+

+    if(this._ftEl) {

+        var parentEl = this._sourceFiltersEl;

+        var filters = this._sourceFilters;

+

+        var filterEl = parentEl.appendChild(document.createElement("span"));

+        filterEl.className = "yui-log-filtergrp";

+

+        // Append el at the end so IE 5.5 can set "type" attribute

+        // and THEN set checked property

+        var sourceChk = document.createElement("input");

+        sourceChk.id = "yui-log-filter" + source + 
YAHOO.widget.LogReader._index;

+        sourceChk.className = "yui-log-filter" + source;

+        sourceChk.type = "checkbox";

+        sourceChk.source = source;

+        sourceChk = filterEl.appendChild(sourceChk);

+        sourceChk.checked = true;

+

+        // Add this checked filter to the internal array of filters

+        filters.push(source);

+        // Subscribe to the click event

+        
YAHOO.util.Event.addListener(sourceChk,'click',oSelf._onCheckSource,oSelf);

+

+        // Create and class the text label

+        var sourceChkLbl = 
filterEl.appendChild(document.createElement("label"));

+        sourceChkLbl.htmlFor = sourceChk.id;

+        sourceChkLbl.className = source;

+        sourceChkLbl.innerHTML = source;

+    }

+};

+

+/**

+ * Reprints all log messages in the stack through filters.

+ *

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._filterLogs = function() {

+    // Reprint stack with new filters

+    if (this._consoleEl !== null) {

+        this._clearConsole();

+        this._printToConsole(YAHOO.widget.Logger.getStack());

+    }

+};

+

+/**

+ * Clears all outputted log messages from the console and resets the time of 
the

+ * last output log message.

+ *

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._clearConsole = function() {

+    // Clear the buffer of any pending messages

+    this._timeout = null;

+    this._buffer = [];

+

+    // Reset the rolling timer

+    this._lastTime = YAHOO.widget.Logger.getStartTime();

+

+    var consoleEl = this._consoleEl;

+    while(consoleEl.hasChildNodes()) {

+        consoleEl.removeChild(consoleEl.firstChild);

+    }

+};

+

+/**

+ * Sends buffer of log messages to output and clears buffer.

+ *

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._printBuffer = function() {

+    this._timeout = null;

+

+    if (this._consoleEl !== null) {

+        var entries = [];

+        for (var i=0; i<this._buffer.length; i++) {

+            entries[i] = this._buffer[i];

+        }

+        this._buffer = [];

+        this._printToConsole(entries);

+        if(!this.newestOnTop) {

+            this._consoleEl.scrollTop = this._consoleEl.scrollHeight;

+        }

+    }

+};

+

+/**

+ * Cycles through an array of log messages, and outputs each one to the console

+ * if its category has not been filtered out.

+ *

+ * @param {array} aEntries

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._printToConsole = function(aEntries) {

+    var entriesLen = aEntries.length;

+    var sourceFiltersLen = this._sourceFilters.length;

+    var categoryFiltersLen = this._categoryFilters.length;

+    // Iterate through all log entries to print the ones that filter through

+    for(var i=0; i<entriesLen; i++) {

+        var entry = aEntries[i];

+        var category = entry.category;

+        var source = entry.source;

+        var sourceDetail = entry.sourceDetail;

+        var okToPrint = false;

+        var okToFilterCats = false;

+

+        for(var j=0; j<sourceFiltersLen; j++) {

+            if(source == this._sourceFilters[j]) {

+                okToFilterCats = true;

+                break;

+            }

+        }

+        if(okToFilterCats) {

+            for(var k=0; k<categoryFiltersLen; k++) {

+                if(category == this._categoryFilters[k]) {

+                    okToPrint = true;

+                    break;

+                }

+            }

+        }

+        if(okToPrint) {

+            // To format for console, calculate the elapsed time

+            // to be from the last item that passed through the filter,

+            // not the absolute previous item in the stack

+            var label = entry.category.substring(0,4).toUpperCase();

+

+            var time = entry.time;

+            if (time.toLocaleTimeString) {

+                var localTime  = time.toLocaleTimeString();

+            }

+            else {

+                localTime = time.toString();

+            }

+

+            var msecs = time.getTime();

+            var startTime = YAHOO.widget.Logger.getStartTime();

+            var totalTime = msecs - startTime;

+            var elapsedTime = msecs - this._lastTime;

+            this._lastTime = msecs;

+            

+            var verboseOutput = (this.verboseOutput) ? "<br>" : "";

+            var sourceAndDetail = (sourceDetail) ?

+                source + " " + sourceDetail : source;

+

+            var output =  "<span class='"+category+"'>"+label+"</span> " +

+                totalTime + "ms (+" +

+                elapsedTime + ") " + localTime + ": " +

+                sourceAndDetail + ": " +

+                verboseOutput +

+                entry.msg;

+

+            var oNewElement = (this.newestOnTop) ?

+                
this._consoleEl.insertBefore(document.createElement("p"),this._consoleEl.firstChild):

+                this._consoleEl.appendChild(document.createElement("p"));

+            oNewElement.innerHTML = output;

+        }

+    }

+};

+

+/***************************************************************************

+ * Private event handlers

+ ***************************************************************************/

+/**

+ * Handles Logger's categoryCreateEvent.

+ *

+ * @param {string} type The event

+ * @param {array} args Data passed from event firer

+ * @param {object} oSelf The log reader instance

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._onCategoryCreate = function(type, args, 
oSelf) {

+    var category = args[0];

+    if(oSelf._ftEl) {

+        oSelf._createCategoryCheckbox(category);

+    }

+};

+

+/**

+ * Handles Logger's sourceCreateEvent.

+ *

+ * @param {string} type The event

+ * @param {array} args Data passed from event firer

+ * @param {object} oSelf The log reader instance

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._onSourceCreate = function(type, args, oSelf) 
{

+    var source = args[0];

+    if(oSelf._ftEl) {

+        oSelf._createSourceCheckbox(source);

+    }

+};

+

+/**

+ * Handles check events on the category filter checkboxes.

+ *

+ * @param {event} v The click event

+ * @param {object} oSelf The log reader instance

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._onCheckCategory = function(v, oSelf) {

+    var newFilter = this.category;

+    var filtersArray = oSelf._categoryFilters;

+

+    if(!this.checked) { // Remove category from filters

+        for(var i=0; i<filtersArray.length; i++) {

+            if(newFilter == filtersArray[i]) {

+                filtersArray.splice(i, 1);

+                break;

+            }

+        }

+    }

+    else { // Add category to filters

+        filtersArray.push(newFilter);

+    }

+    oSelf._filterLogs();

+};

+

+/**

+ * Handles check events on the category filter checkboxes.

+ *

+ * @param {event} v The click event

+ * @param {object} oSelf The log reader instance

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._onCheckSource = function(v, oSelf) {

+    var newFilter = this.source;

+    var filtersArray = oSelf._sourceFilters;

+    

+    if(!this.checked) { // Remove category from filters

+        for(var i=0; i<filtersArray.length; i++) {

+            if(newFilter == filtersArray[i]) {

+                filtersArray.splice(i, 1);

+                break;

+            }

+        }

+    }

+    else { // Add category to filters

+        filtersArray.push(newFilter);

+    }

+    oSelf._filterLogs();

+};

+

+/**

+ * Handles click events on the collapse button.

+ *

+ * @param {event} v The click event

+ * @param {object} oSelf The log reader instance

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._onClickCollapseBtn = function(v, oSelf) {

+    var btn = oSelf._collapseBtn;

+    if(btn.value == "Expand") {

+        oSelf._consoleEl.style.display = "block";

+        if(oSelf._ftEl) {

+            oSelf._ftEl.style.display = "block";

+        }

+        btn.value = "Collapse";

+    }

+    else {

+        oSelf._consoleEl.style.display = "none";

+        if(oSelf._ftEl) {

+            oSelf._ftEl.style.display = "none";

+        }

+        btn.value = "Expand";

+    }

+};

+

+/**

+ * Handles click events on the pause button.

+ *

+ * @param {event} v The click event

+ * @param {object} oSelf The log reader instance

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._onClickPauseBtn = function(v, oSelf) {

+    var btn = oSelf._pauseBtn;

+    if(btn.value == "Resume") {

+        oSelf.resume();

+        btn.value = "Pause";

+    }

+    else {

+        oSelf.pause();

+        btn.value = "Resume";

+    }

+};

+

+/**

+ * Handles click events on the clear button.

+ *

+ * @param {event} v The click event

+ * @param {object} oSelf The log reader instance

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._onClickClearBtn = function(v, oSelf) {

+    oSelf._clearConsole();

+};

+

+/**

+ * Handles Logger's onNewEvent.

+ *

+ * @param {string} type The click event

+ * @param {array} args Data passed from event firer

+ * @param {object} oSelf The log reader instance

+ * @private

+ */

+YAHOO.widget.LogReader.prototype._onNewLog = function(type, args, oSelf) {

+    var logEntry = args[0];

+    oSelf._buffer.push(logEntry);

+

+    if (oSelf.logReaderEnabled === true && oSelf._timeout === null) {

+        oSelf._timeout = setTimeout(function(){oSelf._printBuffer();}, 100);

+    }

+};

+

+


Index: menu.js
===================================================================
RCS file: menu.js
diff -N menu.js
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ menu.js     15 Jul 2006 14:41:51 -0000      1.1
@@ -0,0 +1,5152 @@
+/*
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+Version 0.11.0
+*/
+
+
+/**
+* @class The superclass of all menu containers.
+* @constructor
+* @extends YAHOO.widget.Overlay
+* @base YAHOO.widget.Overlay
+* @param {String or HTMLElement} p_oElement String id or HTMLElement 
+* (either HTMLSelectElement or HTMLDivElement) of the source HTMLElement node.
+* @param {Object} p_oConfig Optional. The configuration object literal 
+* containing the configuration for a MenuModule instance. See 
+* configuration class documentation for more details.
+*/
+YAHOO.widget.MenuModule = function(p_oElement, p_oConfig) {
+
+    YAHOO.widget.MenuModule.superclass.constructor.call(
+        this, 
+        p_oElement, 
+        p_oConfig
+    );
+
+};
+
+YAHOO.extend(YAHOO.widget.MenuModule, YAHOO.widget.Overlay);
+
+// Constants
+
+/**
+* Constant representing the CSS class(es) to be applied to the root 
+* HTMLDivElement of the MenuModule instance.
+* @final
+* @type String
+*/
+YAHOO.widget.MenuModule.prototype.CSS_CLASS_NAME = "yuimenu";
+
+/**
+* Constant representing the type of item to instantiate and add when parsing 
+* the child nodes (either HTMLLIElement, HTMLOptGroupElement or 
+* HTMLOptionElement) of a menu's DOM.  The default 
+* is YAHOO.widget.MenuModuleItem.
+* @final
+* @type YAHOO.widget.MenuModuleItem
+*/
+YAHOO.widget.MenuModule.prototype.ITEM_TYPE = null;
+
+/**
+* Constant representing the tagname of the HTMLElement used to title 
+* a group of items.
+* @final
+* @type String
+*/
+YAHOO.widget.MenuModule.prototype.GROUP_TITLE_TAG_NAME = "H6";
+
+// Private properties
+
+/**
+* Array of HTMLElements used to title groups of items.
+* @private
+* @type {Array}
+*/
+YAHOO.widget.MenuModule.prototype._aGroupTitleElements = null;
+
+/**
+* Multi-dimensional array of items.
+* @private
+* @type {Array}
+*/
+YAHOO.widget.MenuModule.prototype._aItemGroups = null;
+
+/**
+* An array of HTMLUListElements, each of which is the parent node of each 
+* items's HTMLLIElement node.
+* @private
+* @type {Array}
+*/
+YAHOO.widget.MenuModule.prototype._aListElements = null;
+
+/**
+* Reference to the Event utility singleton.
+* @private
+* @type {YAHOO.util.Event}
+*/
+YAHOO.widget.MenuModule.prototype._oEventUtil = YAHOO.util.Event;
+
+/**
+* Reference to the Dom utility singleton.
+* @private
+* @type {YAHOO.util.Dom}
+*/
+YAHOO.widget.MenuModule.prototype._oDom = YAHOO.util.Dom;
+
+/**
+* Reference to the item the mouse is currently over.
+* @private
+* @type {YAHOO.widget.MenuModuleItem}
+*/
+YAHOO.widget.MenuModule.prototype._oCurrentItem = null;
+
+/** 
+* The current state of a MenuModule instance's "mouseover" event
+* @private
+* @type {Boolean}
+*/
+YAHOO.widget.MenuModule.prototype._bFiredMouseOverEvent = false;
+
+/** 
+* The current state of a MenuModule instance's "mouseout" event
+* @private
+* @type {Boolean}
+*/
+YAHOO.widget.MenuModule.prototype._bFiredMouseOutEvent = false;
+
+// Public properties
+
+/**
+* Reference to the item that has focus.
+* @private
+* @type {YAHOO.widget.MenuModuleItem}
+*/
+YAHOO.widget.MenuModule.prototype.activeItem = null;
+
+/**
+* Returns a MenuModule instance's parent object.
+* @type {YAHOO.widget.MenuModuleItem}
+*/
+YAHOO.widget.MenuModule.prototype.parent = null;
+
+/**
+* Returns the HTMLElement (either HTMLSelectElement or HTMLDivElement)
+* used create the MenuModule instance.
+* @type {HTMLSelectElement/HTMLDivElement}
+*/
+YAHOO.widget.MenuModule.prototype.srcElement = null;
+
+// Events
+
+/**
+* Fires when the mouse has entered a MenuModule instance.  Passes back the 
+* DOM Event object as an argument.
+* @type {YAHOO.util.CustomEvent}
+* @see YAHOO.util.CustomEvent
+*/
+YAHOO.widget.MenuModule.prototype.mouseOverEvent = null;
+
+/**
+* Fires when the mouse has left a MenuModule instance.  Passes back the DOM 
+* Event object as an argument.
+* @type {YAHOO.util.CustomEvent}
+* @see YAHOO.util.CustomEvent
+*/
+YAHOO.widget.MenuModule.prototype.mouseOutEvent = null;
+
+/**
+* Fires when the user mouses down on a MenuModule instance.  Passes back the 
+* DOM Event object as an argument.
+* @type {YAHOO.util.CustomEvent}
+* @see YAHOO.util.CustomEvent
+*/
+YAHOO.widget.MenuModule.prototype.mouseDownEvent = null;
+
+/**
+* Fires when the user releases a mouse button while the mouse is over 
+* a MenuModule instance.  Passes back the DOM Event object as an argument.
+* @type {YAHOO.util.CustomEvent}
+* @see YAHOO.util.CustomEvent
+*/
+YAHOO.widget.MenuModule.prototype.mouseUpEvent = null;
+
+/**
+* Fires when the user clicks the on a MenuModule instance.  Passes back the 
+* DOM Event object as an argument.
+* @type {YAHOO.util.CustomEvent}
+* @see YAHOO.util.CustomEvent
+*/
+YAHOO.widget.MenuModule.prototype.clickEvent = null;
+
+/**
+* Fires when the user presses an alphanumeric key.  Passes back the 
+* DOM Event object as an argument.
+* @type {YAHOO.util.CustomEvent}
+* @see YAHOO.util.CustomEvent
+*/
+YAHOO.widget.MenuModule.prototype.keyPressEvent = null;
+
+/**
+* Fires when the user presses a key.  Passes back the DOM Event 
+* object as an argument.
+* @type {YAHOO.util.CustomEvent}
+* @see YAHOO.util.CustomEvent
+*/
+YAHOO.widget.MenuModule.prototype.keyDownEvent = null;
+
+/**
+* Fires when the user releases a key.  Passes back the DOM Event 
+* object as an argument.
+* @type {YAHOO.util.CustomEvent}
+* @see YAHOO.util.CustomEvent
+*/
+YAHOO.widget.MenuModule.prototype.keyUpEvent = null;
+
+/**
+* The MenuModule class's initialization method. This method is automatically 
+* called  by the constructor, and sets up all DOM references for 
+* pre-existing markup, and creates required markup if it is not already 
present.
+* @param {String or HTMLElement} p_oElement String id or HTMLElement 
+* (either HTMLSelectElement or HTMLDivElement) of the source HTMLElement node.
+* @param {Object} p_oConfig Optional. The configuration object literal 
+* containing the configuration for a MenuModule instance. See 
+* configuration class documentation for more details.
+*/
+YAHOO.widget.MenuModule.prototype.init = function(p_oElement, p_oConfig) {
+
+    var Dom = this._oDom;
+    var Event = this._oEventUtil;
+
+    if(!this.ITEM_TYPE) {
+
+        this.ITEM_TYPE = YAHOO.widget.MenuModuleItem;
+
+    }
+
+    this._aItemGroups = [];
+    this._aListElements = [];
+    this._aGroupTitleElements = [];
+
+    var oElement;
+
+    if(typeof p_oElement == "string") {
+
+        oElement = document.getElementById(p_oElement);
+
+    }
+    else if(p_oElement.tagName) {
+
+        oElement = p_oElement;
+
+    }
+
+    if(oElement) {
+
+        switch(oElement.tagName) {
+    
+            case "DIV":
+
+                this.srcElement = oElement;
+
+                /* 
+                    Note: we don't pass the user config in here yet 
+                    because we only want it executed once, at the lowest 
+                    subclass level.
+                */ 
+            
+                YAHOO.widget.MenuModule.superclass.init.call(this, oElement);
+
+                this.beforeInitEvent.fire(YAHOO.widget.MenuModule);
+
+                /*
+                    Populate the collection of item groups and item
+                    group titles
+                */
+
+                var oNode = this.body.firstChild;
+                var i = 0;
+
+                do {
+
+                    switch(oNode.tagName) {
+
+                        case this.GROUP_TITLE_TAG_NAME:
+                        
+                            this._aGroupTitleElements[i] = oNode;
+
+                        break;
+
+                        case "UL":
+
+                            this._aListElements[i] = oNode;
+                            this._aItemGroups[i] = [];
+                            i++;
+
+                        break;
+
+                    }
+
+                }
+                while((oNode = oNode.nextSibling));
+
+                /*
+                    Apply the "first-of-type" class to the first UL to mimic 
+                    the "first-of-type" CSS3 psuedo class.
+                */
+
+                if(this._aListElements[0]) {
+
+                    Dom.addClass(this._aListElements[0], "first-of-type");
+
+                }
+
+
+    
+            break;
+    
+            case "SELECT":
+    
+                this.srcElement = oElement;
+    
+    
+                /*
+                    The source element is not something that we can use 
+                    outright, so we need to create a new Overlay
+                */
+    
+                var sId = Dom.generateId();
+
+                /* 
+                    Note: we don't pass the user config in here yet 
+                    because we only want it executed once, at the lowest 
+                    subclass level.
+                */ 
+            
+                YAHOO.widget.MenuModule.superclass.init.call(this, sId); 
+
+                this.beforeInitEvent.fire(YAHOO.widget.MenuModule);
+
+
+
+            break;
+    
+        }
+
+    }
+    else {
+
+        /* 
+            Note: we don't pass the user config in here yet 
+            because we only want it executed once, at the lowest 
+            subclass level.
+        */ 
+    
+        YAHOO.widget.MenuModule.superclass.init.call(this, p_oElement);
+
+        this.beforeInitEvent.fire(YAHOO.widget.MenuModule);
+
+
+
+    }
+
+    if(this.element) {
+
+        var oEl = this.element;
+        var CustomEvent = YAHOO.util.CustomEvent;
+
+        Dom.addClass(oEl, this.CSS_CLASS_NAME);
+
+        // Assign DOM event handlers
+
+        Event.addListener(
+                oEl, 
+                "mouseover", 
+                this._onElementMouseOver, 
+                this, 
+                true
+            );
+
+        Event.addListener(oEl, "mouseout", this._onElementMouseOut, this, 
true);
+        Event.addListener(oEl, "mousedown", this._onDOMEvent, this, true);
+        Event.addListener(oEl, "mouseup", this._onDOMEvent, this, true);
+        Event.addListener(oEl, "click", this._onElementClick, this, true);
+        Event.addListener(oEl, "keydown", this._onDOMEvent, this, true);
+        Event.addListener(oEl, "keyup", this._onDOMEvent, this, true);
+        Event.addListener(oEl, "keypress", this._onDOMEvent, this, true);
+
+        // Create custom events
+
+        this.mouseOverEvent = new CustomEvent("mouseOverEvent", this);
+        this.mouseOutEvent = new CustomEvent("mouseOutEvent", this);
+        this.mouseDownEvent = new CustomEvent("mouseDownEvent", this);
+        this.mouseUpEvent = new CustomEvent("mouseUpEvent", this);
+        this.clickEvent = new CustomEvent("clickEvent", this);
+        this.keyPressEvent = new CustomEvent("keyPressEvent", this);
+        this.keyDownEvent = new CustomEvent("keyDownEvent", this);
+        this.keyUpEvent = new CustomEvent("keyUpEvent", this);
+
+        // Subscribe to Custom Events
+
+        this.beforeRenderEvent.subscribe(this._onBeforeRender, this, true);
+        this.renderEvent.subscribe(this._onRender, this, true);
+        this.showEvent.subscribe(this._onShow, this, true);
+        this.beforeHideEvent.subscribe(this._onBeforeHide, this, true);
+
+        if(p_oConfig) {
+    
+            this.cfg.applyConfig(p_oConfig, true);
+    
+        }
+
+        this.cfg.queueProperty("visible", false);
+
+        if(this.srcElement) {
+
+            this._initSubTree();
+
+        }
+
+    }
+
+    this.initEvent.fire(YAHOO.widget.MenuModule);
+
+};
+
+// Private methods
+
+/**
+* Iterates the source element's childNodes collection and uses the child 
+* nodes to instantiate MenuModule and MenuModuleItem instances.
+* @private
+*/
+YAHOO.widget.MenuModule.prototype._initSubTree = function() {
+
+    var oNode;
+
+
+    switch(this.srcElement.tagName) {
+
+        case "DIV":
+
+            if(this._aListElements.length > 0) {
+
+
+                var i = this._aListElements.length - 1;
+
+                do {
+
+                    oNode = this._aListElements[i].firstChild;
+    
+
+                    do {
+    
+                        switch(oNode.tagName) {
+        
+                            case "LI":
+
+
+                                this.addItem(new this.ITEM_TYPE(oNode), i);
+        
+                            break;
+        
+                        }
+            
+                    }
+                    while((oNode = oNode.nextSibling));
+            
+                }
+                while(i--);
+
+            }
+
+        break;
+
+        case "SELECT":
+
+
+            oNode = this.srcElement.firstChild;
+
+            do {
+
+                switch(oNode.tagName) {
+
+                    case "OPTGROUP":
+                    case "OPTION":
+
+
+                        this.addItem(new this.ITEM_TYPE(oNode));
+
+                    break;
+
+                }
+
+            }
+            while((oNode = oNode.nextSibling));
+
+        break;
+
+    }
+
+};
+
+/**
+* Returns the first enabled item in a menu instance.
+* @return Returns a MenuModuleItem instance.
+* @type YAHOO.widget.MenuModuleItem
+* @private
+*/
+YAHOO.widget.MenuModule.prototype._getFirstEnabledItem = function() {
+
+    var nGroups = this._aItemGroups.length;
+    var oItem;
+    var aItemGroup;
+
+    for(var i=0; i<nGroups; i++) {
+
+        aItemGroup = this._aItemGroups[i];
+        
+        if(aItemGroup) {
+
+            var nItems = aItemGroup.length;
+            
+            for(var n=0; n<nItems; n++) {
+            
+                oItem = aItemGroup[n];
+                
+                if(!oItem.cfg.getProperty("disabled")) {
+                
+                    return oItem;
+                
+                }
+    
+                oItem = null;
+    
+            }
+        
+        }
+    
+    }
+    
+};
+
+/**
+* Determines if the value is one of the supported positions.
+* @private
+* @param {Object} p_sPosition The object to be evaluated.
+* @return Returns true if the position is supported.
+* @type Boolean
+*/
+YAHOO.widget.MenuModule.prototype._checkPosition = function(p_sPosition) {
+
+    if(typeof p_sPosition == "string") {
+
+        var sPosition = p_sPosition.toLowerCase();
+
+        return ("dynamic,static".indexOf(sPosition) != -1);
+
+    }
+
+};
+
+/**
+* Adds an item to a group.
+* @private
+* @param {Number} p_nGroupIndex Number indicating the group to which
+* the item belongs.
+* @param {YAHOO.widget.MenuModuleItem} p_oItem The item to be added.
+* @param {Number} p_nItemIndex Optional. Index at which the item 
+* should be added.
+* @return The item that was added.
+* @type YAHOO.widget.MenuModuleItem
+*/
+YAHOO.widget.MenuModule.prototype._addItemToGroup = 
+
+    function(p_nGroupIndex, p_oItem, p_nItemIndex) {
+
+        var Dom = this._oDom;
+        var oItem;
+
+        if(p_oItem instanceof this.ITEM_TYPE) {
+
+            oItem = p_oItem;     
+
+        }
+        else if(typeof p_oItem == "string") {
+
+            oItem = new this.ITEM_TYPE(p_oItem);
+        
+        }
+
+        if(oItem) {
+        
+            var nGroupIndex = typeof p_nGroupIndex == "number" ? 
+                    p_nGroupIndex : 0;
+            
+            var aGroup = this._getItemGroup(nGroupIndex);
+            
+            var oGroupItem;
+    
+
+            if(!aGroup) {
+    
+                aGroup = this._createItemGroup(nGroupIndex);
+    
+            }
+
+            if(typeof p_nItemIndex == "number") {
+    
+                var bAppend = (p_nItemIndex >= aGroup.length);            
+    
+
+                if(aGroup[p_nItemIndex]) {
+        
+                    aGroup.splice(p_nItemIndex, 0, oItem);
+        
+                }
+                else {
+        
+                    aGroup[p_nItemIndex] = oItem;
+        
+                }
+    
+    
+                oGroupItem = aGroup[p_nItemIndex];
+    
+                if(oGroupItem) {
+    
+                    if(bAppend && !oGroupItem.element.parentNode) {
+            
+                        this._aListElements[nGroupIndex].appendChild(
+                            oGroupItem.element
+                        );
+        
+                    }
+                    else {
+      
+        
+                        /**
+                        * Returns the next sibling of an item in an array 
+                        * @param {p_aArray} An array
+                        * @param {p_nStartIndex} The index to start searching
+                        * the array 
+                        * @ignore
+                        * @return Returns an item in an array
+                        * @type Object 
+                        */
+                        function getNextItemSibling(p_aArray, p_nStartIndex) {
+                
+                            return (
+                                    p_aArray[p_nStartIndex] || 
+                                    getNextItemSibling(
+                                        p_aArray, 
+                                        (p_nStartIndex+1)
+                                    )
+                                );
+                
+                        }
+        
+        
+                        var oNextItemSibling = 
+                                getNextItemSibling(aGroup, (p_nItemIndex+1));
+        
+                        if(oNextItemSibling && !oGroupItem.element.parentNode) 
{
+                
+                            this._aListElements[nGroupIndex].insertBefore(
+                                    oGroupItem.element, 
+                                    oNextItemSibling.element
+                                );
+            
+                        }
+        
+                    }
+        
+    
+                    oGroupItem.parent = this;
+            
+                    this._subscribeToItemEvents(oGroupItem);
+        
+                    this._configureItemSubmenuModule(oGroupItem);
+                    
+                    this._updateItemProperties(nGroupIndex);
+            
+
+                    return oGroupItem;
+        
+                }
+    
+            }
+            else {
+        
+                var nItemIndex = aGroup.length;
+        
+                aGroup[nItemIndex] = oItem;
+        
+        
+                oGroupItem = aGroup[nItemIndex];
+        
+                if(oGroupItem) {
+        
+                    if(
+                        !Dom.isAncestor(
+                            this._aListElements[nGroupIndex], 
+                            oGroupItem.element
+                        )
+                    ) {
+        
+                        this._aListElements[nGroupIndex].appendChild(
+                            oGroupItem.element
+                        );
+        
+                    }
+        
+                    oGroupItem.element.setAttribute("groupindex", nGroupIndex);
+                    oGroupItem.element.setAttribute("index", nItemIndex);
+            
+                    oGroupItem.parent = this;
+        
+                    oGroupItem.index = nItemIndex;
+                    oGroupItem.groupIndex = nGroupIndex;
+            
+                    this._subscribeToItemEvents(oGroupItem);
+        
+                    this._configureItemSubmenuModule(oGroupItem);
+        
+                    if(nItemIndex === 0) {
+            
+                        Dom.addClass(oGroupItem.element, "first-of-type");
+            
+                    }
+
+            
+                    return oGroupItem;
+        
+                }
+        
+            }
+
+        }
+    
+    };
+
+/**
+* Removes an item from a group by index.
+* @private
+* @param {Number} p_nGroupIndex Number indicating the group to which
+* the item belongs.
+* @param {Number} p_nItemIndex Number indicating the index of the item to  
+* be removed.
+* @return The item that was removed.
+* @type YAHOO.widget.MenuModuleItem
+*/    
+YAHOO.widget.MenuModule.prototype._removeItemFromGroupByIndex = 
+
+    function(p_nGroupIndex, p_nItemIndex) {
+
+        var nGroupIndex = typeof p_nGroupIndex == "number" ? p_nGroupIndex : 0;
+        var aGroup = this._getItemGroup(nGroupIndex);
+    
+        if(aGroup) {
+    
+            var aArray = aGroup.splice(p_nItemIndex, 1);
+            var oItem = aArray[0];
+        
+            if(oItem) {
+        
+                // Update the index and className properties of each member    
    
+                
+                this._updateItemProperties(nGroupIndex);
+        
+                if(aGroup.length === 0) {
+        
+                    // Remove the UL
+        
+                    var oUL = this._aListElements[nGroupIndex];
+        
+                    if(this.body && oUL) {
+        
+                        this.body.removeChild(oUL);
+        
+                    }
+        
+                    // Remove the group from the array of items
+        
+                    this._aItemGroups.splice(nGroupIndex, 1);
+        
+        
+                    // Remove the UL from the array of ULs
+        
+                    this._aListElements.splice(nGroupIndex, 1);
+        
+        
+                    /*
+                         Assign the "first-of-type" class to the new first UL 
+                         in the collection
+                    */
+        
+                    oUL = this._aListElements[0];
+        
+                    if(oUL) {
+        
+                        this._oDom.addClass(oUL, "first-of-type");
+        
+                    }            
+        
+                }
+        
+        
+                // Return a reference to the item that was removed
+            
+                return oItem;
+        
+            }
+    
+        }
+    
+    };
+
+/**
+* Removes a item from a group by reference.
+* @private
+* @param {Number} p_nGroupIndex Number indicating the group to which
+* the item belongs.
+* @param {YAHOO.widget.MenuModuleItem} p_oItem The item to be removed.
+* @return The item that was removed.
+* @type YAHOO.widget.MenuModuleItem
+*/    
+YAHOO.widget.MenuModule.prototype._removeItemFromGroupByValue =
+
+    function(p_nGroupIndex, p_oItem) {
+
+        var aGroup = this._getItemGroup(p_nGroupIndex);
+
+        if(aGroup) {
+
+            var nItems = aGroup.length;
+            var nItemIndex = -1;
+        
+            if(nItems > 0) {
+        
+                var i = nItems-1;
+            
+                do {
+            
+                    if(aGroup[i] == p_oItem) {
+            
+                        nItemIndex = i;
+                        break;    
+            
+                    }
+            
+                }
+                while(i--);
+            
+                if(nItemIndex > -1) {
+            
+                    return this._removeItemFromGroupByIndex(
+                                p_nGroupIndex, 
+                                nItemIndex
+                            );
+            
+                }
+        
+            }
+        
+        }
+    
+    };
+
+/**
+* Updates the index, groupindex, and className properties of the items
+* in the specified group. 
+* @private
+* @param {Number} p_nGroupIndex Number indicating the group of items to update.
+*/
+YAHOO.widget.MenuModule.prototype._updateItemProperties = 
+
+    function(p_nGroupIndex) {
+
+        var aGroup = this._getItemGroup(p_nGroupIndex);
+        var nItems = aGroup.length;
+    
+        if(nItems > 0) {
+    
+            var Dom = this._oDom;
+            var i = nItems - 1;
+            var oItem;
+            var oLI;
+    
+            // Update the index and className properties of each member        
+        
+            do {
+    
+                oItem = aGroup[i];
+    
+                if(oItem) {
+        
+                    oLI = oItem.element;
+    
+                    oItem.index = i;
+                    oItem.groupIndex = p_nGroupIndex;
+    
+                    oLI.setAttribute("groupindex", p_nGroupIndex);
+                    oLI.setAttribute("index", i);
+    
+                    Dom.removeClass(oLI, "first-of-type");
+    
+                }
+        
+            }
+            while(i--);
+    
+    
+            if(oLI) {
+    
+                Dom.addClass(oLI, "first-of-type");
+    
+            }
+    
+        }
+    
+    };
+
+/**
+* Creates a new item group (array) and it's associated HTMLUlElement node 
+* @private
+* @param {Number} p_nIndex Number indicating the group to create.
+* @return An item group.
+* @type Array
+*/
+YAHOO.widget.MenuModule.prototype._createItemGroup = function(p_nIndex) {
+
+    if(!this._aItemGroups[p_nIndex]) {
+
+        this._aItemGroups[p_nIndex] = [];
+
+        var oUL = document.createElement("ul");
+
+        this._aListElements[p_nIndex] = oUL;
+
+        return this._aItemGroups[p_nIndex];
+
+    }
+
+};
+
+/**
+* Returns the item group at the specified index.
+* @private
+* @param {Number} p_nIndex Number indicating the index of the item group to
+* be retrieved.
+* @return An array of items.
+* @type Array
+*/
+YAHOO.widget.MenuModule.prototype._getItemGroup = function(p_nIndex) {
+
+    var nIndex = ((typeof p_nIndex == "number") ? p_nIndex : 0);
+
+    return this._aItemGroups[nIndex];
+
+};
+
+/**
+* Subscribe's a MenuModule instance to it's parent MenuModule instance's 
events.
+* @private
+* @param {YAHOO.widget.MenuModuleItem} p_oItem The item to listen
+* for events on.
+*/
+YAHOO.widget.MenuModule.prototype._configureItemSubmenuModule = 
+
+    function(p_oItem) {
+
+        var oSubmenu = p_oItem.cfg.getProperty("submenu");
+    
+        if(oSubmenu) {
+    
+            /*
+                Listen for configuration changes to the parent MenuModule 
+                instance so they they can be applied to the submenu.
+            */
+    
+            this.cfg.configChangedEvent.subscribe(
+                this._onParentMenuModuleConfigChange, 
+                oSubmenu, 
+                true
+            );
+            
+            this.renderEvent.subscribe(
+                this._onParentMenuModuleRender,
+                oSubmenu, 
+                true
+            );
+    
+            oSubmenu.beforeShowEvent.subscribe(
+                this._onSubmenuBeforeShow, 
+                oSubmenu, 
+                true
+            );
+    
+            oSubmenu.showEvent.subscribe(this._onSubmenuShow, oSubmenu, true);
+    
+            oSubmenu.hideEvent.subscribe(this._onSubmenuHide, oSubmenu, true);
+    
+        }
+
+};
+
+/**
+* Subscribes a MenuModule instance to the specified item's Custom Events.
+* @private
+* @param {YAHOO.widget.MenuModuleItem} p_oItem The item to listen for events 
on.
+*/
+YAHOO.widget.MenuModule.prototype._subscribeToItemEvents = function(p_oItem) {
+
+    var aArguments = [this, p_oItem];
+
+    p_oItem.focusEvent.subscribe(this._onItemFocus, aArguments);
+
+    p_oItem.blurEvent.subscribe(this._onItemBlur, aArguments);
+
+    p_oItem.cfg.configChangedEvent.subscribe(
+        this._onItemConfigChange,
+        aArguments
+    );
+
+};
+
+/**
+* Returns the offset width of a MenuModule instance.
+* @private
+*/
+YAHOO.widget.MenuModule.prototype._getOffsetWidth = function() {
+
+    var oClone = this.element.cloneNode(true);
+
+    this._oDom.setStyle(oClone, "width", "");
+
+    document.body.appendChild(oClone);
+
+    var sWidth = oClone.offsetWidth;
+
+    document.body.removeChild(oClone);
+
+    return sWidth;
+
+};
+
+/**
+* Determines if a DOM event was fired on an item and (if so) fires the item's
+* associated Custom Event
+* @private
+* @param {HTMLElement} p_oElement The original target of the event.
+* @param {String} p_sEventType The type/name of the Custom Event to fire.
+* @param {Event} p_oDOMEvent The DOM event to pass back when firing the 
+* Custom Event.
+* @return An item.
+* @type YAHOO.widget.MenuModuleItem
+*/
+YAHOO.widget.MenuModule.prototype._fireItemEvent = 
+
+    function(p_oElement, p_sEventType, p_oDOMEvent) {
+
+        var me = this;
+    
+        /**
+        * Returns the specified element's parent HTMLLIElement (&#60;LI&#60;)
+        * @param {p_oElement} An HTMLElement node
+        * @ignore
+        * @return Returns an HTMLElement node
+        * @type HTMLElement 
+        */
+        function getItemElement(p_oElement) {
+        
+            if(p_oElement == me.element) {
+    
+                return;
+            
+            }
+            else if(p_oElement.tagName == "LI") {
+        
+                return p_oElement;
+        
+            }
+            else if(p_oElement.parentNode) {
+    
+                return getItemElement(p_oElement.parentNode);
+        
+            }
+        
+        }
+    
+    
+        var oElement = getItemElement(p_oElement);
+    
+        if(oElement) {
+    
+            /*
+                Retrieve the item that corresponds to the 
+                HTMLLIElement (&#60;LI&#60;) and fire the Custom Event        
+            */
+    
+            var nGroupIndex = parseInt(oElement.getAttribute("groupindex"), 
10);
+            var nIndex = parseInt(oElement.getAttribute("index"), 10);
+            var oItem = this._aItemGroups[nGroupIndex][nIndex];
+    
+            if(!oItem.cfg.getProperty("disabled")) {
+    
+                oItem[p_sEventType].fire(p_oDOMEvent);
+    
+                return oItem;
+    
+            }
+    
+        }
+
+    };
+
+// Private DOM event handlers
+
+/**
+* Generic event handler for the MenuModule's root HTMLDivElement node.  Used 
+* to handle "mousedown," "mouseup," "keydown," "keyup," and "keypress" events.
+* @private
+* @param {Event} p_oEvent Event object passed back by the event 
+* utility (YAHOO.util.Event).
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance 
+* corresponding to the HTMLDivElement that fired the event.
+*/
+YAHOO.widget.MenuModule.prototype._onDOMEvent = 
+
+    function(p_oEvent, p_oMenuModule) {
+
+        var Event = this._oEventUtil;
+
+        // Map of DOM event types to Custom Event types
+
+        var oEventTypes =  {
+                "mousedown": "mouseDownEvent",
+                "mouseup": "mouseUpEvent",
+                "keydown": "keyDownEvent",
+                "keyup": "keyUpEvent",
+                "keypress": "keyPressEvent"
+            };
+    
+        var sCustomEventType = oEventTypes[p_oEvent.type];
+        
+        var oTarget = Event.getTarget(p_oEvent);
+    
+        /*
+            Check if the target was an element that is a part of a 
+            an item and (if so), fire the associated custom event.
+        */
+    
+        this._fireItemEvent(oTarget, sCustomEventType, p_oEvent);
+
+    
+        // Fire the associated custom event for the MenuModule
+    
+        this[sCustomEventType].fire(p_oEvent);
+    
+    
+        /*
+            Stop the propagation of the event at each MenuModule instance
+            since menus can be embedded in eachother.
+        */
+            
+        Event.stopPropagation(p_oEvent);
+
+    };
+
+/**
+* "mouseover" event handler for the MenuModule's root HTMLDivElement node.
+* @private
+* @param {Event} p_oEvent Event object passed back by the event
+* utility (YAHOO.util.Event).
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance 
+* corresponding to the HTMLDivElement that fired the event.
+*/
+YAHOO.widget.MenuModule.prototype._onElementMouseOver = 
+
+    function(p_oEvent, p_oMenuModule) {
+
+        var Event = this._oEventUtil;
+        var oTarget = Event.getTarget(p_oEvent);
+    
+        if(
+            (
+                oTarget == this.element || 
+                this._oDom.isAncestor(this.element, oTarget)
+            )  && 
+            !this._bFiredMouseOverEvent
+        ) {
+    
+            // Fire the "mouseover" Custom Event for the MenuModule instance
+    
+            this.mouseOverEvent.fire(p_oEvent);
+    
+            this._bFiredMouseOverEvent = true;
+            this._bFiredMouseOutEvent = false;
+    
+        }
+    
+    
+        /*
+            Check if the target was an element that is a part of an item
+            and (if so), fire the "mouseover" Custom Event.
+        */
+    
+        if(!this._oCurrentItem) {
+    
+            this._oCurrentItem = 
+                this._fireItemEvent(oTarget, "mouseOverEvent", p_oEvent);
+    
+        }
+    
+    
+        /*
+            Stop the propagation of the event at each MenuModule instance
+            since menus can be embedded in eachother.
+        */
+    
+        Event.stopPropagation(p_oEvent);
+
+    };
+
+/**
+* "mouseout" event handler for the MenuModule's root HTMLDivElement node.
+* @private
+* @param {Event} p_oEvent Event object passed back by the event
+* utility (YAHOO.util.Event).
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance 
+* corresponding to the HTMLDivElement that fired the event.
+*/
+YAHOO.widget.MenuModule.prototype._onElementMouseOut = 
+
+    function(p_oEvent, p_oMenuModule) {
+
+        var Dom = this._oDom;
+        var Event = this._oEventUtil;
+        var oRelatedTarget = Event.getRelatedTarget(p_oEvent);
+        var bLIMouseOut = true;
+        var bMovingToSubmenu = false;
+            
+    
+        // Determine where the mouse is going
+    
+        if(this._oCurrentItem && oRelatedTarget) {
+    
+            if(
+                oRelatedTarget == this._oCurrentItem.element || 
+                Dom.isAncestor(this._oCurrentItem.element, oRelatedTarget)
+            ) {
+    
+                bLIMouseOut = false;
+    
+            }
+    
+    
+            var oSubmenu = this._oCurrentItem.cfg.getProperty("submenu");
+    
+            if(
+                oSubmenu && 
+                (
+                    oRelatedTarget == oSubmenu.element ||
+                    Dom.isAncestor(oSubmenu.element, oRelatedTarget)
+                )
+            ) {
+    
+                bMovingToSubmenu = true;
+    
+            }
+    
+        }
+    
+    
+        if(this._oCurrentItem && (bLIMouseOut || bMovingToSubmenu)) {
+    
+            // Fire the "mouseout" Custom Event for the item
+    
+            this._oCurrentItem.mouseOutEvent.fire(p_oEvent);
+    
+            this._oCurrentItem = null;
+    
+        }
+    
+    
+        if(
+            !this._bFiredMouseOutEvent && 
+            (
+                !Dom.isAncestor(this.element, oRelatedTarget) ||
+                bMovingToSubmenu
+            )
+        ) {
+    
+            // Fire the "mouseout" Custom Event for the MenuModule instance
+    
+            this.mouseOutEvent.fire(p_oEvent);
+    
+            this._bFiredMouseOutEvent = true;
+            this._bFiredMouseOverEvent = false;
+    
+        }
+    
+    
+        /*
+            Stop the propagation of the event at each MenuModule instance
+            since menus can be embedded in eachother.
+        */
+    
+        Event.stopPropagation(p_oEvent);
+
+    };
+
+/**
+* "click" event handler for the MenuModule's root HTMLDivElement node.
+* @private
+* @param {Event} p_oEvent Event object passed back by the 
+* event utility (YAHOO.util.Event).
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance 
+* corresponding to the HTMLDivElement that fired the event.
+*/         
+YAHOO.widget.MenuModule.prototype._onElementClick = 
+
+    function(p_oEvent, p_oMenuModule) {
+
+        var Event = this._oEventUtil;
+        
+        var oTarget = Event.getTarget(p_oEvent);
+        
+        /*
+            Check if the target was a DOM element that is a part of an
+            item and (if so), fire the associated "click" 
+            Custom Event.
+        */
+        
+        var oItem = this._fireItemEvent(oTarget, "clickEvent", p_oEvent);
+        
+        var bCurrentPageURL; // Indicates if the URL points to the current page
+    
+    
+        if(oItem) {
+    
+            var sURL = oItem.cfg.getProperty("url");
+            var oSubmenu = oItem.cfg.getProperty("submenu");
+            
+            bCurrentPageURL = (sURL.substr((sURL.length-1),1) == "#");
+    
+            /*
+                ACCESSIBILITY FEATURE FOR SCREEN READERS: Expand/collapse the
+                submenu when the user clicks on the submenu indicator image.
+            */        
+    
+            if(oTarget == oItem.submenuIndicator && oSubmenu) {
+
+                if(oSubmenu.cfg.getProperty("visible")) {
+        
+                    oSubmenu.hide();
+        
+                }
+                else {
+
+                    var oActiveItem = this.activeItem;
+               
+
+                    // Hide any other submenus that might be visible
+                
+                    if(oActiveItem && oActiveItem != this) {
+                
+                        this.clearActiveItem();
+                
+                    }
+
+                    this.activeItem = oItem;
+        
+                    oItem.cfg.setProperty("selected", true);
+
+                    oSubmenu.show();
+        
+                }
+        
+            }
+            else if(oTarget.tagName != "A" && !bCurrentPageURL) {
+                
+                /*
+                    Follow the URL of the item regardless of whether or 
+                    not the user clicked specifically on the
+                    HTMLAnchorElement (&#60;A&#60;) node.
+                */
+    
+                document.location = sURL;
+        
+            }
+        
+        }
+            
+    
+        switch(oTarget.tagName) {
+        
+            case "A":
+            
+                if(bCurrentPageURL) {
+    
+                    // Don't follow URLs that are equal to "#"
+    
+                    Event.preventDefault(p_oEvent);
+                
+                }
+                else {
+    
+                    /*
+                        Break if the anchor's URL is something other than "#" 
+                        to prevent the call to "stopPropagation" from be 
+                        executed.  This is required for Safari to be able to 
+                        follow the URL.
+                    */
+                
+                    break;
+                
+                }
+            
+            default:
+    
+                /*
+                    Stop the propagation of the event at each MenuModule 
+                    instance since Menus can be embedded in eachother.
+                */
+    
+                Event.stopPropagation(p_oEvent);
+            
+            break;
+        
+        }
+    
+    
+        // Fire the associated "click" Custom Event for the MenuModule instance
+    
+        this.clickEvent.fire(p_oEvent);
+
+    };
+
+// Private Custom Event handlers
+
+/**
+* "beforerender" Custom Event handler for a MenuModule instance.  Appends all 
+* of the HTMLUListElement (&#60;UL&#60;s) nodes (and their child 
+* HTMLLIElement (&#60;LI&#60;)) nodes and their accompanying title nodes to  
+* the body of the MenuModule instance.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance that 
+* fired the event.
+*/
+YAHOO.widget.MenuModule.prototype._onBeforeRender = 
+
+    function(p_sType, p_aArgs, p_oMenuModule) {
+
+        var Dom = this._oDom;
+        var oConfig = this.cfg;
+        var oEl = this.element;
+        var nListElements = this._aListElements.length;
+    
+
+        if(oConfig.getProperty("position") == "static") {
+    
+            oConfig.queueProperty("iframe", false);
+            oConfig.queueProperty("visible", true);
+            
+        }
+    
+    
+        if(nListElements > 0) {
+    
+            var i = 0;
+            var bFirstList = true;
+            var oUL;
+            var oGroupTitle;
+    
+    
+            do {
+    
+                oUL = this._aListElements[i];
+    
+                if(oUL) {
+    
+                    if(bFirstList) {
+            
+                        Dom.addClass(oUL, "first-of-type");
+                        bFirstList = false;
+            
+                    }
+    
+    
+                    if(!Dom.isAncestor(oEl, oUL)) {
+    
+                        this.appendToBody(oUL);
+    
+                    }
+    
+    
+                    oGroupTitle = this._aGroupTitleElements[i];
+    
+                    if(oGroupTitle) {
+    
+                        if(!Dom.isAncestor(oEl, oGroupTitle)) {
+    
+                            oUL.parentNode.insertBefore(oGroupTitle, oUL);
+    
+                        }
+    
+    
+                        Dom.addClass(oUL, "hastitle");
+    
+                    }
+    
+                }
+    
+                i++;
+    
+            }
+            while(i < nListElements);
+    
+        }
+
+    };
+
+/**
+* "render" Custom Event handler for a MenuModule instance.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance that 
+* fired the event.
+*/
+YAHOO.widget.MenuModule.prototype._onRender = 
+
+    function(p_sType, p_aArgs, p_oMenuModule) {
+
+        if(this.cfg.getProperty("position") == "dynamic") {
+    
+            var sWidth = this.element.parentNode.tagName == "BODY" ? 
+                    this.element.offsetWidth : this._getOffsetWidth();
+        
+            this.cfg.setProperty("width", (sWidth + "px"));
+    
+        }
+
+    };
+
+/**
+* "show" Custom Event handler for a MenuModule instance.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance that 
+* fired the event.
+*/
+YAHOO.widget.MenuModule.prototype._onShow = 
+
+    function(p_sType, p_aArgs, p_oMenuModule) {
+    
+        /*
+            Setting focus to an item in the newly visible submenu alerts the 
+            contents of the submenu to the screen reader.
+        */
+
+        this.setInitialFocus();
+    
+    };
+
+/**
+* "hide" Custom Event handler for a MenuModule instance.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance that 
+* fired the event.
+*/
+YAHOO.widget.MenuModule.prototype._onBeforeHide = 
+
+    function(p_sType, p_aArgs, p_oMenuModule) {
+
+        var oActiveItem = this.activeItem;
+
+        if(oActiveItem) {
+    
+            oActiveItem.blur();
+
+            if(oActiveItem.cfg.getProperty("selected")) {
+    
+                oActiveItem.cfg.setProperty("selected", false);
+    
+            }
+    
+            var oSubmenu = oActiveItem.cfg.getProperty("submenu");
+    
+            if(oSubmenu && oSubmenu.cfg.getProperty("visible")) {
+    
+                oSubmenu.hide();
+    
+            }
+    
+        }
+
+    };
+
+/**
+* "configchange" Custom Event handler for a submenu.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oSubmenu The submenu that subscribed
+* to the event.
+*/
+YAHOO.widget.MenuModule.prototype._onParentMenuModuleConfigChange = 
+
+    function(p_sType, p_aArgs, p_oSubmenu) {
+    
+        var sPropertyName = p_aArgs[0][0];
+        var oPropertyValue = p_aArgs[0][1];
+    
+        switch(sPropertyName) {
+    
+            case "iframe":
+            case "constraintoviewport":
+    
+                p_oSubmenu.cfg.setProperty(sPropertyName, oPropertyValue);
+                    
+            break;        
+            
+        }
+    
+    };
+
+/**
+* "render" Custom Event handler for a MenuModule instance.  Renders a  
+* submenu in response to the firing of it's parent's "render" event.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oSubmenu The submenu that subscribed
+* to the event.
+*/
+YAHOO.widget.MenuModule.prototype._onParentMenuModuleRender = 
+
+    function(p_sType, p_aArgs, p_oSubmenu) {
+
+        /*
+            Set the "iframe" and "constraintoviewport" configuration 
+            properties to match the parent MenuModule
+        */ 
+    
+        var oParentMenu = p_oSubmenu.parent.parent;
+    
+        p_oSubmenu.cfg.applyConfig(
+        
+            {
+                constraintoviewport: 
+                    oParentMenu.cfg.getProperty("constraintoviewport"),
+    
+                xy: [0,0],
+    
+                iframe: oParentMenu.cfg.getProperty("iframe")
+    
+            }
+        
+        );
+    
+    
+        if(this._oDom.inDocument(this.element)) {
+    
+            this.render();
+    
+        }
+        else {
+    
+            this.render(this.parent.element);
+    
+        }
+    
+    };
+
+/**
+* "beforeshow" Custom Event handler for a submenu.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oSubmenu The submenu that fired
+* the event.
+*/
+YAHOO.widget.MenuModule.prototype._onSubmenuBeforeShow = 
+
+    function(p_sType, p_aArgs, p_oSubmenu) {
+    
+        var oParent = this.parent;
+        var aAlignment = oParent.parent.cfg.getProperty("submenualignment");
+
+        this.cfg.setProperty(
+            "context", 
+            [
+                oParent.element, 
+                aAlignment[0], 
+                aAlignment[1]
+            ]
+        );
+
+        oParent.submenuIndicator.alt = 
+            oParent.EXPANDED_SUBMENU_INDICATOR_ALT_TEXT;
+    
+    };
+
+/**
+* "show" Custom Event handler for a submenu.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oSubmenu The submenu that fired
+* the event.
+*/
+YAHOO.widget.MenuModule.prototype._onSubmenuShow = 
+
+    function(p_sType, p_aArgs, p_oSubmenu) {
+    
+        var oParent = this.parent;
+
+        oParent.submenuIndicator.alt = 
+            oParent.EXPANDED_SUBMENU_INDICATOR_ALT_TEXT;
+    
+    };
+
+/**
+* "hide" Custom Event handler for a submenu.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oSubmenu The submenu that fired
+* the event.
+*/
+YAHOO.widget.MenuModule.prototype._onSubmenuHide = 
+
+    function(p_sType, p_aArgs, p_oSubmenu) {
+    
+        var oParent = this.parent;
+
+        if(oParent.parent.cfg.getProperty("visible")) {
+
+            oParent.cfg.setProperty("selected", false);
+    
+            oParent.focus();
+        
+        }
+
+        oParent.submenuIndicator.alt = 
+            oParent.COLLAPSED_SUBMENU_INDICATOR_ALT_TEXT;
+    
+    };
+
+/**
+* "focus" YAHOO.util.CustomEvent handler for a MenuModule instance's items.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {Array} p_aObjects Array containing the current MenuModule instance 
+* and the item that fired the event.
+*/
+YAHOO.widget.MenuModule.prototype._onItemFocus = 
+
+    function(p_sType, p_aArgs, p_aObjects) {
+    
+        var me = p_aObjects[0];
+        var oItem = p_aObjects[1];
+    
+        me.activeItem = oItem;
+    
+    };
+
+/**
+* "blur" YAHOO.util.CustomEvent handler for a MenuModule instance's items.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {Array} p_aObjects Array containing the current MenuModule instance 
+* and the item that fired the event.
+*/
+YAHOO.widget.MenuModule.prototype._onItemBlur = 
+
+    function(p_sType, p_aArgs, p_aObjects) {
+    
+        var me = p_aObjects[0];
+        var oItem = p_aObjects[1];
+        var oSubmenu = oItem.cfg.getProperty("submenu");
+    
+        if(!oSubmenu || (oSubmenu && !oSubmenu.cfg.getProperty("visible"))) {
+    
+            me.activeItem = null;
+    
+        }
+    
+    };
+
+/**
+* "configchange" YAHOO.util.CustomEvent handler for the MenuModule 
+* instance's items.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the 
+* event was fired.
+* @param {Array} p_aObjects Array containing the current MenuModule instance 
+* and the item that fired the event.
+*/
+YAHOO.widget.MenuModule.prototype._onItemConfigChange = 
+
+    function(p_sType, p_aArgs, p_aObjects) {
+
+        var me = p_aObjects[0];    
+        var sProperty = p_aArgs[0][0];
+        var oItem = p_aObjects[1];
+    
+        switch(sProperty) {
+    
+            case "submenu":
+    
+                var oSubmenu = p_aArgs[0][1];
+    
+                if(oSubmenu) {
+    
+                    me._configureItemSubmenuModule(oItem);
+    
+                }
+    
+            break;
+    
+            case "text":
+            case "helptext":
+    
+                /*
+                    A change to an item's "text" or "helptext"
+                    configuration properties requires the width of the parent
+                    MenuModule instance to be recalculated.
+                */
+    
+                if(me.element.style.width) {
+        
+                    var sWidth = me._getOffsetWidth() + "px";
+    
+                    me._oDom.setStyle(me.element, "width", sWidth);
+    
+                }
+    
+            break;
+    
+        }
+    
+    };
+
+/**
+* The default event handler executed when the moveEvent is fired, if the 
+* "constraintoviewport" configuration property is set to true.
+*/
+YAHOO.widget.MenuModule.prototype.enforceConstraints = 
+
+    function(type, args, obj) {
+
+        var Dom = this._oDom;
+        var oConfig = this.cfg;
+    
+        var pos = args[0];
+            
+        var x = pos[0];
+        var y = pos[1];
+        
+        var bod = document.getElementsByTagName('body')[0];
+        var htm = document.getElementsByTagName('html')[0];
+        
+        var bodyOverflow = Dom.getStyle(bod, "overflow");
+        var htmOverflow = Dom.getStyle(htm, "overflow");
+        
+        var offsetHeight = this.element.offsetHeight;
+        var offsetWidth = this.element.offsetWidth;
+        
+        var viewPortWidth = Dom.getClientWidth();
+        var viewPortHeight = Dom.getClientHeight();
+        
+        var scrollX = window.scrollX || document.body.scrollLeft;
+        var scrollY = window.scrollY || document.body.scrollTop;
+        
+        var topConstraint = scrollY + 10;
+        var leftConstraint = scrollX + 10;
+        var bottomConstraint = scrollY + viewPortHeight - offsetHeight - 10;
+        var rightConstraint = scrollX + viewPortWidth - offsetWidth - 10;
+        
+        var aContext = oConfig.getProperty("context");
+        var oContextElement = aContext ? aContext[0] : null;
+    
+    
+        if (x < 10) {
+    
+            x = leftConstraint;
+    
+        } else if ((x + offsetWidth) > viewPortWidth) {
+    
+            if(
+                oContextElement && 
+                ((x - oContextElement.offsetWidth) > offsetWidth)
+            ) {
+    
+                x = (x - (oContextElement.offsetWidth + offsetWidth));
+    
+            }
+            else {
+    
+                x = rightConstraint;
+    
+            }
+    
+        }
+    
+        if (y < 10) {
+    
+            y = topConstraint;
+    
+        } else if (y > bottomConstraint) {
+    
+            if(oContextElement && (y > offsetHeight)) {
+    
+                y = ((y + oContextElement.offsetHeight) - offsetHeight);
+    
+            }
+            else {
+    
+                y = bottomConstraint;
+    
+            }
+    
+        }
+    
+        oConfig.setProperty("x", x, true);
+        oConfig.setProperty("y", y, true);
+    
+    };
+
+// Event handlers for configuration properties
+
+/**
+* Event handler for when the "position" configuration property of a
+* MenuModule changes.
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance fired
+* the event.
+* @see YAHOO.widget.Overlay#configIframe
+*/
+YAHOO.widget.MenuModule.prototype.configPosition = 
+
+    function(p_sType, p_aArgs, p_oMenuModule) {
+
+        var sCSSPosition = p_aArgs[0] == "static" ? "static" : "absolute";
+    
+        this._oDom.setStyle(this.element, "position", sCSSPosition);
+    
+    };
+
+// Public methods
+
+YAHOO.widget.MenuModule.prototype.toString = function() {
+
+    return ("Menu " + this.id);
+
+};
+
+/**
+* Sets the title of a group of items.
+* @param {String} p_sGroupTitle The title of the group.
+* @param {Number} p_nGroupIndex Optional. Number indicating the group to which
+* the title belongs.
+*/
+YAHOO.widget.MenuModule.prototype.setItemGroupTitle = 
+
+    function(p_sGroupTitle, p_nGroupIndex) {
+        
+        if(typeof p_sGroupTitle == "string" && p_sGroupTitle.length > 0) {
+    
+            var Dom = this._oDom;
+
+            var nGroupIndex = 
+                    typeof p_nGroupIndex == "number" ? p_nGroupIndex : 0;
+    
+            var oTitle = this._aGroupTitleElements[nGroupIndex];
+    
+    
+            if(oTitle) {
+    
+                oTitle.innerHTML = p_sGroupTitle;
+                
+            }
+            else {
+    
+                oTitle = document.createElement(this.GROUP_TITLE_TAG_NAME);
+                        
+                oTitle.innerHTML = p_sGroupTitle;
+    
+                this._aGroupTitleElements[nGroupIndex] = oTitle;
+    
+            }
+    
+    
+            var i = this._aGroupTitleElements.length - 1;
+            var nFirstIndex;
+    
+            do {
+    
+                if(this._aGroupTitleElements[i]) {
+    
+                    Dom.removeClass(
+                        this._aGroupTitleElements[i],
+                        "first-of-type"
+                    );
+
+                    nFirstIndex = i;
+    
+                }
+    
+            }
+            while(i--);
+    
+    
+            if(nFirstIndex !== null) {
+    
+                Dom.addClass(
+                    this._aGroupTitleElements[nFirstIndex], 
+                    "first-of-type"
+                );
+    
+            }
+    
+        }
+    
+    };
+
+/**
+* Appends the specified item to a MenuModule instance.
+* @param {YAHOO.widget.MenuModuleItem} p_oItem The item to be added.
+* @param {Number} p_nGroupIndex Optional. Number indicating the group to which
+* the item belongs.
+* @return The item that was added to the MenuModule.
+* @type YAHOO.widget.MenuModuleItem
+*/
+YAHOO.widget.MenuModule.prototype.addItem = function(p_oItem, p_nGroupIndex) {
+
+    if(p_oItem) {
+
+        return this._addItemToGroup(p_nGroupIndex, p_oItem);
+        
+    }
+
+};
+
+/**
+* Inserts an item into a MenuModule instance at the specified index.
+* @param {YAHOO.widget.MenuModuleItem} p_oItem The item to be inserted.
+* @param {Number} p_nItemIndex Number indicating the ordinal position 
+* at which the item should be added.
+* @param {Number} p_nGroupIndex Optional. Number indicating the group to which
+* the item belongs.
+* @return The item that was inserted into the MenuModule.
+* @type YAHOO.widget.MenuModuleItem
+*/
+YAHOO.widget.MenuModule.prototype.insertItem = 
+
+    function(p_oItem, p_nItemIndex, p_nGroupIndex) {
+    
+        if(p_oItem) {
+    
+            return this._addItemToGroup(p_nGroupIndex, p_oItem, p_nItemIndex);
+    
+        }
+    
+    };
+
+/**
+* Removes the specified item from a MenuModule instance.
+* @param {YAHOO.widget.MenuModuleItem/Number} p_oObject The item or index of 
+* the item to be removed.
+* @param {Number} p_nGroupIndex Optional. Number indicating the group to which
+* the item belongs.
+* @return The item that was removed from the MenuModule.
+* @type YAHOO.widget.MenuModuleItem
+*/
+YAHOO.widget.MenuModule.prototype.removeItem =
+
+    function(p_oObject, p_nGroupIndex) {
+    
+        if(typeof p_oObject != "undefined") {
+    
+            var oItem;
+    
+            if(p_oObject instanceof YAHOO.widget.MenuModuleItem) {
+    
+                oItem = 
+                    this._removeItemFromGroupByValue(p_nGroupIndex, 
p_oObject);           
+    
+            }
+            else if(typeof p_oObject == "number") {
+    
+                oItem = 
+                    this._removeItemFromGroupByIndex(p_nGroupIndex, p_oObject);
+    
+            }
+    
+            if(oItem) {
+    
+                oItem.destroy();
+
+    
+                return oItem;
+    
+            }
+    
+        }
+    
+    };
+
+/**
+* Returns a multi-dimensional array of all of a MenuModule's items.
+* @return An array of items.
+* @type Array
+*/        
+YAHOO.widget.MenuModule.prototype.getItemGroups = function() {
+
+    return this._aItemGroups;
+
+};
+
+/**
+* Returns the item at the specified index.
+* @param {Number} p_nItemIndex Number indicating the ordinal position of the 
+* item to be retrieved.
+* @param {Number} p_nGroupIndex Optional. Number indicating the group to which
+* the item belongs.
+* @return An item.
+* @type YAHOO.widget.MenuModuleItem
+*/
+YAHOO.widget.MenuModule.prototype.getItem = 
+
+    function(p_nItemIndex, p_nGroupIndex) {
+    
+        if(typeof p_nItemIndex == "number") {
+    
+            var aGroup = this._getItemGroup(p_nGroupIndex);
+    
+            if(aGroup) {
+    
+                return aGroup[p_nItemIndex];
+            
+            }
+    
+        }
+    
+    };
+
+/**
+* Removes the MenuModule instance's element from the DOM and sets all child 
+* elements to null.
+*/
+YAHOO.widget.MenuModule.prototype.destroy = function() {
+
+    // Remove DOM event handlers
+
+    this._oEventUtil.purgeElement(this.element);
+
+    // Remove Custom Event listeners
+
+    this.mouseOverEvent.unsubscribeAll();
+    this.mouseOutEvent.unsubscribeAll();
+    this.mouseDownEvent.unsubscribeAll();
+    this.mouseUpEvent.unsubscribeAll();
+    this.clickEvent.unsubscribeAll();
+    this.keyPressEvent.unsubscribeAll();
+    this.keyDownEvent.unsubscribeAll();
+    this.keyUpEvent.unsubscribeAll();
+    this.beforeMoveEvent.unsubscribeAll();
+
+    var nItemGroups = this._aItemGroups.length;
+    var nItems;
+    var oItemGroup;
+    var oItem;
+    var i;
+    var n;
+
+    // Remove all items
+
+    if(nItemGroups > 0) {
+
+        i = nItemGroups - 1;
+
+        do {
+
+            oItemGroup = this._aItemGroups[i];
+
+            if(oItemGroup) {
+
+                nItems = oItemGroup.length;
+    
+                if(nItems > 0) {
+    
+                    n = nItems - 1;
+        
+                    do {
+
+                        oItem = this._aItemGroups[i][n];
+
+                        if(oItem) {
+        
+                            oItem.destroy();
+                        }
+        
+                    }
+                    while(n--);
+    
+                }
+
+            }
+
+        }
+        while(i--);
+
+    }        
+
+    // Continue with the superclass implementation of this method
+
+    YAHOO.widget.MenuModule.superclass.destroy.call(this);
+    
+
+};
+
+/**
+* Sets focus to a MenuModule instance's first enabled item.
+*/
+YAHOO.widget.MenuModule.prototype.setInitialFocus = function() {
+
+    var oItem = this._getFirstEnabledItem();
+    
+    if(oItem) {
+    
+        oItem.focus();
+    }
+    
+};
+
+/**
+* Sets the "selected" configuration property of a MenuModule instance's first
+* enabled item to "true."
+*/
+YAHOO.widget.MenuModule.prototype.setInitialSelection = function() {
+
+    var oItem = this._getFirstEnabledItem();
+    
+    if(oItem) {
+    
+        oItem.cfg.setProperty("selected", true);
+    }        
+
+};
+
+/**
+* Sets the "selected" configuration property of a MenuModule instance's active 
+* item to "false," blurs the item and hide's the item's submenu.
+*/
+YAHOO.widget.MenuModule.prototype.clearActiveItem = function () {
+
+    if(this.activeItem) {
+
+        var oConfig = this.activeItem.cfg;
+
+        oConfig.setProperty("selected", false);
+
+        var oSubmenu = oConfig.getProperty("submenu");
+
+        if(oSubmenu) {
+
+            oSubmenu.hide();
+
+        }
+
+    }
+
+};
+
+/**
+* Initializes the class's configurable properties which can be changed using 
+* the MenuModule's Config object (cfg).
+*/
+YAHOO.widget.MenuModule.prototype.initDefaultConfig = function() {
+
+    YAHOO.widget.MenuModule.superclass.initDefaultConfig.call(this);
+
+    var oConfig = this.cfg;
+
+       // Add configuration properties
+
+    oConfig.addProperty(
+        "position", 
+        {
+            value: "dynamic", 
+            handler: this.configPosition, 
+            validator: this._checkPosition 
+        } 
+    );
+
+    oConfig.refireEvent("position");
+
+    oConfig.addProperty("submenualignment", { value: ["tl","tr"] } );
+
+};
+
+/**
+* @class The MenuModuleItem class allows you to create and modify an item for a
+* MenuModule instance.
+* @constructor
+* @param {String or HTMLElement} p_oObject String or HTMLElement 
+* (either HTMLLIElement, HTMLOptGroupElement or HTMLOptionElement) of the 
+* source HTMLElement node.
+* @param {Object} p_oConfig The configuration object literal containing 
+* the configuration for a MenuModuleItem instance. See the configuration 
+* class documentation for more details.
+*/
+YAHOO.widget.MenuModuleItem = function(p_oObject, p_oConfig) {
+
+    if(p_oObject) {
+
+        this.init(p_oObject, p_oConfig);
+
+    }
+
+};
+
+YAHOO.widget.MenuModuleItem.prototype = {
+
+    // Constants
+
+    /**
+    * Constant representing the path to the image to be used for the submenu
+    * arrow indicator.
+    * @final
+    * @type String
+    */
+    SUBMENU_INDICATOR_IMAGE_PATH: "nt/ic/ut/alt1/menuarorght8_nrm_1.gif",
+
+    /**
+    * Constant representing the path to the image to be used for the submenu
+    * arrow indicator when a MenuModuleItem instance is selected.
+    * @final
+    * @type String
+    */
+    SELECTED_SUBMENU_INDICATOR_IMAGE_PATH: 
+        "nt/ic/ut/alt1/menuarorght8_hov_1.gif",
+
+    /**
+    * Constant representing the path to the image to be used for the submenu
+    * arrow indicator when a MenuModuleItem instance is disabled.
+    * @final
+    * @type String
+    */
+    DISABLED_SUBMENU_INDICATOR_IMAGE_PATH: 
+        "nt/ic/ut/alt1/menuarorght8_dim_1.gif",
+
+    /**
+    * Constant representing the alt text for the image to be used for the 
+    * submenu arrow indicator.
+    * @final
+    * @type String
+    */
+    COLLAPSED_SUBMENU_INDICATOR_ALT_TEXT: "Collapsed.  Click to expand.",
+
+    /**
+    * Constant representing the alt text for the image to be used for the 
+    * submenu arrow indicator when the submenu is visible.
+    * @final
+    * @type String
+    */
+    EXPANDED_SUBMENU_INDICATOR_ALT_TEXT: "Expanded.  Click to collapse.",
+
+    /**
+    * Constant representing the alt text for the image to be used for the 
+    * submenu arrow indicator when a MenuModuleItem instance is disabled.
+    * @final
+    * @type String
+    */
+    DISABLED_SUBMENU_INDICATOR_ALT_TEXT: "Disabled.",
+
+    /**
+    * Constant representing the CSS class(es) to be applied to the root 
+    * HTMLLIElement of the MenuModuleItem.
+    * @final
+    * @type String
+    */
+    CSS_CLASS_NAME: "yuimenuitem",
+
+    /**
+    * Constant representing the type of menu to instantiate when creating 
+    * submenu instances from parsing the child nodes (either HTMLSelectElement 
+    * or HTMLDivElement) of the item's DOM.  The default 
+    * is YAHOO.widget.MenuModule.
+    * @final
+    * @type YAHOO.widget.MenuModule
+    */
+    SUBMENU_TYPE: null,
+
+    /**
+    * Constant representing the type of item to instantiate when 
+    * creating item instances from parsing the child nodes (either 
+    * HTMLLIElement, HTMLOptGroupElement or HTMLOptionElement) of the 
+    * submenu's DOM.  
+    * The default is YAHOO.widget.MenuModuleItem.
+    * @final
+    * @type YAHOO.widget.MenuModuleItem
+    */
+    SUBMENU_ITEM_TYPE: null,
+
+    /**
+    * Constant representing the prefix path to use for non-secure images
+    * @type string
+    */
+    IMG_ROOT: "http://us.i1.yimg.com/us.yimg.com/i/";,
+    
+
+    /**
+    * Constant representing the prefix path to use for securely served images
+    * @type string
+    */
+    IMG_ROOT_SSL: "https://a248.e.akamai.net/sec.yimg.com/i/";,
+
+    // Private member variables
+    
+    /**
+    * Reference to the HTMLAnchorElement of the MenuModuleItem's core internal
+    * DOM structure.
+    * @private
+    * @type {HTMLAnchorElement}
+    */
+    _oAnchor: null,
+    
+
+    /**
+    * Reference to the text node of the MenuModuleItem's core internal
+    * DOM structure.
+    * @private
+    * @type {Text}
+    */
+    _oText: null,
+    
+    
+    /**
+    * Reference to the HTMLElement (&#60;EM&#60;) used to create the optional
+    * help text for a MenuModuleItem instance.
+    * @private
+    * @type {HTMLElement}
+    */
+    _oHelpTextEM: null,
+    
+    
+    /**
+    * Reference to the submenu for a MenuModuleItem instance.
+    * @private
+    * @type {YAHOO.widget.MenuModule}
+    */
+    _oSubmenu: null,
+    
+    
+    /**
+    * Reference to the Dom utility singleton.
+    * @private
+    * @type {YAHOO.util.Dom}
+    */
+    _oDom: YAHOO.util.Dom,
+
+    // Public properties
+
+       /**
+       * The class's constructor function
+       * @type YAHOO.widget.MenuModuleItem
+       */
+       constructor: YAHOO.widget.MenuModuleItem,
+
+       /**
+       * The string representing the image root
+       * @type string
+       */
+       imageRoot: null,
+
+       /**
+       * Boolean representing whether or not the current browsing context 
+       * is secure (https)
+       * @type boolean
+       */
+       isSecure: YAHOO.widget.Module.prototype.isSecure,
+
+    /**
+    * Returns the ordinal position of a MenuModuleItem instance in a group.
+    * @type Number
+    */
+    index: null,
+
+    /**
+    * Returns the index of the group to which a MenuModuleItem instance 
belongs.
+    * @type Number
+    */
+    groupIndex: null,
+
+    /**
+    * Returns the parent object for a MenuModuleItem instance.
+    * @type {YAHOO.widget.MenuModule}
+    */
+    parent: null,
+
+    /**
+    * Returns the HTMLLIElement for a MenuModuleItem instance.
+    * @type {HTMLLIElement}
+    */
+    element: null,
+
+    /**
+    * Returns the HTMLElement (either HTMLLIElement, HTMLOptGroupElement or
+    * HTMLOptionElement) used create the MenuModuleItem instance.
+    * @type {HTMLLIElement/HTMLOptGroupElement/HTMLOptionElement}
+    */
+    srcElement: null,
+
+    /**
+    * Specifies an arbitrary value for a MenuModuleItem instance.
+    * @type {Object}
+    */
+    value: null,
+
+    /**
+    * Reference to the HTMLImageElement used to create the submenu
+    * indicator for a MenuModuleItem instance.
+    * @type {HTMLImageElement}
+    */
+    submenuIndicator: null,
+
+       /**
+       * String representing the browser
+       * @type string
+       */
+       browser: YAHOO.widget.Module.prototype.browser,
+
+    // Events
+
+    /**
+    * Fires when a MenuModuleItem instances's HTMLLIElement is removed from
+    * it's parent HTMLUListElement node.
+    * @type {YAHOO.util.CustomEvent}
+    * @see YAHOO.util.CustomEvent
+    */
+    destroyEvent: null,
+
+    /**
+    * Fires when the mouse has entered a MenuModuleItem instance.  Passes
+    * back the DOM Event object as an argument.
+    * @type {YAHOO.util.CustomEvent}
+    * @see YAHOO.util.CustomEvent
+    */
+    mouseOverEvent: null,
+
+    /**
+    * Fires when the mouse has left a MenuModuleItem instance.  Passes back  
+    * the DOM Event object as an argument.
+    * @type {YAHOO.util.CustomEvent}
+    * @see YAHOO.util.CustomEvent
+    */
+    mouseOutEvent: null,
+
+    /**
+    * Fires when the user mouses down on a MenuModuleItem instance.  Passes 
+    * back the DOM Event object as an argument.
+    * @type {YAHOO.util.CustomEvent}
+    * @see YAHOO.util.CustomEvent
+    */
+    mouseDownEvent: null,
+
+    /**
+    * Fires when the user releases a mouse button while the mouse is 
+    * over a MenuModuleItem instance.  Passes back the DOM Event object as
+    * an argument.
+    * @type {YAHOO.util.CustomEvent}
+    * @see YAHOO.util.CustomEvent
+    */
+    mouseUpEvent: null,
+
+    /**
+    * Fires when the user clicks the on a MenuModuleItem instance.  Passes 
+    * back the DOM Event object as an argument.
+    * @type {YAHOO.util.CustomEvent}
+    * @see YAHOO.util.CustomEvent
+    */
+    clickEvent: null,
+
+    /**
+    * Fires when the user presses an alphanumeric key.  Passes back the 
+    * DOM Event object as an argument.
+    * @type {YAHOO.util.CustomEvent}
+    * @see YAHOO.util.CustomEvent
+    */
+    keyPressEvent: null,
+
+    /**
+    * Fires when the user presses a key.  Passes back the DOM Event 
+    * object as an argument.
+    * @type {YAHOO.util.CustomEvent}
+    * @see YAHOO.util.CustomEvent
+    */
+    keyDownEvent: null,
+
+    /**
+    * Fires when the user releases a key.  Passes back the DOM Event 
+    * object as an argument.
+    * @type {YAHOO.util.CustomEvent}
+    * @see YAHOO.util.CustomEvent
+    */
+    keyUpEvent: null,
+
+    /**
+    * Fires when a MenuModuleItem instance receives focus.
+    * @type {YAHOO.util.CustomEvent}
+    * @see YAHOO.util.CustomEvent
+    */
+    focusEvent: null,
+
+    /**
+    * Fires when a MenuModuleItem instance loses the input focus.
+    * @type {YAHOO.util.CustomEvent}
+    * @see YAHOO.util.CustomEvent
+    */
+    blurEvent: null,
+
+    /**
+    * The MenuModuleItem class's initialization method. This method is 
+    * automatically called by the constructor, and sets up all DOM references 
+    * for pre-existing markup, and creates required markup if it is not
+    * already present.
+    * @param {String or HTMLElement} p_oObject String or HTMLElement 
+    * (either HTMLLIElement, HTMLOptGroupElement or HTMLOptionElement) of the 
+    * source HTMLElement node.
+    * @param {Object} p_oConfig The configuration object literal containing 
+    * the configuration for a MenuModuleItem instance. See the configuration 
+    * class documentation for more details.
+    */
+    init: function(p_oObject, p_oConfig) {
+
+        this.imageRoot = (this.isSecure) ? this.IMG_ROOT_SSL : this.IMG_ROOT;
+
+        if(!this.SUBMENU_TYPE) {
+    
+            this.SUBMENU_TYPE = YAHOO.widget.MenuModule;
+    
+        }
+
+        if(!this.SUBMENU_ITEM_TYPE) {
+    
+            this.SUBMENU_ITEM_TYPE = YAHOO.widget.MenuModuleItem;
+    
+        }
+
+        // Create the config object
+
+        this.cfg = new YAHOO.util.Config(this);
+
+        this.initDefaultConfig();
+
+        var oConfig = this.cfg;
+
+        if(this._checkString(p_oObject)) {
+
+            this._createRootNodeStructure();
+
+            oConfig.setProperty("text", p_oObject);
+
+        }
+        else if(this._checkDOMNode(p_oObject)) {
+
+            switch(p_oObject.tagName) {
+
+                case "OPTION":
+
+                    this._createRootNodeStructure();
+
+                    oConfig.setProperty("text", p_oObject.text);
+
+                    this.srcElement = p_oObject;
+
+                break;
+
+                case "OPTGROUP":
+
+                    this._createRootNodeStructure();
+
+                    oConfig.setProperty("text", p_oObject.label);
+
+                    this.srcElement = p_oObject;
+
+                    this._initSubTree();
+
+                break;
+
+                case "LI":
+
+                    // Get the anchor node (if it exists)
+
+                    var oAnchor = this._getFirstElement(p_oObject, "A");
+                    var sURL = "#";
+                    var sText = null;
+
+                    // Capture the "text" and/or the "URL"
+
+                    if(oAnchor) {
+
+                        sURL = oAnchor.getAttribute("href");
+
+                        if(oAnchor.innerText) {
+                
+                            sText = oAnchor.innerText;
+                
+                        }
+                        else {
+                
+                            var oRange = oAnchor.ownerDocument.createRange();
+                
+                            oRange.selectNodeContents(oAnchor);
+                
+                            sText = oRange.toString();             
+                
+                        }
+
+                    }
+                    else {
+
+                        var oText = p_oObject.firstChild;
+
+                        sText = oText.nodeValue;
+
+                        oAnchor = document.createElement("a");
+                        
+                        oAnchor.setAttribute("href", sURL);
+
+                        p_oObject.replaceChild(oAnchor, oText);
+                        
+                        oAnchor.appendChild(oText);
+
+                    }
+
+                    this.srcElement = p_oObject;
+                    this.element = p_oObject;
+                    this._oAnchor = oAnchor;
+    
+
+                    // Check if emphasis has been applied to the MenuModuleItem
+
+                    var oEmphasisNode = this._getFirstElement(oAnchor);
+                    var bEmphasis = false;
+                    var bStrongEmphasis = false;
+
+                    if(oEmphasisNode) {
+
+                        // Set a reference to the text node 
+
+                        this._oText = oEmphasisNode.firstChild;
+
+                        switch(oEmphasisNode.tagName) {
+
+                            case "EM":
+
+                                bEmphasis = true;
+
+                            break;
+
+                            case "STRONG":
+
+                                bStrongEmphasis = true;
+
+                            break;
+
+                        }
+
+                    }
+                    else {
+
+                        // Set a reference to the text node 
+
+                        this._oText = oAnchor.firstChild;
+
+                    }
+
+                    /*
+                        Set these properties silently to sync up the 
+                        configuration object without making changes to the 
+                        element's DOM
+                    */ 
+
+                    oConfig.setProperty("text", sText, true);
+                    oConfig.setProperty("url", sURL, true);
+                    oConfig.setProperty("emphasis", bEmphasis, true);
+                    oConfig.setProperty(
+                        "strongemphasis", 
+                        bStrongEmphasis, 
+                        true
+                    );
+
+                    this._initSubTree();
+
+                break;
+
+            }            
+
+        }
+
+        if(this.element) {
+
+            this._oDom.addClass(this.element, this.CSS_CLASS_NAME);
+
+            // Create custom events
+    
+            var CustomEvent = YAHOO.util.CustomEvent;
+    
+            this.destroyEvent = new CustomEvent("destroyEvent", this);
+            this.mouseOverEvent = new CustomEvent("mouseOverEvent", this);
+            this.mouseOutEvent = new CustomEvent("mouseOutEvent", this);
+            this.mouseDownEvent = new CustomEvent("mouseDownEvent", this);
+            this.mouseUpEvent = new CustomEvent("mouseUpEvent", this);
+            this.clickEvent = new CustomEvent("clickEvent", this);
+            this.keyPressEvent = new CustomEvent("keyPressEvent", this);
+            this.keyDownEvent = new CustomEvent("keyDownEvent", this);
+            this.keyUpEvent = new CustomEvent("keyUpEvent", this);
+            this.focusEvent = new CustomEvent("focusEvent", this);
+            this.blurEvent = new CustomEvent("blurEvent", this);
+
+            if(p_oConfig) {
+    
+                oConfig.applyConfig(p_oConfig);
+    
+            }        
+
+            oConfig.fireQueue();
+
+        }
+
+    },
+
+    // Private methods
+
+    /**
+    * Returns an HTMLElement's first HTMLElement node
+    * @private
+    * @param {HTMLElement} p_oElement The element to be evaluated.
+    * @param {String} p_sTagName Optional. The tagname of the element.
+    * @return Returns an HTMLElement node.
+    * @type Boolean
+    */
+    _getFirstElement: function(p_oElement, p_sTagName) {
+
+        var oElement;
+
+        if(p_oElement.firstChild && p_oElement.firstChild.nodeType == 1) {
+
+            oElement = p_oElement.firstChild;
+
+        }
+        else if(
+            p_oElement.firstChild && 
+            p_oElement.firstChild.nextSibling && 
+            p_oElement.firstChild.nextSibling.nodeType == 1
+        ) {
+
+            oElement = p_oElement.firstChild.nextSibling;
+
+        }
+
+        if(p_sTagName) {
+
+            return (oElement && oElement.tagName == p_sTagName) ? 
+                oElement : false;
+
+        }
+
+        return oElement;
+
+    },
+
+    /**
+    * Determines if an object is a string
+    * @private
+    * @param {Object} p_oObject The object to be evaluated.
+    * @return Returns true if the object is a string.
+    * @type Boolean
+    */
+    _checkString: function(p_oObject) {
+
+        return (typeof p_oObject == "string");
+
+    },
+
+    /**
+    * Determines if an object is an HTMLElement.
+    * @private
+    * @param {Object} p_oObject The object to be evaluated.
+    * @return Returns true if the object is an HTMLElement.
+    * @type Boolean
+    */
+    _checkDOMNode: function(p_oObject) {
+
+        return (p_oObject && p_oObject.tagName);
+
+    },
+
+    /**
+    * Creates the core DOM structure for a MenuModuleItem instance.
+    * @private
+    */
+    _createRootNodeStructure: function () {
+
+        this.element = document.createElement("li");
+
+        this._oText = document.createTextNode("");
+
+        this._oAnchor = document.createElement("a");
+        this._oAnchor.appendChild(this._oText);
+        
+        this.cfg.refireEvent("url");
+
+        this.element.appendChild(this._oAnchor);            
+
+    },
+
+    /**
+    * Iterates the source element's childNodes collection and uses the  
+    * child nodes to instantiate other menus.
+    * @private
+    */
+    _initSubTree: function() {
+
+        var Menu = this.SUBMENU_TYPE;
+        var MenuModuleItem = this.SUBMENU_ITEM_TYPE;
+        var oSrcEl = this.srcElement;
+        var oConfig = this.cfg;
+
+        if(oSrcEl.childNodes.length > 0) {
+
+            var oNode = oSrcEl.firstChild;
+            var aOptions = [];
+
+            do {
+
+                switch(oNode.tagName) {
+        
+                    case "DIV":
+        
+                        oConfig.setProperty("submenu", (new Menu(oNode)));
+        
+                    break;
+ 
+                    case "OPTION":
+
+                        aOptions[aOptions.length] = oNode;
+
+                    break;
+       
+                }
+            
+            }        
+            while((oNode = oNode.nextSibling));
+
+            var nOptions = aOptions.length;
+
+            if(nOptions > 0) {
+    
+                oConfig.setProperty(
+                    "submenu", 
+                    (new Menu(this._oDom.generateId()))
+                );
+    
+                for(var n=0; n<nOptions; n++) {
+    
+                    this._oSubmenu.addItem((new MenuModuleItem(aOptions[n])));
+    
+                }
+    
+            }
+
+        }
+
+    },
+
+    // Event handlers for configuration properties
+
+    /**
+    * Event handler for when the "text" configuration property of
+    * a MenuModuleItem instance changes. 
+    * @param {String} p_sType The name of the event that was fired.
+    * @param {Array} p_aArgs Collection of arguments sent when the 
+    * event was fired.
+    * @param {YAHOO.widget.MenuModuleItem} p_oItem The MenuModuleItem instance 
+    * that fired the event.
+    */
+    configText: function(p_sType, p_aArgs, p_oItem) {
+
+        var sText = p_aArgs[0];
+
+        if(this._oText) {
+
+            this._oText.nodeValue = sText;
+
+        }
+
+    },
+
+    /**
+    * Event handler for when the "helptext" configuration property of
+    * a MenuModuleItem instance changes. 
+    * @param {String} p_sType The name of the event that was fired.
+    * @param {Array} p_aArgs Collection of arguments sent when the 
+    * event was fired.
+    * @param {YAHOO.widget.MenuModuleItem} p_oItem The MenuModuleItem instance 
+    * that fired the event.
+    */    
+    configHelpText: function(p_sType, p_aArgs, p_oItem) {
+
+        var me = this;
+        var Dom = this._oDom;
+        var oHelpText = p_aArgs[0];
+        var oEl = this.element;
+        var oConfig = this.cfg;
+        var aNodes = [oEl, this._oAnchor];
+        var oImg = this.submenuIndicator;
+
+        /**
+        * Adds the "hashelptext" class to the necessary nodes and refires the 
+        * "selected" and "disabled" configuration events
+        * @ignore
+        */
+        function initHelpText() {
+
+            Dom.addClass(aNodes, "hashelptext");
+
+            if(oConfig.getProperty("disabled")) {
+
+                oConfig.refireEvent("disabled");
+
+            }
+
+            if(oConfig.getProperty("selected")) {
+
+                oConfig.refireEvent("selected");
+
+            }                
+
+        }
+
+        /**
+        * Removes the "hashelptext" class and corresponding DOM element (EM)
+        * @ignore
+        */
+        function removeHelpText() {
+
+            Dom.removeClass(aNodes, "hashelptext");
+
+            oEl.removeChild(me._oHelpTextEM);
+            me._oHelpTextEM = null;
+
+        }
+
+        if(this._checkDOMNode(oHelpText)) {
+
+            if(this._oHelpTextEM) {
+
+                this._oHelpTextEM.parentNode.replaceChild(
+                    oHelpText, 
+                    this._oHelpTextEM
+                );
+
+            }
+            else {
+
+                this._oHelpTextEM = oHelpText;
+
+                oEl.insertBefore(this._oHelpTextEM, oImg);
+
+            }
+
+            initHelpText();
+
+        }
+        else if(this._checkString(oHelpText)) {
+
+            if(oHelpText.length === 0) {
+
+                removeHelpText();
+
+            }
+            else {
+
+                if(!this._oHelpTextEM) {
+
+                    this._oHelpTextEM = document.createElement("em");
+
+                    oEl.insertBefore(this._oHelpTextEM, oImg);
+
+                }
+
+                this._oHelpTextEM.innerHTML = oHelpText;
+
+                initHelpText();
+
+            }
+
+        }
+        else if(!oHelpText && this._oHelpTextEM) {
+
+            removeHelpText();
+
+        }
+
+    },
+
+    /**
+    * Event handler for when the "url" configuration property of
+    * a MenuModuleItem instance changes.  
+    * @param {String} p_sType The name of the event that was fired.
+    * @param {Array} p_aArgs Collection of arguments sent when the 
+    * event was fired.
+    * @param {YAHOO.widget.MenuModuleItem} p_oItem The MenuModuleItem instance 
+    * that fired the event.
+    */    
+    configURL: function(p_sType, p_aArgs, p_oItem) {
+
+        var sURL = p_aArgs[0];
+
+        if(!sURL) {
+
+            sURL = "#";
+
+        }
+
+        this._oAnchor.setAttribute("href", sURL);
+
+    },
+
+    /**
+    * Event handler for when the "emphasis" configuration property of
+    * a MenuModuleItem instance changes.  
+    * @param {String} p_sType The name of the event that was fired.
+    * @param {Array} p_aArgs Collection of arguments sent when the 
+    * event was fired.
+    * @param {YAHOO.widget.MenuModuleItem} p_oItem The MenuModuleItem instance 
+    * that fired the event.
+    */    
+    configEmphasis: function(p_sType, p_aArgs, p_oItem) {
+
+        var bEmphasis = p_aArgs[0];
+        var oAnchor = this._oAnchor;
+        var oText = this._oText;
+        var oConfig = this.cfg;
+        var oEM;
+
+        if(bEmphasis && oConfig.getProperty("strongemphasis")) {
+
+            oConfig.setProperty("strongemphasis", false);
+
+        }
+
+        if(oAnchor) {
+
+            if(bEmphasis) {
+
+                oEM = document.createElement("em");
+                oEM.appendChild(oText);
+
+                oAnchor.appendChild(oEM);
+
+            }
+            else {
+
+                oEM = this._getFirstElement(oAnchor, "EM");
+
+                oAnchor.removeChild(oEM);
+                oAnchor.appendChild(oText);
+
+            }
+
+        }
+
+    },
+
+    /**
+    * Event handler for when the "strongemphasis" configuration property of
+    * a MenuModuleItem instance changes. 
+    * @param {String} p_sType The name of the event that was fired.
+    * @param {Array} p_aArgs Collection of arguments sent when the 
+    * event was fired.
+    * @param {YAHOO.widget.MenuModuleItem} p_oItem The MenuModuleItem instance 
+    * that fired the event.
+    */    
+    configStrongEmphasis: function(p_sType, p_aArgs, p_oItem) {
+
+        var bStrongEmphasis = p_aArgs[0];
+        var oAnchor = this._oAnchor;
+        var oText = this._oText;
+        var oConfig = this.cfg;
+        var oStrong;
+
+        if(bStrongEmphasis && oConfig.getProperty("emphasis")) {
+
+            oConfig.setProperty("emphasis", false);
+
+        }
+
+        if(oAnchor) {
+
+            if(bStrongEmphasis) {
+
+                oStrong = document.createElement("strong");
+                oStrong.appendChild(oText);
+
+                oAnchor.appendChild(oStrong);
+
+            }
+            else {
+
+                oStrong = this._getFirstElement(oAnchor, "STRONG");
+
+                oAnchor.removeChild(oStrong);
+                oAnchor.appendChild(oText);
+
+            }
+
+        }
+
+    },
+
+    /**
+    * Event handler for when the "disabled" configuration property of
+    * a MenuModuleItem instance changes. 
+    * @param {String} p_sType The name of the event that was fired.
+    * @param {Array} p_aArgs Collection of arguments sent when the 
+    * event was fired.
+    * @param {YAHOO.widget.MenuModuleItem} p_oItem The MenuModuleItem instance 
+    * that fired the event.
+    */    
+    configDisabled: function(p_sType, p_aArgs, p_oItem) {
+
+        var bDisabled = p_aArgs[0];
+        var Dom = this._oDom;
+        var oAnchor = this._oAnchor;
+        var aNodes = [this.element, oAnchor];
+        var oEM = this._oHelpTextEM;
+        var oConfig = this.cfg;
+        var oImg = this.submenuIndicator;
+        var sImageSrc;
+        var sImageAlt;
+
+        if(oEM) {
+
+            aNodes[2] = oEM;
+
+        }
+
+        if(bDisabled) {
+
+            if(oConfig.getProperty("selected")) {
+
+                oConfig.setProperty("selected", false);
+
+            }
+
+            oAnchor.removeAttribute("href");
+
+            Dom.addClass(aNodes, "disabled");
+
+            sImageSrc = this.DISABLED_SUBMENU_INDICATOR_IMAGE_PATH;
+            sImageAlt = this.DISABLED_SUBMENU_INDICATOR_ALT_TEXT;
+
+        }
+        else {
+
+            oAnchor.setAttribute("href", oConfig.getProperty("url"));
+
+            Dom.removeClass(aNodes, "disabled");
+
+            sImageSrc = this.SUBMENU_INDICATOR_IMAGE_PATH;
+            sImageAlt = this.COLLAPSED_SUBMENU_INDICATOR_ALT_TEXT;
+
+        }
+
+        if(oImg) {
+
+            oImg.src = this.imageRoot + sImageSrc;
+            oImg.alt = sImageAlt;
+
+        }
+
+    },
+
+    /**
+    * Event handler for when the "selected" configuration property of
+    * a MenuModuleItem instance changes. 
+    * @param {String} p_sType The name of the event that was fired.
+    * @param {Array} p_aArgs Collection of arguments sent when the 
+    * event was fired.
+    * @param {YAHOO.widget.MenuModuleItem} p_oItem The MenuModuleItem instance 
+    * that fired the event.
+    */    
+    configSelected: function(p_sType, p_aArgs, p_oItem) {
+
+        if(!this.cfg.getProperty("disabled")) {
+
+            var Dom = this._oDom;
+            var bSelected = p_aArgs[0];
+            var oEM = this._oHelpTextEM;
+            var aNodes = [this.element, this._oAnchor];
+            var oImg = this.submenuIndicator;
+            var sImageSrc;
+
+            if(oEM) {
+    
+                aNodes[2] = oEM;  
+    
+            }
+    
+            if(bSelected) {
+    
+                Dom.addClass(aNodes, "selected");
+                sImageSrc = this.SELECTED_SUBMENU_INDICATOR_IMAGE_PATH;
+    
+            }
+            else {
+    
+                Dom.removeClass(aNodes, "selected");
+                sImageSrc = this.SUBMENU_INDICATOR_IMAGE_PATH;
+    
+            }
+    
+            if(oImg) {
+    
+                oImg.src = document.images[(this.imageRoot + sImageSrc)].src;
+
+            }
+
+        }
+
+    },
+
+    /**
+    * Event handler for when the "submenu" configuration property of
+    * a MenuModuleItem instance changes. 
+    * @param {String} p_sType The name of the event that was fired.
+    * @param {Array} p_aArgs Collection of arguments sent when the 
+    * event was fired.
+    * @param {YAHOO.widget.MenuModuleItem} p_oItem The MenuModuleItem instance 
+    * that fired the event.
+    */
+    configSubmenu: function(p_sType, p_aArgs, p_oItem) {
+
+        var Dom = this._oDom;
+        var oEl = this.element;
+        var oSubmenu = p_aArgs[0];
+        var oImg = this.submenuIndicator;
+        var oConfig = this.cfg;
+        var aNodes = [this.element, this._oAnchor];
+
+        if(oSubmenu) {
+
+            // Set the submenu's parent to this MenuModuleItem instance
+
+            oSubmenu.parent = this;
+
+            this._oSubmenu = oSubmenu;
+
+            if(!oImg) { 
+
+                var me = this;
+
+                function preloadImage(p_sPath) {
+
+                    var sPath = me.imageRoot + p_sPath;
+
+                    if(!document.images[sPath]) {
+
+                        var oImg = document.createElement("img");
+                        oImg.src = sPath;
+                        oImg.name = sPath;
+                        oImg.id = sPath;
+                        oImg.style.display = "none";
+                        
+                        document.body.appendChild(oImg);
+
+                    }
+                
+                }
+
+                preloadImage(this.SUBMENU_INDICATOR_IMAGE_PATH);
+                preloadImage(this.SELECTED_SUBMENU_INDICATOR_IMAGE_PATH);
+                preloadImage(this.DISABLED_SUBMENU_INDICATOR_IMAGE_PATH);
+
+                oImg = document.createElement("img");
+                oImg.src = (this.imageRoot + 
this.SUBMENU_INDICATOR_IMAGE_PATH);
+                oImg.alt = this.COLLAPSED_SUBMENU_INDICATOR_ALT_TEXT;
+
+                oEl.appendChild(oImg);
+
+                this.submenuIndicator = oImg;
+
+                Dom.addClass(aNodes, "hassubmenu");
+
+                if(oConfig.getProperty("disabled")) {
+
+                    oConfig.refireEvent("disabled");
+
+                }
+
+                if(oConfig.getProperty("selected")) {
+
+                    oConfig.refireEvent("selected");
+
+                }                
+
+            }
+
+        }
+        else {
+
+            Dom.removeClass(aNodes, "hassubmenu");
+
+            if(oImg) {
+
+                oEl.removeChild(oImg);
+
+            }
+
+            if(this._oSubmenu) {
+
+                this._oSubmenu.destroy();
+
+            }
+
+        }
+
+    },
+
+    // Public methods
+
+       /**
+       * Initializes an item's configurable properties.
+       */
+       initDefaultConfig : function() {
+
+        var oConfig = this.cfg;
+        var CheckBoolean = oConfig.checkBoolean;
+
+        // Define the config properties
+
+        oConfig.addProperty(
+            "text", 
+            { 
+                value: "", 
+                handler: this.configText, 
+                validator: this._checkString, 
+                suppressEvent: true 
+            }
+        );
+        
+        oConfig.addProperty("helptext", { handler: this.configHelpText });
+        
+        oConfig.addProperty(
+            "url", 
+            { value: "#", handler: this.configURL, suppressEvent: true }
+        );
+        
+        oConfig.addProperty(
+            "emphasis", 
+            { 
+                value: false, 
+                handler: this.configEmphasis, 
+                validator: CheckBoolean, 
+                suppressEvent: true 
+            }
+        );
+
+        oConfig.addProperty(
+            "strongemphasis",
+            {
+                value: false,
+                handler: this.configStrongEmphasis,
+                validator: CheckBoolean,
+                suppressEvent: true
+            }
+        );
+
+        oConfig.addProperty(
+            "disabled",
+            {
+                value: false,
+                handler: this.configDisabled,
+                validator: CheckBoolean,
+                suppressEvent: true
+            }
+        );
+
+        oConfig.addProperty(
+            "selected",
+            {
+                value: false,
+                handler: this.configSelected,
+                validator: CheckBoolean,
+                suppressEvent: true
+            }
+        );
+
+        oConfig.addProperty("submenu", { handler: this.configSubmenu });
+
+       },
+
+    /**
+    * Finds the next enabled MenuModuleItem instance in a MenuModule instance 
+    * @return Returns a MenuModuleItem instance.
+    * @type YAHOO.widget.MenuModuleItem
+    */
+    getNextEnabledSibling: function() {
+
+        if(this.parent instanceof YAHOO.widget.MenuModule) {
+
+            var nGroupIndex = this.groupIndex;
+
+            /**
+            * Returns the next item in an array 
+            * @param {p_aArray} An array
+            * @param {p_nStartIndex} The index to start searching the array 
+            * @ignore
+            * @return Returns an item in an array
+            * @type Object 
+            */
+            function getNextArrayItem(p_aArray, p_nStartIndex) {
+    
+                return p_aArray[p_nStartIndex] || 
+                    getNextArrayItem(p_aArray, (p_nStartIndex+1));
+    
+            }
+    
+    
+            var aItemGroups = this.parent.getItemGroups();
+            var oNextItem;
+    
+    
+            if(this.index < (aItemGroups[nGroupIndex].length - 1)) {
+    
+                oNextItem = getNextArrayItem(
+                        aItemGroups[nGroupIndex], 
+                        (this.index+1)
+                    );
+    
+            }
+            else {
+    
+                var nNextGroupIndex;
+    
+                if(nGroupIndex < (aItemGroups.length - 1)) {
+    
+                    nNextGroupIndex = nGroupIndex + 1;
+    
+                }
+                else {
+    
+                    nNextGroupIndex = 0;
+    
+                }
+    
+                var aNextGroup = getNextArrayItem(aItemGroups, 
nNextGroupIndex);
+    
+                // Retrieve the first MenuModuleItem instance in the next group
+    
+                oNextItem = getNextArrayItem(aNextGroup, 0);
+    
+            }
+    
+            return oNextItem.cfg.getProperty("disabled") ? 
+                        oNextItem.getNextEnabledSibling() : oNextItem;
+
+        }
+
+    },
+
+    /**
+    * Finds the previous enabled MenuModuleItem instance in a 
+    * MenuModule instance 
+    * @return Returns a MenuModuleItem instance.
+    * @type YAHOO.widget.MenuModuleItem
+    */
+    getPreviousEnabledSibling: function() {
+
+        if(this.parent instanceof YAHOO.widget.MenuModule) {
+
+            var nGroupIndex = this.groupIndex;
+
+            /**
+            * Returns the previous item in an array 
+            * @param {p_aArray} An array
+            * @param {p_nStartIndex} The index to start searching the array 
+            * @ignore
+            * @return Returns an item in an array
+            * @type Object 
+            */
+            function getPreviousArrayItem(p_aArray, p_nStartIndex) {
+    
+                return p_aArray[p_nStartIndex] || 
+                    getPreviousArrayItem(p_aArray, (p_nStartIndex-1));
+    
+            }
+
+            /**
+            * Get the index of the first item in an array 
+            * @param {p_aArray} An array
+            * @param {p_nStartIndex} The index to start searching the array 
+            * @ignore
+            * @return Returns an item in an array
+            * @type Object 
+            */    
+            function getFirstItemIndex(p_aArray, p_nStartIndex) {
+    
+                return p_aArray[p_nStartIndex] ? 
+                    p_nStartIndex : 
+                    getFirstItemIndex(p_aArray, (p_nStartIndex+1));
+    
+            }
+    
+            var aItemGroups = this.parent.getItemGroups();
+            var oPreviousItem;
+    
+            if(
+                this.index > getFirstItemIndex(aItemGroups[nGroupIndex], 0)
+            ) {
+    
+                oPreviousItem = 
+                    getPreviousArrayItem(
+                        aItemGroups[nGroupIndex], 
+                        (this.index-1)
+                    );
+    
+            }
+            else {
+    
+                var nPreviousGroupIndex;
+    
+                if(nGroupIndex > getFirstItemIndex(aItemGroups, 0)) {
+    
+                    nPreviousGroupIndex = nGroupIndex - 1;
+    
+                }
+                else {
+    
+                    nPreviousGroupIndex = aItemGroups.length - 1;
+    
+                }
+    
+                var aPreviousGroup = 
+                        getPreviousArrayItem(aItemGroups, nPreviousGroupIndex);
+    
+                oPreviousItem = 
+                    getPreviousArrayItem(
+                        aPreviousGroup, 
+                        (aPreviousGroup.length - 1)
+                    );
+    
+            }
+    
+            return oPreviousItem.cfg.getProperty("disabled") ? 
+                    oPreviousItem.getPreviousEnabledSibling() : oPreviousItem;
+
+        }
+
+    },
+
+    /**
+    * Causes a MenuModuleItem instance to receive the focus and fires the
+    * focus event.
+    */
+    focus: function() {
+
+        var oParent = this.parent;
+        var oAnchor = this._oAnchor;
+        var oActiveItem = oParent.activeItem;
+
+        if(
+            !this.cfg.getProperty("disabled") && 
+            oParent && 
+            oParent.cfg.getProperty("visible")
+        ) {
+
+            if(oActiveItem) {
+
+                oActiveItem.blur();
+
+            }
+
+            oAnchor.focus();
+
+            /*
+                Opera 8.5 doesn't always focus the anchor if a MenuModuleItem
+                instance has a submenu, this is fixed by calling "focus"
+                twice.
+            */
+            if(oParent && this.browser == "opera" && this._oSubmenu) {
+
+                oAnchor.focus();
+
+            }
+
+            this.focusEvent.fire();
+
+        }
+
+    },
+
+    /**
+    * Causes a MenuModuleItem instance to lose focus and fires the onblur 
event.
+    */    
+    blur: function() {
+
+        var oParent = this.parent;
+
+        if(
+            !this.cfg.getProperty("disabled") && 
+            oParent && 
+            this._oDom.getStyle(oParent.element, "visibility") == "visible"
+        ) {
+
+            this._oAnchor.blur();
+
+            this.blurEvent.fire();
+
+        }
+
+    },
+
+       /**
+       * Removes a MenuModuleItem instance's HTMLLIElement from it's parent
+    * HTMLUListElement node.
+       */
+    destroy: function() {
+
+        var oEl = this.element;
+
+        if(oEl) {
+
+            // Remove CustomEvent listeners
+    
+            this.mouseOverEvent.unsubscribeAll();
+            this.mouseOutEvent.unsubscribeAll();
+            this.mouseDownEvent.unsubscribeAll();
+            this.mouseUpEvent.unsubscribeAll();
+            this.clickEvent.unsubscribeAll();
+            this.keyPressEvent.unsubscribeAll();
+            this.keyDownEvent.unsubscribeAll();
+            this.keyUpEvent.unsubscribeAll();
+            this.focusEvent.unsubscribeAll();
+            this.blurEvent.unsubscribeAll();
+            this.cfg.configChangedEvent.unsubscribeAll();
+
+            // Remove the element from the parent node
+
+            var oParentNode = oEl.parentNode;
+
+            if(oParentNode) {
+
+                oParentNode.removeChild(oEl);
+
+                this.destroyEvent.fire();
+
+            }
+
+            this.destroyEvent.unsubscribeAll();
+
+        }
+
+    }
+
+};
+
+/**
+* @class Extends YAHOO.widget.MenuModule to provide a set of default mouse and 
+* key event behaviors.
+* @constructor
+* @extends YAHOO.widget.MenuModule
+* @base YAHOO.widget.MenuModule
+* @param {String or HTMLElement} p_oElement String id or HTMLElement 
+* (either HTMLSelectElement or HTMLDivElement) of the source HTMLElement node.
+* @param {Object} p_oConfig Optional. The configuration object literal 
+* containing the configuration for a Menu instance. See 
+* configuration class documentation for more details.
+*/
+YAHOO.widget.Menu = function(p_oElement, p_oConfig) {
+
+    YAHOO.widget.Menu.superclass.constructor.call(
+            this, 
+            p_oElement,
+            p_oConfig
+        );
+
+};
+
+YAHOO.extend(YAHOO.widget.Menu, YAHOO.widget.MenuModule);
+
+/**
+* The Menu class's initialization method. This method is automatically 
+* called by the constructor, and sets up all DOM references for pre-existing 
+* markup, and creates required markup if it is not already present.
+* @param {String or HTMLElement} p_oElement String id or HTMLElement 
+* (either HTMLSelectElement or HTMLDivElement) of the source HTMLElement node.
+* @param {Object} p_oConfig Optional. The configuration object literal 
+* containing the configuration for a Menu instance. See 
+* configuration class documentation for more details.
+*/
+YAHOO.widget.Menu.prototype.init = function(p_oElement, p_oConfig) {
+
+    if(!this.ITEM_TYPE) {
+
+        this.ITEM_TYPE = YAHOO.widget.MenuItem;
+
+    }
+
+    // Call the init of the superclass (YAHOO.widget.Menu)
+
+    YAHOO.widget.Menu.superclass.init.call(this, p_oElement);
+
+    this.beforeInitEvent.fire(YAHOO.widget.Menu);
+
+    // Add event handlers
+
+    this.showEvent.subscribe(this._onMenuShow, this, true);
+    this.mouseOverEvent.subscribe(this._onMenuMouseOver, this, true);
+    this.keyDownEvent.subscribe(this._onMenuKeyDown, this, true);
+
+    if(p_oConfig) {
+
+        this.cfg.applyConfig(p_oConfig, true);
+
+    }
+    
+    this.initEvent.fire(YAHOO.widget.Menu);
+
+};
+
+// Private event handlers
+
+/**
+* "show" Custom Event handler for a menu.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.Menu} p_oMenu The menu that fired the event.
+*/
+YAHOO.widget.Menu.prototype._onMenuShow = 
+
+    function(p_sType, p_aArgs, p_oMenu) {
+
+        var oParent = this.parent;
+
+        if(oParent && oParent.parent instanceof YAHOO.widget.Menu) {
+
+            var aAlignment = 
oParent.parent.cfg.getProperty("submenualignment");
+    
+            this.cfg.setProperty(
+                "submenualignment", 
+                [ aAlignment[0], aAlignment[1] ]
+            );
+        
+        }
+
+    };
+
+/**
+* "mouseover" Custom Event handler for a Menu instance.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.Menu} p_oMenu The Menu instance that fired the event.
+*/
+YAHOO.widget.Menu.prototype._onMenuMouseOver = 
+
+    function(p_sType, p_aArgs, p_oMenu) {
+    
+        /*
+            If the menu is a submenu, then select the menu's parent
+            MenuItem instance
+        */
+    
+        if(this.parent) {
+    
+            this.parent.cfg.setProperty("selected", true);
+    
+        }
+    
+    };
+
+/**
+* "mouseover" Custom Event handler for a Menu instance.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.Menu} p_oMenu The Menu instance that fired the event.
+*/
+YAHOO.widget.Menu.prototype._onMenuKeyDown = 
+
+    function(p_sType, p_aArgs, p_oMenu) {
+    
+        if(this.cfg.getProperty("position") == "dynamic") {
+    
+            var oDOMEvent = p_aArgs[0];
+            var oParent = this.parent;
+        
+            if(oDOMEvent.keyCode == 27) { // Esc key
+        
+                this.hide();
+        
+                // Set focus to the parent MenuItem if one exists
+        
+                if(oParent) {
+        
+                    oParent.focus();
+
+                    if(oParent.parent instanceof YAHOO.widget.Menu) {
+
+                        oParent.cfg.setProperty("selected", true);
+        
+                    }
+
+                    YAHOO.util.Event.preventDefault(oDOMEvent);
+        
+                }
+            
+            }
+        
+        }
+    
+    };
+    
+
+// Public event handlers
+
+/**
+* Event handler fired when the resize monitor element is resized.
+*/
+YAHOO.widget.Menu.prototype.onDomResize = function(e, obj) {
+
+    if(!this._handleResize) {
+    
+        this._handleResize = true;
+        return;
+    
+    }
+
+
+    var me = this;
+    var oConfig = this.cfg;
+
+    if(oConfig.getProperty("position") == "dynamic") {
+
+        oConfig.setProperty("width", (this._getOffsetWidth() + "px"));
+        
+        if(this.parent && oConfig.getProperty("visible")) {
+
+            function align() {
+
+                me.align();
+            
+            }
+
+            window.setTimeout(align, 0);
+            
+        }
+
+    }
+
+    YAHOO.widget.Menu.superclass.onDomResize.call(this, e, obj);
+
+};    
+
+/**
+* @class The MenuItem class allows you to create and modify an item for a
+* Menu instance.  MenuItem extends YAHOO.widget.MenuModuleItem to provide a 
+* set of default mouse and key event behaviors.
+* @constructor
+* @extends YAHOO.widget.MenuModuleItem
+* @base YAHOO.widget.MenuModuleItem
+* @param {String or HTMLElement} p_oObject String or HTMLElement 
+* (either HTMLLIElement, HTMLOptGroupElement or HTMLOptionElement) of the 
+* source HTMLElement node.
+* @param {Object} p_oConfig The configuration object literal containing 
+* the configuration for a MenuItem instance. See the configuration 
+* class documentation for more details.
+*/
+YAHOO.widget.MenuItem = function(p_oObject, p_oConfig) {
+
+    YAHOO.widget.MenuItem.superclass.constructor.call(
+        this, 
+        p_oObject, 
+        p_oConfig
+    );
+
+};
+
+YAHOO.extend(YAHOO.widget.MenuItem, YAHOO.widget.MenuModuleItem);
+
+/**
+* The MenuItem class's initialization method. This method is automatically
+* called by the constructor, and sets up all DOM references for
+* pre-existing markup, and creates required markup if it is not
+* already present.
+* @param {String or HTMLElement} p_oObject String or HTMLElement 
+* (either HTMLLIElement, HTMLOptGroupElement or HTMLOptionElement) of the 
+* source HTMLElement node.
+* @param {Object} p_oConfig The configuration object literal containing 
+* the configuration for a MenuItem instance. See the configuration 
+* class documentation for more details.
+*/
+YAHOO.widget.MenuItem.prototype.init = function(p_oObject, p_oConfig) {
+
+    if(!this.SUBMENU_TYPE) {
+
+        this.SUBMENU_TYPE = YAHOO.widget.Menu;
+
+    }
+
+    if(!this.SUBMENU_ITEM_TYPE) {
+
+        this.SUBMENU_ITEM_TYPE = YAHOO.widget.MenuItem;
+
+    }
+
+    /* 
+        Call the init of the superclass (YAHOO.widget.MenuModuleItem)
+        Note: We don't pass the user config in here yet 
+        because we only want it executed once, at the lowest 
+        subclass level.
+    */ 
+
+    YAHOO.widget.MenuItem.superclass.init.call(this, p_oObject);  
+
+    // Add event handlers to each "MenuItem" instance
+
+    this.keyDownEvent.subscribe(this._onKeyDown, this, true);
+    this.mouseOverEvent.subscribe(this._onMouseOver, this, true);
+    this.mouseOutEvent.subscribe(this._onMouseOut, this, true);
+
+    var oConfig = this.cfg;
+
+    if(p_oConfig) {
+
+        oConfig.applyConfig(p_oConfig, true);
+
+    }
+
+    oConfig.fireQueue();
+
+};
+
+// Constants
+
+/**
+* Constant representing the path to the image to be used for the checked state.
+* @final
+* @type String
+*/
+YAHOO.widget.MenuItem.prototype.CHECKED_IMAGE_PATH = 
+    "nt/ic/ut/bsc/menuchk8_nrm_1.gif";
+
+/**
+* Constant representing the path to the image to be used for the selected 
+* checked state.
+* @final
+* @type String
+*/
+YAHOO.widget.MenuItem.prototype.SELECTED_CHECKED_IMAGE_PATH = 
+    "nt/ic/ut/bsc/menuchk8_hov_1.gif";
+
+/**
+* Constant representing the path to the image to be used for the disabled 
+* checked state.
+* @final
+* @type String
+*/
+YAHOO.widget.MenuItem.prototype.DISABLED_CHECKED_IMAGE_PATH = 
+    "nt/ic/ut/bsc/menuchk8_dim_1.gif";
+
+/**
+* Constant representing the alt text for the image to be used for the 
+* checked image.
+* @final
+* @type String
+*/
+YAHOO.widget.MenuItem.prototype.CHECKED_IMAGE_ALT_TEXT = "Checked.";
+
+/**
+* Constant representing the alt text for the image to be used for the 
+* checked image when the item is disabled.
+* @final
+* @type String
+*/
+YAHOO.widget.MenuItem.prototype.DISABLED_CHECKED_IMAGE_ALT_TEXT = 
+    "Checked. (Item disabled.)";
+
+// Private properties
+
+/**
+* Reference to the HTMLImageElement used to create the checked
+* indicator for a MenuItem instance.
+* @private
+* @type {HTMLImageElement}
+*/
+YAHOO.widget.MenuItem.prototype._checkImage = null;
+
+// Private event handlers
+
+/**
+* "keydown" Custom Event handler for a MenuItem instance.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance that 
+* fired the event.
+*/
+YAHOO.widget.MenuItem.prototype._onKeyDown = 
+
+    function(p_sType, p_aArgs, p_oMenuItem) {
+
+        var Event = YAHOO.util.Event;
+        var oDOMEvent = p_aArgs[0];
+        var oParent = this.parent;
+        var oConfig = this.cfg;
+        var oMenuItem;
+    
+
+        switch(oDOMEvent.keyCode) {
+    
+            case 38:    // Up arrow
+            case 40:    // Down arrow
+    
+                if(
+                    this == oParent.activeItem && 
+                    !oConfig.getProperty("selected")
+                ) {
+    
+                    oConfig.setProperty("selected", true);
+    
+                }
+                else {
+    
+                    var oNextItem = (oDOMEvent.keyCode == 38) ? 
+                            this.getPreviousEnabledSibling() : 
+                            this.getNextEnabledSibling();
+            
+                    if(oNextItem) {
+
+                        oParent.clearActiveItem();
+
+                        oNextItem.cfg.setProperty("selected", true);
+            
+                        oNextItem.focus();
+    
+                    }
+    
+                }
+    
+                Event.preventDefault(oDOMEvent);
+
+            break;
+            
+    
+            case 39:    // Right arrow
+
+                oParent.clearActiveItem();
+
+                oConfig.setProperty("selected", true);
+                
+                this.focus();
+
+                var oSubmenu = oConfig.getProperty("submenu");
+    
+                if(oSubmenu) {
+
+                    oSubmenu.show();
+                    oSubmenu.setInitialSelection();                    
+    
+                }
+                else if(
+                    YAHOO.widget.MenuBarItem && 
+                    oParent.parent && 
+                    oParent.parent instanceof YAHOO.widget.MenuBarItem
+                ) {
+
+                    oParent.hide();
+    
+                    // Set focus to the parent MenuItem if one exists
+    
+                    oMenuItem = oParent.parent;
+    
+                    if(oMenuItem) {
+    
+                        oMenuItem.focus();
+                        oMenuItem.cfg.setProperty("selected", true);
+    
+                    }                    
+                
+                }
+    
+                Event.preventDefault(oDOMEvent);
+
+            break;
+    
+    
+            case 37:    // Left arrow
+    
+                // Only hide if this this is a MenuItem of a submenu
+    
+                if(oParent.parent) {
+    
+                    oParent.hide();
+    
+                    // Set focus to the parent MenuItem if one exists
+    
+                    oMenuItem = oParent.parent;
+    
+                    if(oMenuItem) {
+    
+                        oMenuItem.focus();
+                        oMenuItem.cfg.setProperty("selected", true);
+    
+                    }
+    
+                }
+
+                Event.preventDefault(oDOMEvent);
+    
+            break;        
+    
+        }
+    
+    };
+
+/**
+* "mouseover" Custom Event handler for a MenuItem instance.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance that 
+* fired the event.
+*/
+YAHOO.widget.MenuItem.prototype._onMouseOver = 
+
+    function(p_sType, p_aArgs, p_oMenuItem) {
+
+        var oParent = this.parent;
+        var oConfig = this.cfg;
+        var oActiveItem = oParent.activeItem;
+    
+    
+        // Hide any other submenus that might be visible
+    
+        if(oActiveItem && oActiveItem != this) {
+    
+            oParent.clearActiveItem();
+    
+        }
+    
+    
+        // Select and focus the current MenuItem instance
+    
+        oConfig.setProperty("selected", true);
+        this.focus();
+    
+    
+        // Show the submenu for this instance
+    
+        var oSubmenu = oConfig.getProperty("submenu");
+    
+        if(oSubmenu) {
+    
+            oSubmenu.show();
+    
+        }
+    
+    };
+
+/**
+* "mouseout" Custom Event handler for a MenuItem instance.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance that 
+* fired the event.
+*/
+YAHOO.widget.MenuItem.prototype._onMouseOut = 
+
+    function(p_sType, p_aArgs, p_oMenuItem) {
+    
+        var oConfig = this.cfg;
+        var oSubmenu = oConfig.getProperty("submenu");
+
+        oConfig.setProperty("selected", false);
+    
+        if(oSubmenu) {
+    
+            var oDOMEvent = p_aArgs[0];
+            var oRelatedTarget = YAHOO.util.Event.getRelatedTarget(oDOMEvent);
+    
+            if(
+                !(
+                    oRelatedTarget == oSubmenu.element || 
+                    YAHOO.util.Dom.isAncestor(oSubmenu.element, oRelatedTarget)
+                )
+            ) {
+    
+                oSubmenu.hide();
+    
+            }
+    
+        }
+    
+    };
+
+// Event handlers for configuration properties
+
+/**
+* Event handler for when the "checked" configuration property of
+* a MenuItem instance changes. 
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the 
+* event was fired.
+* @param {YAHOO.widget.MenuItem} p_oItem The MenuItem instance 
+* that fired the event.
+*/    
+YAHOO.widget.MenuItem.prototype.configChecked =
+
+    function(p_sType, p_aArgs, p_oItem) {
+    
+        var Dom = YAHOO.util.Dom;
+        var bChecked = p_aArgs[0];
+        var oEl = this.element;
+        var oConfig = this.cfg;
+        var oImg;
+        
+
+        if(bChecked) {
+
+            var me = this;
+
+            function preloadImage(p_sPath) {
+
+                var sPath = me.imageRoot + p_sPath;
+
+                if(!document.images[sPath]) {
+
+                    var oImg = document.createElement("img");
+                    oImg.src = sPath;
+                    oImg.name = sPath;
+                    oImg.id = sPath;
+                    oImg.style.display = "none";
+                    
+                    document.body.appendChild(oImg);
+
+                }
+            
+            }
+
+            preloadImage(this.CHECKED_IMAGE_PATH);
+            preloadImage(this.SELECTED_CHECKED_IMAGE_PATH);
+            preloadImage(this.DISABLED_CHECKED_IMAGE_PATH);
+
+            oImg = document.createElement("img");
+            oImg.src = (this.imageRoot + this.CHECKED_IMAGE_PATH);
+            oImg.alt = this.CHECKED_IMAGE_ALT_TEXT;
+
+            var oSubmenu = this.cfg.getProperty("submenu");
+
+            if(oSubmenu) {
+
+                oEl.insertBefore(oImg, oSubmenu.element);
+
+            }
+            else {
+
+                oEl.appendChild(oImg);            
+
+            }
+
+            Dom.addClass([oEl, oImg], "checked");
+
+            this._checkImage = oImg;
+
+            if(oConfig.getProperty("disabled")) {
+
+                oConfig.refireEvent("disabled");
+
+            }
+
+            if(oConfig.getProperty("selected")) {
+
+                oConfig.refireEvent("selected");
+
+            }
+        
+        }
+        else {
+
+            oImg = this._checkImage;
+
+            Dom.removeClass([oEl, oImg], "checked");
+
+            if(oImg) {
+
+                oEl.removeChild(oImg);
+
+            }
+
+            this._checkImage = null;
+        
+        }
+
+    };
+    
+
+/**
+* Event handler for when the "selected" configuration property of
+* a MenuItem instance changes. 
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the 
+* event was fired.
+* @param {YAHOO.widget.MenuItem} p_oItem The MenuItem instance 
+* that fired the event.
+*/    
+YAHOO.widget.MenuItem.prototype.configSelected = 
+
+    function(p_sType, p_aArgs, p_oItem) {
+
+        YAHOO.widget.MenuItem.superclass.configSelected.call(
+                this, p_sType, p_aArgs, p_oItem
+            );        
+    
+        var oConfig = this.cfg;
+
+        if(!oConfig.getProperty("disabled") && oConfig.getProperty("checked")) 
{
+
+            var bSelected = p_aArgs[0];
+
+            var sSrc = this.imageRoot + (bSelected ? 
+                this.SELECTED_CHECKED_IMAGE_PATH : this.CHECKED_IMAGE_PATH);
+
+            this._checkImage.src = document.images[sSrc].src;
+            
+        }            
+    
+    };
+
+/**
+* Event handler for when the "disabled" configuration property of
+* a MenuItem instance changes. 
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the 
+* event was fired.
+* @param {YAHOO.widget.MenuItem} p_oItem The MenuItem instance 
+* that fired the event.
+*/    
+YAHOO.widget.MenuItem.prototype.configDisabled = 
+
+    function(p_sType, p_aArgs, p_oItem) {
+    
+        YAHOO.widget.MenuItem.superclass.configDisabled.call(
+                this, p_sType, p_aArgs, p_oItem
+            );        
+    
+        if(this.cfg.getProperty("checked")) {
+    
+            var bDisabled = p_aArgs[0];
+            var sAlt = this.CHECKED_IMAGE_ALT_TEXT;
+            var sSrc = this.CHECKED_IMAGE_PATH;
+            var oImg = this._checkImage;
+            
+            if(bDisabled) {
+    
+                sAlt = this.DISABLED_CHECKED_IMAGE_ALT_TEXT;
+                sSrc = this.DISABLED_CHECKED_IMAGE_PATH;
+            
+            }
+
+            oImg.src = document.images[(this.imageRoot + sSrc)].src;
+            oImg.alt = sAlt;
+            
+        }    
+            
+    };
+
+// Public methods
+    
+/**
+* Initializes the class's configurable properties which can be changed using 
+* the MenuModule's Config object (cfg).
+*/
+YAHOO.widget.MenuItem.prototype.initDefaultConfig = function() {
+
+    YAHOO.widget.MenuItem.superclass.initDefaultConfig.call(this);
+
+       // Add configuration properties
+
+    this.cfg.addProperty(
+        "checked", 
+        {
+            value: false, 
+            handler: this.configChecked, 
+            validator: this.cfg.checkBoolean, 
+            suppressEvent: true 
+        } 
+    );
+
+};
+
+/**
+* @class Creates a list of options which vary depending on the context in 
+* which the menu is invoked.
+* @constructor
+* @extends YAHOO.widget.Menu
+* @base YAHOO.widget.Menu
+* @param {String or HTMLElement} p_oElement String id or HTMLElement 
+* (either HTMLSelectElement or HTMLDivElement) of the source HTMLElement node.
+* @param {Object} p_oConfig Optional. The configuration object literal 
+* containing the configuration for a ContextMenu instance. See 
+* configuration class documentation for more details.
+*/
+YAHOO.widget.ContextMenu = function(p_oElement, p_oConfig) {
+
+    YAHOO.widget.ContextMenu.superclass.constructor.call(
+            this, 
+            p_oElement,
+            p_oConfig
+        );
+
+};
+
+YAHOO.extend(YAHOO.widget.ContextMenu, YAHOO.widget.Menu);
+
+YAHOO.widget.ContextMenu.prototype._oTrigger = null;
+
+/**
+* The ContextMenu class's initialization method. This method is automatically  
+* called by the constructor, and sets up all DOM references for pre-existing 
+* markup, and creates required markup if it is not already present.
+* @param {String or HTMLElement} p_oElement String id or HTMLElement 
+* (either HTMLSelectElement or HTMLDivElement) of the source HTMLElement node.
+* @param {Object} p_oConfig Optional. The configuration object literal 
+* containing the configuration for a ContextMenu instance. See 
+* configuration class documentation for more details.
+*/
+YAHOO.widget.ContextMenu.prototype.init = function(p_oElement, p_oConfig) {
+
+    if(!this.ITEM_TYPE) {
+
+        this.ITEM_TYPE = YAHOO.widget.ContextMenuItem;
+
+    }
+
+    // Call the init of the superclass (YAHOO.widget.Menu)
+
+    YAHOO.widget.ContextMenu.superclass.init.call(this, p_oElement);
+
+    this.beforeInitEvent.fire(YAHOO.widget.ContextMenu);
+
+    if(p_oConfig) {
+
+        this.cfg.applyConfig(p_oConfig, true);
+
+    }
+    
+    
+    this.initEvent.fire(YAHOO.widget.ContextMenu);
+
+};
+
+// Private event handlers
+
+/**
+* "mousedown" event handler for the document object.
+* @private
+* @param {Event} p_oEvent Event object passed back by the 
+* event utility (YAHOO.util.Event).
+* @param {YAHOO.widget.ContextMenu} p_oMenu The ContextMenu instance 
+* handling the event.
+*/
+YAHOO.widget.ContextMenu.prototype._onDocumentMouseDown = 
+
+    function(p_oEvent, p_oMenu) {
+    
+        var oTarget = YAHOO.util.Event.getTarget(p_oEvent);
+        var oTargetEl = this._oTargetElement;
+    
+        if(
+            oTarget != oTargetEl || 
+            !YAHOO.util.Dom.isAncestor(oTargetEl, oTarget)
+        ) {
+    
+            this.hide();
+        
+        }
+    
+    };
+
+/**
+* "click" event handler for the HTMLElement node that triggered the event. 
+* Used to cancel default behaviors in Opera.
+* @private
+* @param {Event} p_oEvent Event object passed back by the 
+* event utility (YAHOO.util.Event).
+* @param {YAHOO.widget.ContextMenu} p_oMenu The ContextMenu instance 
+* handling the event.
+*/
+YAHOO.widget.ContextMenu.prototype._onTriggerClick = 
+
+    function(p_oEvent, p_oMenu) {
+
+        if(p_oEvent.ctrlKey) {
+        
+            YAHOO.util.Event.stopEvent(p_oEvent);
+    
+        }
+        
+    };
+
+/**
+* "contextmenu" event handler ("mousedown" for Opera) for the HTMLElement 
+* node that triggered the event.
+* @private
+* @param {Event} p_oEvent Event object passed back by the 
+* event utility (YAHOO.util.Event).
+* @param {YAHOO.widget.ContextMenu} p_oMenu The ContextMenu instance 
+* handling the event.
+*/
+YAHOO.widget.ContextMenu.prototype._onTriggerContextMenu = 
+
+    function(p_oEvent, p_oMenu) {
+
+        var Event = YAHOO.util.Event;
+        var oConfig = this.cfg;
+
+        if(p_oEvent.type == "mousedown") {
+        
+            if(!p_oEvent.ctrlKey) {
+    
+                return;
+            
+            }
+        
+            Event.stopEvent(p_oEvent);
+    
+        }
+    
+    
+        this.contextEventTarget = Event.getTarget(p_oEvent);
+    
+    
+        // Position and display the context menu
+    
+        var nX = Event.getPageX(p_oEvent);
+        var nY = Event.getPageY(p_oEvent);
+    
+    
+        oConfig.applyConfig( { x:nX, y:nY, visible:true } );
+        oConfig.fireQueue();
+    
+    
+        // Prevent the browser's default context menu from appearing
+    
+        Event.preventDefault(p_oEvent);
+    
+    };
+
+// Public properties
+
+/**
+* Returns the HTMLElement node that was the target of the "contextmenu" 
+* DOM event.
+* @type HTMLElement
+*/
+YAHOO.widget.ContextMenu.prototype.contextEventTarget = null;
+
+// Public methods
+
+/**
+* Initializes the class's configurable properties which can be changed using 
+* a ContextMenu instance's Config object (cfg).
+*/
+YAHOO.widget.ContextMenu.prototype.initDefaultConfig = function() {
+
+    YAHOO.widget.ContextMenu.superclass.initDefaultConfig.call(this);
+
+       // Add a configuration property
+
+    this.cfg.addProperty("trigger", { handler: this.configTrigger });
+
+};
+
+// Event handlers for configuration properties
+
+/**
+* Event handler for when the "trigger" configuration property of
+* a MenuItem instance. 
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the 
+* event was fired.
+* @param {YAHOO.widget.ContextMenu} p_oMenu The ContextMenu that instance fired
+* the event.
+*/
+YAHOO.widget.ContextMenu.prototype.configTrigger = 
+
+    function(p_sType, p_aArgs, p_oMenu) {
+    
+        var Event = YAHOO.util.Event;
+        var oTrigger = p_aArgs[0];
+    
+        if(oTrigger) {
+    
+
+            /*
+                If there is a current "trigger" - remove the event handlers 
+                from that element(s) before assigning new ones
+            */
+            if(this._oTrigger) {
+            
+                Event.purgeElement(this._oTrigger);
+
+            }
+
+            this._oTrigger = oTrigger;
+
+            /*
+                Listen for the "mousedown" event in Opera b/c it does not 
+                support the "contextmenu" event
+            */ 
+      
+            var bOpera = (this.browser == "opera");
+    
+            Event.addListener(
+                oTrigger, 
+                (bOpera ? "mousedown" : "contextmenu"), 
+                this._onTriggerContextMenu,
+                this,
+                true
+            );
+    
+    
+            /*
+                Assign a "click" event handler to the trigger element(s) for
+                Opera to prevent default browser behaviors.
+            */
+    
+            if(bOpera) {
+            
+                Event.addListener(
+                    oTrigger, 
+                    "click", 
+                    this._onTriggerClick,
+                    this,
+                    true
+                );
+    
+            }
+    
+    
+            // Assign a "mousedown" event handler to the document
+        
+            Event.addListener(
+                document, 
+                "mousedown", 
+                this._onDocumentMouseDown,
+                this,
+                true
+            );        
+    
+        }
+        
+    };
+
+/**
+* @class Creates an item for a context menu instance.
+* @constructor
+* @extends YAHOO.widget.MenuItem
+* @base YAHOO.widget.MenuItem
+* @param {String or HTMLElement} p_oObject String or HTMLElement 
+* (either HTMLLIElement, HTMLOptGroupElement or HTMLOptionElement) of the 
+* source HTMLElement node.
+* @param {Object} p_oConfig The configuration object literal containing 
+* the configuration for a ContextMenuItem instance. See the configuration 
+* class documentation for more details.
+*/
+YAHOO.widget.ContextMenuItem = function(p_oObject, p_oConfig) {
+
+    YAHOO.widget.ContextMenuItem.superclass.constructor.call(
+        this, 
+        p_oObject, 
+        p_oConfig
+    );
+
+};
+
+YAHOO.extend(YAHOO.widget.ContextMenuItem, YAHOO.widget.MenuItem);
+
+/**
+* The ContextMenuItem class's initialization method. This method is
+* automatically called by the constructor, and sets up all DOM references for
+* pre-existing markup, and creates required markup if it is not
+* already present.
+* @param {String or HTMLElement} p_oObject String or HTMLElement 
+* (either HTMLLIElement, HTMLOptGroupElement or HTMLOptionElement) of the 
+* source HTMLElement node.
+* @param {Object} p_oConfig The configuration object literal containing 
+* the configuration for a ContextMenuItem instance. See the configuration 
+* class documentation for more details.
+*/
+YAHOO.widget.ContextMenuItem.prototype.init = 
+
+    function(p_oObject, p_oConfig) {
+    
+        if(!this.SUBMENU_TYPE) {
+    
+            this.SUBMENU_TYPE = YAHOO.widget.ContextMenu;
+    
+        }
+    
+        if(!this.SUBMENU_ITEM_TYPE) {
+    
+            this.SUBMENU_ITEM_TYPE = YAHOO.widget.ContextMenuItem;
+    
+        }
+    
+    
+        /* 
+            Call the init of the superclass (YAHOO.widget.MenuItem)
+            Note: We don't pass the user config in here yet 
+            because we only want it executed once, at the lowest 
+            subclass level.
+        */ 
+    
+        YAHOO.widget.ContextMenuItem.superclass.init.call(this, p_oObject);
+
+        var oConfig = this.cfg;
+    
+        if(p_oConfig) {
+    
+            oConfig.applyConfig(p_oConfig, true);
+    
+        }
+    
+        oConfig.fireQueue();
+    
+    };
+
+/**
+* @class Horizontal collection of items, each of which can contain a submenu.
+* Extends YAHOO.widget.MenuModule to provide a set of default mouse and 
+* key event behaviors.
+* @constructor
+* @extends YAHOO.widget.MenuModule
+* @base YAHOO.widget.MenuModule
+* @param {String or HTMLElement} p_oElement String id or HTMLElement 
+* (either HTMLSelectElement or HTMLDivElement) of the source HTMLElement node.
+* @param {Object} p_oConfig Optional. The configuration object literal 
+* containing the configuration for a MenuBar instance. See 
+* configuration class documentation for more details.
+*/
+YAHOO.widget.MenuBar = function(p_oElement, p_oConfig) {
+
+    YAHOO.widget.MenuBar.superclass.constructor.call(
+            this, 
+            p_oElement,
+            p_oConfig
+        );
+
+};
+
+YAHOO.extend(YAHOO.widget.MenuBar, YAHOO.widget.MenuModule);
+
+/**
+* The MenuBar class's initialization method. This method is automatically 
+* called by the constructor, and sets up all DOM references for pre-existing 
+* markup, and creates required markup if it is not already present.
+* @param {String or HTMLElement} p_oElement String id or HTMLElement 
+* (either HTMLSelectElement or HTMLDivElement) of the source HTMLElement node.
+* @param {Object} p_oConfig Optional. The configuration object literal 
+* containing the configuration for a MenuBar instance. See 
+* configuration class documentation for more details.
+*/
+YAHOO.widget.MenuBar.prototype.init = function(p_oElement, p_oConfig) {
+
+    if(!this.ITEM_TYPE) {
+
+        this.ITEM_TYPE = YAHOO.widget.MenuBarItem;
+
+    }
+
+    // Call the init of the superclass (YAHOO.widget.MenuModule)
+
+    YAHOO.widget.MenuBar.superclass.init.call(this, p_oElement);
+
+    this.beforeInitEvent.fire(YAHOO.widget.MenuBar);
+
+    var oConfig = this.cfg;
+
+    /*
+        Set the default value for the "position" configuration property
+        to "static" 
+    */
+    if(!p_oConfig || (p_oConfig && !p_oConfig.position)) {
+
+        oConfig.queueProperty("position", "static");
+
+    }
+
+    /*
+        Set the default value for the "submenualignment" configuration property
+        to "tl" and "bl" 
+    */
+    if(!p_oConfig || (p_oConfig && !p_oConfig.submenualignment)) {
+
+        oConfig.queueProperty("submenualignment", ["tl","bl"]);
+
+    }
+
+    if(p_oConfig) {
+
+        oConfig.applyConfig(p_oConfig, true);
+
+    }
+    
+    this.initEvent.fire(YAHOO.widget.MenuBar);
+
+};
+
+// Constants
+
+/**
+* Constant representing the CSS class(es) to be applied to the root 
+* HTMLDivElement of the MenuBar instance.
+* @final
+* @type String
+*/
+YAHOO.widget.MenuBar.prototype.CSS_CLASS_NAME = "yuimenubar";
+
+/**
+* @class The MenuBarItem class allows you to create and modify an item for a
+* MenuBar instance.  MenuBarItem extends YAHOO.widget.MenuModuleItem to 
provide 
+* a set of default mouse and key event behaviors.
+* @constructor
+* @extends YAHOO.widget.MenuModuleItem
+* @base YAHOO.widget.MenuModuleItem
+* @param {String or HTMLElement} p_oObject String or HTMLElement 
+* (either HTMLLIElement, HTMLOptGroupElement or HTMLOptionElement) of the 
+* source HTMLElement node.
+* @param {Object} p_oConfig The configuration object literal containing 
+* the configuration for a MenuBarItem instance. See the configuration 
+* class documentation for more details.
+*/
+YAHOO.widget.MenuBarItem = function(p_oObject, p_oConfig) {
+
+    YAHOO.widget.MenuBarItem.superclass.constructor.call(
+        this, 
+        p_oObject, 
+        p_oConfig
+    );
+
+};
+
+YAHOO.extend(YAHOO.widget.MenuBarItem, YAHOO.widget.MenuModuleItem);
+
+/**
+* The MenuBarItem class's initialization method. This method is automatically
+* called by the constructor, and sets up all DOM references for
+* pre-existing markup, and creates required markup if it is not
+* already present.
+* @param {String or HTMLElement} p_oObject String or HTMLElement 
+* (either HTMLLIElement, HTMLOptGroupElement or HTMLOptionElement) of the 
+* source HTMLElement node.
+* @param {Object} p_oConfig The configuration object literal containing 
+* the configuration for a MenuBarItem instance. See the configuration 
+* class documentation for more details.
+*/
+YAHOO.widget.MenuBarItem.prototype.init = function(p_oObject, p_oConfig) {
+
+    if(!this.SUBMENU_TYPE) {
+
+        this.SUBMENU_TYPE = YAHOO.widget.Menu;
+
+    }
+
+    if(!this.SUBMENU_ITEM_TYPE) {
+
+        this.SUBMENU_ITEM_TYPE = YAHOO.widget.MenuItem;
+
+    }
+
+    /* 
+        Call the init of the superclass (YAHOO.widget.MenuModuleItem)
+        Note: We don't pass the user config in here yet 
+        because we only want it executed once, at the lowest 
+        subclass level.
+    */ 
+
+    YAHOO.widget.MenuBarItem.superclass.init.call(this, p_oObject);  
+
+    // Add event handlers to each "MenuBarItem" instance
+
+    this.keyDownEvent.subscribe(this._onKeyDown, this, true);
+
+    var oConfig = this.cfg;
+
+    if(p_oConfig) {
+
+        oConfig.applyConfig(p_oConfig, true);
+
+    }
+
+    oConfig.fireQueue();
+
+};
+
+// Constants
+
+/**
+* Constant representing the CSS class(es) to be applied to the root 
+* HTMLLIElement of the MenuBarItem.
+* @final
+* @type String
+*/
+YAHOO.widget.MenuBarItem.prototype.CSS_CLASS_NAME = "yuimenubaritem";
+
+/**
+* Constant representing the path to the image to be used for the submenu
+* arrow indicator.
+* @final
+* @type String
+*/
+YAHOO.widget.MenuBarItem.prototype.SUBMENU_INDICATOR_IMAGE_PATH =
+    "nt/ic/ut/alt1/menuarodwn8_nrm_1.gif";
+
+/**
+* Constant representing the path to the image to be used for the submenu
+* arrow indicator when a MenuBarItem instance is selected.
+* @final
+* @type String
+*/
+YAHOO.widget.MenuBarItem.prototype.SELECTED_SUBMENU_INDICATOR_IMAGE_PATH =
+    "nt/ic/ut/alt1/menuarodwn8_hov_1.gif";
+
+/**
+* Constant representing the path to the image to be used for the submenu
+* arrow indicator when a MenuBarItem instance is disabled.
+* @final
+* @type String
+*/
+YAHOO.widget.MenuBarItem.prototype.DISABLED_SUBMENU_INDICATOR_IMAGE_PATH = 
+    "nt/ic/ut/alt1/menuarodwn8_dim_1.gif";
+
+// Private event handlers
+
+/**
+* "keydown" Custom Event handler for a MenuBarItem instance.
+* @private
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
+* was fired.
+* @param {YAHOO.widget.MenuModule} p_oMenuModule The MenuModule instance that 
+* fired the event.
+*/
+YAHOO.widget.MenuBarItem.prototype._onKeyDown =
+
+    function(p_sType, p_aArgs, p_oMenuItem) {
+
+        var Event = YAHOO.util.Event;
+        var oDOMEvent = p_aArgs[0];
+        var oConfig = this.cfg;
+        var oParent = this.parent;
+    
+        switch(oDOMEvent.keyCode) {
+    
+            case 37:    // Left arrow
+            case 39:    // Right arrow
+    
+                if(
+                    this == oParent.activeItem && 
+                    !oConfig.getProperty("selected")
+                ) {
+    
+                    oConfig.setProperty("selected", true);
+    
+                }
+                else {
+    
+                    var oNextItem = (oDOMEvent.keyCode == 37) ? 
+                            this.getPreviousEnabledSibling() : 
+                            this.getNextEnabledSibling();
+            
+                    if(oNextItem) {
+
+                        oParent.clearActiveItem();
+
+                        oNextItem.cfg.setProperty("selected", true);
+            
+                        oNextItem.focus();
+    
+                    }
+    
+                }
+
+                Event.preventDefault(oDOMEvent);
+    
+            break;
+    
+            case 40:    // Down arrow
+
+                oParent.clearActiveItem();
+                        
+                oConfig.setProperty("selected", true);
+                
+                this.focus();
+
+                var oSubmenu = oConfig.getProperty("submenu");
+    
+                if(oSubmenu) {
+        
+                    oSubmenu.show();
+                    oSubmenu.setInitialSelection();
+    
+                }
+
+                Event.preventDefault(oDOMEvent);
+    
+            break;
+    
+        }
+    
+    };

Index: yahoo.js
===================================================================
RCS file: yahoo.js
diff -N yahoo.js
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ yahoo.js    15 Jul 2006 14:41:51 -0000      1.1
@@ -0,0 +1,84 @@
+/*                                                                             
                                                                         
+Copyright (c) 2006, Yahoo! Inc. All rights reserved.                           
                                                                         
+Code licensed under the BSD License:                                           
                                                                         
+http://developer.yahoo.net/yui/license.txt                                     
                                                                         
+version: 0.11.0                                                                
                                                                         
+*/ 
+
+/**
+ * The Yahoo global namespace
+ * @constructor
+ */
+var YAHOO = window.YAHOO || {};
+
+/**
+ * Returns the namespace specified and creates it if it doesn't exist
+ *
+ * YAHOO.namespace("property.package");
+ * YAHOO.namespace("YAHOO.property.package");
+ *
+ * Either of the above would create YAHOO.property, then
+ * YAHOO.property.package
+ *
+ * @param  {String} ns The name of the namespace
+ * @return {Object}    A reference to the namespace object
+ */
+YAHOO.namespace = function(ns) {
+
+    if (!ns || !ns.length) {
+        return null;
+    }
+
+    var levels = ns.split(".");
+    var nsobj = YAHOO;
+
+    // YAHOO is implied, so it is ignored if it is included
+    for (var i=(levels[0] == "YAHOO") ? 1 : 0; i<levels.length; ++i) {
+        nsobj[levels[i]] = nsobj[levels[i]] || {};
+        nsobj = nsobj[levels[i]];
+    }
+
+    return nsobj;
+};
+
+/**
+ * Uses YAHOO.widget.Logger to output a log message, if the widget is 
available.
+ *
+ * @param  {string}  sMsg       The message to log.
+ * @param  {string}  sCategory  The log category for the message.  Default
+ *                              categories are "info", "warn", "error", time".
+ *                              Custom categories can be used as well. (opt)
+ * @param  {string}  sSource    The source of the the message (opt)
+ * @return {boolean}            True if the log operation was successful.
+ */
+YAHOO.log = function(sMsg, sCategory, sSource) {
+    var l = YAHOO.widget.Logger;
+    if(l && l.log) {
+        return l.log(sMsg, sCategory, sSource);
+    } else {
+        return false;
+    }
+};
+
+/**
+ * Utility to set up the prototype, constructor and superclass properties to
+ * support an inheritance strategy that can chain constructors and methods.
+ *
+ * @param {Function} subclass   the object to modify
+ * @param {Function} superclass the object to inherit
+ */
+YAHOO.extend = function(subclass, superclass) {
+    var f = function() {};
+    f.prototype = superclass.prototype;
+    subclass.prototype = new f();
+    subclass.prototype.constructor = subclass;
+    subclass.superclass = superclass.prototype;
+    if (superclass.prototype.constructor == Object.prototype.constructor) {
+        superclass.prototype.constructor = superclass;
+    }
+};
+
+YAHOO.namespace("util");
+YAHOO.namespace("widget");
+YAHOO.namespace("example");
+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]