		function ActivSpellClass() {
			this.init();	
		}

		ActivSpellClass.prototype = new Object();
		ActivSpellClass.prototype.init = function() {
			this.argsIndex = -1;
			this.fieldRefs = new Array();
			this.ignore = new Array();
			this.change = new Array();
			this.changeto = new Array();
			this.replacements = new Array();
		}
		
		ActivSpell = new ActivSpellClass();
		
		function nextField() {

		}
	
		function spell() 
		{	
			ActivSpell.init();
			ActivSpell.fieldRefs = arguments;
			
			//override nextField since registering onpropertychange fires itself
			nextField = function() {
				ActivSpell.argsIndex++;
				ActivSpell.replacements = new Array();
				if(ActivSpell.argsIndex < ActivSpell.fieldRefs.length) {
					if (eval(ActivSpell.fieldRefs[ActivSpell.argsIndex]).length == 0) {
						nextField();
					}
					
				ActivSpellWin = window.open("/spellchecker/window.cfm?jsvar=" + ActivSpell.fieldRefs[ActivSpell.argsIndex], "ActivSpellWin", "height=230,width=450,status=no,toolbar=no,menubar=no,location=no");
				} else {
					spellCheckComplete();
				}
			}
			
			//index ActivSpell.argsIndex
			ActivSpell.argsIndex++;
			
			//send the first field to spellcheck
			if (eval(ActivSpell.fieldRefs[ActivSpell.argsIndex]).length == 0) {
				nextField();
			} else {
				ActivSpellWin = window.open("/spellchecker/window.cfm?jsvar=" + ActivSpell.fieldRefs[0], "ActivSpellWin", "height=230,width=450,status=no,toolbar=no,menubar=no,location=no");	
			}
		}
		
		function spellFCK() 
		{	
			ActivSpell.init();
			ActivSpell.fieldRefs = arguments;
			
			//override nextField since registering onpropertychange fires itself
			nextField = function() {
				ActivSpell.argsIndex++;
				ActivSpell.replacements = new Array();
				if(ActivSpell.argsIndex < ActivSpell.fieldRefs.length) {
					if (eval(ActivSpell.fieldRefs[ActivSpell.argsIndex]).length == 0) {
						nextField();
					}
					
				ActivSpellWin = window.open("/spellchecker/window.cfm?jsvar=" + ActivSpell.fieldRefs[ActivSpell.argsIndex], "ActivSpellWin", "height=230,width=450,status=no,toolbar=no,menubar=no,location=no");
				} else {
					spellCheckComplete();
				}
			}
			
			//index ActivSpell.argsIndex
			ActivSpell.argsIndex++;
			
			//send the first field to spellcheck
			if (eval(ActivSpell.fieldRefs[ActivSpell.argsIndex]).length == 0) {
				nextField();
			} else {
				ActivSpellWin = window.open("/spellchecker/window.cfm?jsvar=" + ActivSpell.fieldRefs[0], "ActivSpellWin", "height=230,width=450,status=no,toolbar=no,menubar=no,location=no");	
			}
		}
		
		function spellCheckComplete() {
			alert("Spell Check Complete!");
			
			ActivSpell.argsIndex = -1;
			nextField = function() {}
			ActivSpellWin.close();
		}
		
		function spellcheckerBeginFCK(EditorName) {
			// Get the text from the FCKEditor
			// Run the spell-checker on the text
			//spell(textForm);
			//BEM 10/29/09: changed this to an associative check on the name bc the dashes in event builder didn't like the dot separators
			spell('FCKeditorAPI.Instances[\'' + EditorName +'\'].EditorDocument.body.innerHTML');


		}
		
		function spellcheckerBegin(EditorName) {
			var theForm = document.getElementsByTagName('form')[0];
  			var formName = theForm.name;
			// Get the text from the FCKEditor
			// Run the spell-checker on the text
			//spell(textForm);
			spell('document.' + formName +'[\'' + EditorName +'\'].value');


		}
		
	/*	function spellcheckerFinish() {
			// Put the spell-checked text back into the FCKEditor
			var theForm = document.getElementsByTagName('form')[0];
  			var formName = theForm.name;
			textForm = eval('document.' + formName + '.spellcheckText.value');
			messageForm = eval('document.' + formName + '.spellcheckName.value');
			alert(textForm);
			alert(messageForm);
			FCKeditorAPI.GetInstance(messageForm).SetHTML(textForm);
			return false;
		}
*/
