rem: var elements = rg.getElementsByTagName("radio"); var topItem = elements[0]; for (var i=0; i < elements.length; i++) if (elements[i].selected) topItem = elements[i]; 
add: if (!rg.selectedItem) { var elements = rg.getElementsByTagName("radio"); rg.selectedItem = elements[0]; } 
context: function acctTypePageInit() {  // this is a total hack.  // select the first radio button, assuming the wizard hasn't  // already selected one for us. The wizard can get in this wierd state  var rg = document.getElementById("acctyperadio");  var elements = rg.getElementsByTagName("radio");  var topItem = elements[0];  for (var i=0; i < elements.length; i++)    if (elements[i].selected) topItem = elements[i];  rg.selectedItem = topItem;  var selectedItemId = topItem.getAttribute('id');  if (selectedItemId == "mailaccount")    setMailAccountTypeData();  else if (selectedItemId == "newsaccount")    setNewsAccountTypeData();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/4e7adb888f53151376eadf9a0d30604d6cd85f6c/aw-accounttype.js/clean/mailnews/base/prefs/resources/content/aw-accounttype.js