public/javascripts/yui/container/container.js
function (overlay) {

            var registered = false,
                i,
                n;

            if (overlay instanceof Overlay) {

                overlay.cfg.addProperty("manager", { value: this } );

                this._bindFocus(overlay);
                this._bindBlur(overlay);
                this._bindDestroy(overlay);
                this._syncZIndex(overlay);

                this.overlays.push(overlay);
                this.bringToTop(overlay);

                registered = true;

            } else if (overlay instanceof Array) {

                for (i = 0, n = overlay.length; i < n; i++) {
                    registered = this.register(overlay[i]) || registered;
                }

            }

            return registered;
        }
function (overlay) {

            var registered = false,
                i,
                n;

            if (overlay instanceof Overlay) {

                overlay.cfg.addProperty("manager", { value: this } );

                this._bindFocus(overlay);
                this._bindBlur(overlay);
                this._bindDestroy(overlay);
                this._syncZIndex(overlay);

                this.overlays.push(overlay);
                this.bringToTop(overlay);

                registered = true;

            } else if (overlay instanceof Array) {

                for (i = 0, n = overlay.length; i < n; i++) {
                    registered = this.register(overlay[i]) || registered;
                }

            }

            return registered;
        }
function ( overlay ) { var registered = false , i , n ; if ( overlay instanceof Overlay ) { overlay . cfg . addProperty ( "manager" , { value : this } ) ; this . _bindFocus ( overlay ) ; this . _bindBlur ( overlay ) ; this . _bindDestroy ( overlay ) ; this . _syncZIndex ( overlay ) ; this . overlays . push ( overlay ) ; this . bringToTop ( overlay ) ; registered = true ; } else if ( overlay instanceof Array ) { for ( i = 0 , n = overlay . length ; i < n ; i ++ ) { registered = this . register ( overlay [ i ] ) || registered ; } } return registered ; }
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.

@method register
@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.
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 .