rem: sidebar_menuitem.setAttribute('checked', 'true'); 
add: if (sidebar_menuitem) sidebar_menuitem.setAttribute('checked', 'true'); 
context: function sidebarOverlayInit(){  try {	  var fileLocatorInterface = Components.interfaces.nsIFileLocator;	  var fileLocatorProgID = 'component://netscape/filelocator';	  var fileLocatorService  = Components.classes[fileLocatorProgID].getService();	  // use the fileLocator to look in the profile directory           // to find 'panels.rdf', which is the	  // database of the user's currently selected panels.	  fileLocatorService = fileLocatorService.QueryInterface(fileLocatorInterface);	  // if <profile>/panels.rdf doesn't exist, GetFileLocation() will copy	  // bin/defaults/profile/panels.rdf to <profile>/panels.rdf	  var sidebar_file = fileLocatorService.GetFileLocation(PANELS_RDF_FILE);	  var sidebar_url = sidebar_file.URLString;	  if (!sidebar_file.exists()) {			// this should not happen, as GetFileLocation() should copy		// defaults/panels.rdf to the users profile directory		return;	  }	  debug("sidebar url is " + sidebar_url.URLString + "\n");	  sidebar.db = sidebar_file.URLString;  }  catch (ex) {	// this should not happen	return;  }    sidebar.resource = 'urn:sidebar:current-panel-list';  // Initialize the display  var sidebar_element = document.getElementById('sidebar-box')  var sidebar_menuitem = document.getElementById('menu_sidebar')  if (sidebar_element.getAttribute('hidden') == 'true') {    sidebar_element.setAttribute('style', 'display:none')    sidebar_menuitem.setAttribute('checked', 'false')  } else {	sidebar_menuitem.setAttribute('checked', 'true');	debug("sidebar = " + sidebar + "\n");	debug("sidebar.resource = " + sidebar.resource + "\n");	debug("sidebar.db = " + sidebar.db + "\n");	// Add the user's current panel choices to the template builder,	// which will aggregate it with the other datasources that describe	// the individual panel's title, customize URL, and content URL.	var panels = document.getElementById('sidebar-panels');	panels.database.AddDataSource(RDF.GetDataSource(sidebar.db));		// XXX This is a hack to force re-display	panels.setAttribute('ref', 'urn:sidebar:current-panel-list');	sidebarOpenDefaultPanel(1, 0);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a9af8f33e911550f0e957a1c83ec85016d6484e3/sidebarOverlay.js/buggy/suite/common/sidebar/sidebarOverlay.js