rem: if (aCommandID != "viewWebPanelsSidebar") {  if ((aCommandID == "viewBookmarksSidebar" && sidebar.contentDocument.getElementById("bookmarksPanel")) || (aCommandID == "viewHistorySidebar" && sidebar.contentDocument.getElementById("history-panel"))) sidebar.contentDocument.getElementById("search-box").focus();  else sidebar.addEventListener("load", asyncFocusSearchBox, true); } 
context: function toggleSidebar(aCommandID, forceOpen) {  var sidebarBox = document.getElementById("sidebar-box");  if (!aCommandID)    aCommandID = sidebarBox.getAttribute("sidebarcommand");  var elt = document.getElementById(aCommandID);  var sidebar = document.getElementById("sidebar");  var sidebarTitle = document.getElementById("sidebar-title");  var sidebarSplitter = document.getElementById("sidebar-splitter");  if (elt.getAttribute("checked") == "true") {    if (!forceOpen) {        elt.removeAttribute("checked");        sidebarBox.setAttribute("sidebarcommand", "");        sidebarTitle.setAttribute("value", "");        sidebarBox.hidden = true;        sidebarSplitter.hidden = true;    }    return;  }    var elts = document.getElementsByAttribute("group", "sidebar");  for (var i = 0; i < elts.length; ++i)    elts[i].removeAttribute("checked");  elt.setAttribute("checked", "true");;  if (sidebarBox.hidden) {    sidebarBox.hidden = false;    sidebarSplitter.hidden = false;  }    var url = elt.getAttribute("sidebarurl");  var title = elt.getAttribute("sidebartitle");  if (!title)    title = elt.getAttribute("label");  sidebar.setAttribute("src", url);  sidebarBox.setAttribute("src", url);  sidebarBox.setAttribute("sidebarcommand", elt.id);  sidebarTitle.setAttribute("value", title);  if (aCommandID != "viewWebPanelsSidebar") { // no searchbox there    // if the sidebar we want is already constructed, focus the searchbox    if ((aCommandID == "viewBookmarksSidebar" && sidebar.contentDocument.getElementById("bookmarksPanel"))    || (aCommandID == "viewHistorySidebar" && sidebar.contentDocument.getElementById("history-panel")))      sidebar.contentDocument.getElementById("search-box").focus();    // otherwiese, attach an onload handler    else      sidebar.addEventListener("load", asyncFocusSearchBox, true);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/2e91f7eef2712d55644db43bef48ef5f6d9dfa58/browser.js/clean/browser/base/content/browser.js