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

            var isInstance = overlay instanceof Overlay,
                overlays = this.overlays,
                n = overlays.length,
                found = null,
                o,
                i;

            if (isInstance || typeof overlay == "string") {
                for (i = n-1; i >= 0; i--) {
                    o = overlays[i];
                    if ((isInstance && (o === overlay)) || (o.id == overlay)) {
                        found = o;
                        break;
                    }
                }
            }

            return found;
        }
function (overlay) {

            var isInstance = overlay instanceof Overlay,
                overlays = this.overlays,
                n = overlays.length,
                found = null,
                o,
                i;

            if (isInstance || typeof overlay == "string") {
                for (i = n-1; i >= 0; i--) {
                    o = overlays[i];
                    if ((isInstance && (o === overlay)) || (o.id == overlay)) {
                        found = o;
                        break;
                    }
                }
            }

            return found;
        }
function ( overlay ) { var isInstance = overlay instanceof Overlay , overlays = this . overlays , n = overlays . length , found = null , o , i ; if ( isInstance || typeof overlay == "string" ) { for ( i = n - 1 ; i >= 0 ; i -- ) { o = overlays [ i ] ; if ( ( isInstance && ( o === overlay ) ) || ( o . id == overlay ) ) { found = o ; break ; } } } return found ; }
Attempts to locate an Overlay by instance or ID.
@method find
@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.
Attempts to locate an Overlay by instance or ID .