<%@ taglib uri="/hawtags" prefix="haw" %>
<!-- 
  HAWHAW HawTags JSP taglib demo
  Norbert Huffschmid
  $Date: 2007/12/05 22:10:57 $
-->
<haw:haw>

  <!-- This script runs in 2 steps.
       If no pass-parameter has been received we're starting ... -->
  <% if (request.getParameter("pass") == null) {
      // determine redirection target
      String redirection_param="10; URL=" + request.getRequestURL().toString() + "?pass=2";
      String link = request.getRequestURL().toString() + "?pass=2";
  %>

  <!-- Here we define a deck named "Demo" where all content should be centered
       After 10 seconds a redirection to the second part will take place -->
  <haw:deck title="Demo"
            align="center"
            redirection="<%= redirection_param %>">

    <!-- Let's say 'Hello' with bold big characters
         make 2 line breaks before next output will appear -->
    <haw:text bold="yes" big="yes" br="2">Welcome to HAWHAW!</haw:text>

    <!-- and some more text ... -->
    <haw:text>Please scroll through the examples to see what HAWHAW can do for you!</haw:text>

    <!-- in case that the device does not support redirection:
         ... we define a link additionally -->
    <haw:a href="<%= link %>" title="Start">Continue
      <!-- for voice users some additional instructions might be helpful -->
      <haw:voice_text>
        Please say continue to continue, or wait a little bit until you are forwarded automatically.
      </haw:voice_text>
    </haw:a>
  </haw:deck>

  <% }
     else {

       // determine location of HawTags examples
       String baseurl="http://www.hawhaw.de:8090/hawtags/examples/";
       String e1 = baseurl + "e1.jsp";
       String e2 = baseurl + "e2.jsp";
       String e3 = baseurl + "e3.jsp";
       String e4 = baseurl + "e4.jsp";
       String e5 = baseurl + "e5.jsp";
       String e6 = baseurl + "e6.jsp";
       String e7 = baseurl + "e7.jsp";
       String e9 = baseurl + "e9.jsp";
  %>

  <haw:deck title="Demo" align="center">

    <!-- Intro is over - let's make a menu now -->
    <haw:linkset>

      <!-- Here we define all those links to our samples: -->
      <haw:a href="<%= e1 %>" title="Formats">Example 1</haw:a>
      <haw:a href="<%= e2 %>" title="Input">Example 2</haw:a>
      <haw:a href="<%= e3 %>" title="Radio">Example 3</haw:a>
      <haw:a href="<%= e4 %>" title="Checkbox">Example 4</haw:a>
      <haw:a href="<%= e5 %>" title="Select">Example 5</haw:a>
      <haw:a href="<%= e6 %>" title="Images">Example 6</haw:a>
      <haw:a href="<%= e7 %>" title="Tables">Example 7</haw:a>
      <!-- Example 8 is not applicable for HawTags -->
      <haw:a href="<%= e9 %>" title="Call">Example 9</haw:a>

      <!-- make it more comfortable for voice users -->
      <haw:voice_text>
        You can select an example by pressing the according dial button on your phone.
      </haw:voice_text>
    </haw:linkset>
  </haw:deck>
 
  <% } %>

</haw:haw>