var questions = new Array();
var choices = new Array();
var answers = new Array();
var response = new Array();

questions[0] = "1) What is the national speed limit on a motorway?";
choices[0] = new Array();
choices[0][0] = "60mph";
choices[0][1] = "70mph";
choices[0][2] = "80mph";
choices[0][3] = "90mph";
answers[0] = choices[0][1];

questions[1] = "2) What type of pedestrian crossing is a toucan crossing?";
choices[1] = new Array();
choices[1][0] = "It has black and white lines on the road";
choices[1][1] = "It has sensors that detects pedestrians on the crossing";
choices[1][2] = "It's activated by pressing a button";
choices[1][3] = "Cyclists and pedestrians can cross";
answers[1] = choices[1][3];

questions[2] = "3) What does an amber light mean on a traffic light?";
choices[2] = new Array();
choices[2][0] = "Stop if you can";
choices[2][1] = "Get ready to go";
choices[2][2] = "Go if crossing is clear";
choices[2][3] = "Speed up";
answers[2] = choices[2][0];

questions[3] = "4) What is the national speed limit on a single carriageway?";
choices[3] = new Array();
choices[3][0] = "30mph";
choices[3][1] = "60mph";
choices[3][2] = "70mph";
choices[3][3] = "80mph";
answers[3] = choices[3][1];

questions[4] = "5) What is the nearest that you can park near a junction?";
choices[4] = new Array();
choices[4][0] = "10 metres";
choices[4][1] = "12 metres";
choices[4][2] = "14 metres";
choices[4][3] = "16 metres";
answers[4] = choices[4][0];

questions[5] = "6) The lane in the middle of a motorway is used for?";
choices[5] = new Array();
choices[5][0] = "The fastest cars";
choices[5][1] = "Cars that are directed in that lane";
choices[5][2] = "Overtaking";
choices[5][3] = "Emergency vehicles";
answers[5] = choices[5][2];

questions[6] = "7) What does the driving routine MSM stand for?";
choices[6] = new Array();
choices[6][0] = "Manoeuvre, signals, Mirrors";
choices[6][1] = "Mirrors, signal, manoeuvre";
choices[6][2] = "Move, signal, mirrors";
choices[6][3] = "Mirrors, signal, move";
answers[6] = choices[6][1];

questions[7] = "8) What would you do if you approach a solid white line";
choices[7] = new Array();
choices[7][0] = "Give-way";
choices[7][1] = "Don't overtake";
choices[7][2] = "Stop";
choices[7][3] = "You have priority";
answers[7] = choices[7][2];

questions[8] = "9) What does a flashing amber light mean on a pelican crossing?";
choices[8] = new Array();
choices[8][0] = "Stop";
choices[8][1] = "Go";
choices[8][2] = "Go as long as no one is wanting to cross";
choices[8][3] = "Go as long as no one is crossing";
answers[8] = choices[8][3];

questions[9] = "10) What does a yellow hatched box mean painted on the road?";
choices[9] = new Array();
choices[9][0] = "Keep close to the car in front";
choices[9][1] = "Drive normally";
choices[9][2] = "Don't stop in it unless turning right";
choices[9][3] = "Don't stop in it unless going straight on";
answers[9] = choices[9][2];

questions[10] = "11) What does the flashing of headlights mean?";
choices[10] = new Array();
choices[10][0] = "Warning signal";
choices[10][1] = "To let someone out of a turning";
choices[10][2] = "Tell someone their lights aren't working";
choices[10][3] = "To say hello to someone";
answers[10] = choices[10][0];

questions[11] = "12) Your mobile phone rings whilst you're driving on a motorway, what do you do?";
choices[11] = new Array();
choices[11][0] = "Stop on the hard shoulder";
choices[11][1] = "Stop in a safe place";
choices[11][2] = "Answer the phone";
choices[11][3] = "Hold the phone but put it on loud speaker";
answers[11] = choices[11][1];

questions[12] = "13) What is the purpose of the hard shoulder on a motorway?";
choices[12] = new Array();
choices[12][0] = "If you need to read the map quickly";
choices[12][1] = "For a break";
choices[12][2] = "If you break down";
choices[12][3] = "To overtake";
answers[12] = choices[12][2];

