<!-- MENU-LOCATION=NONE -->
<HTML>
<HEAD>
<TITLE>Services</TITLE>
<script type="text/javascript" src="CSXSServices.js"></script>
<SCRIPT LANGUAGE="javascript">
<!--
function receiveArguments()
{
	var id = arguments[0];
	if(id == 'fly') {
		alert('This menu command duplicates a test panel and makes it visible');
		DWfile.copy(dw.getConfigurationPath() + '/Floaters/Service1.htm',dw.getConfigurationPath() + '/Floaters/serviceFly.htm');
		dw.toggleFloater('serviceFly');
		return;
	} 
	if(id == 'bicom') {
		//alert('You can comunicate between dw and flash and vice-vera');
		//DWfile.copy(dw.getConfigurationPath() + '/Floaters/Service1.htm',dw.getConfigurationPath() + '/Floaters/serviceFly.htm');
		dw.toggleFloater('interComunication');
		return;
	} 
	if(id == 'local') {
		dw.toggleFloater('localContent');
		return;
	} 
	if(id == 'online') {
		dw.toggleFloater('onlineContent');
		return;
	} 
	if (id == 'cs3floater') {
	  dw.toggleFloater('PhotoAlbum');
	}
	if(id == 'authplay') {
	  var swfPath = dw.getConfigurationPath();
	  swfPath += '/flash/PhotoAlbum.swf';
		dw.newFlashFloater(swfPath,'photo_album');
		dw.toggleFloater('photo_album');
		return;
	} 
	if (id == 'ball') {
	  var swfPath = dw.getConfigurationPath();
	  swfPath += '/flash/BouncyBallCS3.swf';
		dw.newFlashFloater(swfPath,'Bouncy_Ball');
		dw.toggleFloater('Bouncy_Ball');
		return;
	} 
	if (id == 'helpterm') {
	  var swfPath = dw.getConfigurationPath();
//	  invokeSearchHelpTerm();
	  swfPath += '/HelpSearch/swf/HelpTerm.swf';
		dw.newFlashFloater(swfPath,'Help_Term');
		dw.toggleFloater('Help_Term');
		return;
	} 
	if (id == 'plugplug') {
	  if (CSXS.initialize())
	    CSXS.invokeKuler();
	}
}

function canAcceptCommand()
{
	return true;
}

// 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 menuItems = new Array();
	menuItems.push(new String("Old School Floater;id='cs3floater'"));
	menuItems.push(new String("Authplay;id='authplay'"));
	menuItems.push(new String("Bouncy Ball;id='ball'"));
	menuItems.push(new String("PlugPlug;id='plugplug'"));
	menuItems.push(new String("Help Term;id='helpterm'"));
	menuItems.push(new String("---------;id='separator'"));
	populateServicesMenu(menuItems);
	return menuItems;
}

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

function populateServicesMenu(menuItems)
{
  if (menuItems != undefined) {
     
    if (!CSXS.initialize())
      return false;
 
    for (i=0; i < CSXS.menuItems.length; i++) {
      menuItem = CSXS.menuItems[i];
      // add the menus retrieved from CXSXS they are in CSXS.menuItems
      // format for Dreamweaver is a string in the following format: "Menu Name;id='menuID'" 
      menuItems.push(new String(menuItem.nameUtf8 + ";id='" +  menuItem.menuId + "'" ));
    }
  }
}

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