subroutine applet1
include wbp w3Include
call w3HtmlInit("java1", "")
serverpool=''
sessionid=''
profileid=''
call w3getVal(serverpool, 'w3ServerPool')
call w3getVal(sessionid, 'w3SessionId')
call w3getVal(profileid, 'w3ProfileId')
states=""
call w3getVal(states,']visited')
call w3printn('<?xml version="1.0" standalone="yes">')
call w3printn('<!DOCTYPE FCApplet [ ')
call w3printn('<!ELEMENT FCApplet(w3ServerPool,w3SessionId, w3ProfileId, w3Data*)>')
call w3printn('<!ELEMENT w3ServerPool (#PCDATA)>')
call w3printn('<!ELEMENT w3SessionId (#PCDATA)>')
call w3printn('<!ELEMENT w3ProfileId (#PCDATA)>')
call w3printn('<!ELEMENT w3Data (w3Value*)>')
call w3printn('<!ELEMENT w3Value (#PCDATA)>')
call w3printn('<!ATTLIST w3Value name NMTOKEN #REQUIRED>')
call w3printn('<!ATTLIST w3Value index CDATA #IMPLIED>')
call w3printn(']>')
call w3printn('<FCApplet>')
call w3printn('<w3ServerPool>':serverpool:'</w3ServerPool>')
call w3printn('<w3SessionId>':sessionid:'</w3SessionId>')
call w3printn('<w3ProfileId>':profileid:'</w3ProfileId>')
call w3printn('<w3Data>')
cnt = dcount(states<1>,@vm)
for i = cnt to 1 step -1
cur = states<1,i>
call w3printn('<w3Value name="visited" index="':i-1:'">':cur:'</w3Value>')
call w3printn('<w3Value name="focus">0</w3Value>')
crt("cur state = ":cur)
next i
call w3printn('</w3Data>')
call w3printn('</FCApplet>')
call w3HtmlFooter("","")
return