rem: bookmarkView.view.selection.select(ind); 
add: bookmarkView.tree.view.selection.select(ind); 
context: function Startup(){  gFld_Name = document.getElementById("name");  gFld_URL = document.getElementById("url");  gFld_ShortcutURL = document.getElementById("shortcutUrl");  gCB_AddGroup = document.getElementById("addgroup");  var bookmarkView = document.getElementById("bookmarks-view");  var shouldSetOKButton = true;  var dialogElement = document.documentElement;  if ("arguments" in window) {    var ind;    var folderItem = null;    var arg;    if (window.arguments.length < 5)      arg = null;    else      arg = window.arguments[4];    switch (arg) {    case "selectFolder":      // If we're being opened as a folder selection window      document.getElementById("bookmarknamegrid").hidden = true;      document.getElementById("showaddgroup").hidden = true;      document.getElementById("destinationSeparator").hidden = true;      document.getElementById("nameseparator").hidden = true;      document.title = dialogElement.getAttribute("selectFolderTitle");      shouldSetOKButton = false;      if (window.arguments[2])        folderItem = bookmarkView.rdf.GetResource(window.arguments[2]);      if (folderItem) {        ind = bookmarkView.treeBuilder.getIndexOfResource(folderItem);        bookmarkView.view.selection.select(ind);      }      break;    case "newBookmark":      document.getElementById("showaddgroup").hidden = true;      document.getElementById("destinationSeparator").hidden = true;      document.getElementById("folderbox").hidden = true;      setupFields();      if (window.arguments[2])        gCreateInFolder = window.arguments[2];      break;    case "addGroup":      setupFields();      break;    case "addGroup,group":      gCB_AddGroup.checked = true;      setupFields();      toggleGroup();      break;    default:      // Regular Add Bookmark      document.getElementById("showaddgroup").hidden = true;      setupFields();      if (window.arguments[2]) {        gCreateInFolder = window.arguments[2];        folderItem = bookmarkView.rdf.GetResource(gCreateInFolder);        if (folderItem) {          ind = bookmarkView.treeBuilder.getIndexOfResource(folderItem);          bookmarkView.view.selection.select(ind);        }      }    }  }  if ((arg != "newBookmark") && (bookmarkView.currentIndex == -1))    bookmarkView.view.selection.select(0);  if (shouldSetOKButton)    onFieldInput();  if (document.getElementById("bookmarknamegrid").hidden) {    bookmarkView.tree.focus();  } else {    gFld_Name.select();    gFld_Name.focus();  }  // XXX fix old profiles  dialogElement.removeAttribute("height");  dialogElement.removeAttribute("width");  sizeToContent();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/b9f7aaec8f3eb4e8b301623c2dd41fe3e918a45a/addBookmark.js/buggy/xpfe/components/bookmarks/resources/addBookmark.js