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

function receiveArguments()
{
    var selectedFile = arguments[0];
    dw.editIncludedFile(selectedFile);	
}

function canAcceptCommand() 
{
    return (!dw.IsIBE() && dw.canPopupCodeNavigator());
}

// 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 includedFiles = null;
	includedFiles = new Array();

	var listFiles = dw.getIncludedFiles();
	if (!listFiles || listFiles.length < 0)
	    return 0;

	for (var i = 0; i < listFiles.length; i = i + 1) 
	{
	    var url = new String(listFiles[i]);
	    includedFiles[i] = STR_EDIT;
	    includedFiles[i] = includedFiles[i].replace(/%s/i, url);
	    //includedFiles[i] += "'" + url + "'";

	    includedFiles[i] += ";id='" + url + "'";
	}
	
	return includedFiles;
}