questions[13] = "14) What is the minimum tread depth on a car tyre?";
choices[13] = new Array();
choices[13][0] = "1.4mm";
choices[13][1] = "1.5mm";
choices[13][2] = "1.6mm";
choices[13][3] = "1.7mm";
answers[13] = choices[13][2];

questions[14] = "15) If you get in to a wrong lane at a junction, you should?";
choices[14] = new Array();
choices[14][0] = "Change lanes immediately";
choices[14][1] = "Proceed in the direction of that lane";
choices[14][2] = "Stop and wait for someone to let you out";
choices[14][3] = "Sound your horn and change lanes";
answers[14] = choices[14][1];

questions[15] = "16) When can you use a bus lane?";
choices[15] = new Array();
choices[15][0] = "When the sign tells you";
choices[15][1] = "Never";
choices[15][2] = "When there are no buses using it";
choices[15][3] = "If after 7pm";
answers[15] = choices[15][0];

questions[16] = "17) When reversing, another car stops close behind, what should you do?";
choices[16] = new Array();
choices[16][0] = "Wait and use your hazard warning lights";
choices[16][1] = "Drive slowly backwards";
choices[16][2] = "Use your horn";
choices[16][3] = "Drive on to park somewhere else";
answers[16] = choices[16][3];

questions[17] = "18) What shape is a warning sign?";
choices[17] = new Array();
choices[17][0] = "Round";
choices[17][1] = "Hexagon";
choices[17][2] = "Triangle";
choices[17][3] = "Square";
answers[17] = choices[17][2];

questions[18] = "19) What is the overall stopping distance at 30mph";
choices[18] = new Array();
choices[18][0] = "23 metres";
choices[18][1] = "33 metres";
choices[18][2] = "40 metres";
choices[18][3] = "44 metres";
answers[18] = choices[18][0];

questions[19] = "20) What is the speed limit on a dual carriageway?";
choices[19] = new Array();
choices[19][0] = "50mph";
choices[19][1] = "60mph";
choices[19][2] = "70mph";
choices[19][3] = "80mph";
answers[19] = choices[19][2];

questions[20] = "21) You stop for pedestrians waiting to cross at a zebra crossing but they don't start to cross. What should you do?";
choices[20] = new Array();
choices[20][0] = "Be patient and wait";
choices[20][1] = "Sound your horn";
choices[20][2] = "Wave them to cross";
choices[20][3] = "Drive on";
answers[20] = choices[20][0];

questions[21] = "22) When driving in snow it is best to keep in as high a gear as possible. Why is this?";
choices[21] = new Array();
choices[21][0] = "To leave a lower gear available in case of wheelspin";
choices[21][1] = "To help prevent wheelspin";
choices[21][2] = "So that wheelspin does not cause your engine to run too fast";
choices[21][3] = "To help you slow down quickly when you brake";
answers[21] = choices[21][1];

questions[22] = "23) The back of the car skids out to the right, what would you do to correct the skid?";
choices[22] = new Array();
choices[22][0] = "Steer right";
choices[22][1] = "Steer left";
choices[22][2] = "Use the handbrake";
choices[22][3] = "Brake harder";
answers[22] = choices[22][0];

questions[23] = "24) When traffic lights aren't working who has priority?";
choices[23] = new Array();
choices[23][0] = "No-one";
choices[23][1] = "Traffic on the major road";
choices[23][2] = "Traffic going straight ahead";
choices[23][3] = "Traffic turning left";
answers[23] = choices[23][0];

questions[24] = "25) You break down on a normal road. How far back from your car should you display a warning triangle?";
choices[24] = new Array();
choices[24][0] = "At least 25 metres from your vehicle";
choices[24][1] = "At least 35 metres from your vehicle";
choices[24][2] = "At least 45 metres from your vehicle";
choices[24][3] = "At least 55 metres from your vehicle";
answers[24] = choices[24][2];

questions[25] = "26) You notice a car in the rear view mirror with a green flashing light, what is it?";
choices[25] = new Array();
choices[25][0] = "A fire engine";
choices[25][1] = "A Dentist";
choices[25][2] = "Undercover Police";
choices[25][3] = "A Doctor";
answers[25] = choices[25][3];

questions[26] = "27) When would you use your horn?";
choices[26] = new Array();
choices[26][0] = "As a warning";
choices[26][1] = "Tell someone to speed up";
choices[26][2] = "If you get annoyed";
choices[26][3] = "To hurry pedestrians";
answers[26] = choices[26][0];

