 #ifndef MOZ_PLACES_BOOKMARKS 
function delayedStartup(){  var os = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);  os.addObserver(gSessionHistoryObserver, "browser:purge-session-history", false);  os.addObserver(gXPInstallObserver, "xpinstall-install-blocked", false);  if (!gPrefService)    gPrefService = Components.classes["@mozilla.org/preferences-service;1"]                             .getService(Components.interfaces.nsIPrefBranch);  BrowserOffline.init();    if (gURLBar && document.documentElement.getAttribute("chromehidden").indexOf("toolbar") != -1) {    gURLBar.setAttribute("readonly", "true");    gURLBar.setAttribute("enablehistory", "false");  }  if (gURLBar)    gURLBar.addEventListener("dragdrop", URLBarOnDrop, true);  gBrowser.addEventListener("pageshow", function(evt) { setTimeout(pageShowEventHandlers, 0, evt); }, true);  window.addEventListener("keypress", ctrlNumberTabSelection, false);  if (gMustLoadSidebar) {    var sidebar = document.getElementById("sidebar");    var sidebarBox = document.getElementById("sidebar-box");    sidebar.setAttribute("src", sidebarBox.getAttribute("src"));  }#ifndef MOZ_PLACES_BOOKMARKS  // add bookmark options to context menu for tabs  addBookmarkMenuitems();  initServices();  initBMService();  // now load bookmarks  BMSVC.readBookmarks();  var bt = document.getElementById("bookmarks-ptf");  if (bt) {    var btf = BMSVC.getBookmarksToolbarFolder().Value;    bt.ref = btf;    document.getElementById("bookmarks-chevron").ref = btf;    bt.database.AddObserver(BookmarksToolbarRDFObserver);  }  window.addEventListener("resize", BookmarksToolbar.resizeFunc, false);  document.getElementById("PersonalToolbar")          .controllers.appendController(BookmarksMenuController);#else  PlacesMenuDNDController.init();#endif  // called when we go into full screen, even if it is  // initiated by a web page script  window.addEventListener("fullscreen", onFullScreen, true);  if (gIsLoadingBlank && gURLBar && isElementVisible(gURLBar))    focusElement(gURLBar);  else    focusElement(content);  SetPageProxyState("invalid");  var toolbox = document.getElementById("navigator-toolbox");  toolbox.customizeDone = BrowserToolboxCustomizeDone;  // Set up Sanitize Item  gSanitizeListener = new SanitizeListener();  var pbi = gPrefService.QueryInterface(Components.interfaces.nsIPrefBranchInternal);  // Enable/Disable URL Bar Auto Fill  gURLBarAutoFillPrefListener = new URLBarAutoFillPrefListener();  pbi.addObserver(gURLBarAutoFillPrefListener.domain, gURLBarAutoFillPrefListener, false);  // Enable/Disable auto-hide tabbar  gAutoHideTabbarPrefListener = new AutoHideTabbarPrefListener();  pbi.addObserver(gAutoHideTabbarPrefListener.domain, gAutoHideTabbarPrefListener, false);  pbi.addObserver(gHomeButton.prefDomain, gHomeButton, false);  gHomeButton.updateTooltip();  gClickSelectsAll = gPrefService.getBoolPref("browser.urlbar.clickSelectsAll");  if (gURLBar)    gURLBar.clickSelectsAll = gClickSelectsAll;#ifdef HAVE_SHELL_SERVICE  // Perform default browser checking (after window opens).  var shell = getShellService();  if (shell) {    var shouldCheck = shell.shouldCheckDefaultBrowser;    var willRestoreSession = false;    try {      var ss = Cc["@mozilla.org/browser/sessionstartup;1"].               getService(Ci.nsISessionStartup);      willRestoreSession = ss.doRestore();    }    catch (ex) { /* never mind; suppose SessionStore is broken */ }    if (shouldCheck && !shell.isDefaultBrowser(true) && !willRestoreSession) {      var brandBundle = document.getElementById("bundle_brand");      var shellBundle = document.getElementById("bundle_shell");      var brandShortName = brandBundle.getString("brandShortName");      var promptTitle = shellBundle.getString("setDefaultBrowserTitle");      var promptMessage = shellBundle.getFormattedString("setDefaultBrowserMessage",                                                         [brandShortName]);      var checkboxLabel = shellBundle.getFormattedString("setDefaultBrowserDontAsk",                                                         [brandShortName]);      const IPS = Components.interfaces.nsIPromptService;      var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]                                                .getService(IPS);      var checkEveryTime = { value: shouldCheck };      var rv = ps.confirmEx(window, promptTitle, promptMessage,                            IPS.STD_YES_NO_BUTTONS,                            null, null, null, checkboxLabel, checkEveryTime);      if (rv == 0)        shell.setDefaultBrowser(true, false);      shell.shouldCheckDefaultBrowser = checkEveryTime.value;    }  }#endif  // BiDi UI  gBidiUI = isBidiEnabled();  if (gBidiUI) {    document.getElementById("documentDirection-separator").hidden = false;    document.getElementById("documentDirection-swap").hidden = false;    document.getElementById("textfieldDirection-separator").hidden = false;    document.getElementById("textfieldDirection-swap").hidden = false;  }#ifdef XP_MACOSX  // Setup click-and-hold gestures access to the session history  // menus if global click-and-hold isn't turned on  if (!getBoolPref("ui.click_hold_context_menus", false))    SetClickAndHoldHandlers();#endif  // Initialize the microsummary service by retrieving it, prompting its factory  // to create its singleton, whose constructor initializes the service.  Cc["@mozilla.org/microsummary/service;1"].getService(Ci.nsIMicrosummaryService);  // initialize the session-restore service (in case it's not already running)  if (document.documentElement.getAttribute("windowtype") == "navigator:browser") {    try {      var ss = Cc["@mozilla.org/browser/sessionstore;1"].               getService(Ci.nsISessionStore);      ss.init(window);    } catch(ex) {      dump("nsSessionStore could not be initialized: " + ex + "\n");    }  }  // browser-specific tab augmentation  AugmentTabs.init();  // bookmark-all-tabs command  gBookmarkAllTabsHandler = new BookmarkAllTabsHandler();}
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/f3cce4d2e42dfa2641398435f525d7cceea74725/browser.js/clean/browser/base/content/browser.js