var Total_Question = 15         // Remember to change this value
                                // according to # of questions

var msg = "If it reads 80% or above then well done. If it reads between 50% and 79% then you have achieved an above average result. Between 25% and 49% then you need to go back to the timeline. If you received below 25% then..... Below are the correct solutions to the questions you got wrong"

// These are the solutions
  var Solution = new Array(Total_Question)
  Solution[0] = "The correct answer is  F. Jameson"
  Solution[1] = "It was Lyotard who wrote The Postmodern Condition"
  Solution[2] = "There were 3 phases of modernism."
Solution[3] = "The last phase of modernism was centred in New York."
Solution[4]= "It was Walter Benjamin who wrote about the significance of Baroque, particularly the theatre if baroque, for modern times"
Solution[5]= "Most commentators agree that it was Francesco Onis who first used the term 'postmodernism'"
Solution[6]= "It is Jean Baudrillard who argues that the 'real has imploded'"
Solution[7]= "It was Arthur Kroker who co-authored the Panic Encyclopedia"
Solution[8]= "It was Gilles Deleuze & Felix Guattari who made this statement. They favoured rhizomes"
Solution[9]= "Conceptualism is a form of art sometimes claimed to be postmodern"
Solution[10]= "It was the housing estate in St. Louis which when demolished was cited by Charles Jencks as the death of modernist arcitecture'"
Solution[11]= "It is the neo-Functionalist, Jeffrey Alexander who proposes the idea of neo-modernity"
Solution[12]= "It was the feminist Seyla Benhabib who argued that but for the thesis of the 'death of the subject' postmodernism had much to offer feminism and vice-versa"
Solution[13]= "It was Michel Foucault who wrote 'The Order of Things'"
Solution[14]= "It was Peter Goodrich who wrote 'Reading the Law'"

// end of solutions

function GetSelectedButton(ButtonGroup)
{
  for (var x=0; x < ButtonGroup.length; x++)
    if (ButtonGroup[x].checked) return x
  return 0
} 

function ReportScore(correct)
{ 
  var SecWin = 
      window.open("","","scrollbars,width=400,height=250")
  var MustHave1 = "<HTML><HEAD><TITLE>YOUR SCORE</TITLE></HEAD><BODY><center><font face='Arial' size='4' color='red'><b>SociologyOnline Postmodernism Quiz.</center></font><br><font face='Arial' size='4' color='black'><center><b> How did you do?<br></center><font face='Arial' size='3' color='black'><b> Your result, given in terms of the percentage of questions you answered correctly is:"
  var Percent = "<H2>Score : "+Math.round(correct/Total_Question*100)
                 + "%</H2><HR>"
  msg = MustHave1 +Percent + msg  + "<br><center><INPUT TYPE='BUTTON' VALUE='Close Window' onClick='window.close()'><BR></FORM><br>Tony Fitzgerald</BODY></HTML>"
SecWin.document.write(msg)
  msg = ""  // Clear message
}

function Grade()
{
  var correct = 0
  var wrong = 0
  for (number=0; number < Total_Question; number++)
    {
      var form = document.forms[number]      // Question #
      var i = GetSelectedButton(form.q1)
      if (form.q1[i].value == "1")
         { correct++ } 
        else 
         { wrong++
           msg += "<H4>Question "+(number+1)+".</H4>"
                  +Solution[number]+"<BR>"
         }
    }
    ReportScore(correct)

}

