     import flash.events.MouseEvent;
     import flash.display.Sprite;
     import flash.events.StageOrientationEvent;
-    import flash.display.Bitmap;
     import flash.utils.setTimeout;
 
     import caurina.transitions.Tweener;
 
     // qnx 
     import qnx.media.QNXStageWebView;
-    import qnx.events.WebViewEvent;
     import qnx.ui.buttons.IconButton;
     import qnx.ui.skins.buttons.OutlineButtonSkinBlack;
 
     // webworks
     import webworks.extension.DefaultExtension;
-
 
     public class ChildBrowser extends DefaultExtension
     {

        public function clearCookies()
        {
          //if we dont have a webview, make one and put it in the background
          if (childWebView == null) 
          {
              childWebView = new QNXStageWebView("ChildBrowser");
              childWebView.stage = webView.stage;
              childWebView.viewPort = new Rectangle(0,50,webView.stage.stageWidth,browserHeight);
              childWebView.zOrder = -1;
          }
          //clear the webviews cookies
          childWebView.clearCookies();
          childWebView.stage = null;
          childWebView.dispose();
        }

        public function loadURL(url:String)
        {
            var self = this;
            browserHeight = webView.stage.stageHeight - 50;
            //only ever create one web view
            childWebView = new QNXStageWebView("ChildBrowser");
            childWebView.zOrder = -100;
            webView.zOrder = -1;
            childWebView.viewPort = new Rectangle(0,50,webView.stage.stageWidth,browserHeight);
            //load this url
            childWebView.loadURL(url);
            // events
            //webView.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, onOrientationChange);
            //childWebView.addEventListener(WebViewEvent.DOCUMENT_LOAD_FINISHED, loaded);
            this.initBG();
        }


        private function onOrientationChange(event:StageOrientationEvent)
        {
            //var self = this
            //this.removeUI();
            //this.initBG()
            //this.initUI()
            //childWebView.viewPort = new Rectangle(0,50,webView.stage.stageWidth,browserHeight);
        }

        private function clearWindow()
        {
            childWebView.loadURL("about:blank");
        }

        public function getLocation():String
        {
            return childWebView.location;
        }

        public function forward()
        {
            childWebView.historyForward();
        }

        public function back()
        {
            childWebView.historyBack();
        }

        public function refresh()
        {
            childWebView.reload();
        }

        public function close()
        {
          childWebView.stage = null;
          childWebView.dispose();

          Tweener.addTween(webViewUI, {
            y: webView.stage.stageHeight,

          return this.isVisible; 
        }

        // our own addChild implementation
        // maps back to stage of WebWorkAppTemplate.as
        private function addChild(obj)
