var controls

function checkspelling(location) {
	controls = new Array();
	var possibleControls = document.getElementsByTagName('input');
	var j = 0;
	
	for (var i = 0 ; i < possibleControls.length ; i++) {
		if (possibleControls[i].type == "text")
			controls[j++] = possibleControls[i];
	}
	
	possibleControls = document.getElementsByTagName('textarea');
	for (var i = 0 ; i < possibleControls.length ; i++) {
		controls[j++] = possibleControls[i];
	}	
	
	spWindow = spellingPopup(location + 'comment/spellcheck.aspx', 'spellchecker', 'width=340,height=500,top=10,left=10,location=no,toolbar=no,scrollbars=yes,resizable=yes');
}

function spellingPopup(url, name, features) {
	return !window.open(url, name, features);
}