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("Give an arm signal as well as using your indicators","Signal so that other drivers can slow down for you","Look over your shoulder for a final check","Select a higher gear than normal")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest001 = new Question(
"Question 1",
0,
"Before you make a U-turn in the road, you should (mark ONE answer)<br><br><i><u>Knowledge and Understanding</u></i><br><i>If you want to make a U-turn, slow down and ensure that the road is clear in both directions. Make sure that the road is wide enough to carry out the manoeuvre.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Just after a bend","In a one-way street","On a 30 mph road","Approaching a dip in the road")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest002 = new Question(
"Question 2",
0,
"In which of these situations should you avoid overtaking? (mark ONE answer)<br><br><i><u>Knowledge and Understanding</u></i><br><i>As you begin to think about overtaking, ask yourself if it is really necessary. If you can't see well ahead stay back and wait for a safer place to pull out.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Stop immediately","Answer it immediately","Pull up in a suitable place","Pull up at the nearest curb")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest003 = new Question(
"Question 3",
0,
"Your mobile phone rings while you are travelling. You should (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>The safest option is to switch off your mobile phone before you set off, and use a message service. Even hands-free systems are likely to distract your attention. Don't endanger other road users. If you need to make a call, pull up in a safe place when you can, you may need to go some distance before you can find one. It is illegal to use a hand-held mobile or similar device when driving or riding, except in a genuine emergency.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Loud music","Arguing with a passenger","Using a mobile phone","Putting in a cassette tape","Stopping to regularly to rest","Pulling up to tune the radio")
corr=new Array("1","1","1","1","0","0")
comm=""
valu=""
quest004 = new Question(
"Question 4",
1,
"Which of the following may cause loss of concentration on a long journey? <br>(mark FOUR answers)<br><br><i><u>Knowledge and Understanding<br></u></i><i>You should not allow yourself to be distracted when driving. You need to concentrate fully in order to be safe on the road. Loud music could mask other sounds, such as the audible warning of an emergency vehicle. Any distraction which causes you to take your hands off the road could be dangerous.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Stop and wait for the green light","Stop and wait for the red light","Give way to pedestrians waiting to cross","Give way to pedestrians already on the crossing")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest005 = new Question(
"Question 5",
0,
"At a pelican crossing the flashing amber light means you MUST (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Pelican crossings are signal-controlled crossings operated by pedestrians. Push-button controls change the signals. Pelican crossings have no red-and-amber stage before green. Instead, they have a flashing amber light, which means you MUST give way to pedestrians already on the crossing, but if it is clear, you may continue.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Using the rear door of a hatchback car","Reversing into a parking space","Following another vehicle too closely","Driving with rear fog lights on")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest006 = new Question(
"Question 6",
0,
"'Tailgating' means (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>'Tailgating' is used to describe this dangerous practice, often seen in fast-moving traffic and on motorways. Following the vehicle in front too closely is dangerous because it a) restricts your view of the road ahead b) leaves you no safety margin if the vehicle in front slows down or stops suddenly.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("One second","Two seconds","Three seconds","Four seconds")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest007 = new Question(
"Question 7",
0,
"You are following a vehicle on a wet road. You should leave a time gap of at least (mark one answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Wet roads will reduce your tyres' grip on the road. The safe separation gap of at least two seconds in dry conditions should be doubled in wet weather.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Your tank is only three quarters full","You have used a locking filler cap","You check your fuel gauge is working","Your filler cap is securely fastened")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest008 = new Question(
"Question 8",
0,
"To avoid spillage after refuelling, you should make sure that (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>When learning to drive it is a good idea to practice filling your car with fuel. Ask your instructor if you can use a petrol station and fill the fuel tank yourself. You need to know where the filler cap is located on the car you are driving in order to park on the correct side of the pump. Take care not to overfill the tank or spill fuel. Make sure you secure the filler cap as soon as you have replaced the fuel nozzle.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("In the right-hand lane","In the left-hand lane","In either lane, depending on the traffic","Just left of the centre line")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest009 = new Question(
"Question 9",
0,
"You are in a one-way street and want to turn right. You should position yourself (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>If you are travelling in a one-way street and wish to turn right you should take up a position in the right-hand lane. This will enable other road users not wishing to turn to proceed on the left. Indicate your intention and take up your position in good time.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Toucan","Puffin","Pelican","Zebra")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest010 = new Question(
"Question 10",
0,
"At which type of crossing are cyclists allowed to ride across with pedestrians? (mark ONE answer)<br><br><i><u>Knowledge and Understanding</u></i><br><i>A toucan crossing is designed to allow pedestrians and cyclists to cross at the same time. Look out for cyclists approaching the crossing at speed.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Give way to pedestrians who are crossing","Encourage pedestrians to cross","Not move until the green light appears","Stop even if the crossing is clear")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest011 = new Question(
"Question 11",
0,
"You are approaching a pelican crossing. The amber light is flashing. You must (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>While the pedestrians are crossing don't encourage them to cross by waving or flashing headlights: other road users may misunderstand your signal. Don't harass them by creeping forwards or revving your engine.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Increase your speed","Sound your horn","Flash your headlights","Drive slowly past","Give plenty of room","Rev your engine")
corr=new Array("0","0","0","1","1","0")
comm=""
valu=""
quest012 = new Question(
"Question 12",
1,
"You are driving along a country road. A horse and rider are approaching. What should you do? (mark TWO answers)<br><br><i><u>Knowledge and Understanding<br></u></i><i>It is important that you reduce your speed. passing too closely at speed could startle the horse and unseat the rider.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Be patient and wait","Sound your horn","Carry on","Wave then to cross")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest013 = new Question(
"Question 13",
0,
"You stop for pedestrians waiting to cross at a zebra crossing. They do not start to cross. What should you do? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>If you stop for pedestrians and they don't start to cross don't wave then across or sound your horn. This could be dangerous if another vehicle is approaching which hasn't seen or heard your signal.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Braking","Steering","Changing gear","Parking")
corr=new Array("1","1","0","0")
comm=""
valu=""
quest014 = new Question(
"Question 14",
1,
"Which TWO are badly affected if the tyres are under-inflated? (mark TWO answers)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Your tyres are your only contact with the road so it is very important to ensure that they are free from defects, have sufficient tread depth and are correctly inflated. Correct tyre pressures help reduce the risk of skidding and provide a safer and more comfortable drive or ride.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Between 10 pm and 6 am in a built-up area","At any time in a built-up area","Between 11.30 pm and 7 am in a built-up area","Between 11.30 pm and 6 am on any road")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest015 = new Question(
"Question 15",
0,
"You must NOT sound your horn (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Vehicles can be noisy. Every effort must be made to prevent excessive noise, especially in built-up areas at night. Don't rev the engine or&nbsp; sound your horn unnecessarily. It is illegal to sound your horn in a built-up area between 11.30 pm and 7 am, except when another vehicle poses danger.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Engines produce more power","Exhaust systems easier to replace","Engines run quietly","Exhaust fumes cleaner")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest016 = new Question(
"Question 16",
0,
"Catalytic converters are fitted to make the (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Harmful gases in the exhaust system pollute the atmosphere. These gases are reduced by up to 90% if a catalytic converter is fitted. Cleaner air benefits everyone, especially people who live or work near congested roads.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Always at major road works","Used to increase traffic speed","At toll-bridge approaches only","Traffic calming measures")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest017 = new Question(
"Question 17",
0,
"Road humps, chicanes, and road narrowings are (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Traffic calming measures help keep vehicle speeds low in congested areas where there are pedestrians and children. A pedestrian is much more likely to survive a collision with a vehicle travelling at 20 mph than at 40 mph. <br></i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Take it to a local authority site","Put it in the dustbin","Break it into pieces","Leave it on wasteland","Take it to a garage","Burn it in a fire")
corr=new Array("1","0","0","0","1","0")
comm=""
valu=""
quest018 = new Question(
"Question 18",
1,
"How should you dispose of a used battery? (mark TWO answers)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Batteries contain acid which is hazardous and must be disposed of safely.<br></i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Poor steering control","Accelerating around bends","Staying in high gears","Harsh braking and accelerating")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest019 = new Question(
"Question 19",
0,
"What is the most likely cause of high fuel consumption? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Accelerating and braking gently and smoothly will help to save fuel, reduce wear on your vehicle and is better for the environment.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Battery acid","Distilled water","Engine oil","Engine coolant")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest020 = new Question(
"Question 20",
0,
"The fluid level in your battery is low. What should you top it up with? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Some modern batteries are maintenance-free. Check your vehicle handbook and, if necessary, make sure that the plates in each battery cell are covered.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Look at a map","Contact your local garage","Look in your vehicle handbook","Check your vehicle registration document")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest021 = new Question(
"Question 21",
0,
"Before starting a journey it is wise to plan your route. How can you do this? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Planning your journey before setting out can help to make it much easier, more pleasant and may help to ease traffic congestion. Look at a map to help you to do this. You may need different scale maps depending on where and how far you are going. Printing or writing out the route can also help.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("10%","20%","30%","40%")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest022 = new Question(
"Question 22",
0,
"What percentage of all emissions does road transport account for? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Transport is an essential part of modern life but it does have environmental effects. In heavily populated areas traffic is the biggest source of air pollution. Eco-safe driving and riding will reduce emissions and can make a surprising difference to local air quality. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Twice the normal distance","Give times the normal distance","Seven times the normal distance","Ten times the normal distance")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest023 = new Question(
"Question 23",
0,
"Braking distances on ice can be (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>In icy and snowy weather, your stopping distance will increase by up to ten times compared to good, dry conditions. Take extra care when braking, accelerating and steering, to cut down the risk of skidding. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Two times","Three times","Five times","Ten times")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest024 = new Question(
"Question 24",
0,
"Freezing conditions will affect the distance it takes you to come to a stop. You should expect stopping distances to increase by up to (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Your tyre grip is greatly reduced on icy roads and you need to allow up to ten times the normal stopping distance.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("The suspension","The grip of the tyres","The braking","The exhaust")
corr=new Array("0","1","1","0")
comm=""
valu=""
quest025 = new Question(
"Question 25",
1,
"In very hot weather the road surface can become soft. Which TWO of the following will be most affected? (mark TWO answers)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Only a small part of your tyre is in contact with the road. This is why you must consider the surface on which your are travelling, and alter your speed to suit the road conditions. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Pass close","Pass quickly","Pass wide","Pass immediately")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest026 = new Question(
"Question 26",
0,
"What should you do when overtaking a motorcyclist in strong winds? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>In strong winds riders of two-wheeled vehicles are particularly vulnerable. When you overtake them allow plenty of room. Always check to the left as you pass. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Reduce speed in good time","Switch lanes at any time to make progress","Choose an appropriate lane in good time","Keep the correct separation distance","Increase speed to pass through quickly","Follow other motorists closely to avoid long queues")
corr=new Array("1","0","1","1","0","0")
comm=""
valu=""
quest027 = new Question(
"Question 27",
1,
"To avoid a collision when entering a contraflow system, you should (mark THREE answers)<br> <br><i><u>Knowledge and Understanding<br></u></i><i>In a contraflow system you will be travelling close to oncoming traffic and sometimes in narrow lanes. You should obey the temporary speed limit signs, get into the correct lane at the proper time and keep a safe separation distance from the vehicle ahead. When traffic is at a very low speed, merging in turn is recommended if it is safe and appropriate.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Worn tyres","Driver error","Other vehicles","Pedestrians")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest028 = new Question(
"Question 28",
0,
"What is the most common cause of skidding? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>A skid happens when the driver changes the speed or direction of their vehicle so suddenly that the tyres can't keep their grip on the road. Remember that the risk of skidding on a wet or icy road is much greater than in dry conditions.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Drive at a slow speed in as high gear as possible","Use the handbrake if the wheels start to slip","Brake gently and repeatedly","Drive in a low gear at all times")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest029 = new Question(
"Question 29",
0,
"You are driving on an icy road. How can you avoid wheelspin? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>If you are travelling on a icy road extra caution will be required to avoid loss of control. Keeping your speed down and using the highest gear possible will reduce the risk of the tyres losing their grip on this slippery surface. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Brake firmly and not turn the steering wheel","Steer carefully to the left","Steer carefully to the right","Brake firmly and steer to the left")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest030 = new Question(
"Question 30",
0,
"You are turning left on a slippery road. The back of your vehicle slides to the right. You should (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Steer into the skid but be careful not to overcorrect with too much steering. Too much movement may lead to a skid in the opposite direction. Skids don't just happen, they are caused. The three important factors in order are the driver, the vehicle and the road surface. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Brake firmly and quickly","Be ready to steer sharply","Use sidelights only","Brake gently in plenty of time")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest031 = new Question(
"Question 31",
0,
"When driving in falling snow you should (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Braking on snow can be extremely dangerous. Be gentle with both the accelerator and brake to prevent wheelspin.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Turn the steering wheel towards the kerb","Park close to the bumper of another car","Park with two wheels on the kerb","Put the handbrake on firmly","Turn the steering wheel away from the kerb")
corr=new Array("1","0","0","1","0")
comm=""
valu=""
quest032 = new Question(
"Question 32",
1,
"You wish to park facing DOWNHILL. Which TWO of the following should you do? (mark TWO answers)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Turning the wheels towards the kerb will allow it to act as a chock, preventing any forward movement of the vehicle. It will also help to leave it in gear, or select Park if you have an automatic. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Aquaplane","Skid","Puncture","Wear")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest033 = new Question(
"Question 33",
0,
"Anti-lock brakes prevent wheels from locking. This means the tyres are less likely to (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>If an anti-lock braking system is fitted it activates automatically when maximum braking pressure is applied or when it senses that the wheels are about to lock. It prevents the wheels from locking so you can continue to steer the vehicle during braking. It does not remove the need for good driving practices such as anticipation and correct speed for the conditions.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Yes, you should plan to stop every half hour","Yes, regular stops help concentration","No, you will be less tired if you get there as soon as possible","No, only fuel stops will be needed")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest034 = new Question(
"Question 34",
0,
"You are planning a long journey. Do you need to plan rest stops? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Try to plan your journey so that you can take rest stops. It is recommended that you take a break of at least 15 minutes after every two hours of driving. This should help to maintain your concentration.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Try not to react","Let them know how you feel","Flash your headlights several times","Sound your horn")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest035 = new Question(
"Question 35",
0,
"A driver does something that upsets you. You should (mark ONE answer)<br> <br><i><u>Knowledge and Understanding<br></u></i><i>There are times when other road users make a misjudgment or mistake. When this happens try not to get annoyed and don't react by showing anger. Sounding your horn, flashing your headlights or shouting won't help the situation. Good anticipation will help to prevent these incidents becoming collisions. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Overtake after checking your mirrors and signalling","Stay behind until you are past the junction","Accelerate quickly to pass before the junction","Slow down and prepare to overtake on the left")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest036 = new Question(
"Question 36",
0,
"You are following a slow-moving vehicle on a narrow country road. There is a junction just ahead on the right. What should you do?<br><br><i><u>Knowledge and Understanding<br></u></i><i>You should never overtake as you approach a junction. If a vehicle emerged from the junction while you were overtaking, a dangerous situation could develop very quickly.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Flash your lights to alert the driver","Sound your horn before overtaking","Overtake on the left if there is room","Stay behind and not overtake")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest037 = new Question(
"Question 37",
0,
"You think the driver in the vehicle in front has forgotten to cancel their right indicator. You should (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>The driver may be unsure of the location of a junction and turn suddenly. Be cautious and don't attempt to overtake. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("They need to listen for following traffic","Motorcycles do not have mirrors","Look around helps them balance as they turn","They need to check for traffic in their blind area")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest038 = new Question(
"Question 38",
0,
"Motorcyclists will often look round over their right shoulder just before turning right. This is because (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>If you see a motorcyclist take a quick glance over their shoulder, this could mean they are about to change direction. Recognising a clue like this helps you to be prepared and take appropriate action, making you safer on the road. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Set you mirror to anti-dazzle","Set your mirror to dazzle the other driver","Brake sharply to a stop","Switch your rear lights on and off")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest039 = new Question(
"Question 39",
0,
"You are dazzled at night by a vehicle behind you. You should&nbsp; (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>The interior mirror of most vehicles can be set to the anti-dazzle position. You will still be able to see the lights of the traffic behind you, but the dazzle will be greatly reduced. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("When moving off","On dual carriageways","When approaching junctions","On motorways")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest040 = new Question(
"Question 40",
0,
"Motorcyclists are particularly vulnerable (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Another road user failing to see a motorcyclist is a major cause of collisions at junctions. Wherever streams of traffic join or cross there is the potential for this type of incident to occur.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Left","Right","Any direction","Straight ahead")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest041 = new Question(
"Question 41",
0,
"You are following two cyclists. They approach a roundabout in the left-hand lane. In which direction should you expect the cyclists to go? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Cyclists approaching a roundabout in the left-hand lane may be turning right but may not have been able to get into the correct lane due to the heavy traffic. They may also feel safer keeping to the left all the way round the roundabout. Be aware of them and give them plenty of room. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("The bus may have broken down","Pedestrians may come from behind the bus","The bus may move off suddenly","The bus may remain stationary")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest042 = new Question(
"Question 42",
0,
"You are driving in town. There is a bus at the bus stop on the other side of the road. Why should you be careful?&nbsp; (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>If you see a bus ahead watch out for pedestrians. They may not be able to see you if they are crossing from behind the bus.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Sound your horn","Drop back further","Flash your headlights","Start to overtake")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest043 = new Question(
"Question 43",
0,
"You keep well back waiting to overtake a large vehicle. A car fills the gap. You should? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>It is very frustrating when your separation distance is shortened by another vehicle. React positively, stay calm and drop further back.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Switch off all your fog lights","Keep your rear fog lights on","Keep your front fog lights on","Leave fog lights on in case fog returns")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest044 = new Question(
"Question 44",
0,
"You have just driven out of fog. Visibility is now good. You must (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>You MUST turn off your fog lights if visibility is over 100 metres (328 feet). However, be prepared for the fact that the fog may be patchy.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Left","Right","Centre","Either the right or centre")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest045 = new Question(
"Question 45",
0,
"On a three-lane motorway which lane should you normally use? (mark one answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>On a three-lane motorway you should travel in the left-hand lane unless you are overtaking. This applies regardless of the speed at which you are travelling.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Green","Red","White","Amber")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest046 = new Question(
"Question 46",
0,
"You are on a motorway. What colour are the reflective studs on the left of the carriageway? (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Red studs are placed between the edge of the carriageway and the hard shoulder. Where slip roads leave or join the motorway the studs are green. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Three years after the date it was issued","10,000 miles","One year after the date it was issued","30,000 miles")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest047 = new Question(
"Question 47",
0,
"An MOT certificate is normally valid for (mark ONE answer)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Make a note of the date your MOT certificate expires. Some garages remind you that your vehicle is due an MOT but not all do. You may take your vehicle for MOT up to one month in advance and have the certificate post-dated.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Reassure then constantly","Offer them a cigarette","Keep them warm","Avoid moving them if possible","Avoid leaving them alone","Give them a warm drink")
corr=new Array("1","0","1","1","1","0")
comm=""
valu=""
quest048 = new Question(
"Question 48",
1,
"You are at the scene of an accident. Someone is suffering from shock. You should (mark FOUR answers)<br><br><i><u>Knowledge and Understanding<br></u></i><i>The signs of shock may not be immediately obvious. Prompt treatment can help to minimise the effects. Lay the casualty down, loosen tight clothing, call an ambulance and check their breathing and pulse. </i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Turn the steering wheel slowly to each side","Accelerate to increase your speed","Stop as quickly as you can","Slow down very gradually")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest049 = new Question(
"Question 49",
0,
"How can you stop a caravan snaking from side to side? (mark ONE answer)<br> <br><i><u>Knowledge and Understanding<br></u></i><i>Keep calm and don't brake harshly or you could lose control completely. Ease off the accelerator until the unit is brought back under control. The most dangerous time is on long downhill gradients.</i>",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Gearbox","Steering","Handling","Battery life","Journey time")
corr=new Array("0","1","1","0","0")
comm=""
valu=""
quest050 = new Question(
"Question 50",
1,
"Overloading your vehicle can seriously affect the (mark TWO answers)<br><br><i><u>Knowledge and Understanding<br></u></i><i>Any load will have an effect on the handling of your vehicle and this becomes worse as you increase the load. Any changes in the centre of gravity or weight the vehicle is carrying will affect its braking and handling on bends. </i><br><br><i>You need to be aware of this when carrying passengers, heavy load, fitting a roof rack or towing a trailer. </i>",
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,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>Driving Theory Test 01</b><br><br>\n",0);
cachewrite("<b>Click To View Questions and Answers <a title='Click To View Questions and Answers' a href='theorytestanswers01.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='theorytestanswers01.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)}}

