<!--
function makeArray(len) {
    for (var i = 0; i < len; i++) this[i] = null;
this.length = len;
}

function makeQuestion(question, correctAnswer) {
var args = makeQuestion.arguments;
this.question = question;
this.correctAnswer = correctAnswer;
this.userAnswer = null;
this.isCorrect = isCorrect;
this.showForm = showForm;
this.userChoices = new makeArray(args.length - 2);
   for (var i = 0; i < args.length - 2; i++) { 
   this.userChoices[i] = args[i + 2];
   }
}
function isCorrect() {
if (this.correctAnswer == this.userAnswer) return true;
else return false;
}
// Method to display contents of question object.
function showForm(n) {
document.write('<p>' + (n + 1) + '. ' + this.question + '<BLOCKQUOTE><FORM>');
    for (var i = 0; i < this.userChoices.length; i++) {
        document.write('<INPUT TYPE = "RADIO" NAME = "q' + n + 
                       '" onClick = "quiz[' + n + '].userAnswer = ' + i + '">');
        document.write(this.userChoices[i] + '<BR>');
    }
document.write('</FORM></BLOCKQUOTE>');
}
// Function to correct the quiz and display score, correct answers.
function correctQuiz() {
var correct = 0;
correctPage = '<HTML><HEAD><TITLE>Corrections</TITLE><LINK REL="StyleSheet" HREF="media.css" TYPE="text/css"></HEAD><BODY>';
    for (var i = 0; i < quiz.length; i++) {
    if (quiz[i].isCorrect()) correct++;
    }
var score = Math.round((correct / quiz.length) * 100);
correctPage += '<SPAN CLASS="hi">Score: ' + score + ' %</SPAN>';
    if (correct < quiz.length) { 
    correctPage += ifWrong;
        for (var i = 0; i < quiz.length; i++) {
            if (!quiz[i].isCorrect()) {
            correctPage += (i + 1) + '. ' +
            quiz[i].userChoices[quiz[i].correctAnswer] + '<BR>';
            }
        }
    }
    else correctPage += ifAced;
correctPage += '<P><A HREF="JAVASCRIPT:void(0);" onClick="window.close()">Close this window.</A></BODY></HTML>';
correctwin = window.open ('', '', 'height=375,width=300,scrollbars=yes,left=50,top=50');
    if (correctwin.opener == null) correctwin.opener = window;
correctwin.location = 'javascript:opener.correctPage';
}
// Message to display if quiz is aced.
var ifAced = "<P>What a star! All right.<P>"; 
// Message to display if any are wrong.
var ifWrong = "<P>Here are the correct answers to the questions you got wrong:<P>";

quiz = new makeArray(10);
quiz[0] = new makeQuestion("How should this shot be described?<p><center><img src=\"/images/twos.jpg\" align=middle></center>", 1,                                                         "master shot",                
                           "two shot",               
                           "high angle");              
quiz[1] = new makeQuestion("When the camera follows the subject we call this...?", 1,
                           "...panning",
                           "...tracking", 
                	   "...tilting");
quiz[2] = new makeQuestion("When would incidental music be used?", 2, 
                           "With the title sequence of the programme.", 
                           "At the end of the programme.",
                           "At key moments to create a particular reaction.");
quiz[3] = new makeQuestion("What are pyrotechnics?", 1, 
                           "The people who operate the cameras.",
                           "Explosions, fire, fireworks and so on.", 
                           "Different methods of planning a set.");
quiz[4] = new makeQuestion("What is ambient lighting?", 0, 
                           "Light from within the scene.",
                           "Lighting that the audience doesn't see.", 
                           "Lasers and projectors, like those used in nightclubs.");
quiz[5] = new makeQuestion("For which film was <span class=hi>bullet time</span> invented?", 1, 
                           "<i>Romeo Must Die</i>",
                           "<i>The Matrix</i>", 
                           "<i>Crouching Tiger, Hidden Dragon</i>");
quiz[6] = new makeQuestion("What would be an accurate description of this shot?<p><center><img src=\"/images/ls2.jpg\" align=middle></center>", 0, 
                           "Long shot",
                           "Point of view shot", 
                           "Mid shot");
quiz[7] = new makeQuestion("What is the effect of a low angle shot?", 0, 
                           "The subject looks more imposing.",
                           "The viewer feels powerful.", 
                           "The subject seems insignificant.");
quiz[8] = new makeQuestion("What is the section of film between edits called?", 2, 
                           "Rolling time",
                           "A lapse", 
                           "A take");
quiz[9] = new makeQuestion("What is the dolly?", 1, 
                           "A hand held camera.",
                           "A piece of track for the camera to move on.", 
                           "The make-up artist.");

// -->
