<?xml version="1.0" encoding="UTF-8"?>
<window id="1137">

	<defaultcontrol always="true">10</defaultcontrol>
	<onload>SetFocus(10)</onload>

	<controls>
        <include condition="Skin.HasSetting(Sub_MainMenuBG)">SubBackgroundLists</include>
	    <!-- Default background if no show selected -->
		<include>DefaultBackground</include>
		<include>OpenClose</include>

		<control type="group">

			<!-- Hidden Button to focus the left list on load -->
			<control type="button" id="10">
				<include>HiddenButton</include>
				<onleft>SetFocus(4000)</onleft>
				<onright>SetFocus(4000)</onright>
				<onup>SetFocus(4000)</onup>
				<ondown>SetFocus(4000)</ondown>
				<onback>SetFocus(4000)</onback>
				<onclick>SetFocus(4000)</onclick>
				<onfocus>SetFocus(4000)</onfocus>
			</control>
			<!-- Hidden label with weekday -->
			<control type="label" id="11">
			    <label>$INFO[System.Date(DDD)]</label>
			    <include>HiddenObject</include>
		    </control>
            <!-- Background fanart -->
			<control type="image">
				<posx>0</posx>
				<posy>0</posy>
				<include>Dimensions_Fullscreen</include>
				<aspectratio>scale</aspectratio>
				<texture background="true">$INFO[Container.ListItem.Art(fanart)]</texture>
				<visible>Control.HasFocus(5001) | Control.HasFocus(5002) | Control.HasFocus(5003) |
				         Control.HasFocus(5004) | Control.HasFocus(5005) | Control.HasFocus(5006) |
						 Control.HasFocus(5007)</visible>
				<fadetime>600</fadetime>
				<animation effect="fade" time="600">Visible</animation>
				<animation effect="fade" time="600">Hidden</animation>
			</control>

			<!-- Menu backgrounds -->
			<control type="image" description="Left Side background">
				<colordiffuse>dfcebe9e</colordiffuse>
				<left>10</left>
				<top>60</top>
				<width>462</width>
				<height>980</height>
				<texture border="45">dialogs/TinyDialog.png</texture>
				<!-- <colordiffuse>$VAR[DialogBGColor]</colordiffuse> -->
			</control>
			<control type="image" description="Right Side Background">
				<colordiffuse>dfcebe9e</colordiffuse>
				<left>472</left>
				<top>60</top>
				<width>1419</width>
				<height>980</height>
				<texture border="45">dialogs/TinyDialog.png</texture>
				<!-- <colordiffuse>$VAR[DialogBGColor]</colordiffuse> -->
			</control>

			<!-- Busy Loader -->
			<control type="group">
				<top>104</top>
				<left>400</left>
				<height>410</height>
				<visible>![[!Container(5001).IsUpdating + Integer.IsGreater(Container(5001).NumItems,0)] | [!Container(5002).IsUpdating + Integer.IsGreater(Container(5002).NumItems,0)] |
				           [!Container(5003).IsUpdating + Integer.IsGreater(Container(5003).NumItems,0)] | [!Container(5004).IsUpdating + Integer.IsGreater(Container(5004).NumItems,0)] |
						   [!Container(5005).IsUpdating + Integer.IsGreater(Container(5005).NumItems,0)] | [!Container(5006).IsUpdating + Integer.IsGreater(Container(5006).NumItems,0)] |
						   [!Container(5007).IsUpdating + Integer.IsGreater(Container(5007).NumItems,0)]]</visible>
				<include>InfoLoading</include>
			</control>

			<!-- Static List with days/dates/number of episodes -->
			<control type="list" id="4000">
				<posx>41.5</posx>
				<posy>130</posy>
				<width>397</width>
				<height>780</height>
				<onright condition="[Container(4000).HasFocus(1) + Integer.IsGreater(Container(5001).NumItems,0)]">5001</onright>
				<onright condition="[Container(4000).HasFocus(2) + Integer.IsGreater(Container(5002).NumItems,0)]">5002</onright>
				<onright condition="[Container(4000).HasFocus(3) + Integer.IsGreater(Container(5003).NumItems,0)]">5003</onright>
				<onright condition="[Container(4000).HasFocus(4) + Integer.IsGreater(Container(5004).NumItems,0)]">5004</onright>
				<onright condition="[Container(4000).HasFocus(5) + Integer.IsGreater(Container(5005).NumItems,0)]">5005</onright>
				<onright condition="[Container(4000).HasFocus(6) + Integer.IsGreater(Container(5006).NumItems,0)]">5006</onright>
				<onright condition="[Container(4000).HasFocus(7) + Integer.IsGreater(Container(5007).NumItems,0)]">5007</onright>
				<onup>4000</onup>
				<ondown>4000</ondown>
				<scrolltime tween="quadratic">300</scrolltime>

				<itemlayout width="397" height="60">
					<control type="image">
						<width>397</width>
						<height>60</height>
						<texture border="3">buttons/ButtonNF.png</texture>
					</control>
					<control type="group">
						<control type="label" description="Main Label">
							<posx>10</posx>
							<width>220</width>
							<height>60</height>
							<label>[B]$INFO[ListItem.Label][/B]</label>
							<font>InfoPlot</font>
						</control>
						<control type="label">
							<posx>230</posx>
							<width>157</width>
							<height>60</height>
							<align>right</align>
							<label>$INFO[ListItem.Label2]</label>
							<font>InfoPlot</font>
						</control>
					</control>
				</itemlayout>
				<focusedlayout width="397" height="60">
					<control type="image" description="fa overlay">
						<animation effect="fade" start="100" end="40" time="100" condition="!Control.HasFocus(4000)">Conditional</animation>
						<width>397</width>
						<height>60</height>
						<texture border="4" colordiffuse="$VAR[HighlightColor]">img/WhiteRoundedST2.png</texture>
					</control>
					<control type="group">
						<control type="label" description="Main Label">
							<posx>10</posx>
							<width>220</width>
							<height>60</height>
							<textcolor>$VAR[FocusedTextColor]</textcolor>
							<shadowcolor></shadowcolor>
							<label>[B]$INFO[ListItem.Label][/B]</label>
							<font>InfoPlot</font>
						</control>
						<control type="label">
							<posx>230</posx>
							<width>157</width>
							<height>60</height>
							<align>right</align>
							<textcolor>$VAR[FocusedTextColor]</textcolor>
							<label>$INFO[ListItem.Label2]</label>
							<font>InfoPlot</font>
						</control>
					</control>
				</focusedlayout>
                <!-- Embuary Info provides 7 days of Next Aired info -->
				<content>
					<include content="EmbuaryInfoTVGuideItem">
						<param name="EmbuaryInfoTVGuideItemID">1</param>
						<param name="EmbuaryInfoTVGuideDayID">5001</param>
					</include>
					<include content="EmbuaryInfoTVGuideItem">
						<param name="EmbuaryInfoTVGuideItemID">2</param>
						<param name="EmbuaryInfoTVGuideDayID">5002</param>
					</include>
					<include content="EmbuaryInfoTVGuideItem">
						<param name="EmbuaryInfoTVGuideItemID">3</param>
						<param name="EmbuaryInfoTVGuideDayID">5003</param>
					</include>
					<include content="EmbuaryInfoTVGuideItem">
						<param name="EmbuaryInfoTVGuideItemID">4</param>
						<param name="EmbuaryInfoTVGuideDayID">5004</param>
					</include>
					<include content="EmbuaryInfoTVGuideItem">
						<param name="EmbuaryInfoTVGuideItemID">5</param>
						<param name="EmbuaryInfoTVGuideDayID">5005</param>
					</include>
					<include content="EmbuaryInfoTVGuideItem">
						<param name="EmbuaryInfoTVGuideItemID">6</param>
						<param name="EmbuaryInfoTVGuideDayID">5006</param>
					</include>
					<include content="EmbuaryInfoTVGuideItem">
						<param name="EmbuaryInfoTVGuideItemID">7</param>
						<param name="EmbuaryInfoTVGuideDayID">5007</param>
					</include>
				</content>
			</control>

			<!-- Group of panels, one for each day -->
			<control type="group" id="5000">
                <!-- Top scrollbar -->
				<control type="scrollbar" id="60">
					<left>500</left>
					<top>108</top>
					<width>1341</width>
					<height>12</height>
					<onup>5000</onup>
					<ondown condition="Container(4000).HasFocus(1)">5001</ondown>
					<ondown condition="Container(4000).HasFocus(2)">5002</ondown>
					<ondown condition="Container(4000).HasFocus(3)">5003</ondown>
					<ondown condition="Container(4000).HasFocus(4)">5004</ondown>
					<ondown condition="Container(4000).HasFocus(5)">5005</ondown>
					<ondown condition="Container(4000).HasFocus(6)">5006</ondown>
					<ondown condition="Container(4000).HasFocus(7)">5007</ondown>
					<onleft>4000</onleft>
					<showonepage>false</showonepage>
					<orientation>horizontal</orientation>
					<animation effect="fade" start="100" end="0" time="500" delay="500" condition="!Control.HasFocus(60) + !Container.Scrolling">Conditional</animation>
				</control>
                <!-- Panels with episodes, one for each day.  Embuary Info already sorts them in date order, starting with today -->
				<control type="panel" id="5001">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(1)] | Control.HasFocus(5001) |  [Container(4000).HasFocus(1) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5001</onright>
					<include>EmbuaryInfoTVGuidePanelLayout</include>
					<content target="videos">$VAR[EmbInfoNextAired0]</content>
				</control>
				<control type="panel" id="5002">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(2)] | Control.HasFocus(5002) |  [Container(4000).HasFocus(2) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5002</onright>
					<include>EmbuaryInfoTVGuidePanelLayout</include>
					<content target="videos">$VAR[EmbInfoNextAired1]</content>
				</control>
				<control type="panel" id="5003">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(3)] | Control.HasFocus(5003) |  [Container(4000).HasFocus(3) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5003</onright>
					<include>EmbuaryInfoTVGuidePanelLayout</include>
					<content target="videos">$VAR[EmbInfoNextAired2]</content>
				</control>
				<control type="panel" id="5004">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(4)] | Control.HasFocus(5004) |  [Container(4000).HasFocus(4) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5004</onright>
					<include>EmbuaryInfoTVGuidePanelLayout</include>
					<content target="videos">$VAR[EmbInfoNextAired3]</content>
				</control>
				<control type="panel" id="5005">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(5)] | Control.HasFocus(5005) |  [Container(4000).HasFocus(5) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5005</onright>
					<include>EmbuaryInfoTVGuidePanelLayout</include>
					<content target="videos">$VAR[EmbInfoNextAired4]</content>
				</control>
				<control type="panel" id="5006">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(6)] | Control.HasFocus(5006) |  [Container(4000).HasFocus(6) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5006</onright>
					<include>EmbuaryInfoTVGuidePanelLayout</include>
					<content target="videos">$VAR[EmbInfoNextAired5]</content>
				</control>
				<control type="panel" id="5007">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(7)] | Control.HasFocus(5007) |  [Container(4000).HasFocus(7) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5007</onright>
					<include>EmbuaryInfoTVGuidePanelLayout</include>
					<content target="videos">$VAR[EmbInfoNextAired6]</content>
				</control>

			</control>
			<!-- Top Bar -->
			<include>Time</include>

		</control>

	</controls>
</window>