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

            var oOverlay = this.find(p_oOverlay),
                nTopZIndex,
                oTopOverlay,
                aOverlays;

            if (oOverlay) {

                aOverlays = this.overlays;
                aOverlays.sort(this.compareZIndexDesc);

                oTopOverlay = aOverlays[0];

                if (oTopOverlay) {
                    nTopZIndex = Dom.getStyle(oTopOverlay.element, "zIndex");

                    if (!isNaN(nTopZIndex)) {

                        var bRequiresBump = false;

                        if (oTopOverlay !== oOverlay) {
                            bRequiresBump = true;
                        } else if (aOverlays.length > 1) {
                            var nNextZIndex = Dom.getStyle(aOverlays[1].element, "zIndex");
                            // Don't rely on DOM order to stack if 2 overlays are at the same zindex.
                            if (!isNaN(nNextZIndex) && (nTopZIndex == nNextZIndex)) {
                                bRequiresBump = true;
                            }
                        }

                        if (bRequiresBump) {
                            oOverlay.cfg.setProperty("zindex", (parseInt(nTopZIndex, 10) + 2));
                        }
                    }
                    aOverlays.sort(this.compareZIndexDesc);
                }
            }
        }
function (p_oOverlay) {

            var oOverlay = this.find(p_oOverlay),
                nTopZIndex,
                oTopOverlay,
                aOverlays;

            if (oOverlay) {

                aOverlays = this.overlays;
                aOverlays.sort(this.compareZIndexDesc);

                oTopOverlay = aOverlays[0];

                if (oTopOverlay) {
                    nTopZIndex = Dom.getStyle(oTopOverlay.element, "zIndex");

                    if (!isNaN(nTopZIndex)) {

                        var bRequiresBump = false;

                        if (oTopOverlay !== oOverlay) {
                            bRequiresBump = true;
                        } else if (aOverlays.length > 1) {
                            var nNextZIndex = Dom.getStyle(aOverlays[1].element, "zIndex");
                            // Don't rely on DOM order to stack if 2 overlays are at the same zindex.
                            if (!isNaN(nNextZIndex) && (nTopZIndex == nNextZIndex)) {
                                bRequiresBump = true;
                            }
                        }

                        if (bRequiresBump) {
                            oOverlay.cfg.setProperty("zindex", (parseInt(nTopZIndex, 10) + 2));
                        }
                    }
                    aOverlays.sort(this.compareZIndexDesc);
                }
            }
        }
function ( p_oOverlay ) { var oOverlay = this . find ( p_oOverlay ) , nTopZIndex , oTopOverlay , aOverlays ; if ( oOverlay ) { aOverlays = this . overlays ; aOverlays . sort ( this . compareZIndexDesc ) ; oTopOverlay = aOverlays [ 0 ] ; if ( oTopOverlay ) { nTopZIndex = Dom . getStyle ( oTopOverlay . element , "zIndex" ) ; if ( ! isNaN ( nTopZIndex ) ) { var bRequiresBump = false ; if ( oTopOverlay !== oOverlay ) { bRequiresBump = true ; } else if ( aOverlays . length > 1 ) { var nNextZIndex = Dom . getStyle ( aOverlays [ 1 ] . element , "zIndex" ) ; // Don't rely on DOM order to stack if 2 overlays are at the same zindex. if ( ! isNaN ( nNextZIndex ) && ( nTopZIndex == nNextZIndex ) ) { bRequiresBump = true ; } } if ( bRequiresBump ) { oOverlay . cfg . setProperty ( "zindex" , ( parseInt ( nTopZIndex , 10 ) + 2 ) ) ; } } aOverlays . sort ( this . compareZIndexDesc ) ; } } }
Places the specified Overlay instance on top of all other
Overlay instances.
@method bringToTop
@param {YAHOO.widget.Overlay} p_oOverlay Object representing an
Overlay instance.
@param {String} p_oOverlay String representing the id of an
Overlay instance.
Places the specified Overlay instance on top of all other Overlay instances .