rem: var suggestions; suggestions = this.nextSibling.firstChild.data.split(/,/); for (var i = 0; i < suggestions.length; ++i) { var txt = suggestions[i]; var option = document.createElement("option"); option.value = txt; option.appendChild(document.createTextNode(txt)); select.appendChild(option); 
add:  var suggestions = new Array(); if (this.nextSibling.firstChild) { suggestions = this.nextSibling.firstChild.data.split(/,/); if (suggestions.length) { for (var i = 0; i < suggestions.length; ++i) { var txt = suggestions[i]; var option = document.createElement("option"); option.value = txt; option.appendChild(document.createTextNode(txt)); select.appendChild(option); } } 
context: function wordClicked() {	if (currentElement) {		var a = allWords[currentElement.__msh_origWord];		currentElement.className = currentElement.className.replace(/\s*HA-spellcheck-current\s*/g, " ");		for (var i in a) {			var el = a[i];			if (el != currentElement) {				el.className = el.className.replace(/\s*HA-spellcheck-same\s*/g, " ");			}		}	}	currentElement = this;	this.className += " HA-spellcheck-current";	var a = allWords[currentElement.__msh_origWord];	for (var i in a) {		var el = a[i];		if (el != currentElement) {			el.className += " HA-spellcheck-same";		}	}	document.getElementById("b_replall").disabled = (a.length <= 1);	document.getElementById("b_ignall").disabled = (a.length <= 1);	var txt;	if (a.length == 1) {		txt = a.length + " occurrence";	} else {		txt = a.length + " occurrences";	}		document.getElementById("status").innerHTML = "&nbsp;Found " + txt +		' for word "<b>' + currentElement.__msh_origWord + '</b>"';	var select = document.getElementById("v_suggestions");	for (var i = select.length; --i >= 0;) {		select.remove(i);	}	var suggestions;	suggestions = this.nextSibling.firstChild.data.split(/,/);	for (var i = 0; i < suggestions.length; ++i) {		var txt = suggestions[i];		var option = document.createElement("option");		option.value = txt;		option.appendChild(document.createTextNode(txt));		select.appendChild(option);	}	document.getElementById("v_currentWord").innerHTML = this.__msh_origWord;	if (suggestions.length > 0) {		select.selectedIndex = 0;		select.onchange();	} else {		document.getElementById("v_replacement").value = this.innerHTML;	}	return false;};
meta: 5635	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5635/f35320be2513e7f5329a05f05b14412cbc31f533/spell_checker.js/buggy/fudge/wysiwyg/plugins/spell_checker/spell_checker.js