<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN"
                        "http://www.phone.com/dtd/wml11.dtd" >

<wml>

 <card id="first" >
 <onevent type="onenterforward">
    <refresh>
     <setvar name="startCur" value=""/>
     <setvar name="endCur" value=""/>
     <setvar name="cur" value=""/>
    </refresh>
   </onevent>

  <p>
   <do type="accept" label="conv">
    <go href="#destVal"/>
   </do>
     Currency converter!
     Convert from?
     <select name="startCur">
	<option  value="USD">USD</option>
	<option  value="DMark">D-Mark</option>
	<option  value="Franc">Franc</option>
	<option  value="Lira">Lira</option>
     </select>
  </p>
 </card>

 <card id="destVal">

  <p>
  <do type="accept" label="dest">
   <go href="#valCard"/>
  </do>

  Convert from $startCur to:
   <select name="endCur">
	<option  value="USD">USD</option>
	<option  value="DMark">D-Mark</option>
	<option  value="Franc">Franc</option>
	<option  value="Lira">Lira</option>
     </select>
  </p>
 </card>

 <card id="valCard">
  <onevent type="onenterforward">
   <refresh>
	<setvar name="cur" value=""/>
	<setvar name="ans" value=""/>
  </refresh>  
</onevent>
  <p>
  <do type="accept" label="conv">
   <go href="converter.wmls#convert()"/>
  </do>
   $startCur? (whole number)
   <input type="text" name="cur" format="*N"/>
 </p>
</card>

<card id="convD">
<p> 
<do type="accept" label="new">
  <go href="#first">
  <setvar name="startCur" value=""/>
  <setvar name="endCur" value=""/>
  <setvar name="cur" value=""/>
  </go>
 </do>

 <do type="options" label="again">
  <go href="#valCard"/>
 </do>
 
  $cur in $startCur is $ans $endCur
 </p>
</card>
 </wml>
