rem: if (gLastBrowserCharset) {  menuitem = document.getElementById('charset.' + gLastBrowserCharset); } else {  var wnd = document.commandDispatcher.focusedWindow; if ((window == wnd) || (wnd == null)) wnd = window._content; menuitem = document.getElementById('charset.' + wnd.document.characterSet); } 
add:  var wnd = document.commandDispatcher.focusedWindow; if ((window == wnd) || (wnd == null)) wnd = window._content; menuitem = document.getElementById('charset.' + wnd.document.characterSet); 
context: function UpdateCurrentCharset(){    var menuitem = null;    if (gLastBrowserCharset) {      //avoid looking for the focused window, use the charset last used in charsetLoadListener      menuitem = document.getElementById('charset.' + gLastBrowserCharset);    } else {      //fall-back: when page has not finished loading exctract the charset from DOM      var wnd = document.commandDispatcher.focusedWindow;      if ((window == wnd) || (wnd == null)) wnd = window._content;      menuitem = document.getElementById('charset.' + wnd.document.characterSet);    }    if (menuitem) {        menuitem.setAttribute('checked', 'true');    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/067935ba67280d7c0f8862573ba0a359c8a7aaf3/charsetOverlay.js/buggy/xpfe/global/resources/content/charsetOverlay.js