Controling announcements duration with web - Help!

I am trying to add duration control to announcements through the web interface.
It is not working! Help!
Start of announce_announce.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>R4 Remote Control</TITLE>
</HEAD>
<BODY bgcolor="#000000" text="#FFFFFF" link="#00FF00" vlink="#009933" alink="#FFFF00">
<table><tr><td><a href="index.html"><img src="images/r4.png" border=0></a></td><td><font face="tahoma, verdana" size=5>&&&
</font></td></tr></table>
<font face="tahoma, verdana" size=-1><!-- Loop through all characters in the string and call settweak for each one -->
<!-- Remove announcement -->
<form action="announce_announce.html">
Type the text you wish to announce here:
<input name="cmd" type="hidden" value="set"><br>
<input name="txt" type="text" value="" size=40><br>
Duration: <input name="dur" type="text" value="10" size=3><br>
<input type="submit" value="Display">(Max. 250 chars)
</form>
STOP DISPLAYING</a>
</BODY>
</HTML>
End of announce_announce.html
Start of announcenormal.r4
OVERLAY (
"name" = "Announce Normal";
"author" = "Gordon Williams";
"announce" = "true";
"html" = "announce_announce.html";
TEXTURE font();
GL gl(scenefrom,font);
)
float mytime,c;
int text[256];
int len;
float appearTime;
void settweak(int num,float val) {
if (num==-1) appearTime = val;
if ((num>=0) & (num<255)) { // set the text
text[num] = val;
text[num+1] = 0;
len = 0;
while (text[len]) len = len + 1;
}
}
void init() {
if (appearTime==0) appearTime = 10;
strcpy(gl.shader,"T0;BAa;");
strcpy(font.filename,"ui/font_?.png");
strcpy(text,"ANNOUNCE");
len = 8;
}
void render() {
mytime = mytime + (timepass/appearTime);
if (mytime>1) {
mytime = 1;
finished = 1;
}
c = 1;
if (mytime<0.1) c = (mytime*10.0);
if (mytime>0.9) c = 1.0-((mytime-0.9)*10.0);
gl.clear();
gl.aspect=0;
gl.glTranslate(0,-0.9,-2.414);
gl.glScale(1.8/len,1.8/len,1);
gl.glcolor(1,1,1,c);
gl.glPrint(text,0.0-(len/2.0),len/2.0);
}
void reset() {
mytime = 0;
}
End of announcenormal.r4
It is not working! Help!
Start of announce_announce.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>R4 Remote Control</TITLE>
</HEAD>
<BODY bgcolor="#000000" text="#FFFFFF" link="#00FF00" vlink="#009933" alink="#FFFF00">
<table><tr><td><a href="index.html"><img src="images/r4.png" border=0></a></td><td><font face="tahoma, verdana" size=5>&&&
</font></td></tr></table>
<font face="tahoma, verdana" size=-1><!-- Loop through all characters in the string and call settweak for each one -->
<!-- Remove announcement -->
<form action="announce_announce.html">
Type the text you wish to announce here:
<input name="cmd" type="hidden" value="set"><br>
<input name="txt" type="text" value="" size=40><br>
Duration: <input name="dur" type="text" value="10" size=3><br>
<input type="submit" value="Display">(Max. 250 chars)
</form>
STOP DISPLAYING</a>
</BODY>
</HTML>
End of announce_announce.html
Start of announcenormal.r4
OVERLAY (
"name" = "Announce Normal";
"author" = "Gordon Williams";
"announce" = "true";
"html" = "announce_announce.html";
TEXTURE font();
GL gl(scenefrom,font);
)
float mytime,c;
int text[256];
int len;
float appearTime;
void settweak(int num,float val) {
if (num==-1) appearTime = val;
if ((num>=0) & (num<255)) { // set the text
text[num] = val;
text[num+1] = 0;
len = 0;
while (text[len]) len = len + 1;
}
}
void init() {
if (appearTime==0) appearTime = 10;
strcpy(gl.shader,"T0;BAa;");
strcpy(font.filename,"ui/font_?.png");
strcpy(text,"ANNOUNCE");
len = 8;
}
void render() {
mytime = mytime + (timepass/appearTime);
if (mytime>1) {
mytime = 1;
finished = 1;
}
c = 1;
if (mytime<0.1) c = (mytime*10.0);
if (mytime>0.9) c = 1.0-((mytime-0.9)*10.0);
gl.clear();
gl.aspect=0;
gl.glTranslate(0,-0.9,-2.414);
gl.glScale(1.8/len,1.8/len,1);
gl.glcolor(1,1,1,c);
gl.glPrint(text,0.0-(len/2.0),len/2.0);
}
void reset() {
mytime = 0;
}
End of announcenormal.r4