 
         public function loadURL(url:String)
         {
+            webView.zOrder = -1;
+            var self = this
             browserHeight = webView.stage.stageHeight - 50;
-            this.initBG();
 
             //only ever create one web view
-            if (childWebView == null) 
-            {
-                childWebView = new QNXStageWebView("ChildBrowser");
-                childWebView.stage = webView.stage;
-                childWebView.viewPort = new Rectangle(0,50,webView.stage.stageWidth,browserHeight);
+            function createBrowser(){
+              if (childWebView == null) 
+              {
+                  childWebView = new QNXStageWebView("ChildBrowser");
+                  childWebView.stage = webView.stage;
+                  childWebView.viewPort = new Rectangle(0,50,webView.stage.stageWidth,browserHeight);
+              }
+
+              //if its not visible.. i want to see it
+              if (!self.getVisible())
+              {
+                  self.setVisible(true)
+              }
+
+              //load this url
+              childWebView.loadURL(url);
+
+              //build buttons
+              self.initUI();
+
+              // events
+              webView.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, onOrientationChange);
             }
 
-            //if its not visible.. i want to see it
-            if (!this.getVisible())
-            {
-                this.setVisible(true)
-            }
-
-          //load this url
-          childWebView.loadURL(url);
-
-          //build buttons
-          this.initUI();
-
-          // events
-          webView.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, onOrientationChange);
-
+            this.initBG(createBrowser);
         }
 
         private function onOrientationChange(event:StageOrientationEvent)
         {
+            var self = this
             this.removeUI();
-            this.initBG();
-            this.initUI();
+            this.initBG(function(){
+              self.initUI()
+            });
             childWebView.viewPort = new Rectangle(0,50,webView.stage.stageWidth,browserHeight);
         }
 

            return new Array ("blackberry.polarmobile.childbrowser");
        }

        private function initBG()
        {
            bgshape = new Sprite();
            bgshape.graphics.beginFill(0x323232);
            bgshape.graphics.drawRect(0,0,webView.stage.stageWidth, webView.stage.stageHeight);
            webView.stage.addChildAt(bgshape, 0);
        }

        public function clearCookies()

        private var closeButton:IconButton;
        private var refreshButton:IconButton;
        private var bgshape:Sprite;
        private var loading_bg_shape:Sprite;
        private var browserHeight;
        private var isVisible:Boolean;

