<root>
	<styles>		
		<include src="file://{resources}/styles/steamstyles.css" />
		<include src="file://{resources}/styles/mainmenu.css" />
		<include src="file://{resources}/styles/mainmenu_storebackground.css" />
		<include src="file://{resources}/styles/mainmenu_systemmessages.css" />
		<include src="file://{resources}/styles/mainmenu_communitybackground.css" />
	</styles>
	
	<MainMenu defaultfocus="LibraryButton" oncancel="NavigateTenfootBack()">
		<Panel id="BodyWrapper" rememberchildfocus="true" childfocusonhover="true">

			<!-- Top row of menu buttons -->
			<Panel id="TopRow" class="TopRowBase" tabindex="0" selectionpos="0,0"  selectionposboundary="vertical" >
				<Panel id="TopRowLeft" selectionpos="0,0">
					<Button id="Avatar" class="Button TopRowButton" selectionpos="1,0" onactivate="CloseModalDialog(); OpenProfileMenu( false );" >
						<AvatarImage id="SelfAvatar"  />
					</Button>
					<Panel id="ProfileNameWrapper" >
							<Label  class="ProfileLabel" text="#MainMenu_ProfileState" />
							<Label  class="ProfileNameLabel" text="#MainMenu_Profile" />
					</Panel>
				</Panel>
				<Panel id="TopRowRight" selectionpos="1,0" >
					<BroadcastOverlay id="Broadcast" class="TopRowButton"/>
					<Button id="GoOnlineButton" class="Button TopRowButton" onactivate="GoOnline();" selectionpos="auto" tabindex="auto" >
                        <Panel class="background_box" />
                        <Image class="GoOnlineImage" src="file://{images}/offline.png" />
					</Button>			
					<Button id="FamilyModeLock" class="Button TopRowButton" onactivate="ToggleParentalLock();" selectionpos="auto" tabindex="auto" >
                        <Panel class="background_box" />
                        <Panel id="ParentalLockImages" >
                            <Image id="ParentalLockImageLocked" src="file://{images}/locked_acct.png" />
                            <Image id="ParentalLockImageUnlocked" src="file://{images}/unlocked_acct.png" />
                        </Panel>

					</Button>
					<Button id="EscapeButton" class="Button TopRowButton" onactivate="EscapeBP();" selectionpos="auto" tabindex="auto" >
                        			<Panel class="background_box" />
                        			<Image class="EscapeImage" src="file://{images}/systemmenu/icon_home.png" />
					</Button>	
					<Button id="ControllerBatteryButton" class="Button TopRowButton" onactivate="ControllerSendLowBatteryIndication();" selectionpos="auto" tabindex="auto" >
                        <Panel class="background_box" />
                        <Panel id="BatteryImages" >
							<Image class="BatteryLevelWired" src="file://{images}/controller_generic_nobattery.png" />
							<Image class="BatteryLevelEmpty" src="file://{images}/controller_battery_1.png" />
							<Image class="BatteryLevelLow" src="file://{images}/controller_battery_2.png" />
							<Image class="BatteryLevelHalf" src="file://{images}/controller_battery_3.png" />
							<Image class="BatteryLevelFull" src="file://{images}/controller_battery_4.png" />
						</Panel>

					</Button>
					<ParentalButton id="SystemIMSButton" class="Button TopRowButton" onactivate="DisplaySystemMessages(false);" selectionpos="auto" tabindex="auto" >
                        <Panel class="background_box" />
                        <Panel class="TopButtonContentWrapper">
							<Image src="file://{images}/messages.png" />
								<Panel class="TopRowElement" >
									<Label class="TopRowCounter" text="#MainMenu_SystemIMsShort_Number" />
									<Label class="TopRowCounterBackground" text="#MainMenu_SystemIMsShort_Number" /> 
								</Panel>
						</Panel>

					</ParentalButton>
					<ParentalButton id="Inbox" class="Button TopRowButton" onactivate="DisplayInboxDropdown();" selectionpos="auto" tabindex="auto" >
                        <Panel class="background_box" />
                        <Panel class="TopButtonContentWrapper" >
							<Image id="InboxImage" class="InboxImage" src="file://{images}/systemmenu/icon_alerts.png" />
								<Panel class="TopRowElement" >
                                    <Label class="TopRowCounter" text="#MainMenu_InboxShort" />
                                    <Label class="TopRowCounterBackground" text="#MainMenu_InboxShort" />
								</Panel>
						</Panel>

					</ParentalButton>
					<Button id="PendingChats" class="Button TopRowButton" onactivate="ShowFriends();" selectionpos="auto" tabindex="auto" >
                        <Panel class="background_box" />
                        <Panel class="TopButtonContentWrapper" >
							<Image src="file://{images}/systemmenu/icon_chat.png" />
							<Panel class="TopRowElement" >
									<Label class="TopRowCounter" text="#MainMenu_PendingChatsShort" />
									<Label class="TopRowCounterBackground" text="#MainMenu_PendingChatsShort" /> 
								</Panel>
						</Panel>

					</Button>
					<Button id="MusicGuideButton" class="Button TopRowButton MusicGuideButton" selectionpos="auto" tabindex="auto"
						onactivate="ShowMusicLibrary();" >
                        <Panel class="background_box" />
                        <Image id="MusicGuideImage" src="file://{images}/systemmenu/icon_music.png"/>
					</Button>
					<Button id="DownloadsButton" class="Button TopRowButton" onactivate="ShowDownloads();" selectionpos="auto" tabindex="auto" >
                        <Panel class="background_box" />
                        <Panel class="TopButtonContentWrapper" >
							<Image src="file://{images}/systemmenu/icon_downloads.png" />
									<Panel class="TopRowElement" >
										<Label class="TopRowCounter" text="#MainMenu_ActiveDownloadsShort" />
										<Label class="TopRowCounterBackground" text="#MainMenu_ActiveDownloadsShort" /> 
									</Panel>
						</Panel>

					</Button>
					<ParentalButton id="SettingsButton" class="Button TopRowButton" onactivate="ShowSettingsMenu();" selectionpos="auto" tabindex="auto" >
                        <Panel class="background_box" />
                        <Image src="file://{images}/systemmenu/icon_settings.png" />

					</ParentalButton>
					<Button id="Exit" class="Button TopRowButton" onactivate="ShowQuitDialog();" selectionpos="auto" tabindex="auto" >
                        <Panel class="background_box" />
                        <Image src="file://{images}/systemmenu/icon_power.png" />

					</Button>
					<Button id="BetaButton" class="Button TopRowButton" onactivate="BrowserGoToURL(http://www.steampowered.com/steamosbeta);" selectionpos="auto" tabindex="auto" >
						<Image src="file://{images}/betabutton4.tga" />
					</Button>

					<BatteryIndicator id="MainMenuBatteryIndicator" class="MainMenuBatteryIndicator" />

					<Clock id="Clock" class="Clock" />
				</Panel>
				
			</Panel> <!-- Top Row -->
			
			<Panel id="HR" class="HR" />
					
			<!-- The main row of menu buttons in the center of the screen -->
			<Panel id="MenuRow" tabindex="1" selectionpos="0,20" selectionposboundary="vertical" >
				<Label  class="TriggerRowLeft MainMenuRowLabel" text="#UI_LeftBumper_Short" />
				<Label  class="TriggerRowRight MainMenuRowLabel" text="#UI_RightBumper_Short" />
				<Panel id="MenuRowLeftButton"  selectionpos="-10,0">

					<ParentalButton id="WebButton" class="Button EdgeButton EdgeButtonLeft" tabindex="0" selectionpos="1,20" onactivate="ShowWebBrowser();">
						<Image class="MainMenuIcon" src="file://{images}/systemmenu/icon_web.png" />
						<Label  class="MainMenuRowLabel" text="#MainMenu_Web" />

						<Image class="MainMenuCapsuleOver" src="file://{images}/systemmenu/capsule_glow.png" />
					</ParentalButton>

				</Panel>

				<Panel id="MenuRowButtons" selectionpos="0,0">
					<ParentalButton id="StoreButton" class="Button MainMenuButton" tabindex="1" selectionpos="2,20"  onactivate="ShowStoreClearBackstack();">
						<Image class="MainMenuIcon" src="file://{images}/systemmenu/icon_store.png" />
						<Label id="StoreLabel" class="MainMenuRowLabel" text="#MainMenu_Store" />
						<Image class="MainMenuCapsuleOver" src="file://{images}/systemmenu/capsule_glow.png" />
					</ParentalButton>
					<Button id="LibraryButton" class="Button MainMenuButton" tabindex="2" selectionpos="3,20"  onactivate="ShowLibraryClearBackstack();">
						<Image class="MainMenuIcon" src="file://{images}/systemmenu/icon_library.png" />
						<Label id="LibraryLabel" class="MainMenuRowLabel" text="#MainMenu_Library" />
						<Image class="MainMenuCapsuleOver" src="file://{images}/systemmenu/capsule_glow.png" />
					</Button>
					<ParentalButton id="CommunityButton" class="Button MainMenuButton" tabindex="3" selectionpos="4,20"  onactivate="ShowCommunityClearBackstack();">
						<Image class="MainMenuIcon" src="file://{images}/systemmenu/icon_community.png" />
						<Label id="CommunityLabel" class="MainMenuRowLabel" text="#MainMenu_Community" />
						<Image class="MainMenuCapsuleOver" src="file://{images}/systemmenu/capsule_glow.png" />
					</ParentalButton>
				</Panel>
				
				<Panel id="MenuRowRightButton" selectionpos="10,0">
					<ParentalButton id="FriendsButton" class="Button EdgeButton EdgeButtonRight" tabindex="4" selectionpos="5,20" onactivate="ShowFriends();">
						<Image class="MainMenuIcon" src="file://{images}/systemmenu/icon_friends.png" />
						<Label  class="MainMenuRowLabel" text="#MainMenu_Chat" />
						<Image class="MainMenuCapsuleOver" src="file://{images}/systemmenu/capsule_glow.png" />
					</ParentalButton>
				</Panel>
			</Panel>
			<Panel id="HR2" class="HR" />
			<Panel id="GameRowContents" tabindex="2" class="GameRowContents" selectionpos="0,80" selectionposboundary="vertical" ondescendantfocus="AddStyle( MainMenu, GameRowFocus)" ondescendantblur="RemoveStyle( MainMenu, GameRowFocus)" >
														
				<Panel id="GameRowContentsWrapper" class="GameRowContentsWrapper" selectionpos="auto" >
					<Panel class="GameItem game_1" selectionpos="1,0" >
					
						<Panel class="GameItemHeader" >

							<Label class="GameRowHeaderLabel" text="#MainMenu_FriendsArePlaying" />
						</Panel>
						<Button id="FriendsArePlayingGame" class="GameButton" tabindex="0"  selectionpos="0,0" >
							<Image id="GameImage" class="GameArt" src="file://{images}/library_default.tga" defaultsrc="file://{images}/library_default.tga" scaling="stretch-to-fit-preserve-aspect" >
								<Label id="MissingImageLabel" text="" />
							</Image>
							<Panel id="SuggestedStatus" >			
								<Panel id="SuggestedStatusWrapper" >			
									<Panel id="StreamingVideoSupport" class="StreamingVideoSupport StatusImage" />
									<Panel id="GridControllerSupport" class="GridControllerSupport StatusImage" />
									<Panel class="InstalledState" />
									<Panel id="ReadyToPlay" class="ReadyToPlay StatusImage" />
									<Panel id="ReadyToStream" class="ReadyToStream StatusImage" />
									<Panel id="ReadyToDownload" class="ReadyToDownload StatusImage" />
									<Panel id="NotReadyToPlay" class="NotReadyToPlay StatusImage" />
								</Panel>
							</Panel>
						</Button>
					</Panel>
					<Panel class="GameItem game_2" selectionpos="3,0" >
						<Panel class="GameItemHeader" >
							<Label class="GameRowHeaderLabel" text="#MainMenu_RecentPlaying" />
						</Panel>
						<Button id="ResumePlayingGame" class="GameButton" tabindex="1" selectionpos="0,0">
							<Image id="GameImage" class="GameArt" src="file://{images}/library_default.tga" defaultsrc="file://{images}/library_default.tga" scaling="stretch-to-fit-preserve-aspect" >
								<Label id="MissingImageLabel" text="" />
							</Image>
							<Panel id="SuggestedStatus" >			
								<Panel id="SuggestedStatusWrapper" >			
									<Panel id="StreamingVideoSupport" class="StreamingVideoSupport StatusImage" />
									<Panel id="GridControllerSupport" class="GridControllerSupport StatusImage" />
									<Panel class="InstalledState" />
									<Panel id="ReadyToPlay" class="ReadyToPlay StatusImage" />
									<Panel id="ReadyToStream" class="ReadyToStream StatusImage" />
									<Panel id="ReadyToDownload" class="ReadyToDownload StatusImage" />
									<Panel id="NotReadyToPlay" class="NotReadyToPlay StatusImage" />
								</Panel>
							</Panel>
						</Button>
					</Panel>
					<Panel class="GameItem game_3"  selectionpos="4,0">
						<Panel class="GameItemHeader" >
							<Label class="GameRowHeaderLabel" text="#MainMenu_UnplayedPlaying" />
						</Panel>
						<Button id="UnplayedPlayingGame" class="GameButton" tabindex="2" selectionpos="0,0" >
							<Image id="GameImage" class="GameArt" src="file://{images}/library_default.tga" defaultsrc="file://{images}/library_default.tga" scaling="stretch-to-fit-preserve-aspect" >
								<Label id="MissingImageLabel" text="" />
							</Image>
							<Panel id="SuggestedStatus" >			
								<Panel id="SuggestedStatusWrapper" >			
									<Panel id="StreamingVideoSupport" class="StreamingVideoSupport StatusImage" />
									<Panel id="GridControllerSupport" class="GridControllerSupport StatusImage" />
									<Panel class="InstalledState" />
									<Panel id="ReadyToPlay" class="ReadyToPlay StatusImage" />
									<Panel id="ReadyToStream" class="ReadyToStream StatusImage" />
									<Panel id="ReadyToDownload" class="ReadyToDownload StatusImage" />
									<Panel id="NotReadyToPlay" class="NotReadyToPlay StatusImage" />
								</Panel>
							</Panel>
						</Button>
					</Panel>
				</Panel>
			</Panel>
			<Panel id="WelcomePanel" selectionpos="0,160" overscroll-y="160" />
		</Panel>
		<!-- All the contents for backgrounds for the main nav row, and the real contents to drill into on activation -->
		<Panel id="MainRowContents" hittest="false">			
			<CommunityWrapper id="CommunityWrapper" class="CommunityWrapper" />
			<ProfileWrapper id="ProfileWrapper" class="ProfileWrapper" />
		</Panel>
		<ContentFrame id="ContentFrame" />
		<Panel id="BodyHittestBlocker" onmouseactivate="None();"/>
	</MainMenu>	
</root>
