rem: var w        = getTopWin(); 
context:   openGroupBookmark: function (aURI, aTargetBrowser)  {    if (aTargetBrowser == "current" || aTargetBrowser == "tab") {      var w        = getTopWin();      var browser  = w.document.getElementById("content");      var resource = RDF.GetResource(aURI);      var urlArc   = RDF.GetResource(NC_NS+"URL");      RDFC.Init(BMDS, resource);      var containerChildren = RDFC.GetElements();      var tabPanels = browser.browsers;      var tabCount  = tabPanels.length;      var doReplace = PREF.getBoolPref("browser.tabs.loadFolderAndReplace");      var loadInBackground = PREF.getBoolPref("browser.tabs.loadBookmarksInBackground");      var index0;      if (doReplace)        index0 = 0;      else {        for (index0=tabCount-1; index0>=0; --index0)          if (browser.browsers[index0].webNavigation.currentURI.spec != "about:blank")            break;        ++index0;      }      var index  = index0;      while (containerChildren.hasMoreElements()) {        var res = containerChildren.getNext().QueryInterface(kRDFRSCIID);        var target = BMDS.GetTarget(res, urlArc, true);        if (target) {          var uri = target.QueryInterface(kRDFLITIID).Value;          if (index < tabCount)            tabPanels[index].loadURI(uri);          else            browser.addTab(uri);          ++index;        }      }      // If the bookmark group was completely invalid, just bail.      if (index == index0)        return;      // focus the first tab if prefs say to      if (!loadInBackground || doReplace) {        // Select the first tab in the group.        var tabs = browser.mTabContainer.childNodes;        browser.selectedTab = tabs[index0];      }      // Close any remaining open tabs that are left over.      // (Always skipped when we append tabs)      for (var i = tabCount-1; i >= index; --i)        browser.removeTab(tabs[i]);      // and focus the content      w.content.focus();    } else {      dump("Open Group in new window: not implemented...\n");    }  },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/67e83f2023bca7bc962d0009c451f8b967a62563/bookmarks.js/buggy/browser/components/bookmarks/content/bookmarks.js