// Copyright 2000, 2001, 2002, 2003 Macromedia, Inc. All rights reserved.

function receiveArguments()
{
	
	var dom = dw.getDocumentDOM();

	var itemID = arguments[0];

	if (itemID == "CC:Spell:Add")
		dom.addwordToDictionary();
	else if (itemID == "CC:Spell:Ignore")
		dom.ignoreCurrentWord();

}

function canAcceptCommand()
{
	var dom = dw.getDocumentDOM();
	// enable these items only if the current word has a spelling error.
	return dom && dom.isCurrentWordHasSpellingError();
}


function getDynamicContent()
{
	var result = new Array;
	var resultIndex = 0;
	// the user can add the word to the dictionary or ignore the word.
	result[resultIndex++] = MENU_strSpellIgnore + ";id='CC:Spell:Ignore'";
	result[resultIndex++] = MENU_strSpellAddToDictionary + ";id='CC:Spell:Add'";			

	return result;
}
