function Question (qname,
type,
qstring,
response,
comment,
corrects,
explan,
score,
ifcorrect,ifwrong,ifnull,
img)
{this.qname=qname;
this.type=type;
this.qstring=qstring;
this.response=response;
this.comment=comment;
this.corrects=corrects;
this.explan=explan;
this.score=score;
this.ifcorrect=ifcorrect;
this.ifwrong=ifwrong;
this.ifnull=ifnull;
this.img=img;
}

var zin=1,top=0, mycount=0, waitTime=2400, qright=0, mycomment;
var global=new Array(3);
var recent, recent2, recdone=false, opera7, opera=CheckOpera56();
function cachewrite(s,idx){global[idx]+=s;}
function CheckOpera56()
{
var version;
if (navigator.userAgent.toLowerCase().indexOf('opera') == -1) return false;
version=parseInt(navigator.appVersion.toLowerCase());
if (version>6) {opera7=true; return false;}
if (version<5) return false;
return true;
}
resp=new Array("The rider may be blown into your path","The rider may be forced to stop suddenly","You will have less control over your vehicle","You will be travelling faster than normal")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest001 = new Question(
"Question 1",
0,
"Why, on a windy day, should you allow extra room when overtaking a motor cyclist?<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Take extra care when driving home","Do not drive home","Drink several cups of coffee before driving home","Take a short sleep before driving home")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest002 = new Question(
"Question 2",
0,
"A driver has had a few alcoholic drinks, what advice should you give them?<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Increase the control you have over the vehicle","Decrease the control you have over the vehicle","Make the car use more fuel","Reduce the vehicle's braking distance")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest003 = new Question(
"Question 3",
0,
"Coasting your vehicle whilst driving will..<br><br>Mark one answer",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Three times the normal distance","Ten times the normal distance","fifteen times the normal distance","Six times the normal distance")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest004 = new Question(
"Question 4",
0,
"When travelling on ice braking distances can be<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Park in a quiet area","Park in a busy area","Install a security coded radio","Install a cheap, no frills radio")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest005 = new Question(
"Question 5",
0,
"To help prevent your vehicle's radio from being stolen you can<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Zebra","Pelican","Puffin","Toucan")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest006 = new Question(
"Question 6",
0,
"At which pedestrian crossing are cyclists allowed to ride across?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("On a 40mph road","On a dual carriageway","Approaching a junction","Approaching a brow of a hill")
corr=new Array("0","0","1","1")
comm=""
valu=""
quest007 = new Question(
"Question 7",
1,
"In which of the following should you avoid overtaking?<br><br>Mark two answers.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("73 metres","83 metres","55 metres","95 metres")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest008 = new Question(
"Question 8",
0,
"When travelling at 60mph on a dry road the shortest overall stopping distance is what?<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Speed up","Be prepared to stop","Beep your horn to acknowlege her","Flash your headlights at her and wave her to cross")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest009 = new Question(
"Question 9",
0,
"Driving towards a zebra crossing you see an elderly woman waiting to cross. What should you do?<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Allow plenty of room","Go very slowly","Be ready to stop","Sound your horn","Speed up and quickly overtake")
corr=new Array("1","1","1","0","0")
comm=""
valu=""
quest010 = new Question(
"Question 10",
1,
"Which THREE should you do when passing livestock on the road?",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Puffin","Toucan","Zebra","Pelican")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest011 = new Question(
"Question 11",
0,
"Which type of crossing can detect when people are on them?<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Cyclists","Cars","High-sided vehicles","Motorcycles")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest012 = new Question(
"Question 12",
0,
"A strong cross wind is least likely to affect which of these vehicles?<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("The same as normal","Trebled","Doubled","Quadrupled")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest013 = new Question(
"Question 13",
0,
"When travelling in very heavy rain your overall stopping distance is likely to be<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("On a main road","At night","For longer than necessary","Into a side road")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest014 = new Question(
"Question 14",
0,
"You should never reverse<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Sing to them","Try and cool them down","Keep reassuring them until qualified help arrives","Give them liquids to drink")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest015 = new Question(
"Question 15",
0,
"At the scene of an accident you have to treat someone for shock. What should you do?<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("When they are over 18 years old","Never","When travelling on minor roads","In the summer")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest016 = new Question(
"Question 16",
0,
"When are passengers allowed to ride in a caravan that is being towed?<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Your comfort","The handling","Your ability to change gear","The steering")
corr=new Array("0","1","0","1")
comm=""
valu=""
quest017 = new Question(
"Question 17",
1,
"Overloading your vehicle may seriously affect<br><br>Mark two answers.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("A vehicle towing a trailor","An estate car","A motorcycle","A mini bus")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest018 = new Question(
"Question 18",
0,
"Which of the following is NOT allowed to travel in the right-hand lane of a three-lane motorway?<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("After dusk","When visibility is reduced to 100 metres or less","When overtaking at night","When visibilty is reduced to 150 metres or less.")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest019 = new Question(
"Question 19",
0,
"When should you use front fog lights?<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Reduced co-ordination","Speedier reactions","Increased road&nbsp; awareness","Increased confidence","Poor judgement")
corr=new Array("1","0","0","1","1")
comm=""
valu=""
quest020 = new Question(
"Question 20",
1,
"Which of the following are likely effects of drinking alcohol?<br><br>Mark three answers.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("By selecting fifth gear","By selecting a lower gear","By turning the engine off","By travelling with the clutch pressed down")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest021 = new Question(
"Question 21",
0,
"You can use the engine of your vehicle as a brake by<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Increase your speed to reduce your journey time","Decrease your speed","Stop at a safe place and rest","Turn on the radio and listen to loud music")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest022 = new Question(
"Question 22",
0,
"If you start to feel tired whilst driving you should<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("80 mph","60 mph","70 mph","50 mph")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest023 = new Question(
"Question 23",
0,
"What is the national speed limit for cars in the left-hand lane of a three-laned motorway? <br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Four years","Three years","Two years","One year")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest024 = new Question(
"Question 24",
0,
"After how many years does a car first need a MOT certificate?<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Change to a low gear","Brake quickly and firmly","Allow the vehicle to roll to a stop","Apply the handbrake","Grip the steering wheel firmly")
corr=new Array("0","0","1","0","1")
comm=""
valu=""
quest025 = new Question(
"Question 25",
1,
"Whilst driving a front tyre bursts. What should you do?<br><br>Mark two answers.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Learner drivers","Cyclists","Buses","Motorcycles over 100cc","Tractors")
corr=new Array("1","1","0","0","1")
comm=""
valu=""
quest026 = new Question(
"Question 26",
1,
"Which of the following must not use a motorway?<br><br>Mark three answers.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Over 65 years old","Deaf and dumb","Deaf and blind","Blind only")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest027 = new Question(
"Question 27",
0,
"A pedestrian with a white stick and red band is<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("30 to 45-year-olds","17 to 25-year-olds","46 to 55-year-olds","55 to 66-year olds")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest028 = new Question(
"Question 28",
0,
"The age group most likely to be involved in road accidents is<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Seven times greater than normal","Ten times greater than normal","Eight times greater than normal","Twice as great than normal")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest029 = new Question(
"Question 29",
0,
"When travelling on ice braking distances can be <br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("At night","On a dual carriageway","Alone","With passengers")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest030 = new Question(
"Question 30",
0,
"A provisional licence holder must not drive a motor car&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Give way to them","Flash your lights and wave them across","Drive around them","Proceed regardless")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest031 = new Question(
"Question 31",
0,
"You turn into a side road. Pedestrians have started to cross the road. You should<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Turn on your hazard lights","Turn on your rear fog lights","Turn on your front fog lights","Turn your headlights to dipped mode")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest032 = new Question(
"Question 32",
0,
"Travelling on a wet motorway with road spray tou should<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Steer into the skid","Brake sharply","Steer away from the skid","roll with it")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest033 = new Question(
"Question 33",
0,
"When correcting a rear-wheel skid you should<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Crusing at high speeds","Overtaking","Crusing at low speeds","High-sided vehicles")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest034 = new Question(
"Question 34",
0,
"The right hand lane on a three-lane motorway is used for<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("30 mph","40 mph","50 mph","60 mph")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest035 = new Question(
"Question 35",
0,
"The national speed limit for cars and motorcycles on a single carriageway road is<br><br>Mark one answer.",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

questions = new Array (
quest001,quest002,quest003,quest004,quest005,quest006,quest007,quest008,quest009,quest010,quest011,quest012,quest013,quest014,quest015,quest016,quest017,quest018,quest019,quest020,quest021,quest022,quest023,quest024,quest025,quest026,quest027,quest028,quest029,quest030,quest031,quest032,quest033,quest034,quest035)

function doQuestion(quest)
{
var numdo;
var numord=eval(quest+1);
var i=-1, ii, type, myname, gadget;
type=questions[quest].type;
numdo=type>=3?1:questions[quest].response.length;


document.writeln ("<a name=\""+questions[quest].qname+"\"></a>")
document.write("\n")
document.write("    <tr>\n")
document.write("      <td width=\"5%\" align=\"center\" valign=\"top\" bgcolor=\"#E6E6FF\"><font face=\"Verdana\"\n")
document.write("      color=\"#000080\"><strong><small>")
document.write(numord)
document.write("</small></strong></font></td>\n")
document.write("      <td width=\"95%\" valign=\"top\" bgcolor=\"#F4F4FF\"><font face=\"Verdana\"><font color=\"#000080\"><strong><small>\n")
document.write("      ")
if (questions[quest].img!="") {
document.write("\n")
document.write("         <img border=\"0\" hspace=\"10\" vspace=\"5\" align=\"left\" src=\"")
document.write(questions[quest].img)
document.write("\">\n")
document.write("      ")
}
document.write("\n")
document.write("      ")
document.writeln(questions[quest].qstring)
document.write("</small></strong></font><br>\n")
document.write("      <br><small><small>\n")
document.write("      ")
for (i=0; i<numdo; i++) {
myname=questions[quest].qname;
gadget="radio";
if (type>=3) gadget="text";
else if (type==1) {
myname+="_"+(i<9?"0":"")+(i+1);
gadget="checkbox";}
document.write("\n")
document.write("         ")
document.write(type==7?"<textarea name=\""+myname+"\" rows=5 cols=30 class=\"input\">":" <input type="+gadget+" name=\""+myname);
if (type<3) document.write("\" value=\""+i+"\">\n")
else document.write(type==7?"</textarea>":"\" class=\"input\" value=\"\">\n")
if (type<3) document.write(questions[quest].response[i]);
document.write("<br>\n")
document.write("      ")
}
document.write("\n")
document.write("      </small></small></font></td>\n")
document.write("    </tr>\n")
document.write("    ")
}
function doTest() {
var count, i;
questions.sort(myrandom);
for (i=0; i<questions.length; i++) {
questions[i].qname="Question "+(i+1);}
count=questions.length;
for (i=0; i<count; i++) doQuestion(i);
}
function fill(s,l){
s=s+""
for (y=1;y<=l;y++)
if (s.length>=l) break; else s="0"+s;
return s
}
function CheckQName(wapf,ii,i,multi,selection){
var len;
if (!multi) return(wapf.elements[ii].name==questions[i].qname);
len=questions[i].qname.length;
if (wapf.elements[ii].name.substring(0,len)!=questions[i].qname) return false;
if (wapf.elements[ii].name.substring(len,len+1)!="_") return false;
if (eval(wapf.elements[ii].name.substring(len+1,len+3))==(selection+1)) return true;
return false;
}
function errore(uno,due,tre)
{
if (!errori) global[1]="<H3>You have made the following errors</H3>";
++errori;
cachewrite("<p><b>"+uno+"</b><br>"+due+"<br>"+mycomment+tre+"</p>",2);
mycomment="";
}
function testIE5plus(){
var pos=navigator.appVersion.lastIndexOf('MSIE ');
if (pos != -1) {
pos+=5;
if (eval(navigator.appVersion.charAt(pos))>4)
return true;}
return false;}
function correct(wapf)
{
var i, ii, t, re, tmp, selection, multi, multipage=0, type, isnull, iswrong, iscorrect, evaluation=0, total=0, udat;
errori=waitTime=0;
udat=new Array();
for (i=0, ii=0; i<wapf.elements.length; i++)
{tmp=wapf.elements[i];
if (tmp.name.substring(0,13)=="Quiz.UserData"){
t=tmp.name.substring(14,tmp.name.length);
re=new RegExp("_", "g");
t=t.replace(re," ");
udat[ii++]=t+": <i>"+tmp.value+"</i><br>";
if (opera) tmp.value="";}}
global[0]=global[2]="";
global[1]="<h3>Congratulations, you haven't made any errors</h3>";
cachewrite("<html><head><title>Results</title><BASE target='_blank'></head><body bgcolor='#FFFFFF'><font face='Verdana, Arial'><table border=0 cellpadding=0 cellspacing=0 width='100%' bgcolor='#C0C0C0'><tr><td width='100%'><font face='Verdana, Arial' size=5 color='#FFFFFF'><b>&nbsp;Results</b></font></td></tr></table>",0)
now= new Date()
cachewrite("<small><p>"+fill((now.getMonth()+1),2)+"/"+fill(now.getDate(),2)+"/"+now.getYear()+"&nbsp;&nbsp;"+fill(now.getHours(),2)+":"+fill(now.getMinutes(),2)+"</p>",0)
cachewrite("<b>Mock Theroy Test #1</b><br><br>\n",0);
if (udat.length>0) {
cachewrite("<b>Information</b><br>\n",0);
for (i=0; i<udat.length; i++) cachewrite(udat[i],0);}
if (opera7 && multipage) {
for (i=0; i<questions.length; i++) {
id=document.getElementById("q"+(i+1));
id2=document.getElementById("q"+(i+1)+"a");
id.style.display=id2.style.display="block";}}

for (i=0; i<questions.length; i++) {
if (opera && multipage) {
id=document.getElementById("q"+(i+1));
id2=document.getElementById("q"+(i+1)+"a");
id.style.visibility=id2.style.visibility="visible";}
type=questions[i].type;
if (type==1) multi=1;
else multi=0;
isnull=true;
iscorrect=false;iswrong=false;
selection=0;
evaluation=0;
mycomment="";
for (ii=0; ii<wapf.elements.length; ii++) {
if (CheckQName(wapf,ii,i,multi,selection)) {
if (type>=3 && wapf.elements[ii].value!="") {
isnull=false;
if (wapf.elements[ii].value.toLowerCase()==questions[i].corrects.toLowerCase()) iscorrect=true;
else iswrong=true;
++selection;}
else if (wapf.elements[ii].checked) {
if (questions[i].score!="") evaluation+=questions[i].score[selection];
if (isnull) isnull=false;
if (questions[i].corrects[selection]=="1") iscorrect=(iswrong==false)?true:false;
else {
iswrong=true;
if (multi && questions[i].corrects!='') errore(questions[i].qname,"The checkbox  <i>"+questions[i].response[selection]+"</i>  shouldn't have been selected.",questions[i].explan)
}
if (questions[i].comment!="" && questions[i].comment[selection]!="")
mycomment+=((iscorrect || questions[i].corrects=='')?"<b>"+questions[i].qname+"</b><br>":"")+"<small>"+questions[i].comment[selection]+"</small><br>";
} else {
if (questions[i].corrects[selection]=="1") {
iswrong=true;
if (multi && questions[i].corrects!='') errore(questions[i].qname,"The checkbox  <i>"+questions[i].response[selection]+"</i>  should have been selected.",questions[i].explan);
}}
++selection;
}}
if (multi==false && (isnull || iswrong)) {
var okresp="", z;
if (type>=3) okresp=questions[i].corrects;
else {
for (z=0; z<questions[i].corrects.length; z++) {
if (questions[i].corrects[z]==1) {
okresp=questions[i].response[z];
break;
}}}
if (okresp!="") errore(questions[i].qname,"The right answer was <i>"+okresp+".</i>",questions[i].explan);
}
if (mycomment!="") cachewrite(mycomment,2);
if (questions[i].corrects!="") ++qright;
if (isnull) evaluation+=questions[i].ifnull;
else if (iswrong) evaluation+=questions[i].ifwrong;
else if (iscorrect) evaluation+=questions[i].ifcorrect;
total+=evaluation;}
if (qright==0) global[1]="<br>";
if (errori) cachewrite("<br><b>You have made "+errori+" "+(errori==1?"error":"errors")+".</b>",2);
cachewrite("<br><b>Total score: "+total+".</b><br>",2);

cachewrite("</small><hr noshade><center><form>",2)
printest=(((navigator.appName=="Netscape") && (navigator.appVersion.charAt(0)>="4")) || (testIE5plus() == true))? "print()": "alert('This button can be used with Netscape Navigator 4 or Microsoft Internet Explorer 5 only. If you want to print with other browsers, please select the Print command in the File menu.')"
cachewrite("<input type='button' value='Print...' onClick='"+printest+"'>&nbsp;&nbsp;&nbsp;&nbsp;",2)
cachewrite("<input type='button' value='Close' onClick='window.close()'></form></center>",2)
cachewrite(aknw,2)
winr=window.open('','wapres', 'titlebar=1,location=0,directories=0,menubar=1,toolbar=0,scrollbars=1,resizable=1,status=1')
for (i=0; i<3; i++) winr.document.write(global[i]);winr.document.close()
if ((opera || opera7) && multipage) {
document.forms[0].elements[0].value='Print...';
document.forms[0].elements[1].value='Close';
for (i=0; i<questions.length-1; i++) {
id=document.getElementById("q"+(i+1));
id2=document.getElementById("q"+(i+1)+"a");
opera?id.style.visibility=id2.style.visibility="hidden":id.style.display=id2.style.display="none";}}
}
aknw="<br><p align='center'><small><small>Created and managed with <a title='Click here to visit WebQuiz site' href='http://www.smartlite.it/go.asp?OLDLP' target = '_blank'>SmartLite WebQuiz</a></small></small></p>"
function myrandom(a,b)
{
var rc;
do {rc=Math.floor(Math.random()*3)-1;} while (rc==2);
return(rc);
}
function update_time(t) {
self.status=t;}
function stms(s){
if (Math.abs(tmMx)>=3600){
h=Math.floor(s/3600);m=Math.floor((s%3600)/60);s=((s%3600)%60);return fill(h,2)+':'+fill(m,2)+':'+fill(s,2);
}else{m=Math.floor(s/60);s=s%60;return fill(m,2)+':'+fill(s,2);}}
function shtm(t){
tmVl=t+1;update_time(stms(Math.abs(t)))
if (waitTime==0) return;
tmId = setTimeout('shtm(tmVl)',1000)
if (t==((tmMx>0)? tmMx : 0)){
clearTimeout(tmId)
alert('Time is over, correcting questionnaire now.')

correct(document.WapForm)}}
function checkTime(){
tmMx=-waitTime;
if (tmMx!=0){
alert('Time to complete your questionnaire is: '+stms(Math.abs(tmMx))+'\n\nPlease check time count.');
shtm((tmMx>0) ? 0 : tmMx)}}
