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

function receiveArguments()
{
	if (!arguments)
		return 0;

	var itemID = arguments[0];	
	ccwf.executeAction(itemID);
}

function canAcceptCommand()
{
	if(dw.isCCOnline() && dw.isPageEnabled() && CCWorkspaceManager.getManager(dw.getDocumentDOM()) != null && (ccwf.isCCWF() && ccwf.isActionsEnabled()) && dw.isSendActionMenuItemEnabled() && !CCWorkspaceManager.getManager(dw.getDocumentDOM()).isBlogSite())
		return true;
	else
		return false;
}

function getDynamicContent()
{
	var items = new Array;
		
	if(ccwf.isCCWF())
	{
		var actions = ccwf.getGenericActions();

		if (!actions)
			return 0;

		if (actions.length < 1)
			return 0;

		var i;
		var item = 0;
		for (i = 0; i < actions.length; i ++)
		{
			items[item++] = actions[i] + ";id='" + actions[i] + "'";
		}
	}

	return items;
}
