Q1 = new Array('<img src="lightsquiz/1.gif" align="Center" border="0" class=\'MainImg\'><p>What is this?','Fishing vessel engaged in trawling','Sailing vessel, bow aspect','Pilot vessel','Sailing vessel stern aspect','Vessel over 50m in length',2,'','','','','');
Q2 = new Array('<img src="lightsquiz/2.gif" align="Center" border="0" class=\'MainImg\'><p>What is this?','Air cusion vessel, bow aspect','Vessel at anchor','Powered vessel, >50m, bow aspect','Powered vessel, <50m, bow aspect','Powered vessel, <50m, stern aspect',4,'','','','','');
Q3 = new Array('<img src="lightsquiz/3.gif" align="Center" border="0" class=\'MainImg\'><p>What is this?','Vessel engaged in underwater operations','Vessel moving away, stern aspect','Vessel <50m, port aspect','Vessel at anchor','North cardinal',2,'','','','','');
Q4 = new Array('<img src="lightsquiz/4.gif" align="Center" border="0" class=\'MainImg\'><p>What is this?','Sailing vessel, port aspect','Powered vessel, port aspect','Minesweeper, starboard aspect','Powered vessel, starboard aspect','',4,'','','','','');
Q5 = new Array('<img src="lightsquiz/5.gif" align="Center" border="0" class=\'MainImg\'><p>What is this?','Vessel over 50m in length','Vessel towing smaller vessel','Fishing vessel engaged in trawling','Towing, over 200m total length','Large vessel at anchor',1,'','','','','');
Q6 = new Array('<img src="lightsquiz/6.gif" align="Center" border="0" class=\'MainImg\'><p>What is this?','West cardinal mark','Lighthouse','North cardinal mark','South cardinal mark','Vessel at anchor',3,'A West cardinal flashes 9 times followed by a short period of darkness before repeating','A lighthouse would have a much slower cycle','At night a North Cardinal is marked by a white light flashing continuously','South cardinals flash 6 times followed by a long flash and a short period of darkness before repeating','Vessels at anchor display a steady all-round white light');
Q7 = new Array('<img src="lightsquiz/7.gif" align="Center" border="0" class=\'MainImg\'><p>What is this?','North cardinal','South cardinal','West cardinal','Vessel at anchor','',2,'North cardinal flashes continuously','Six flashes followed by one long flash','West cardinal flashes nine times','Anchor light is a steady all-round white light','');
Q8 = new Array('<img src="lightsquiz/8.gif" align="Center" border="0" class=\'MainImg\'><p>Sailing in open waters at night you come up from below to see these lights directly ahead<br>What do you do?','Grab the air horn and give five blasts','Make a turn to port then resume your original course','Make a turn to starboard then resume your original course','Hold your course','Stop the boat and check your position',3,'They look too close for that. Besides, in a head-on situation both vessels are obliged to take evasive action.','Oops! that\'s the wrong way. If the other sailor takes the correct action you could collide.','This is another sailing boat heading stright towards you. Each of you are required to turn to starboard in order to pass safely portside to portside.','These are unlikely to be port and staboard hand channel markers in open water. Any attempt to sail between them could be very painfull.','No time for that');
Q9 = new Array('<img src="lightsquiz/9.gif" align="Center" border="0" class=\'MainImg\'><p>Whilst sailing due south you notice this light directly ahead<br>What should you do?','Alter course to due west','Alter course to due east','Alter course to due north','Hold your course','Stop and check you position',5,'You are in a danger area and there is nothing to say heading west is a safe route','You are in a danger area and there is nothing to say heading east is a safe route','Well, as you\'ve got this far without hitting anything you may just get away with this but it\'s not worth the risk.','You could be in a danger area. To continue may be to push your luck','This is a south cardinal. If it is ahead of you when your heading is south you could be in the danger area so, check your position before proceeding.');
Questions = new Array(Q1,Q2,Q3,Q4,Q5,Q6,Q7,Q8,Q9);
Used = new Array(0,0,0,0,0,0,0,0,0);
var Current = 0;
var Done = 0;
var Correct = 0;
var Batch = 0;
var Total = 5;
var TotalQ = 9;
var TotalBatches = 1;
function NewQuestion() {
 Current = Math.floor(Math.random() * TotalQ);
 while (Used[Current] > 0) {
  Current = Math.floor(Math.random() * TotalQ);
 }
 document.open('Æ.htm');
 document.writeln('<HTML>\n<head>\n<meta name="robots" content="noarchive" />\n<title>SailTales UK Marine Lights Quiz</title>');
 document.writeln('<script src="st-quiz-lights.js" language="JavaScript"></script>\n<style>\nbody {background: #FBE9BD; background-repeat: no-repeat; font-size: 5px;}\n#Title {color: #400080; font: 34px \'arial\';}\n#Title2 {color: #400080; font: 18px \'arial\';}\n#CurrentQ {color: #000000; font: 12px \'arial\';}\n#Question {color: #000000; font: 18px \'arial\';}\na.answer:link {color: #400080; text-decoration: none; font: 18px \'arial\';}\na.answer:visited {color: #400080; text-decoration: none; font: 18px \'arial\';}\na.answer:hover {color: #FF0080; text-decoration: none; font: 18px \'arial\';}\n#TopR {color: #000000; font: 12px \'arial\';}\n#Score {color: #400080; font: 30px \'arial\';}\n#Extra {color: ; font: px \'\';}\n\n#footer {color: #000000; font: 12px \'arial\';}\n#correct {font: 30px \'arial\'; color: ;}\nimg.MainImg {border-color: ;}\n#incorrect {font: 30px \'arial\'; color: #FF0000;}\n#details {font: 14px \'arial\'; color: #400080;}\n#ReviewAns {font: 18px \'arial\';}\na.answer2:link {color: #FF0000; text-decoration: none; font: 18px \'arial\'; border-width: 2px 2px 2px 2px; border-style: solid; border-top-color: #E0E0E0; border-left-color: #E0E0E0; border-right-color: #606060; border-bottom-color: #606060; background-color: #C0C0C0; padding-left: 5px; padding-right: 5px;}\na.answer2:visited {color: #FF0000; text-decoration: none; font: 18px \'arial\'; border-width: 2px 2px 2px 2px; border-style: solid; border-top-color: #E0E0E0; border-left-color: #E0E0E0; border-right-color: #606060; border-bottom-color: #606060; background-color: #C0C0C0; padding-left: 5px; padding-right: 5px;}\na.answer2:hover {color: #FF0080; text-decoration: none; font: 18px \'arial\'; border-width: 2px 2px 2px 2px; border-style: solid; border-top-color: #606060; border-left-color: #606060; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; background-color: #C0C0C0; padding-left: 5px; padding-right: 5px;}\n</style>');
 document.writeln('</head><body>');
 document.writeln('<center>\n<div id="Title">SailTales UK Marine Lights Quiz</div>\n<br>\n<div id="Title2">Test your knowledge of UK lights with our "just-for-fun" quiz</div></center>');
 document.writeln('<br><hr><br>');
 document.writeln('<p>\n<div id="CurrentQ">Question ' + (Done + 1) + ' of ' + Total + ' from a pool of ' + TotalQ + ' questions');
 document.write('<a class=\'answer\' href=\'#\'>&nbsp;</a>');
 document.write('</div><p>');
 document.writeln('<div id="Question" align="Center">' + Questions[Current][0] + '</div>');
 document.writeln('<p><div align=\'Left\'>');
 document.writeln('<br><hr><br>');
 document.writeln('<ul>');
 if (Questions[Current][1] != '') {
 document.write(' <a class=\'answer\' href="javascript:IsAnswer(1,\'');
 for (i=0; i<TotalQ; i++) {
  document.write(Used[i]);
 }
 document.write('\','+Current+','+Done+','+Correct+','+Batch+')"><li>' + Questions[Current][1] + '</li></a>\n<br>&nbsp;<br>');
 }
 if (Questions[Current][2] != '') {
 document.write(' <a class=\'answer\' href="javascript:IsAnswer(2,\'');
 for (i=0; i<TotalQ; i++) {
  document.write(Used[i]);
 }
 document.write('\','+Current+','+Done+','+Correct+','+Batch+')"><li>' + Questions[Current][2] + '</li></a>\n<br>&nbsp;<br>');
 }
 if (Questions[Current][3] != '') {
 document.write(' <a class=\'answer\' href="javascript:IsAnswer(3,\'');
 for (i=0; i<TotalQ; i++) {
  document.write(Used[i]);
 }
 document.write('\','+Current+','+Done+','+Correct+','+Batch+')"><li>' + Questions[Current][3] + '</li></a>\n<br>&nbsp;<br>');
 }
 if (Questions[Current][4] != '') {
 document.write(' <a class=\'answer\' href="javascript:IsAnswer(4,\'');
 for (i=0; i<TotalQ; i++) {
  document.write(Used[i]);
 }
 document.write('\','+Current+','+Done+','+Correct+','+Batch+')"><li>' + Questions[Current][4] + '</li></a>\n<br>&nbsp;<br>');
 }
 if (Questions[Current][5] != '') {
 document.write(' <a class=\'answer\' href="javascript:IsAnswer(5,\'');
 for (i=0; i<TotalQ; i++) {
  document.write(Used[i]);
 }
 document.write('\','+Current+','+Done+','+Correct+','+Batch+')"><li>' + Questions[Current][5] + '</li></a>\n<br>&nbsp;<br>');
 }
 if (Questions[Current][1] == '' && Questions[Current][2] == '' && Questions[Current][3] == '' && Questions[Current][4] == '' && Questions[Current][5] == '') {
 document.write('<center><font size=\'3\' color=\'#000000\'>There is a problem with question number ' + (Current+1) + '. It appears to have no correct answer.<p><a class="answer2" href="javascript:GetOldVars(\'');
 for (i=0; i<TotalQ; i++) {
  document.write(Used[i]);
 }
 document.write('\','+Current+','+(Done+1)+','+(Correct+1)+','+Batch+')">Continue</a></font></center>');
 }
 document.writeln('</ul></div>');
 document.writeln('<br><hr><br>');
 document.writeln('<p><div id=\'Footer\' align=\'Right\'>&#169;2004 Sailtales.co.uk all rights reserved<p>Created with Hyper Quiz Maker. Visit <a href=\'http://www.hyperquizmaker.co.uk\' class=\'answer\' target=\'_blank\'>www.hyperquizmaker.co.uk</a>.</div></body>\n</html>');
}function GetOldVars(OldUsed,Cu,OldDone,Co,Ba) {
 for (i=0; i<TotalQ; i++) {
  Used[i] = OldUsed.substring(i,i+1);
 }
 Current = Cu;
 Done = OldDone;
 Correct = Co;
 Batch = Ba;
 if (Done < Total) {
  NewQuestion();
 } else {
  Results();
 }
}
function IsAnswer(Val,OldUsed,Cu,OldDone,Co,Ba) {
 for (i=0; i<TotalQ; i++) {
  Used[i] = OldUsed.substring(i,i+1);
 }
 Current = Cu;
 Done = OldDone;
 Correct = Co;
 Batch = Ba;
 Done ++;
 if (Val == Questions[Current][6]) {
  Correct ++;
  Used[Current] = '2';
 } else {
  Used[Current] = '1';
 }
 document.open('Æ.htm');
 document.writeln('<HTML>\n<head>\n<meta name="robots" content="noarchive" />\n<title>SailTales UK Marine Lights Quiz</title>');
 document.writeln('<script src="st-quiz-lights.js" language="JavaScript"></script>\n<style>\nbody {background: #FBE9BD; background-repeat: no-repeat; font-size: 5px;}\n#Title {color: #400080; font: 34px \'arial\';}\n#Title2 {color: #400080; font: 18px \'arial\';}\n#CurrentQ {color: #000000; font: 12px \'arial\';}\n#Question {color: #000000; font: 18px \'arial\';}\na.answer:link {color: #400080; text-decoration: none; font: 18px \'arial\';}\na.answer:visited {color: #400080; text-decoration: none; font: 18px \'arial\';}\na.answer:hover {color: #FF0080; text-decoration: none; font: 18px \'arial\';}\n#TopR {color: #000000; font: 12px \'arial\';}\n#Score {color: #400080; font: 30px \'arial\';}\n#Extra {color: ; font: px \'\';}\n\n#footer {color: #000000; font: 12px \'arial\';}\n#correct {font: 30px \'arial\'; color: ;}\nimg.MainImg {border-color: ;}\n#incorrect {font: 30px \'arial\'; color: #FF0000;}\n#details {font: 14px \'arial\'; color: #400080;}\n#ReviewAns {font: 18px \'arial\';}\na.answer2:link {color: #FF0000; text-decoration: none; font: 18px \'arial\'; border-width: 2px 2px 2px 2px; border-style: solid; border-top-color: #E0E0E0; border-left-color: #E0E0E0; border-right-color: #606060; border-bottom-color: #606060; background-color: #C0C0C0; padding-left: 5px; padding-right: 5px;}\na.answer2:visited {color: #FF0000; text-decoration: none; font: 18px \'arial\'; border-width: 2px 2px 2px 2px; border-style: solid; border-top-color: #E0E0E0; border-left-color: #E0E0E0; border-right-color: #606060; border-bottom-color: #606060; background-color: #C0C0C0; padding-left: 5px; padding-right: 5px;}\na.answer2:hover {color: #FF0080; text-decoration: none; font: 18px \'arial\'; border-width: 2px 2px 2px 2px; border-style: solid; border-top-color: #606060; border-left-color: #606060; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; background-color: #C0C0C0; padding-left: 5px; padding-right: 5px;}\n</style>');
 document.writeln('</head><body>');
 document.writeln('<center>\n<div id="Title">SailTales UK Marine Lights Quiz</div>\n<br>\n<div id="Title2">Test your knowledge of UK lights with our "just-for-fun" quiz</div></center>');
 document.writeln('<br><hr><br>');
 document.writeln('<p>\n<div id=\'CurrentQ\'>Question ' + Done + ' of ' + Total + ' from a pool of ' + TotalQ + ' questions');
 document.write('&nbsp;&nbsp;&nbsp;&nbsp;<a class="answer2" href="javascript:GetOldVars(\'');
 for (i=0; i<TotalQ; i++) {
  document.write(Used[i]);
 }
 document.write('\','+Current+','+Done+','+Correct+','+Batch+')"><blink>Next Question</blink></a>');
 document.write('</div><p>');
 document.writeln('<div id="Question" align="Center">' + Questions[Current][0] + '</div>');
 document.writeln('<p><div align=\'Left\'>');
 document.writeln('<br><hr><br>');
 document.writeln('<ul>');
 if (Questions[Current][1] != '') {
  document.write('<div id=\'ReviewAns\'>');
  if (Val == 1) {
   document.write('<font color=\'#FF0080\'><li>' + Questions[Current][1] + '</li></font>');
  } else {
   document.write('<font color=\'#400080\'><li>' + Questions[Current][1] + '</li></font>');
  }
  document.write('</div>&nbsp;<br>');
 }
 if (Questions[Current][2] != '') {
  document.write('<div id=\'ReviewAns\'>');
  if (Val == 2) {
   document.write('<font color=\'#FF0080\'><li>' + Questions[Current][2] + '</li></font>');
  } else {
   document.write('<font color=\'#400080\'><li>' + Questions[Current][2] + '</li></font>');
  }
  document.write('</div>&nbsp;<br>');
 }
 if (Questions[Current][3] != '') {
  document.write('<div id=\'ReviewAns\'>');
  if (Val == 3) {
   document.write('<font color=\'#FF0080\'><li>' + Questions[Current][3] + '</li></font>');
  } else {
   document.write('<font color=\'#400080\'><li>' + Questions[Current][3] + '</li></font>');
  }
  document.write('</div>&nbsp;<br>');
 }
 if (Questions[Current][4] != '') {
  document.write('<div id=\'ReviewAns\'>');
  if (Val == 4) {
   document.write('<font color=\'#FF0080\'><li>' + Questions[Current][4] + '</li></font>');
  } else {
   document.write('<font color=\'#400080\'><li>' + Questions[Current][4] + '</li></font>');
  }
  document.write('</div>&nbsp;<br>');
 }
 if (Questions[Current][5] != '') {
  document.write('<div id=\'ReviewAns\'>');
  if (Val == 5) {
   document.write('<font color=\'#FF0080\'><li>' + Questions[Current][5] + '</li></font>');
  } else {
   document.write('<font color=\'#400080\'><li>' + Questions[Current][5] + '</li></font>');
  }
  document.write('</div>&nbsp;<br>');
 }
 document.writeln('</ul></font></div>');
 if (Val == Questions[Current][6]) {
  document.writeln('<div id=\'correct\' align=\'center\'>Correct</div>');
 } else {
  document.writeln('<div id=\'incorrect\' align=\'center\'>Incorrect</div>');
 }
 document.writeln('\n<p>\n<div align=\'center\' id=\'details\'>' + Questions[Current][Val + 6]  + '</div>');
 document.writeln('<br><hr><br>');
 document.writeln('<p><div id=\'Footer\' align=\'Right\'>&#169;2004 Sailtales.co.uk all rights reserved<p>Created with Hyper Quiz Maker. Visit <a href=\'http://www.dje.me.uk\' class=\'answer\' target=\'_blank\'>www.hyperquizmaker.co.uk</a>.</div></body>\n</html>');
UsedTemp = '';
}
function Results() {
 document.open('Æ.htm');
 document.writeln('<HTML>\n<head>\n<meta name="robots" content="noarchive" />\n<title>SailTales UK Marine Lights Quiz</title>');
 document.writeln('<script src="st-quiz-lights.js" language="JavaScript"></script>\n<style>\nbody {background: #FBE9BD; background-repeat: no-repeat; font-size: 5px;}\n#Title {color: #400080; font: 34px \'arial\';}\n#Title2 {color: #400080; font: 18px \'arial\';}\n#CurrentQ {color: #000000; font: 12px \'arial\';}\n#Question {color: #000000; font: 18px \'arial\';}\na.answer:link {color: #400080; text-decoration: none; font: 18px \'arial\';}\na.answer:visited {color: #400080; text-decoration: none; font: 18px \'arial\';}\na.answer:hover {color: #FF0080; text-decoration: none; font: 18px \'arial\';}\n#TopR {color: #000000; font: 12px \'arial\';}\n#Score {color: #400080; font: 30px \'arial\';}\n#Extra {color: ; font: px \'\';}\n\n#footer {color: #000000; font: 12px \'arial\';}\n#correct {font: 30px \'arial\'; color: ;}\nimg.MainImg {border-color: ;}\n#incorrect {font: 30px \'arial\'; color: #FF0000;}\n#details {font: 14px \'arial\'; color: #400080;}\n#ReviewAns {font: 18px \'arial\';}\na.answer2:link {color: #FF0000; text-decoration: none; font: 18px \'arial\'; border-width: 2px 2px 2px 2px; border-style: solid; border-top-color: #E0E0E0; border-left-color: #E0E0E0; border-right-color: #606060; border-bottom-color: #606060; background-color: #C0C0C0; padding-left: 5px; padding-right: 5px;}\na.answer2:visited {color: #FF0000; text-decoration: none; font: 18px \'arial\'; border-width: 2px 2px 2px 2px; border-style: solid; border-top-color: #E0E0E0; border-left-color: #E0E0E0; border-right-color: #606060; border-bottom-color: #606060; background-color: #C0C0C0; padding-left: 5px; padding-right: 5px;}\na.answer2:hover {color: #FF0080; text-decoration: none; font: 18px \'arial\'; border-width: 2px 2px 2px 2px; border-style: solid; border-top-color: #606060; border-left-color: #606060; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; background-color: #C0C0C0; padding-left: 5px; padding-right: 5px;}\n</style>');
 document.writeln('</head><body>');
 document.writeln('<center>\n<div id="Title">SailTales UK Marine Lights Quiz</div>\n<br>\n<div id="Title2">Test your knowledge of UK lights with our "just-for-fun" quiz</div></center>');
 document.writeln('<br><hr><br>');
 document.writeln('<p>\n<div id="TopR">Results:</div>\n<p>');
 document.writeln('<center>\n<div id="Score">You scored ' + Correct + ' out of ' + Total + '</div>');
 document.writeln('<p>\n<div id="Extra">');
 if (Correct == 0) {
  document.writeln('maybe you should try again?');
 }
 if (Correct == 1) {
  document.writeln('');
 }
 if (Correct == 2) {
  document.writeln('');
 }
 if (Correct == 3) {
  document.writeln('');
 }
 if (Correct == 4) {
  document.writeln('');
 }
 if (Correct == 5) {
  document.writeln('');
 }
 if (Batch < TotalBatches-1) {
  document.write('</div>\n<p><div id="answer"><a class="answer" href="javascript:GetOldVars(\'');
  for (i=0; i<TotalQ; i++) {
   document.write(Used[i]);
  }
  document.write('\',0,0,0,'+(Batch+1)+')">CONTINUE --&gt;</a>\n</center>');
 } else {
  document.writeln('</div>\n<p><div id="answer"><a class="answer" href="javascript:NewQuestion()">RE-TAKE THE TEST</a>\n</center>');
 }
 document.writeln('<br><hr><br>');
 document.writeln('<p><div id=\'Footer\' align=\'Right\'>&#169;2004 Sailtales.co.uk all rights reserved<p>Created with Hyper Quiz Maker. Visit <a href=\'http://www.dje.me.uk\' class=\'answer\' target=\'_blank\'>www.hyperquizmaker.co.uk</a>.</div></body>\n</html>');
} 