<!-- MENU-LOCATION=NONE -->
<html xmlns:MMString="http://www.macromedia.com/schemes/data/string/">
<HEAD>
<!-- Copyright 2000-2006 Adobe Macromedia Software LLC and its licensors. All rights reserved. -->
<TITLE><MMString:loadString id="Menus/MM/Window_Titles/title" /></TITLE>
<SCRIPT LANGUAGE="javascript">
<!--
function receiveArguments()
{
	var i=0;
	var theWindow = arguments[0];
	i=parseInt(theWindow);
	dw.setActiveWindow(dw.getDocumentList()[i]);
}

// The default is true, so we need to specify for false, otherwise
// dw.setActiveWindow() can lose focus
function isDOMRequired()
{
	return false;
}

function canAcceptCommand()
{
	var winlist = dw.getDocumentList();
	return winlist.length > 0;
}

// getDynamicContent returns the contents of a dynamically generated menu.
// returns an array of strings to be placed in the menu, with a unique
// identifier for each item separated from the menu string by a semicolon.
//
// return null from this routine to indicate that you are not adding any
// items to the menu
function getDynamicContent(itemID)
{
	var windowList = null;
	var i;
	windowList = new Array();
	var dwWindowNames = dw.getDocumentList();
	if (dwWindowNames.length > 0)
	{
		for (i=0; i<dwWindowNames.length; i++)
		{
			windowList[i] = new String(dwWindowNames[i].getWindowTitle());
			if (navigator.platform == "Win32")
			{
			    windowList[i] = windowList[i].replace(/&/g,"&&");
			}
			windowList[i] += ";id='"+i+"'"; // each item needs an ID
			windowList[i] = windowList[i].replace(/_/g,"%_");
		}
	}
	
	// On windows, prefix the items with underscored numbers
	if (navigator.platform == "Win32")
	{
		for (i = 0; i < windowList.length; i++)
		{
			if (i < 9)
				windowList[i] = "_"+(i+1)+" " + windowList[i];
			else
			{
				// for item 10 and above, underscore the second digit
				// (so "1" uses 1, but "10" uses 0, so the first 10 are all unique)
				var num = i+1;
				windowList[i] = ((num - num%10)/10) + "_"+ (num%10) +" " + windowList[i];
			}
		}
	}
	
	return windowList;
}

function isCommandChecked(itemID)
{
	var itemIndex = parseInt(itemID);
	return dw.getDocumentList()[itemIndex] == dw.getActiveWindow();
}

// -->   
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