questions[27] = "28) Where would you find a catalytic converter?";
choices[27] = new Array();
choices[27][0] = "Exhaust system";
choices[27][1] = "Air conditioning";
choices[27][2] = "Part of the brake system";
choices[27][3] = "Part of the steering";
answers[27] = choices[27][0];

questions[28] = "29) You're driving at night on a quiet motorway, which lane would you be in?";
choices[28] = new Array();
choices[28][0] = "Left lane";
choices[28][1] = "Middle lane";
choices[28][2] = "Right lane";
choices[28][3] = "Hard shoulder";
answers[28] = choices[28][0];

questions[29] = "30) Which is the only pedestrian crossing that has a flashing amber light as part of its traffic lights sequence?";
choices[29] = new Array();
choices[29][0] = "Puffin crossing";
choices[29][1] = "Toucan crossing";
choices[29][2] = "Pegasus crossing";
choices[29][3] = "Pelican crossing";
answers[29] = choices[29][3];

questions[30] = "31) You keep back as you wait to overtake a large vehicle but a car from behind overtakes and moves in to the gap that you have made, what do you do?";
choices[30] = new Array();
choices[30][0] = "Sound your horn";
choices[30][1] = "Overtake";
choices[30][2] = "Slow down";
choices[30][3] = "Flash your headlights";
answers[30] = choices[30][2];

questions[31] = "32) Where on a motorway would you find amber reflective studs?";
choices[31] = new Array();
choices[31][0] = "In between lanes";
choices[31][1] = "To mark slip roads and exits";
choices[31][2] = "Between the hard shoulder and carriageway";
choices[31][3] = "Between carriageway and central reservation";
answers[31] = choices[31][3];

questions[32] = "33) What is the national speed limit in an unrestricted residential area?";
choices[32] = new Array();
choices[32][0] = "20mph";
choices[32][1] = "40mph";
choices[32][2] = "30mph";
choices[32][3] = "25mph";
answers[32] = choices[32][2];

questions[33] = "34) Front fog lights should only be used when?";
choices[33] = new Array();
choices[33][0] = "When visibility is reduced to 100 metres";
choices[33][1] = "There are no street lights";
choices[33][2] = "As a warning signal";
choices[33][3] = "When visibility is reduced to 200 metres";
answers[33] = choices[33][0];

questions[34] = "35) An MOT certificate is normally vaild for?";
choices[34] = new Array();
choices[34][0] = "1 year";
choices[34][1] = "2 years";
choices[34][2] = "10,000 miles";
choices[34][3] = "3 years";
answers[34] = choices[34][0];

questions[35] = "36) Driving on a country road, you are most likely to meet coming towards you on your side:";
choices[35] = new Array();
choices[35][0] = "Horse riders";
choices[35][1] = "Pedestrians";
choices[35][2] = "Motor cyclists";
choices[35][3] = "Cyclists";
answers[35] = choices[35][1];

questions[36] = "37) You are driving in a one-way street but realise that you have taken the wrong route, you should:";
choices[36] = new Array();
choices[36][0] = "Reverse in to a driveway and turn around";
choices[36][1] = "Reverse in to a side road and turn around";
choices[36][2] = "Do a u-turn";
choices[36][3] = "Drive to the end of the road";
answers[36] = choices[36][3];

questions[37] = "38) You are driving down a long, steep downhill road. To help with control, you should:";
choices[37] = new Array();
choices[37][0] = "Select a lower gear";
choices[37][1] = "Select neutral";
choices[37][2] = "Select a higher gear";
choices[37][3] = "Just drive normally";
answers[37] = choices[37][0];

questions[38] = "39) Before stopping you should:";
choices[38] = new Array();
choices[38][0] = "Use your indicators";
choices[38][1] = "USe your horn";
choices[38][2] = "Flash your headlights";
choices[38][3] = "Check your mirrors";
answers[38] = choices[38][3];

questions[39] = "40) You need to drive to your local pub to meet friends. You should:";
choices[39] = new Array();
choices[39][0] = "Avoid drinking any alcohol at all";
choices[39][1] = "Just drink a very small amount of alcohol";
choices[39][2] = "Make sure that you eat before drinking any alcohol";
choices[39][3] = "Just drink low-alcoholic drinks all night";
answers[39] = choices[39][0];

