<waml xmlns="http://libs.x-appl.com/stdlib/1.0" xmlns:web="http://libs.x-appl.com/weblib/1.0">
  <head>
    <script id="script1" language="JScript" type="text/javascript"><![CDATA[
			function popup(url)
			{
				win = open(url);
				win.showmodal;
			}
]]></script>
    <script for="listview1" event="OnItemClick" language="JScript"><![CDATA[
//alert(window.event.item.tag+'.html');
window.caption = 'Demo Gallery - ' + window.event.item.caption;
browser1.go(window.event.item.tag+'.html');
]]></script>
    <script for="btnRun" event="OnClick" language="JScript"><![CDATA[
		selected = listview1.selection.first;
		if (typeof(selected) == 'object')
		{
			popup(selected.tag+'.waml');
		}
]]></script>
  </head>
  <body activeControl="btnRun" caption="Demo Gallery" height="646" left="247" position="ownerFormCenter" top="144" width="840">
    <listview id="listview1" align="left" cellSizes.thumbnail.autoSize="true" cellSizes.thumbnail.height="200" cellSizes.thumbnail.width="200" height="646" hotTrack.color="black" hotTrack.enabled="true" hotTrack.underline="false" selection.alphaBlend="true" selection.color="buttontext" selection.useFocusRect="false" src="examples.xml" tabOrder="1" view="thumbnail" width="225">
      <header>
        <column caption="Applications"/>
      </header>
    </listview>
    <panel id="panel1" align="client" background.color="buttonface" caption="panel1" height="646" left="204" width="636">
      <web:browser homePage="gallery_home.htm" id="browser1" align="client" height="587" left="1" tabOrder="0" tabStop="true" top="1" visible="true" width="634"/>
      <panel id="panel2" align="bottom" background.color="white" bevelEdges="top" bevelInner="raised" bevelKind="flat" borderWidth="1" height="57" left="1" top="588" width="634">
        <button id="btnRun" align="right" alignWithMargins="true" caption="Run" height="23" left="526" margins.bottom="14" margins.left="0" margins.right="30" margins.top="12" tabOrder="0" top="15"/>
        <button id="btnDownload" align="right" alignWithMargins="true" caption="Download" height="23" left="411" margins.bottom="14" margins.left="0" margins.right="40" margins.top="12" tabOrder="1" top="15" visible="false"/>
      </panel>
    </panel>
  </body>
</waml>