rem: for (var i = 0; i < a.length; ++i) { 
add: for (var i in a) { 
context: function wordClicked(scroll) {	var self = this;	if (scroll) (function() {		var pos = getAbsolutePos(self);		var ws = { x: frame.offsetWidth - 4,			   y: frame.offsetHeight - 4 };		var wp = { x: frame.contentWindow.document.body.scrollLeft,			   y: frame.contentWindow.document.body.scrollTop };		pos.x -= Math.round(ws.x/2);		if (pos.x < 0) pos.x = 0;		pos.y -= Math.round(ws.y/2);		if (pos.y < 0) pos.y = 0;		frame.contentWindow.scrollTo(pos.x, pos.y);	})();	if (currentElement) {		var a = allWords[currentElement.__msh_origWord];		currentElement.className = currentElement.className.replace(/\s*HA-spellcheck-current\s*/g, " ");		for (var i = 0; i < a.length; ++i) {			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 = 0; i < a.length; ++i) {		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 = "one occurrence";	} else if (a.length == 2) {		txt = "two occurrences";	} else {		txt = a.length + " occurrences";	}	var suggestions = suggested_words[this.__msh_origWord];	if (suggestions)		suggestions = suggestions.split(/,/);	else		suggestions = [];	var select = document.getElementById("v_suggestions");	document.getElementById("statusbar").innerHTML = "Found " + txt +		' for word "<b>' + currentElement.__msh_origWord + '</b>"';	for (var i = select.length; --i >= 0;) {		select.remove(i);	}	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;	}	select.style.display = "none";	select.style.display = "block";	return false;};
meta: 6230	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6230/70e7091322d161ad5e2256481886617b9211a07f/spell-check-ui.js/buggy/phpgwapi/js/htmlarea/plugins/SpellChecker/spell-check-ui.js