rem: var selectedItem = list.selectedItem; 
add: selectedItem = list.selectedItem; 
context: function onAccept(){  //cache language on the parent window  var tree = document.getElementById("langList");  var selectedItem = tree.selectedItems.length ? tree.selectedItems[0] : null;  if (selectedItem) {    var langName = selectedItem.firstChild.firstChild.getAttribute("value");    var langStore = opener.document.getElementById("ProfileLanguage");    if (langStore)      langStore.setAttribute("data", langName);  }  //cache region on the parent window  var list = document.getElementById("regionList");  var selectedItem = list.selectedItem;  if (selectedItem) {    var regionName = selectedItem.getAttribute("value");    var regionStore = opener.document.getElementById("ProfileRegion");    if (regionStore)      regionStore.setAttribute("data", regionName);  }  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a0b1f87aa16c7dc75de63f6bc9b2f9d80525df6f/selectLang.js/buggy/profile/resources/content/selectLang.js