// Copyright 2000 Macromedia, Inc. All rights reserved.

function receiveArguments()
{
	var dom = dw.getDocumentDOM();
	if (dom && dom.getFocus() == 'frameset')
		dw.saveFramesetAs(dw.getDocumentDOM())
	else
		if (dom && dom.getFocus() == 'none')
			dw.setFocus('document');
		dw.saveDocumentAs(dw.getDocumentDOM());
}

function canAcceptCommand()
{
	var dom = dw.getDocumentDOM();
	if (dom && dom.getFocus() == 'frameset')
		return (dw.getFocus(true) == 'html' || dw.getFocus() == 'textView' || dw.getFocus() == 'document') && dw.canSaveFramesetAs(dw.getDocumentDOM());
	else
		return ((dw.getFocus() == 'textView' || dw.getFocus(true) == 'html') || (dw.getFocus() == 'document')) && !dw.getDocumentDOM().getEditNoFramesContent();
}

function setMenuText()
{
	var dom = dw.getDocumentDOM();
	if (dom && dom.getFocus() == 'frameset')
		return MENU_SaveFramesetAs;
    else if (dom && dom.isDocumentInFrame())
		return MENU_SaveFrameAs;
	else
		return MENU_SaveAs;
}
