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=3420, 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("Accelerate hard","Maintain your speed","Be ready to stop","Brake hard")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest001 = new Question(
"Question 1",
0,
"You are approaching traffic lights that have been on green for sometime. You should (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>The longer traffic lights have been on green, the greater the chance of them changing. Always allow for this on approach and be prepared to stop.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Sound the horn","Use the mirrors","Select a higher gear","Flash your headlights")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest002 = new Question(
"Question 2",
0,
"Which of the following should you do before stopping? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Before pulling up check the mirrors to see what is happening behind you. Also assess what is ahead and make sure you give the correct signal if it helps other road users.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Restrict your view","Improve your driving","Distract your attention","Help your concentration")
corr=new Array("1","0","1","0")
comm=""
valu=""
quest003 = new Question(
"Question 3",
1,
"Objects hanging from your interior mirror may (mark TWO answers)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Ensure that you can see clearly through the windscreen of your vehicle. Stickers or hanging objects could affect your field of vision or draw your eyes away from the road. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Receiving a call","Suitably parked","Driving at less than 30 mph","Driving an automatic vehicle")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest004 = new Question(
"Question 4",
0,
"You should only use a mobile phone when (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>It is illegal to use a hand-held mobile phone while driving, except in a genuine emergency. Even using hands-free kit can distract your attention. Park in a safe and convenient place before receiving or making a call or using text messaging. Then you will also be free to take notes or refer to papers.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Look round before you move off","Use all the mirrors on the vehicle","Look round after moving off","Use the exterior mirror only","Give a signal if necessary","Give a signal after moving off")
corr=new Array("1","1","0","0","1","0")
comm=""
valu=""
quest005 = new Question(
"Question 5",
1,
"When you are moving off from behind a parked car you should (mark THREE answers)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Before moving off you should use all the mirrors to check if the road is clear. Look round to check the blind spots and give a signal if it is necessary to warn other road users of your intentions.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("There may be another vehicle coming","They may not be looking","It is safer for you to carry on","They may not be ready to cross")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest006 = new Question(
"Question 6",
0,
"You should never wave people across at pedestrian crossings because (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>If people are waiting to use a pedestrian crossing, slow down and be prepared to stop. Don’t wave them across the road since another driver may, not have seen them, not have seen your signal and may not be able to stop safely.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Motorway maintenance","Bomb disposal","Blood transfusion","Police patrol","Breakdown recovery")
corr=new Array("0","1","1","1","0")
comm=""
valu=""
quest007 = new Question(
"Question 7",
1,
"Which of the following vehicles will use blue flashing beacons? (mark THREE answers)<br><br><i><u>Knowledge and Understanding <br></u></i><i>When you see emergency vehicles with blue flashing beacons, move out of the way as soon as it is safe to do so.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Move closer to the car ahead, so the driver behind has no room to overtake","wave the driver behind to overtake when it is safe","keep a steady course &amp; allow the driver behind to overtake","accelerate to get away from the driver behind")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest008 = new Question(
"Question 8",
0,
"<font face=\"HelveticaNeue-Light\">You are driving in traffic at the speed limit for the road. The driver behind is trying to overtake. You should</font><font face=\"HelveticaNeue-Light\" size=2>&nbsp;</font>(mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Keep a steady course to give the driver behind an opportunity to overtake safely. If necessary, slow down. Reacting incorrectly to another driver’s impatience can lead to danger.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("They use diesel power","They use quieter roads","They use electric power","They do not operate during rush hour")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest009 = new Question(
"Question 9",
0,
"Supertrams or Light Rapid Transit (LRT) systems are environmentally friendly because (mark ONE answer)<br><br>Knowledge and Understanding",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Under-inflated","Of different makes","Over-inflated","New and hardly used")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest010 = new Question(
"Question 10",
0,
"You will use more fuel if your tyres are (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Check your tyre pressures frequently &amp;ndash; normally once a week. If pressures are lower than those recommended by the manufacturer, there will be more &quot;rolling resistance&quot;. The engine will have to work harder to overcome this, leading to increased fuel consumption.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Left with parking lights on","Left with no lights on","Right with parking lights on","Right with dipped headlights on")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest011 = new Question(
"Question 11",
0,
"You are parking on a two-way road at night. The speed limit is 40 mph. You should park on the (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>At night all vehicles must display parking lights when parked on a road with a speed limit greater than 30 mph. They should be close to the kerb, facing in the direction of the traffic flow and not within a distance as specified in The Highway Code.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Your journey will take longer","You will have a more pleasant journey","You will cause more pollution","Your stress levels will be greater")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest012 = new Question(
"Question 12",
0,
"Planning your journey to avoid busy times has a number of advantages. One of these is (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Having a pleasant journey can have safety benefits. You will be less tired and stressed and this will allow you to concentrate more on your driving or riding.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Reduced pollution","Increased fuel consumption","Reduced exhaust emissions","Increased road safety")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest013 = new Question(
"Question 13",
0,
"Rapid acceleration and heavy braking can lead to (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Using the controls smoothly can reduce fuel consumption by about 15% as well as reducing wear and tear on your vehicle. Plan ahead and anticipate changes of speed well in advance. This will reduce the need to accelerate rapidly or brake sharply.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Using the brakes","Making a hill start","Turning into a narrow road","Passing pedal cyclists")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest014 = new Question(
"Question 14",
0,
"In windy conditions you need to take extra car when (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>You should always give cyclists plenty of room when overtaking. When it’s windy, a sudden gust could blow them off course.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("On a narrow country lane","On an open stretch of road","On a busy stretch of road","On a long, straight road")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest015 = new Question(
"Question 15",
0,
"Where are you most likely to be affected by a side wind? (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>In windy conditions, care must be taken on exposed roads. A strong gust of wind can blow you off course. Watch out for other road users who are particularly likely to be affected, such as cyclists, motorcyclists, high-sided lorries and vehicles towing trailers.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("53 metres (175 feet)","60 metres (197 feet)","73 metres (240 feet)","96 metres (315 feet)")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest016 = new Question(
"Question 16",
0,
"In good conditions, what is the typical stopping distance at 70 mph? (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Note that this is the typical stopping distance. It will take at least this distance to think, brake and stop in good conditions. In poor conditions it will take much longer.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("The lowest gear you can","The highest gear you can","A high engine speed","The handbrake and footbrake together")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest017 = new Question(
"Question 17",
0,
"You are trying to move off on snow. You should use (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>If you attempt to move off in a low gear, such as first, the engine will rev at a higher speed. This could cause the wheels to spin and dig further into the snow. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Slow down before you reach the bend","Gently apply your handbrake","Firmly use your footbrake","Coast into the bend","Avoid sudden steering movements")
corr=new Array("1","0","0","0","1")
comm=""
valu=""
quest018 = new Question(
"Question 18",
1,
"You are driving in freezing conditions. What should you do when approaching a sharp bend? (mark TWO answers)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Harsh use of the accelerator, brakes or steering are likely to lead to skidding, especially on slippery surfaces. Avoid steering and braking at the same time. In icy conditions it’s very important that you constantly assess what’s ahead, so that you can take appropriate action in plenty of time.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Obtain car insurance","Understand road signs","React very quickly","Give signals correctly")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest019 = new Question(
"Question 19",
0,
"An elderly person's driving ability could be affected because they may be unable to (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Be tolerant of older drivers. Poor eyesight and hearing could affect the speed with which they react to a hazard and may cause them to be hesitant.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Brake and stop only for large vehicles","Brake sharply to a stop before looking","Be prepared to brake sharply to a stop","Be prepared to stop for any traffic")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest020 = new Question(
"Question 20",
0,
"You are approaching a crossroads. The traffic lights have failed. What should you do? (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>When approaching a junction where the traffic lights have failed, you should proceed with caution. Treat the situation as an unmarked junction and be prepared to stop.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("They give a wider field of vision","They totally cover blind spots","They make it easier to judge the speed of following traffic","They make following traffic look bigger")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest021 = new Question(
"Question 21",
0,
"Why are mirrors often slightly curved (convex)? (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Although a convex mirror gives a wide view of the scene behind, you should be aware that it will not show you everything behind or to the side of the vehicle. Before you move off you will need to check over your shoulder to look for anything not visible in the mirrors.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("To restrict the flow of traffic","To warn you of oncoming traffic","To enable you to change lanes early","To prevent you changing lanes")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest022 = new Question(
"Question 22",
0,
"Why are place names printed on the road surface? (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>The names of towns and cities may be painted on the road at busy junctions and complex road systems. Their purpose is to let you move into the correct lane in good time, allowing traffic to flow more freely.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Traffic in both directions can use the middle lane to overtake","Traffic can travel faster in poor weather conditions","Traffic can overtake on the left","Traffic uses the middle lane for emergencies only")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest023 = new Question(
"Question 23",
0,
"Some two-way roads are divided into three lanes. Why are these particularly dangerous? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>If you intend to overtake you must consider that approaching traffic could be planning the same manoeuvre. When you have considered the situation and have decided it is safe, indicate your intentions early. This will show the approaching traffic that you intend to pull out.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("An ambulance","A fire engine","A doctor on call","A disabled person's vehicle")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest024 = new Question(
"Question 24",
0,
"You are on a dual carriageway. Ahead you see a vehicle with an amber flashing light. What could this be? (mark ONE answer)<br> <br><i><u>Knowledge and Understanding <br></u></i><i>An amber flashing light on a vehicle indicates that it is slow-moving. Battery powered vehicles used by disabled people are limited to 8 mph. It’s not advisable for them to be used on dual carriageways where the speed limit exceeds 50 mph. If they are then an amber flashing light must be used.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Drivers to use the hard shoulder","Overtaking drivers there is a bend to the left","Overtaking drivers to move back to the left","Drivers that it is safe to overtake")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest025 = new Question(
"Question 25",
0,
"This road marking warns (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>You should plan your overtaking to take into account any hazards ahead. In this picture the marking indicates that you are approaching a junction. You will not have time to overtake and move back into the</i><br><i>left safely.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"14.jpg");

resp=new Array("Near the brow of a hill","In a lay-by","Where the kerb is raised","Where the kerb has been lowered for wheelchairs","At or near a bus stop")
corr=new Array("1","0","0","1","1")
comm=""
valu=""
quest026 = new Question(
"Question 26",
1,
"In which THREE places would parking cause an obstruction to others? (mark THREE answers)<br><br><i><u>Knowledge and Understanding</u></i><i> <br>Think about the effect your parking will have on other road users. Don’t forget that not all vehicles are the size of a car. Large vehicles will need more room to pass and might need more time too. Parking out of the view of traffic, such as before the brow of a hill, causes unnecessary risks. Think before you park.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Opposite another parked vehicle","In a quiet road","Opposite a traffic island","In a secure car park")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest027 = new Question(
"Question 27",
0,
"You are away from home and have to park your vehicle overnight. Where should you leave it? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>When leaving your vehicle unattended, use a secure car park whenever possible.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Make you more comfortable","Help you to avoid neck injury","Help you to relax","Help you to maintain your driving position")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest028 = new Question(
"Question 28",
0,
"The most important reason for having a properly adjusted head restraint is to (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>The restraint should be adjusted so that it gives maximum protection to the head and neck. This will help in the event of a rearend collision.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Park in an unlit area","Hide the radio with a blanket","Park near a busy junction","Install a security-coded radio")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest029 = new Question(
"Question 29",
0,
"How can you help to prevent your car radio from being stolen? (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>A security-coded radio can deter thieves as it is likely to be of little use when removed from the vehicle.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Park near a police station","Put them under the driver's seat","Lock then out of sight","Park in an unlit side road")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest030 = new Question(
"Question 30",
0,
"You are parking your car. You have some valuables, which you are unable to take with you. What should you do? (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Your vehicle is like a shop window for thieves. Either remove all valuables or lock them out of sight.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Aerial","Windows","Bumper","Lights","Mirrors","Number plates")
corr=new Array("0","1","0","1","1","1")
comm=""
valu=""
quest031 = new Question(
"Question 31",
1,
"Before starting a journey in freezing weather you should clear ice and snow from your vehicle's (mark FOUR answers)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Don’t travel unless you have no choice. Making unnecessary journeys in bad weather can increase the risk of having a collision. It’s important that you can see and be seen. Make sure any snow or ice is cleared from lights, mirrors, number plates and windows.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Stop and check the tyres","Stop and dry the brakes","Check your exhaust","Test your brakes")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest032 = new Question(
"Question 32",
0,
"You have driven through a flood. What is the first thing you should do? (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Before you test your brakes you must check for following traffic. If it is safe, gently apply the brakes to clear any water that may be covering the braking surfaces.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Overtake before the cyclist gets to the junction","Flash your headlights at the cyclist","Slow down and allow the cyclist to turn","Overtake the cyclist on the left-hand side")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest033 = new Question(
"Question 33",
0,
"You are approaching this cyclist. You should (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Keep well back and allow the cyclist room to take up the correct position for the turn. Don’t get too close behind or try to squeeze past.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"57.jpg");

resp=new Array("Travel at a reduced speed","Always travel at the speed limit","Position in the centre of the road","Only slow down if pedestrians are near")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest034 = new Question(
"Question 34",
0,
"In areas where there are 'traffic calming' measures you should<br><br><i><u>Knowledge and Understanding <br></u></i><i>Traffic calming measures such as road humps, chicanes and narrowings are intended to slow you down. Maintain a reduced speed until you reach the end of these features. They are there to protect pedestrians. Kill your speed!</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Looking for traffic behind you","Reflections of traffic in shop windows","Making eye contact with other road users","Checking for traffic in your interior mirror")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest035 = new Question(
"Question 35",
0,
"You are waiting to emerge at a junction. Parked vehicles restrict your view. What can help you to see traffic on the road you are joining? (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>When your view is restricted into the new road you must still be completely sure it is safe to emerge. Try to look for traffic through the windows of the parked cars or the reflections in shop windows. Keep looking in all directions as you slowly edge forwards until you can see it is safe.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Inform your local police station","Avoid using motorways","Always drive accompanied","Inform the licensing authority")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest036 = new Question(
"Question 36",
0,
"After passing your driving test, you suffer from ill health. This affects your driving. You MUST (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>The licensing authority won’t automatically take away your licence without investigation. For advice, contact the Driver and Vehicle Licensing Agency (or DVA in Northern Ireland).</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("One-way street","Pedestrians","Traffic congestion","Parked vehicles")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest037 = new Question(
"Question 37",
0,
"You are turning left into a side road. What hazards should you be especially aware of? (mark ONE answer) <br><br><i><u>Knowledge and Understanding <br></u></i><i>Make sure that you have reduced your speed and are in the correct gear for the turn. Look into the road before you turn and always give way to any pedestrians who are crossing.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Overtaking you on the left","Following you closely","Emerging from the side road","Overtaking on your right")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest038 = new Question(
"Question 38",
0,
"You intend to turn right into a side road. Just before turning you should check for motorcyclists who might be (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Never attempt to change direction to the right without first checking your right-hand mirror. A motorcyclist might not have seen your signal and could be hidden by the car behind you. This action should become a matter of routine.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Physically disabled","Deaf only","Blind only","Deaf and blind")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest039 = new Question(
"Question 39",
0,
"You see a pedestrian with a white stick and red band. This means that the person is (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>If someone is deaf as well as blind, they may be carrying a white stick with a red reflective band. You can’t see if a pedestrian is deaf. Don’t assume everyone can hear you approaching.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("To give acceleration space to overtake quickly on blind spots","To get the best view of the road ahead","To leave a gap in case the vehicle stops and rolls back","To offer other drivers a safe gap if they want to overtake you")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest040 = new Question(
"Question 40",
0,
"Before overtaking a large vehicle you should keep well back. Why is this? (mark ONE answer)<br> <br><i><u>Knowledge and Understanding <br></u></i><i>When following a large vehicle keep well back. If you’re too close you won’t be able to see the road ahead and the driver of the long vehicle might not be able to see you in their mirrors.<br></i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Accelerate to get closer to the red van","Give a long blast on the horn","Drop back to leave the correct separation distance","Flash your headlights several times")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest041 = new Question(
"Question 41",
0,
"You are driving along this road. The red van cuts in close in front of you. What should you do? (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>There are times when other drivers make incorrect or ill-judged decisions. Be tolerant and try not to retaliate or react aggressively. Always consider the safety of other road users, your passengers and yourself.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"229.jpg");

resp=new Array("8 mph (12 km/h)","18 mph (29 km/h)","28 mph (45 km/h)","38 mph (61 km/h)")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest042 = new Question(
"Question 42",
0,
"In front of you is a class 3 powered vehicle (powered wheeled) driven by a disabled person. These vehicles have a maximum speed of (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>These vehicles are battery powered and very vulnerable due to their slow speed, small size and low height. Some are designed for pavement and road use and have a maximum speed of 8 mph (12 km/h). Others are for pavement use only and are restricted to 4 mph (6 km/h). Take extra care and be patient if you are following one. Allow plenty of room when overtaking and do not go past unless you can do so safely.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Overtake the motorcyclist immediately","Keep well back","Stay level with the motorcyclist","Keep close to the motorcyclist")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest043 = new Question(
"Question 43",
0,
"It is very windy. You are behind a motorcyclist who is overtaking a high-sided vehicle. What should you do? (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Motorcyclists are affected more by windy weather than other vehicles. In windy conditions, high-sided vehicles cause air turbulence. You should keep well back as the motorcyclist could be blown off course.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Use only your sidelights","Always use your headlights","Always use your rear fog lights","Use your headlights only in bad weather")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest044 = new Question(
"Question 44",
0,
"You are on a well-lit motorway at night. You must (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>If you’re driving on a motorway at night or in poor visibility, you must always use your headlights, even if the road is well-lit. The other road users in front must be able to see you in their mirrors.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("By changing to a lower gear","By selecting reverse gear","By changing to a higher gear","By selecting neutral")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest045 = new Question(
"Question 45",
0,
"How can you use the engine of your vehicle to control your speed?<br><br><i><u>Knowledge and Understanding <br></u></i><i>You should brake and slow down before selecting a lower gear. The gear can then be used to keep the speed low and help you control the vehicle. This is particularly helpful on long downhill stretches, where brake fade can occur if the brakes overheat.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Behind the line, then edge forward to see clearly","Beyond the line at a point where you can see clearly","Only if there is traffic on the main road","Only if you are turning to the right")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest046 = new Question(
"Question 46",
0,
"At this blind junction you must stop (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>The ‘stop’ sign has been put here because there is a poor view into the main road. You must stop because it will not be possible to assess the situation on the move, however slowly you are travelling.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"511.jpg");

resp=new Array("Prevent overtaking","Reduce rest stops","Prevent tailgating","Reduce congestion")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest047 = new Question(
"Question 47",
0,
"The aim of an Active Traffic Management scheme on a motorway is to (mark ONE answer)<br> <br><i><u>Knowledge and Understanding <br></u></i><i>Active Traffic Management schemes are intended to reduce congestion and make journey times more reliable. In these areas the hard shoulder may be used as a running lane to ease congestion at peak times or in the event of an incident. It may appear that you could travel faster for a short distance, but keeping traffic flow at a constant speed may improve your journey time.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Variable speed limits","Contraflow systems","National speed limits","Lane closures")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest048 = new Question(
"Question 48",
0,
"On a motorway what is used to reduce traffic bunching? (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>Congestion can be reduced by keeping traffic at a constant speed. At busy times maximum speed limits are displayed on overhead gantries. These can be varied quickly depending on the amount of traffic. By keeping to a constant speed on busy sections of motorway overall journey times are normally improved.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Emergency vehicles emerging","Buses pulling out","Trams crossing in front","Cyclists riding across")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest049 = new Question(
"Question 49",
0,
"At toucan crossings, apart from pedestrians you should be aware of (mark ONE answer)<br><br><i><u>Knowledge and Understanding <br></u></i><i>The use of cycles is being encouraged and more toucan crossings are being installed. These crossings enable pedestrians and cyclists to cross the path of other traffic. Watch out as cyclists will approach the crossing faster than pedestrians.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Move into the middle of the road to get a better view","Slow down","Get over the bridge as quickly as possible","Consider using your horn","Find another route","Beware of pedestrians")
corr=new Array("0","1","0","1","0","1")
comm=""
valu=""
quest050 = new Question(
"Question 50",
1,
"As you approach this bridge you should (mark THREE answers)<br><br><u>K</u><i><u>Knowledge and Understanding <br></u></i><i>This sign gives you a warning. The brow of the hill prevents you seeing oncoming traffic so you must be cautious. The bridge is narrow and there may not be enough room for you to pass an oncoming vehicle at this point. There is no footpath, so pedestrians may be walking in the road. Consider the hidden hazards and be ready to react if necessary.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"humpback.jpg");

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,quest036,quest037,quest038,quest039,quest040,quest041,quest042,quest043,quest044,quest045,quest046,quest047,quest048,quest049,quest050)

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;

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>Theory Test 02</b><br><br>\n",0);
cachewrite("<b>Click To View Questions and Answers <a title='Click To View Questions and Answers' a href='theorytestanswers02.htm'>Click To View Questions and Answers</a></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'><large><large>Click To View Questions and Answers <a title='Click To View Questions and Answers' a href='theorytestanswers02.htm'>Click To View Questions and Answers</a></large></large></p>"
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)}}