questions[40] = "41) The driver behind dazzles you with his lights, you should:";
choices[40] = new Array();
choices[40][0] = "Brake sharply to allow more room between you and the car behind";
choices[40][1] = "Adjust your mirror down so that you can't see the car behind";
choices[40][2] = "Set your mirror to anti-dazzle";
choices[40][3] = "Turn your rear fog light on to signal to the driver behind";
answers[40] = choices[40][2];

questions[41] = "42) When heavy snow is falling you should:";
choices[41] = new Array();
choices[41][0] = "Not drive unless it is essential";
choices[41][1] = "Only drive short journeys";
choices[41][2] = "Only drive slow";
choices[41][3] = "Not drive wearing a heavy coat";
answers[41] = choices[41][0];

questions[42] = "43) The speed limit for cars and motorcycles in the centre lane of a motorway is:";
choices[42] = new Array();
choices[42][0] = "50mph";
choices[42][1] = "60mph";
choices[42][2] = "70mph";
choices[42][3] = "80mph";
answers[42] = choices[42][2];

questions[43] = "44) When parking on a road at night with a 40mph speed limit, you should:";
choices[43] = new Array();
choices[43][0] = "Parking lights on";
choices[43][1] = "Dipped headlights";
choices[43][2] = "Leave the front wheels pointing towards the kerb";
choices[43][3] = "Leave your hazard warning lights on";
answers[43] = choices[43][0];

questions[44] = "45) When treating someone for shock at the scene of an accident, you should:";
choices[44] = new Array();
choices[44][0] = "Give them something warm to drink";
choices[44][1] = "Reassure them constantly";
choices[44][2] = "Get them to walk away from the accident";
choices[44][3] = "Give them a massage around the shoulders";
answers[44] = choices[44][1];

questions[45] = "46) Overloading your vehicle can seriously affect your steering and:";
choices[45] = new Array();
choices[45][0] = "Gearbox";
choices[45][1] = "Tyres";
choices[45][2] = "Suspension";
choices[45][3] = "Handling";
answers[45] = choices[45][3];

questions[46] = "47) You are about to drive home when you feel very tired and a bad headache. You should:";
choices[46] = new Array();
choices[46][0] = "Drive home, but drive carefully";
choices[46][1] = "Wait untill you feel better before driving";
choices[46][2] = "Drive home only if you are sure that you won't fall asleep";
choices[46][3] = "Take some headache tablets and it should be ok to drive";
answers[46] = choices[46][1];

questions[47] = "48) A properly serviced vehicle will be more fuel efficient and:";
choices[47] = new Array();
choices[47][0] = "Cleaner exhaust emissions";
choices[47][1] = "Lower road tax costs";
choices[47][2] = "Lower insurance premiums";
choices[47][3] = "Faster speeds";
answers[47] = choices[47][0];

questions[48] = "49) At a puffin crossing, what colour follows green?";
choices[48] = new Array();
choices[48][0] = "Steady Amber";
choices[48][1] = "Flashing amber";
choices[48][2] = "Steady Red";
choices[48][3] = "Flashing red";
answers[48] = choices[48][0];

questions[49] = "50) The driver in front may have forgotton to cancel the right indicator. You should:";
choices[49] = new Array();
choices[49][0] = "Wave at the driver out of the side window";
choices[49][1] = "Overtake carefully";
choices[49][2] = "Flash your headlights";
choices[49][3] = "Stay behind and not overtake";
answers[49] = choices[49][3];



// response for getting 100%
response[0] = "Excellent, top marks! Well done! Lets hope you do the same on your real theory test.";
// response for getting 90% or more
response[1] = "Passed easily, congratulations!"
// response for getting 70% or more
response[2] = "Phew! You've just about passed! Try again to better your score!";
// response for getting over 50%
response[3] = "Oh no! So close! But you must get at least 43 out of 50 to pass.";
// response for getting 40% or more
response[4] = "Getting better, but you must get at least 43 questions correct to pass.";
// response for getting 20% or more
response[5] = "Sorry to say that you've failed. You Must get at least 43 correct to pass.";
// response for getting 10% or more
response[6] = "Sorry to say that you've failed. You Must get at least 43 correct to pass.";
// response for getting 9% or less
response[7] = "Sorry to say that you've failed. You Must get at least 43 correct to pass.";