You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
205 lines
6.1 KiB
205 lines
6.1 KiB
<!-- $Id: tstclock.htt,v 1.5 2006/09/19 20:01:05 ddoughty Exp $ -->
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE></TITLE>
|
|
<META name="generator" content="Scaldwell">
|
|
<%=SYSTEM.INCLUDEJS global.js %>
|
|
<SCRIPT LANGUAGE="JavaScript">
|
|
<!--
|
|
var down,min,sec,cmin,csec,chrs;
|
|
var warning00 = new Image;
|
|
var warning0 = new Image;
|
|
var warning1 = new Image;
|
|
var warning2 = new Image;
|
|
var warning3 = new Image;
|
|
var warning4 = new Image;
|
|
var warning5 = new Image;
|
|
var warning10 = new Image;
|
|
var warning15 = new Image;
|
|
var warning30 = new Image;
|
|
var warning45 = new Image;
|
|
warning00.src = "<%=PATHS.graphurl%>/<%=SESSION.lang%>/warn00.gif";
|
|
warning0.src = "<%=PATHS.graphurl%>/<%=SESSION.lang%>/warn0.gif";
|
|
warning1.src = "<%=PATHS.graphurl%>/<%=SESSION.lang%>/warn1.gif";
|
|
warning2.src = "<%=PATHS.graphurl%>/<%=SESSION.lang%>/warn2.gif";
|
|
warning3.src = "<%=PATHS.graphurl%>/<%=SESSION.lang%>/warn3.gif";
|
|
warning4.src = "<%=PATHS.graphurl%>/<%=SESSION.lang%>/warn4.gif";
|
|
warning5.src = "<%=PATHS.graphurl%>/<%=SESSION.lang%>/warn5.gif";
|
|
warning15.src = "<%=PATHS.graphurl%>/<%=SESSION.lang%>/warn10.gif";
|
|
warning15.src = "<%=PATHS.graphurl%>/<%=SESSION.lang%>/warn15.gif";
|
|
warning30.src = "<%=PATHS.graphurl%>/<%=SESSION.lang%>/warn30.gif";
|
|
warning45.src = "<%=PATHS.graphurl%>/<%=SESSION.lang%>/warn45.gif";
|
|
|
|
function Hours(data) {
|
|
return(data.substring(0,2));
|
|
}
|
|
|
|
function Minutes(data) {
|
|
return(data.substring(3,5));
|
|
}
|
|
|
|
function Seconds(data) {
|
|
//hkh return(data.substring(7,data.length));
|
|
return(data.substring(6,data.length));
|
|
}
|
|
|
|
function Display(hrs,min,sec) {
|
|
var disp;
|
|
if(hrs<=9) disp="0"+hrs;
|
|
else disp=hrs;
|
|
disp+=":";
|
|
if(min<=9) disp+="0"+min;
|
|
else disp+=min;
|
|
disp+=":";
|
|
if(sec<=9) disp+="0"+sec;
|
|
else disp+=sec;
|
|
return(disp);
|
|
}
|
|
|
|
function Down() {
|
|
chrs=1*Hours(document.sw.beg.value);
|
|
cmin=1*Minutes(document.sw.beg.value);
|
|
csec=0+Seconds(document.sw.beg.value);
|
|
if ((chrs>0) || (cmin>0) || (csec>0))
|
|
DownRepeat();
|
|
}
|
|
|
|
function DownRepeat() {
|
|
var sURL, cwarn;
|
|
// v added support for time capture statistics
|
|
// var n;
|
|
// if (document.sw.tcaprun.value == "*") {
|
|
// n = parseInt(top.tstquest.document.form1.tcap.value);
|
|
// n++;
|
|
// top.tstquest.document.form1.tcap.value = n.toString();
|
|
// }
|
|
// ^ added support for time capture statistics
|
|
if (document.sw.running.value == "!") {
|
|
sURL="<%=PATHS.urlroot%>/texp.pl?tid=<%=SESSION.tid%>&lang=<%=SESSION.lang%>&submit=illegalpage&tstid=<%=TEST_SESSION.id%>";
|
|
top.document.location.replace(sURL);
|
|
} else {
|
|
if (document.sw.running.value == "*") {
|
|
csec--;
|
|
if(csec==-1) {
|
|
csec=59; cmin--;
|
|
if (cmin==-1) {
|
|
cmin=59;chrs--;
|
|
if(chrs==-1) {
|
|
chrs=0;
|
|
};
|
|
}
|
|
if (chrs==0) {
|
|
if (cmin<5) {
|
|
eval("document.warning.src=warning"+cmin+".src");
|
|
} else {
|
|
if (cmin==10) {
|
|
document.warning.src=warning15.src;
|
|
} else {
|
|
if (cmin==15) {
|
|
document.warning.src=warning15.src;
|
|
} else {
|
|
if (cmin==30) {
|
|
document.warning.src=warning30.src;
|
|
} else {
|
|
if (cmin==45) {
|
|
document.warning.src=warning45.src;
|
|
} else {
|
|
document.warning.src=warning00.src;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
document.sw.disp.value=Display(chrs,cmin,csec);
|
|
} else {
|
|
if (document.sw.running.value == "^") {
|
|
chrs=1*Hours(document.sw.beg.value);
|
|
cmin=1*Minutes(document.sw.beg.value);
|
|
csec=0+Seconds(document.sw.beg.value);
|
|
document.sw.disp.value=Display(chrs,cmin,csec);
|
|
if ((chrs>0) || (cmin>0) || (csec>0))
|
|
document.sw.running.value = "*";
|
|
}
|
|
}
|
|
if((chrs==0)&&(cmin==0)&&(csec==0)) {
|
|
sURL="<%=PATHS.urlroot%>/texp.pl?tid=<%=SESSION.tid%>&lang=<%=SESSION.lang%>&submit=<%=PHRASE.549%>&tstid=<%=TEST_SESSION.id%>";
|
|
top.tstquest.document.location.replace(sURL);
|
|
} else {
|
|
down=setTimeout("DownRepeat()",1000);
|
|
}
|
|
}
|
|
}
|
|
window.onload=Down;
|
|
// -->
|
|
</SCRIPT>
|
|
<link rel="stylesheet" type="text/css" href="/<%=CLIENT.clid%>/<%=CLIENT.clid%>.css">
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" topmargin=0>
|
|
<FORM name="sw" METHOD=POST ACTION="<%=PATHS.cgiroot%>/texp.pl" TARGET="_top">
|
|
<input type="hidden" name="tid" value="<%=SESSION.tid%>">
|
|
<input type="hidden" name="submit" value="<%=PHRASE.549%>">
|
|
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=1 width="100%">
|
|
<TR>
|
|
<TD align="center" VALIGN="top">
|
|
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%>
|
|
<TR>
|
|
<TD align="left" VALIGN="top" width=200>
|
|
<%=CLIENT.testlogo%>
|
|
<%=TEST.logo%><BR>
|
|
<FONT SIZE=1>
|
|
<B><%=CLIENT.clnmc%></B><BR>
|
|
</FONT>
|
|
</TD>
|
|
<TD ALIGN="left" VALIGN="middle" NOWRAP>
|
|
<FONT SIZE=2>
|
|
<B><I>
|
|
<%=TEST.desc%><BR>
|
|
<%=QUESTION.id%>
|
|
</B></I>
|
|
</FONT>
|
|
</TD>
|
|
<TD ALIGN="center" VALIGN="middle" NOWRAP>
|
|
<IMG NAME="warning" SRC="<%=PATHS.graphurl%>/<%=SESSION.lang%>/warn00.gif" border=0>
|
|
</TD>
|
|
<TD ALIGN="center" VALIGN="middle" width="100">
|
|
<%=SYSTEM.STARTIF?SYSTEM.hideqno 1 INCLUDE %>
|
|
<input type="hidden" name="qno" VALUE="" size=10 readonly>
|
|
<%=SYSTEM.ELSE%>
|
|
<FONT SIZE=2>
|
|
<%=PHRASE.329%><BR>
|
|
</FONT>
|
|
<!-- <input type="text" name="qno" VALUE="0 of <%=TEST.noq%>" size=10 readonly> -->
|
|
<input type="text" name="qno" VALUE="" size=10 readonly>
|
|
<%=SYSTEM.ENDIF%>
|
|
<input type="hidden" name="running" VALUE="">
|
|
<input type="hidden" name="beg" VALUE="<%=TEST.maxtmfmt%>">
|
|
</TD>
|
|
<TD ALIGN="center" VALIGN="middle" width="100">
|
|
<FONT SIZE=2>
|
|
<%=SYSTEM.STARTIF?SYSTEM.hideclock 1 INCLUDE %>
|
|
<input type="hidden" name="disp" size="9" VALUE="<%=TEST.maxtmfmt%>" readonly>
|
|
</FONT>
|
|
<%=SYSTEM.ELSE%>
|
|
Time Left<BR>
|
|
</FONT>
|
|
<input type="text" name="disp" size="9" VALUE="<%=TEST.maxtmfmt%>" readonly>
|
|
<%=SYSTEM.ENDIF%>
|
|
</TD>
|
|
<TD ALIGN="center" VALIGN="middle" NOWRAP width="36">
|
|
<%=SYSTEM.STARTIF?SYSTEM.hidespinner Y INCLUDE %>
|
|
|
|
<%=SYSTEM.ELSE%>
|
|
<IMG width=32 NAME="loading" SRC="<%=PATHS.graphurl%>/blank.gif" border=0>
|
|
<%=SYSTEM.ENDIF%>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
</FORM>
|
|
</BODY>
|
|
</HTML>
|
|
|