rem: treekids.appendChild ( treeitem ); 
add: treeChildren.appendChild ( treeitem );    gDoOnSelectTree = false; try { treeChildren.parentNode.selectItem(treeitem); } catch (e) {} gDoOnSelectTree = true;  
context: function AddTreeItem ( name, value, treekidsId, attArray, valueCaseFunc ){  attArray[attArray.length] = name;  var treekids    = document.getElementById ( treekidsId );  var treeitem    = document.createElementNS ( XUL_NS, "treeitem" );  var treerow     = document.createElementNS ( XUL_NS, "treerow" );  var attrcell    = document.createElementNS ( XUL_NS, "treecell" );  attrcell.setAttribute( "class", "propertylist" );  attrcell.setAttribute( "label", name );  // Modify treerow selection to better show focus in textbox  treeitem.setAttribute( "class", "ae-selection");  treerow.appendChild ( attrcell );  if ( !valueCaseFunc ) {    // no handling function provided, create default cell.    var valCell = CreateCellWithField ( name, value );    if (!valCell) return null;    treerow.appendChild ( valCell );  } else    valueCaseFunc();  // run user specified function for adding content  treeitem.appendChild ( treerow );  treekids.appendChild ( treeitem );  return treeitem;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a8e5c0b7bcf6def29348bdc1fb448239fd223bd2/EdAdvancedEdit.js/buggy/editor/ui/dialogs/content/EdAdvancedEdit.js