context: function LoadActiveCharSets(){  var active_charsets		   = document.getElementById('active_charsets');   var active_charsets_treeroot = document.getElementById('active_charsets_root');   var visible;  //var charsets_pref_string     = new String();    try {	arrayOfPrefs = charsets_pref_string.split(', ');  }     catch (ex) {	dump("failed to split the preference string!\n");  }		//if (confirm('Load active Charset Decoders ?')) {		if (arrayOfPrefs) for (i = 0; i < arrayOfPrefs.length; i++) {			str = arrayOfPrefs[i];			try {				atom = atom.QueryInterface(Components.interfaces.nsIAtom);			} catch (ex) {				dump("failed to load atom interface...\n" );			}			try {				    atom.ToString(str); } catch (ex) {				dump("failed to create an atom from:" + str + "\n" );			}			if (atom) {							try {					tit = ccm.GetCharsetTitle(NS_NewAtom(str));				}				catch (ex) {								tit     = GetCharSetTitle(str);					visible = GetCharSetVisibility(str);					if (tit == '')	tit = str; 					//if (title != '') tit = title;					dump("failed to get title for:" + str + "\n" );				}						} //atom			//dump("*** Charset: " + str + "\n");			//tit = 'Test';			//str = 'Test';  			if (str) if (tit) if (visible) {				dump("Adding Active Charset: " + str + " ==> " + tit + "\n");				// Create a treerow for the new charset				var item = document.createElement('treeitem');				var row  = document.createElement('treerow');				var cell = document.createElement('treecell');  				// Copy over the attributes				cell.setAttribute('value', tit);				cell.setAttribute('id', str); 				// Add it to the active charsets tree				item.appendChild(row);				row.appendChild(cell);				active_charsets_treeroot.appendChild(item);				// Select is only if the caller wants to.				active_charsets.selectItem(item);				active_charsets.ensureElementIsVisible(item);								dump("*** Added Active Charset: " + tit + "\n");			} //if 		} //for		//confirm('intl.charset_menu.static: '+charsets_pref_string+' ...');		//} //confirm}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/19d1eed6abf4a929d51b745f3f266efb06c1b9ce/pref-charset.js/clean/xpfe/components/prefwindow/resources/content/pref-charset.js