Toggling Menus with the Menu button in 100% Markup

Here's a quick one: How do you have an HD DVD menu that opens and closes when you click the Menu button, but doesn't require any script?

It's pretty easy, but it relies on using a dummy element to hold your state; in this case whether the menu "can open" or whether the menu "can close." For this example (which is incredibly ugly), we'll have a hidden div called "CurrentMenuState" that is at x=0px when the menu "can open", and at x=300px when the menu "can close". I chose those numbers rather arbitrarily.

Comments in the XML should make it clear what is happening:

<?xml version="1.0"?>

<root xml:lang="en" xmlns="https://www.dvdforum.org/2005/ihd" xmlns:style="https://www.dvdforum.org/2005/ihd#style" xmlns:state="https://www.dvdforum.org/2005/ihd#state">

<head>

<styling>

<!--Default style for buttonson the menu; just something basic-->

<style id="MenuButton"

style:position="absolute"

style:width="300px" style:height="100px"

style:x="100px"

style:opacity="0.5" />

</styling>

<timing clock="page">

<defs>

<!--Animations to slide the menu open and closed-->

<animate id="OpenMenu" style:x="-500px;0px" />

<animate id="CloseMenu" style:x="0px;-500px" />

<!--Make something display-->

<set id="Show" style:display="auto" />

<!--Make something opaque-->

<set id="MakeOpaque" style:opacity="1"/>

<!--Two states the menu can be in-->

<set id="STATE_MENU_CAN_OPEN" style:x="0px"/>

<set id="STATE_MENU_CAN_CLOSE" style:x="300px"/>

</defs>

<par>

<!--Dummy animation; highlight the menu buttons when clicked-->

<cue begin="class('MenuButton')[state:actioned()]" dur="0.5s" use="MakeOpaque" />

<!--Open the menu; begin when the button is clicked and state is CAN_OPEN.-->

<!--end when the button is clicked and the state is CAN_CLOSE.-->

<par begin="(id('ToggleMenu')[state:actioned()] and id('CurrentMenuState')[style:x()='0px'])"

end="(id('ToggleMenu')[state:actioned()] and id('CurrentMenuState')[style:x()='300px'])">

<!--Update state to CAN_CLOSE-->

<cue select="id('CurrentMenuState')" dur="1s" fill="hold" use="STATE_MENU_CAN_CLOSE" />

<!--