add: var btfMenuItem = document.getElementById("btfMenuItem"); btfMenuItem.setAttribute("id", BMSVC.getBookmarksToolbarFolder().Value); 
context: function Startup(){  initServices();  initBMService();  gName = document.getElementById("name");  gRequiredFields.push(gName);  gKeywordRow = document.getElementById("keywordRow");  gKeyword = document.getElementById("keyword");  gExpander = document.getElementById("expander");  gMenulist = document.getElementById("select-menu");  gBookmarksTree = document.getElementById("folder-tree");  gName.value = gArg.name;  gName.select();  gName.focus();  gSuggestedKeyword = gArg.keyword;  gKeywordRequired = gArg.bNeedKeyword;  if (!gSuggestedKeyword && !gKeywordRequired) {    gKeywordRow.hidden = true;  } else {    if (gSuggestedKeyword)      gKeyword.value = gSuggestedKeyword;    if (gKeywordRequired)      gRequiredFields.push(gKeyword);  }  sizeToContent();  onFieldInput();  initTitle();  gSelectedFolder = RDF.GetResource(gMenulist.selectedItem.id);  gExpander.setAttribute("tooltiptext", gExpander.getAttribute("tooltiptextdown"));  gPostData = gArg.postData;    if ("feedURL" in gArg) {    var strings = document.getElementById("bookmarksBundle");    document.title = strings.getString("addLiveBookmarkTitle");  }# read the persisted attribute. If it is not present, set a default height.  WSucks = parseInt(gBookmarksTree.getAttribute("height"));  if (!WSucks)    WSucks = 150;  // fix no more persisted class attribute in old profiles  var localStore = RDF.GetDataSource("rdf:local-store");  var rAttribute = RDF.GetResource("class");  var rElement   = RDF.GetResource("chrome://browser/content/bookmarks/addBookmark2.xul#expander");  var rDialog    = RDF.GetResource("chrome://browser/content/bookmarks/addBookmark2.xul");  var rPersist   = RDF.GetResource(gNC_NS+"persist");    var rOldValue = localStore.GetTarget(rElement, rAttribute, true);  if (rOldValue) {    localStore.Unassert(rElement, rAttribute, rOldValue, true);    localStore.Unassert(rDialog, rPersist, rElement, true);    gExpander.setAttribute("class", "down");  }    // Select the specified folder after the window is made visible  function initMenulist() {    if ("folderURI" in gArg) {      var folderItem = document.getElementById(gArg.folderURI);      if (folderItem)        gMenulist.selectedItem = folderItem;    }  }  setTimeout(initMenulist, 0);} 
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/d8f4873a8220cb089c1a817bb8e982fa05f302ed/addBookmark2.js/clean/browser/components/bookmarks/content/addBookmark2.js