rem: var offset; 
add: var offset = 0; 
context: function onAccept(){  // All values are valid - copy to actual element in doc or  //   element created to insert  ValidateData();  var editor = GetCurrentEditor();  // Coalesce into one undo transaction  editor.beginTransaction();  try  {    editor.cloneAttributes(selectElement, gDialog.element);    if (insertNew)      // 'true' means delete the selection before inserting      editor.insertElementAtSelection(selectElement, true);    editor.setShouldTxnSetSelection(false);    while (selectElement.lastChild)      editor.deleteNode(selectElement.lastChild);    var offset;    for (var i = 1; i < itemArray.length; i++)      if (itemArray[i].level > 1)        selectElement.lastChild.appendChild(itemArray[i].element);      else        editor.insertNode(itemArray[i].element, selectElement, offset++, true);    editor.setShouldTxnSetSelection(true);  }  finally  {    editor.endTransaction();  }  SaveWindowLocation();  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6dceef4315bd486ca5e20832f0dae6155950bd3c/EdSelectProps.js/buggy/editor/ui/dialogs/content/EdSelectProps.js