<Popup>
	<ViewController>
		<View	Name		=	"PopupDetails"
				ModelName	=	"OTModel"
				Type		=	"PopupView"
				WindowTitle	=	"Details"
				Width		=	"680" 
				Caption		=	"yes" >

			<Layout lf="PopupDetails.lyt" default="yes" gf="http" xv="1" r="t"/>

			<ChildViews>
				<View Type="PopupButtonChrome" Name="ChildButtonChrome" Container="ButtonChrome"/>
				<View Name="PrevHistoryMenu" Type="PrevHistoryMenuView"/>
				<View Name="NextHistoryMenu" Type="NextHistoryMenuView"/>
			</ChildViews>

			<StartAction>
				<InitAction/>
			</StartAction>

			<XMLEventSubscription Name="DFetchXML"/>

			<XMLGlyphs>
				<Glyph Name="HTML"/>
			</XMLGlyphs>

			<ViewActions>
				<ViewAction Name="InitAction">
					<xsl:choose>
						<xsl:when expr="[[@$smartscreen$] $eq$ y]">
							<Symbol Name="$ss_detailspopup$" Value="T" />
						</xsl:when>
						<xsl:otherwise>
							<Symbol Name="$ss_detailspopup$" Value="F" />
						</xsl:otherwise>
					</xsl:choose>
				</ViewAction>

				<ViewAction Name="ShowURL" SaveHistory="Details">
					<ChangeTitle Title="@Title" />
					<GlyphCommand Glyph="HTML">
						<Navigate URL="[@URL]"/>
					</GlyphCommand>
					<Symbol Name="$details_url$" Value="@URL" />
				</ViewAction>		
				
				<ViewAction Name="ShowURLNoHistory" >
					<GlyphCommand Glyph="HTML">
						<Navigate URL="[@URL]"/>
					</GlyphCommand>
					<Symbol Name="$details_url$" Value="@URL" />
				</ViewAction>			

				<ViewAction Name="HTML:Nav">
					<DbgMsg Msg="Got Nav Message" />
					<PushHistory History="Details">
						<ShowURLNoHistory URL="@URL" />
					</PushHistory>
					<Symbol Name="$details_url$" Value="@URL" />
				</ViewAction>

				<ViewAction Name="HTML:NavComplete">
					<xsl:if expr="[[@name] $ne$ NULL]">
						<ChangeTitle Title="@name" />
					</xsl:if>
				</ViewAction>

				<ViewAction Name="ChangeTitle">
					<SetWindowTitle Title="@Title" />
					<Symbol Name="$details_title$" Value="@Title" />
					<SetHistoryTitle History="Details" Title="@Title" />
				</ViewAction>

				<ViewAction Name="EmailLink">
					<CheckSecureMode/>
					<g_SendEmail Subject="[@$details_title$]" Body="I thought you might be interested in this page I found in AOL Communicator: &lt;A HREF='$details_url$&amp;mode=email'&gt;$details_title$&lt;/A&gt;" />
				</ViewAction>

				<ViewAction Name="Print" >
					<GlyphCommand Glyph="HTML">
						<Print />
					</GlyphCommand>
				</ViewAction>

				<ViewAction Name="VideoLink">
					<g-ShowVideo URL="@url" Provider="@provider" />
				</ViewAction>

				<ViewAction Name="bcatLink">
					<FetchXML url="@url" mode="bcatLink" />
				</ViewAction>

				<ViewAction Name="FetchXML">
					<Action Type="FetchTable">
						<FetchTable Name="FetchXML">
							<FetchItem Name="FetchStock" Url="@url">
								<FetchHandler Name="XMLEvent" >
									<DFetchXML mode="na"/>
								</FetchHandler>
							</FetchItem>
						</FetchTable>
					</Action>
				</ViewAction>

				<ViewAction Name="DFetchXML" >
					<xsl:choose>
						<xsl:when expr="[[@{DFetchXML/ALERTINBOX/DATOM/MEDIABUNDLE/@TYPE}] $eq$ video]"> 
							<g-ShowVideo URL="[@{DFetchXML/ALERTINBOX/DATOM/MEDIABUNDLE/MEDIA/URL}]" TITLE="[@{DFetchXML/ALERTINBOX/DATOM/TITLE}]" PROVIDER="[@{DFetchXML/ALERTINBOX/DATOM/MEDIABUNDLE/MEDIA/@FEED}]"/>
						</xsl:when>
						<xsl:otherwise>
							<ShowURL URL="[@{DFetchXML/ALERTINBOX/DATOM/URL}]" TITLE="[@{DFetchXML/ALERTINBOX/DATOM/TITLE}]" />
						</xsl:otherwise>
					</xsl:choose>
				</ViewAction>  

			</ViewActions>

			<View Name="PrevHistoryMenu" ModelName="EPBarMainMenu" ButtonGlyph="PrevHistory" Type="ButtonMenuView">
				<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" />
				<ViewActions>
					<ViewAction Name="MenuClick">
						<ParentAction>
							<HistoryMenu History="Details" View="PrevHistoryMenu" Back="y"/>
						</ParentAction>
					</ViewAction>
				</ViewActions>
			</View>
			<View Name="NextHistoryMenu" ModelName="EPBarMainMenu" ButtonGlyph="NextHistory" Type="ButtonMenuView">
				<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" />
				<ViewActions>
					<ViewAction Name="MenuClick">
						<ParentAction>
							<HistoryMenu History="Details" View="NextHistoryMenu" Back="n"/>
						</ParentAction>
					</ViewAction>
				</ViewActions>
			</View>
		</View>
	</ViewController>
</Popup>
