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

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

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

		<control type="group">
            <!-- Hidden button to focus left side 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>
            <!-- 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) | Control.HasFocus(5008) | Control.HasFocus(5009) |
						 Control.HasFocus(5010) | Control.HasFocus(5011) | Control.HasFocus(5012) |
						 Control.HasFocus(5013) | Control.HasFocus(5014)</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>60</left>
				<top>60</top>
				<width>412</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>462</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)] | [!Container(5008).IsUpdating + Integer.IsGreater(Container(5008).NumItems,0)] |
						   [!Container(5009).IsUpdating + Integer.IsGreater(Container(5009).NumItems,0)] | [!Container(5010).IsUpdating + Integer.IsGreater(Container(5010).NumItems,0)] |
						   [!Container(5011).IsUpdating + Integer.IsGreater(Container(5011).NumItems,0)] | [!Container(5012).IsUpdating + Integer.IsGreater(Container(5012).NumItems,0)] |
						   [!Container(5013).IsUpdating + Integer.IsGreater(Container(5013).NumItems,0)] | [!Container(5014).IsUpdating + Integer.IsGreater(Container(5014).NumItems,0)]]</visible>
                <include>InfoLoading</include>
            </control>

			<!-- Static List with days/dates/number of episodes -->
			<control type="list" id="4000">
				<posx>105</posx>
				<posy>120</posy>
				<width>322</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>
				<onright condition="[Container(4000).HasFocus(8) + Integer.IsGreater(Container(5008).NumItems,0)]">5008</onright>
				<onright condition="[Container(4000).HasFocus(9) + Integer.IsGreater(Container(5009).NumItems,0)]">5009</onright>
				<onright condition="[Container(4000).HasFocus(10) + Integer.IsGreater(Container(5010).NumItems,0)]">5010</onright>
				<onright condition="[Container(4000).HasFocus(11) + Integer.IsGreater(Container(5011).NumItems,0)]">5011</onright>
				<onright condition="[Container(4000).HasFocus(12) + Integer.IsGreater(Container(5012).NumItems,0)]">5012</onright>
				<onright condition="[Container(4000).HasFocus(13) + Integer.IsGreater(Container(5013).NumItems,0)]">5013</onright>
				<onright condition="[Container(4000).HasFocus(14) + Integer.IsGreater(Container(5014).NumItems,0)]">5014</onright>
				<onup>4000</onup>
				<ondown>4000</ondown>
				<scrolltime tween="quadratic">300</scrolltime>

				<itemlayout width="322" height="60">
					<control type="image">
						<width>322</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>301</width>
						    <height>60</height>
						    <label>[B]$INFO[ListItem.Label][/B]</label>
					    </control>
					    <control type="label">
						    <posx>10</posx>
						    <width>301</width>
						    <height>60</height>
						    <align>right</align>
						    <label>$INFO[ListItem.Label2]</label>
					    </control>
					</control>
				</itemlayout>
				<focusedlayout width="322" height="60">
					<control type="image" description="fa overlay">
						<animation effect="fade" start="100" end="40" time="100" condition="!Control.HasFocus(4000)">Conditional</animation>
						<width>322</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>301</width>
						    <height>60</height>
						    <textcolor>$VAR[FocusedTextColor]</textcolor>
						    <shadowcolor></shadowcolor>
						    <label>[B]$INFO[ListItem.Label][/B]</label>
					    </control>
					    <control type="label">
						    <posx>10</posx>
						    <width>301</width>
						    <height>60</height>
						    <align>right</align>
						    <textcolor>$VAR[FocusedTextColor]</textcolor>
						    <label>$INFO[ListItem.Label2]</label>
					    </control>
					</control>
				</focusedlayout>
				<!-- Using 14 days of TMDb Helper Next Aired info -->
				<content>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">1</param>
						<param name="TMDbTVGuideDayID">5001</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">2</param>
						<param name="TMDbTVGuideDayID">5002</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">3</param>
						<param name="TMDbTVGuideDayID">5003</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">4</param>
						<param name="TMDbTVGuideDayID">5004</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">5</param>
						<param name="TMDbTVGuideDayID">5005</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">6</param>
						<param name="TMDbTVGuideDayID">5006</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">7</param>
						<param name="TMDbTVGuideDayID">5007</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">8</param>
						<param name="TMDbTVGuideDayID">5008</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">9</param>
						<param name="TMDbTVGuideDayID">5009</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">10</param>
						<param name="TMDbTVGuideDayID">5010</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">11</param>
						<param name="TMDbTVGuideDayID">5011</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">12</param>
						<param name="TMDbTVGuideDayID">5012</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">13</param>
						<param name="TMDbTVGuideDayID">5013</param>
					</include>
					<include content="TMDbTVGuideItem">
						<param name="TMDbTVGuideItemID">14</param>
						<param name="TMDbTVGuideDayID">5014</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>
					<ondown condition="Container(4000).HasFocus(8)">5008</ondown>
					<ondown condition="Container(4000).HasFocus(9)">5009</ondown>
					<ondown condition="Container(4000).HasFocus(10)">5010</ondown>
					<ondown condition="Container(4000).HasFocus(11)">5011</ondown>
					<ondown condition="Container(4000).HasFocus(12)">5012</ondown>
					<ondown condition="Container(4000).HasFocus(13)">5013</ondown>
					<ondown condition="Container(4000).HasFocus(14)">5014</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 of episodes, one for each day.  Using just 14 days of TMDb Helper Next Aired info -->
				<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>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=0&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</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>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=1&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</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>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=2&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</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>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=3&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</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>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=4&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</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>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=5&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</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>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=6&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</content>
				</control>
				<control type="panel" id="5008">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(8)] | Control.HasFocus(5008) |  [Container(4000).HasFocus(8) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5008</onright>
					<include>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=7&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</content>
				</control>
				<control type="panel" id="5009">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(9)] | Control.HasFocus(5009) |  [Container(4000).HasFocus(9) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5009</onright>
					<include>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=8&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</content>
				</control>
				<control type="panel" id="5010">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(10)] | Control.HasFocus(5010) |  [Container(4000).HasFocus(10) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5010</onright>
					<include>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=9&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</content>
				</control>
				<control type="panel" id="5011">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(11)] | Control.HasFocus(5011) |  [Container(4000).HasFocus(11) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5011</onright>
					<include>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=10&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</content>
				</control>
				<control type="panel" id="5012">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(12)] | Control.HasFocus(5012) |  [Container(4000).HasFocus(12) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5012</onright>
					<include>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=11&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</content>
				</control>
				<control type="panel" id="5013">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(13)] | Control.HasFocus(5013) |  [Container(4000).HasFocus(13) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5013</onright>
					<include>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=12&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</content>
				</control>
				<control type="panel" id="5014">
					<visible allowhiddenfocus="true">[Control.HasFocus(4000) + Container(4000).HasFocus(14)] | Control.HasFocus(5014) |  [Container(4000).HasFocus(14) + Control.HasFocus(60)]</visible>
					<include>VisibleFadeEffectDelay</include>
					<onright>5014</onright>
					<include>TMDbTVGuidePanelLayout</include>
					<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=13&amp;days=1&amp;widget=True&amp;fanarttv=True&amp;type=episode</content>
				</control>

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

		</control>

	</controls>
</window>