<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/content/utilityOverlay.css"?>
<?xul-overlay href="chrome://global/content/platformGlobalOverlay.xul"?>

<!DOCTYPE window SYSTEM "chrome://communicator/locale/utilityOverlay.dtd">

<overlay id="utilityOverlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <script language="javascript" src="chrome://communicator/content/utilityOverlay.js"></script>
  <script language="javascript" src="chrome://global/content/builtinURLs.js"></script>
         
  <!-- online/offline status indicators -->
  <broadcasterset id="broadcasterset">
  	<broadcaster id="Communicator:Synchronize" value="&offlineSynchronizeCmd.label;" disabled="true" />
	  <broadcaster id="Communicator:WorkMode" value="&offlineGoOfflineCmd.label;" oncommand="setOfflineStatus(true);"/>
  </broadcasterset>
  <statusbarpanel id="offline-status" observes="Communicator:WorkMode"/>
  <menu id="offlineMenu" value="&offlineMenu.label;" accesskey="&offlineMenu.accesskey;">
    <menupopup id="offlineMenuPopup">
      <menuitem position="1" accesskey="&offlineGoOfflineCmd.accesskey;" observes="Communicator:WorkMode"/>
      <menuseparator position="2"/>
      <menuitem position="3" accesskey="&offlineSynchronizeCmd.accesskey;" observes="Communicator:Synchronize"/>
    </menupopup>
  </menu>


	<!-- File Menu -->
	<menu id="menu_File" value="&fileMenu.label;" accesskey="&fileMenu.accesskey;"/>
	
	<!-- New SubMenu (Under File Menu) -->
	<broadcaster id="cmd_newNavigator" oncommand="OpenBrowserWindow()"/>
	<broadcaster id="cmd_newMessage"   oncommand="goOpenNewMessage()"/>
	<broadcaster id="cmd_newEditor"    oncommand="NewEditorWindow();"/>
	<broadcaster id="cmd_sendPage"	   oncommand="SendPage();"/>
	<!-- NOT IMPLEMENTED, so temporarily disabled -->
	<broadcaster id="cmd_newEditorTemplate"   disabled="true"  oncommand="NewEditorFromTemplate();"/>
	<broadcaster id="cmd_newEditorDraft"      disabled="true"  oncommand="NewEditorFromDraft();"/>
  <broadcaster id="cmd_pageSetup" value="&pageSetupCmd.label;" disabled="true" oncommand="goPageSetup();"/>
  
	<menuitem id="menu_newEditor"         value="&newBlankPageCmd.label;"         accesskey="&newBlankPageCmd.accesskey;" key="key_newBlankPage" observes="cmd_newEditor"/>
	<menuitem id="menu_newEditorTemplate" value="&newPageFromTemplateCmd.label;"  accesskey="&newPageFromTemplateCmd.accesskey;"                 observes="cmd_newEditorTemplate"/>
	<menuitem id="menu_newEditorDraft"    value="&newPageFromDraftCmd.label;"     accesskey="&newPageFromDraftCmd.accesskey;"                    observes="cmd_newEditorDraft"/>
 
	<menu id="menu_New" value="&newMenu.label;" accesskey="&newMenu.accesskey;"/>
	<menuitem id="menu_newNavigator" value="&newNavigatorCmd.label;" accesskey="&newNavigatorCmd.accesskey;" key="key_newNavigator" observes="cmd_newNavigator"/>
	<menuitem id="menu_newMessage" value="&newMessageCmd.label;" accesskey="&newMessageCmd.accesskey;" key="key_newMessage" observes="cmd_newMessage"/>
	<menuitem id="cmd_newCard" value="&newCardCmd.label;" accesskey="&newCardCmd.accesskey;" oncommand="goNewCardDialog(0)"/>
	<menuitem id="menu_sendPage" 	 value="&sendPage.label;"  accesskey="&sendPage.accesskey;" key="key_sendPage"  observes="cmd_sendPage"/>
	

	<key id="key_newBlankPage"  xulkey="true" shift="true" key="&newBlankPageCmd.key;" observes="cmd_newEditor"/>
	<key id="key_newNavigator"  xulkey="true" shift="false" key="&newNavigatorCmd.key;" observes="cmd_newNavigator"/>
	<key id="key_newMessage"    xulkey="true" key="&newMessageCmd.key;" observes="cmd_newMessage"/>

	<!-- Edit Menu -->
	<menu id="menu_Edit" value="&editMenu.label;" accesskey="&editMenu.accesskey;"/>
	<menuitem id="menu_undo" value="&undoCmd.label;" key="key_undo" accesskey="&undoCmd.accesskey;" observes="cmd_undo"/>
	<menuitem id="menu_redo" value="&redoCmd.label;" key="key_redo" accesskey="&redoCmd.accesskey;" observes="cmd_redo"/>
	<menuitem id="menu_cut" value="&cutCmd.label;" key="key_cut" accesskey="&cutCmd.accesskey;" observes="cmd_cut"/>
	<menuitem id="menu_copy" value="&copyCmd.label;" key="key_copy" accesskey="&copyCmd.accesskey;" observes="cmd_copy"/>
	<menuitem id="menu_paste" value="&pasteCmd.label;" key="key_paste" accesskey="&pasteCmd.accesskey;" observes="cmd_paste"/>
	<menuitem id="menu_delete" value="&deleteCmd.label;" key="key_delete" accesskey="&deleteCmd.accesskey;" observes="cmd_delete"/>
	<menuitem id="menu_selectAll" value="&selectAllCmd.label;" key="key_selectAll" accesskey="&selectAllCmd.accesskey;" observes="cmd_selectAll"/>
	
	<key id="key_undo" xulkey="true" key="&undoCmd.key;" observes="cmd_undo"/>
	<key id="key_redo" xulkey="true" key="&redoCmd.key;" observes="cmd_redo"/>
	<key id="key_cut" xulkey="true" key="&cutCmd.key;" observes="cmd_cut"/>
	<key id="key_copy" xulkey="true" key="&copyCmd.key;" observes="cmd_copy"/>
	<key id="key_paste" xulkey="true" key="&pasteCmd.key;" observes="cmd_paste"/>
	<key id="key_selectAll" xulkey="true" key="&selectAllCmd.key;" observes="cmd_selectAll"/>
	<key id="key_preferences" observes="cmd_preferences"/>
  
	<commandset id="globalEditMenuItems"
					commandupdater="true"
					events="focus"
					oncommandupdate="goUpdateGlobalEditMenuItems()"/>

	<commandset id="selectEditMenuItems"
					commandupdater="true"
					events="select"
					oncommandupdate="goUpdateSelectEditMenuItems()"/>

	<commandset id="undoEditMenuItems"
					commandupdater="true"
					events="undo"
					oncommandupdate="goUpdateUndoEditMenuItems()"/>
					
	<broadcaster id="cmd_undo" 
				 oncommand="goDoCommand('cmd_undo')"
				 disabled="true"/>
	<broadcaster id="cmd_redo" 
				 oncommand="goDoCommand('cmd_redo')"
				 disabled="true"/>
	<broadcaster id="cmd_cut" 
				 oncommand="goDoCommand('cmd_cut')"
				 disabled="true"/>
	<broadcaster id="cmd_copy" 
				 oncommand="goDoCommand('cmd_copy')"
				 disabled="true"/>
	<broadcaster id="cmd_paste" 
				 oncommand="goDoCommand('cmd_paste')"
				 disabled="true"/>
	<broadcaster id="cmd_delete"
				 oncommand="goDoCommand('cmd_delete')"
				 valueDefault="&deleteCmd.label;"
				 disabled="true"/>
	<broadcaster id="cmd_selectAll"
				 oncommand="goDoCommand('cmd_selectAll')"
				 disabled="true"/>
	
	<!-- Not needed yet, window just needs a broadcaster with this id and oncommand=  broadcaster id="cmd_preferences"/-->
	
	<menuitem id="menu_preferences"
			  value="&preferencesCmd.label;"
			  key="key_preferences"
			  accesskey="&preferencesCmd.accesskey;"
			  observes="cmd_preferences"/>
		  
	<!-- Search Menu -->

	
	<!-- View Menu -->
	<menu id="menu_View" value="&viewMenu.label;" accesskey="&viewMenu.accesskey;"/>
	<menu id="menu_Toolbars" value="&viewToolbarsMenu.label;" accesskey="&viewToolbarsMenu.accesskey;"/>
	<menuitem id="menu_showTaskbar"
			  value="&showTaskbarCmd.label;"
			  accesskey="&showTaskbarCmd.accesskey;"
			  oncommand="goToggleToolbar('taskbar', 'menu_showTaskbar')"
			  checked="true"/>

	<!-- Help Menu -->
	<menu id="menu_Help" value="&helpMenu.label;">
		<menupopup id="helpPopup" oncreate="helpMenuCreate()">
			<menuitem value="&releaseCommCmd.label;" id="releaseUrl"  />
			<menuitem value="&aboutCommCmd.label;" name="&aboutCommCmd.label;" id="releaseName" oncommand="goAboutDialog();"/>
		</menupopup>
	</menu>
	
	<!-- XXX NEEDS XBLIFICIATION!! Gray horizontal splitter -->
	<splitter id="gray_horizontal_splitter" class="gray-horizontal-splitter">
		<box id="begincap" align="horizontal">
			<spring flex="100%"/>
		</box>
		<spring flex="100%"/>
		<grippy/>
		<spring flex="100%"/>
		<box id="endcap" align="horizontal">
			<spring flex="100%"/>
		</box>
	</splitter>

	<!-- Toolbar boxes -->
	<box id="toolbar_button_box" align="horizontal" flex="100%"/>
	
</overlay>