<Popup>
	<SymbolTable>
		<Symbol Name="$ig_showtray$" Value="show" Persist="1"/>
		<Symbol Name="$ig_s_action$" Value="Active" Persist="1" />
		<Symbol Name="$ig_s_type$" Value="Popup" Persist="1" />
		<Symbol Name="$ig_button_mailpopup$" Value="T" Persist="1"/>
		<Symbol Name="$ig_button_chatpopup$" Value="T" Persist="1"/>
		<Symbol Name="$ig_button_ticker2$" Value="T" Persist="1"/>
		<Symbol Name="$ig_button_radio$" Value="T" Persist="1"/>
		<Symbol Name="$ig_button_addressbook$" Value="T" Persist="1"/>
		<Symbol Name="$ig_button_welcome$" Value="T" Persist="1"/>
		<Symbol Name="$ig_disp_breakingnews$" Value="F" Persist="1" />
		<Symbol Name="$ig_tray_align$" Value="left" />
		<Symbol Name="$ig_alwaysontop$" Value="F" Persist="1" />
		<Symbol Name="$ig_scrollmenu$" Value="Medium Scroll" Persist="1"/>
	</SymbolTable>

	<ModelController>
		<Model  Type = "Menu" Name = "EPBarMainMenu"  >
				<MENU	Name = "EPBarMainMenu"  >
					<Items>
						<ACTION Name="Customize Ticker..."	Type="MultipleAction">
							<ViewCmd View="EPBar" >
								<TickerOptions />
							</ViewCmd>
						</ACTION>	
						<ACTION Name="Help" Type="MultipleAction" >
							<ViewCmd View="EPBar" >
								<ShowHelp Key="$help_tickermenu$" />
							</ViewCmd>
						</ACTION>
						<ACTION Name="About..." Type="ShowDialog" Dialog="About" />
						<Separator/>
						<Action Name="Always On Top" Type="MultipleAction">
							<ViewCmd View="EPBar" >
								<ToggleAlwaysOnTop />
							</ViewCmd>
						</Action>
						<Separator/>
						<Action Name="Slow Scroll" Type="MultipleAction">
							<ViewCmd View="EPBar" >
								<ChangeSpeed Item="Slow Scroll"/>
							</ViewCmd>
						</Action>
						<Action Name="Medium Scroll" Type="MultipleAction">
							<ViewCmd View="EPBar" >
								<ChangeSpeed Item="Medium Scroll"/>
							</ViewCmd>
						</Action>
						<Action Name="Fast Scroll" Type="MultipleAction">
							<ViewCmd View="EPBar" >
								<ChangeSpeed Item="Fast Scroll"/>
							</ViewCmd>
						</Action>
						<Separator/>
						<ACTION Name="Close" Type="ShowPopup" Popup="EPBar" ShowAction="Close"/>
					</Items>
				</MENU>
		</Model>

	</ModelController>

	<ViewController>

		<View	Name			=	"EPBar"
				Type			=	"TunerView"
				WindowTitle		=	"Ticker"
				ModeToken		=	"c0"
				Dockable		=	"yes"
				SaveState		=	"yes" >
			<Layout lf="primarybar.lyt" default="yes" />

			<ChildViews>
				<View Type="PrimaryTicker" Name="t1" Container="ticker1"/>
				<View Type="TickerButtonChrome" Name="TickerChildButtons" Container="ButtonChrome"/>
			</ChildViews>

			<StartAction>
				 <InitAction/>
				 <UpdateAction/>
			</StartAction>

			<ViewActions>

				<ViewAction Name="InitAction">
					<Subscribe Model="EPBarMainMenu" />
					<Subscribe Model="PhotonModel" />

					<xsl:choose>
						<xsl:when expr="[[@$ig_showtray$] $eq$ hide]">
							<InitHideTray />
						</xsl:when>
						<xsl:otherwise>
							<HideGlyph Glyph="ShowTickerBtn"/>
						</xsl:otherwise>
					</xsl:choose>
					
					<UpdateAlwaysOnTop/>

					<ChangeSpeed Item="[@$ig_scrollmenu$]" />
				</ViewAction>

				<ViewAction Name="InitHideTray">
					<GlyphCommand Glyph="HideTickerBtn">
						<HideGlyph/>
					</GlyphCommand>
					<GlyphCommand Glyph="ShowTickerBtn">
						<ShowGlyph/>
					</GlyphCommand>
					<GlyphCommand Glyph="ButtonChrome">
						<HideGlyph/>
					</GlyphCommand>
					<RestoreGlyphRect Glyph="TickerGlyph" />
				</ViewAction>

				<ViewAction Name="HideTray">
					<Symbol Name="$ig_showtray$" Value="hide"/>
					<Symbol Name="$ig_tray_align$" Value="right"/>
					<xsl:if expr="[[@$ig_bardock$] $eq$ F]">
						<SaveGlyphRect Glyph="TickerGlyph" />
					</xsl:if>
					<GlyphCommand Glyph="HideTickerBtn">
						<HideGlyph/>
					</GlyphCommand>
					<GlyphCommand Glyph="ShowTickerBtn">
						<ShowGlyph/>
					</GlyphCommand>
					<GlyphCommand Glyph="ButtonChrome">
						<HideGlyph/>
					</GlyphCommand>
					<RestoreGlyphRect Glyph="TickerGlyph" />
				</ViewAction>

				<ViewAction Name="ShowTray">
					<Symbol Name="$ig_showtray$" Value="show"/>
					<Symbol Name="$ig_tray_align$" Value="right"/>
					<SaveGlyphRect Glyph="TickerGlyph" />
					<GlyphCommand Glyph="ShowTickerBtn">
						<HideGlyph/>
					</GlyphCommand>
					<GlyphCommand Glyph="HideTickerBtn">
						<ShowGlyph/>
					</GlyphCommand>
					<GlyphCommand Glyph="ButtonChrome">
						<ShowGlyph/>
					</GlyphCommand>
					<RestoreGlyphRect Glyph="TickerGlyph" />
				</ViewAction>

				<ViewAction Name="ToggleAlwaysOnTop">
					<xsl:choose>
						<xsl:when expr="[[@$ig_alwaysontop$] $eq$ F]">
							<Symbol Name="$ig_alwaysontop$" Value="T"/>
						</xsl:when>
						<xsl:when expr="[[@$ig_alwaysontop$] $eq$ T]">
							<Symbol Name="$ig_alwaysontop$" Value="F"/>
						</xsl:when>
					</xsl:choose>
					<UpdateAlwaysOnTop />
				</ViewAction>

				<ViewAction Name="UpdateAlwaysOnTop">
					<xsl:choose>
						<xsl:when expr="[[@$ig_alwaysontop$] $eq$ T]">
							<SetPlacementOrder Placement="TopMost" />
							<Action Type="ModelCommand" Name="EPBarMainMenu">
								<MenuImage Item="Always On Top" Image="./skins/default/menucheck.gif"/>
							</Action>
						</xsl:when>
						<xsl:when expr="[[@$ig_alwaysontop$] $eq$ F]">
							<SetPlacementOrder Placement="NoTopMost" />
							<Action Type="ModelCommand" Name="EPBarMainMenu">
								<MenuImage Item="Always On Top" />
							</Action>
						</xsl:when>
					</xsl:choose>
				</ViewAction>

				<ViewAction Name="ChangeSpeed">
					<ChildAction Name="t1">
						<ScrollSpeed Speed="@Item" />
					</ChildAction>

					<Action Type="ModelCommand" Name="EPBarMainMenu">
						<MenuImage Item="[@$ig_scrollmenu$]" />
					</Action>

					<Action Type="ModelCommand" Name="EPBarMainMenu">
						<MenuImage Item="@Item" Image="./skins/default/menubullet.gif"/>
					</Action>

					<Symbol Name="$ig_scrollmenu$" Value="@Item"/>

				</ViewAction>

				<ViewAction Name="UpdateButton">
					<xsl:choose>
						<xsl:when expr="[[@ButtonSymbol] $eq$ F]">
							<HideGlyph Glyph="@ButtonGlyph"/>
						</xsl:when>
						<xsl:when expr="[[@ButtonSymbol] $eq$ T]">
							<ShowGlyph Glyph="@ButtonGlyph"/>
						</xsl:when>
					</xsl:choose>
				</ViewAction>

				<ViewAction Name="UpdateToolbar">
					<UpdateButton ButtonGlyph="MailButtons" ButtonSymbol="[@$ig_button_mailpopup$]" />
					<UpdateButton ButtonGlyph="ChatButtons" ButtonSymbol="[@$ig_button_chatpopup$]" />
					<UpdateButton ButtonGlyph="AddressBookButton" ButtonSymbol="[@$ig_button_addressbook$]" />
					<UpdateButton ButtonGlyph="Welcome" ButtonSymbol="[@$ig_button_welcome$]" />
					<UpdateButton ButtonGlyph="Radio" ButtonSymbol="[@$ig_button_radio$]" />
					<RequisitionChanged />
				</ViewAction>

				<ViewAction Name="GoSearch">
					<GetText Glyph="SearchString" Symbol="$ig_s4$"/>
					<DoSearch/>
				</ViewAction>

				<ViewAction Name="DoSearch">
					<xsl:choose>
						<xsl:when expr="[[@$ig_s_type$] $eq$ Help]">
							<ACTION	Name = "Help Topics" Type="ShowPopup" Popup="IGPopupHelp" >
								<NavAction NavURL = "http://$siteserver$/content.php?page=HelpRedirect&topic=$ig_s4$&context=popup" />
							</ACTION>
						</xsl:when>
						<xsl:when expr="[[@$ig_s_action$] $eq$ Popup]">
							<Action Type="ShowPopup" Popup="IGPopupSearch">
								<NavAction NavURL="$searchurl$s4=$ig_s4$&amp;type=$ig_s_type$"/>
							</Action>
						</xsl:when>
						<xsl:otherwise>
							<Action Type="ShellExecute" File="$ig_s_action$"/>
						</xsl:otherwise>
					</xsl:choose>
				</ViewAction>

				<ViewAction Name="EnterKey">
					<GoSearch/>
				</ViewAction>

				<ViewAction Name="SetSubscribeButton">
					<xsl:choose>
						<xsl:when expr="[[@$userstatus$] $eq$ trial]">
							<GlyphCommand Glyph="Subscribe">
								<ShowGlyph />
							</GlyphCommand>
						</xsl:when>
						<xsl:when expr="[[@$userstatus$] $eq$ trialexpired]">
							<GlyphCommand Glyph="Subscribe">
								<ShowGlyph />
							</GlyphCommand>
						</xsl:when>
						<xsl:otherwise>
							<GlyphCommand Glyph="Subscribe">
								<HideGlyph />
							</GlyphCommand>
						</xsl:otherwise>
					</xsl:choose>
					<DbgMsg Msg="UserStatus = [@$userstatus$] \n" />
				</ViewAction>

				<ViewAction Name="TickerOptions">
					<ChildAction Name="t1">
						<Edit/>
					</ChildAction>
				</ViewAction>

			</ViewActions>

			<View	Name		=	"EPBarMainMenu"
					Type		=	"ButtonMenuView"
					ButtonGlyph =	"MainMenu" >

				<Query Model="EPBarMainMenu" />

				<Glyph			Name		="MainMenuGlyph"
								Type		="Menu"
								Style		="Skin.EPBar.Menu.Style"
								Normal		="Skin.EPBar.Menu.Normal"
								Selected	="Skin.EPBar.Menu.Selected"
								LeftEdge	="Skin.EPBar.Menu.LeftEdge"
								RightEdge	="Skin.EPBar.Menu.RightEdge"
								TopEdge		="Skin.EPBar.Menu.TopEdge"
								BottomEdge	="Skin.EPBar.Menu.BottomEdge"
								LabelColorNormal = "Skin.EPBar.Menu.LabelColorNormal"
								LabelColorSelected = "Skin.EPBar.Menu.LabelColorSelected"  />
			</View>

		</View>
	</ViewController>
</Popup>