YAHOO.widget.Overlay.prototype.configIframe = function(type, args, obj) {
        var val = args[0];
        var el = this.element;

        if (val) {
                if (! this.iframe) {
                        this.iframe = document.createElement("iframe");
                        
                        var parent = el.parentNode;
                        if (parent) {
                                parent.appendChild(this.iframe);
                        } else {
                                document.body.appendChild(this.iframe);
                        }

                        this.iframe.src = this.imageRoot + YAHOO.widget.Overlay.IFRAME_SRC;
                        YAHOO.util.Dom.setStyle(this.iframe, "position", "absolute");
                        YAHOO.util.Dom.setStyle(this.iframe, "zIndex", "0");
                        YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0");
                }

                if (YAHOO.util.Dom.getStyle(el, "zIndex") <= 0) {
                        YAHOO.util.Dom.setStyle(el, "zIndex", 1);
                }

                YAHOO.util.Dom.setStyle(this.iframe, "top", YAHOO.util.Dom.getXY(el)[1] - 2 + "px");
                YAHOO.util.Dom.setStyle(this.iframe, "left", YAHOO.util.Dom.getXY(el)[0] - 2 + "px");

                var width = el.offsetWidth;
                var height = el.offsetHeight;

                YAHOO.util.Dom.setStyle(this.iframe, "width", width + "px");
                YAHOO.util.Dom.setStyle(this.iframe, "height", height + "px");

                if (! this.cfg.getProperty("visible")) {
                        this.iframe.style.display = "none";
                } else {
                        this.iframe.style.display = "block";
                }

        } else {
                if (this.iframe) {
                        this.iframe.style.display = "none";
                }
        }
}
function popupShow(panel) {
  panel.center();
  panel.cfg.refireEvent("iframe");
  panel.show();
}
function popupInit(panelId, config) {
  panel = new YAHOO.widget.Panel(panelId, config);
  panel.render();
  return panel;
}
