<?xml version="1.0" encoding="UTF-8"?>
<window>
	<defaultcontrol>9000</defaultcontrol>
	<onload condition="!String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current))">action(back)</onload>
	<onload condition="Window.IsActive(playercontrols)">Dialog.Close(playercontrols)</onload>
	<onload condition="Window.IsActive(favourites)">Dialog.Close(favourites)</onload>
	<include>OnLoadDialogsClose</include>
	<controls>

		<control type="group">
			<left>30</left>
			<top>25</top>
			<include>OpenCloseSlideAnimation</include>
			<include>VisibleHiddenSlideAnimation</include>
			<include content="OptionsTopMenuHeader">
				<param name="top_label" value="$LOCALIZE[13005] $LOCALIZE[33061]"/>
				<param name="top_texture" value="dialogs/menus/topmenus_shutdown.png"/>
			</include>
			<visible>String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current))</visible>
			<control type="grouplist" id="9000">
				<onleft>Close</onleft>
				<onright>Close</onright>
				<include>OptionsTopMenuVars</include>
				<control type="button" id="2">
					<description>Exit button</description>
					<include>TopLeftMenusButton</include>
					<onclick>SetProperty(SmoothExit,Exiting,Home)</onclick>
					<onclick>ActivateWindow(1114)</onclick>
					<label>$LOCALIZE[13012]</label>
					<visible>System.ShowExitButton</visible>
				</control>
				<control type="button" id="3">
					<description>Settings button</description>
					<include>TopLeftMenusButton</include>
					<onclick>ActivateWindow(Settings)</onclick>
					<label>$LOCALIZE[5]</label>
					<visible>System.Loggedon</visible>
				</control>
				<control type="button" id="4">
					<description>System Info button</description>
					<include>TopLeftMenusButton</include>
					<onclick>ActivateWindow(SystemInfo)</onclick>
					<label>$LOCALIZE[130]</label>
					<visible>System.Loggedon</visible>
				</control>
				<control type="button" id="5">
					<description>File Manager button</description>
					<include>TopLeftMenusButton</include>
					<onclick>ActivateWindow(FileManager)</onclick>
					<label>$LOCALIZE[31016]</label>
					<visible>System.Loggedon</visible>
				</control>
				<control type="button" id="6">
					<description>Power Off</description>
					<include>TopLeftMenusButton</include>
					<onclick>SetProperty(SmoothExit,Exiting,Home)</onclick>
					<onclick>RunScript(script.embuary.helper,action=dialogyesno,header=$LOCALIZE[750],message=$LOCALIZE[31046]?,yesaction=SetProperty(SmoothExit,Poweringoff,Home)|ActivateWindow(1114),noaction=back)</onclick>
					<visible>System.CanPowerDown</visible>
					<label>$LOCALIZE[13016]</label>
				</control>
				<control type="button" id="7">
					<description>Custom Shutdown Timer</description>
					<include>TopLeftMenusButton</include>
					<onclick>AlarmClock(shutdowntimer,Powerdown())</onclick>
					<label>$LOCALIZE[20150]</label>
					<visible>!System.HasAlarm(shutdowntimer)</visible>
					<visible>System.CanPowerDown</visible>
				</control>
				<control type="button" id="8">
					<description>Cancel Shutdown Timer</description>
					<include>TopLeftMenusButton</include>
					<onclick>CancelAlarm(shutdowntimer)</onclick>
					<label>$LOCALIZE[20151]</label>
					<visible>System.HasAlarm(shutdowntimer)</visible>
				</control>
				<control type="button" id="9">
					<description>Suspend button</description>
					<include>TopLeftMenusButton</include>
					<onclick>SetProperty(SmoothExit,Exiting,Home)</onclick>
					<onclick>RunScript(script.embuary.helper,action=dialogyesno,header=$LOCALIZE[750],message=$LOCALIZE[31047]?,yesaction=SetProperty(SmoothExit,Suspending,Home)|ActivateWindow(1114)|,noaction=back)</onclick>
					<label>$LOCALIZE[13011]</label>
					<visible>System.CanSuspend</visible>
				</control>
				<control type="button" id="10">
					<description>Hibernate button</description>
					<include>TopLeftMenusButton</include>
					<onclick>SetProperty(SmoothExit,Exiting,Home)</onclick>
					<onclick>RunScript(script.embuary.helper,action=dialogyesno,header=$LOCALIZE[750],message=$LOCALIZE[31048]?,yesaction=SetProperty(SmoothExit,Hibernating,Home)|ActivateWindow(1114),noaction=back)</onclick>
					<label>$LOCALIZE[13010]</label>
					<visible>System.CanHibernate</visible>
				</control>
				<control type="button" id="11">
					<description>Reboot button</description>
					<include>TopLeftMenusButton</include>
					<onclick>SetProperty(SmoothExit,Exiting,Home)</onclick>
					<onclick>RunScript(script.embuary.helper,action=dialogyesno,header=$LOCALIZE[750],message=$LOCALIZE[31049]?,yesaction=SetProperty(SmoothExit,Rebooting,Home)|ActivateWindow(1114),noaction=back)</onclick>
					<visible>System.CanReboot</visible>
					<label>$LOCALIZE[13013]</label>
				</control>
				<control type="button" id="12">
					<description>Logoff button</description>
					<include>TopLeftMenusButton</include>
					<onclick>SetProperty(SmoothStart,True,Home)</onclick>
					<onclick>AlarmClock(Exiting,System.LogOff,00:01,silent)</onclick>
					<label>$LOCALIZE[20126] $INFO[system.profilename]</label>
					<visible>System.HasLoginScreen | Integer.IsGreater(System.ProfileCount,1)</visible>
					<visible>System.Loggedon</visible>
				</control>
				<control type="togglebutton" id="13">
					<description>Master mode button</description>
					<include>TopLeftMenusButton</include>
					<usealttexture>!System.IsMaster</usealttexture>
					<onclick>mastermode</onclick>
					<label>$LOCALIZE[20046]</label>
					<altlabel>$LOCALIZE[20045]</altlabel>
					<visible>System.HasLocks</visible>
				</control>
				<control type="button" id="14">
					<description>Profiles button</description>
					<include>TopLeftMenusButton</include>
					<onclick>ActivateWindow(Profiles)</onclick>
					<label>$LOCALIZE[13200]</label>
					<visible>System.Loggedon</visible>
				</control>
				<control type="button" id="15">
					<description>Eject button</description>
					<include>TopLeftMenusButton</include>
					<onclick>EjectTray</onclick>
					<label>$LOCALIZE[13391]</label>
					<visible>System.HasMediaDVD</visible>
					<visible>System.Loggedon</visible>
				</control>
				<control type="button" id="16">
					<include>TopLeftMenusButton</include>
					<onclick>Dialog.Close(all,true)</onclick>
					<onclick>Action(reloadkeymaps)</onclick>
					<onclick>AlarmClock(Reload,ReloadSkin,00:01,silent)</onclick>
					<onclick>RunScript(script.skinshortcuts,type=buildxml&amp;mode=single&amp;options=clonewidgets&amp;mainmenuID=20)</onclick>
					<label>$LOCALIZE[20183]</label>
				</control>
				<include>OptionsTopMenuEnd</include>
			</control>
		</control>


		<!-- ================= -->
		<!-- Small System Info -->
		<!-- ================= -->
		<control type="group">
			<left>45</left>
			<top>540</top>
			<visible>String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current)) + !Window.IsActive(fullscreenvideo) + !Window.IsActive(visualisation) + !Window.IsVisible(startup)</visible>
			<animation type="WindowOpen" reversible="false">
				<effect type="fade" start="0" end="100" time="300" tween="sine" easing="in"  />
				<effect type="slide" start="0,55" end="0,0" time="350" tween="cubic" easing="out" />
			</animation>
			<animation type="WindowClose" reversible="false">
				<effect type="fade" start="100" end="0" time="300" tween="sine" easing="out" />
				<effect type="slide" start="0,0" end="0,55" time="350" tween="sine" easing="out" />
			</animation>
			<animation type="Visible" reversible="false">
				<effect type="fade" start="0" end="100" time="300" tween="sine" easing="in"  />
				<effect type="slide" start="0,90" end="0,0" time="350" tween="cubic" easing="out" />
			</animation>
			<animation type="Hidden" reversible="false">
				<effect type="fade" start="100" end="0" time="300" tween="sine" easing="out" />
				<effect type="slide" start="0,0" end="0,90" time="350" tween="sine" easing="out" />
			</animation>
			<control type="grouplist">
				<left>0</left>
				<top>0</top>
				<height>200</height>
				<width>1190</width>
				<itemgap>0</itemgap>
				<aligny>bottom</aligny>
				<control type="label" id="1">
					<height>50</height>
					<width>1190</width>
					<font>FontSize_40</font>
					<align>right</align>
					<scroll>false</scroll>
					<label>$LOCALIZE[130]</label>
				</control>
				<control type="label" id="1">
					<height>25</height>
					<width>1190</width>
					<font>FontSize_24</font>
					<textcolor>viewsinfo</textcolor>
					<align>right</align>
					<label>$INFO[System.Date]$COMMA $INFO[System.Time]</label>
				</control>
				<control type="label" id="1">
					<height>25</height>
					<width>1190</width>
					<font>FontSize_24</font>
					<textcolor>viewsinfo</textcolor>
					<align>right</align>
					<label>$INFO[System.ScreenResolution]</label>
				</control>
				<control type="label" id="1">
					<height>25</height>
					<width>1190</width>
					<font>FontSize_24</font>
					<textcolor>viewsinfo</textcolor>
					<align>right</align>
					<label>$INFO[System.InternetState]$INFO[Network.IPAddress,$COMMA $LOCALIZE[150]: ]</label>
				</control>
				<control type="label" id="1">
					<height>25</height>
					<width>1190</width>
					<font>FontSize_24</font>
					<textcolor>viewsinfo</textcolor>
					<align>right</align>
					<label>$INFO[System.Memory(used.percent),$LOCALIZE[31027] ]$INFO[System.CPUUsage,$COMMA $LOCALIZE[13271] ]</label>
				</control>
			</control>
		</control>
	</controls>
</window>