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

function isDOMRequired()
{
	return FALSE;
}

function isAtLeastOneFloaterVisible()
{
	var bResult = false;
	if (
		dw.getFloaterVisibility('objects') || dw.getFloaterVisibility('properties') ||
		dw.getFloaterVisibility('launcher') || dw.getFloaterVisibility('') ||
		dw.getFloaterVisibility('html styles') ||
		dw.getFloaterVisibility('css styles') || dw.getFloaterVisibility('behaviors') ||
		dw.getFloaterVisibility('timelines') || dw.getFloaterVisibility('html') ||
		dw.getFloaterVisibility('layers') || dw.getFloaterVisibility('frames') ||
		dw.getFloaterVisibility('assets') || dw.getFloaterVisibility('history') ||
		dw.getFloaterVisibility('server behaviors') || dw.getFloaterVisibility('data bindings')
		)
		bResult=true;

	return bResult;
}

function receiveArguments()
{
	dw.setHideAllFloaters(!dw.getHideAllFloaters());
}

function canAcceptCommand()
{
	// we only enable the Hide Floaters menu item if at least one floater is available.
	if (!dw.getHideAllFloaters())
		return isAtLeastOneFloaterVisible();
	else
		return true;
}

// setMenuText is called by Dreamweaver to set the text of
// a menu item. We do this when our menu item is dynamic
// only in that the text changes, rather than having to
// write a full-blown dynamic menu.
function setMenuText()
{
	if (!dw.getHideAllFloaters())
		return MENU_HideFloatingPalettes;
	else
		return MENU_ShowFloatingPalettes;
}
