+ element.getFirst().removeStyle( 'height' );\r
+\r
+ var panelElement = panel.element,\r
+ panelWindow = panelElement.getWindow(),\r
+ windowScroll = panelWindow.getScrollPosition(),\r
+ viewportSize = panelWindow.getViewPaneSize(),\r
+ panelSize =\r
+ {\r
+ 'height' : panelElement.$.offsetHeight,\r
+ 'width' : panelElement.$.offsetWidth\r
+ };\r
+\r
+ // If the menu is horizontal off, shift it toward\r
+ // the opposite language direction.\r
+ if ( rtl ? left < 0 : left + panelSize.width > viewportSize.width + windowScroll.x )\r
+ left += ( panelSize.width * ( rtl ? 1 : -1 ) );\r
+\r
+ // Vertical off screen is simpler.\r
+ if( top + panelSize.height > viewportSize.height + windowScroll.y )\r
+ top -= panelSize.height;\r
+\r
+ element.setStyles(\r
+ {\r
+ top : top + 'px',\r
+ left : left + 'px',\r
+ opacity : '1'\r
+ } );\r
+\r
+ } , this );\r
+\r
+ panel.isLoaded ? panelLoad() : panel.onLoad = panelLoad;\r