// Copyright 2000, 2001, 2002, 2003 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')||
		dw.getFloaterVisibility('search')||dw.getFloaterVisibility('validation')||
		dw.getFloaterVisibility('btc')||dw.getFloaterVisibility('linkchecker')||
		dw.getFloaterVisibility('reports')||dw.getFloaterVisibility('ftplog')||
		dw.getFloaterVisibility('debug')
		)
		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;
}
