function quiz() {
var points = 0;

// Question 1
for(q1 = 1; q1 <=5 ; q1++)
{
 if (document.getElementById("quiz").question1[q1].checked) points = points + parseInt(document.getElementById("quiz").question1[q1].value);
}
// Question 2
for(q1 = 1; q1 <=4 ; q1++)
{
 if (document.getElementById("quiz").question2[q1].checked) points = points + parseInt(document.getElementById("quiz").question2[q1].value);
}
// Question 3
for(q1 = 1; q1 <=3 ; q1++)
{
 if (document.getElementById("quiz").question3[q1].checked) points = points + parseInt(document.getElementById("quiz").question3[q1].value);
}
// Question 4
for(q1 = 1; q1 <=5 ; q1++)
{
 if (document.getElementById("quiz").question4[q1].checked) points = points + parseInt(document.getElementById("quiz").question4[q1].value);
}
// Question 5
for(q1 = 1; q1 <=4 ; q1++)
{
 if (document.getElementById("quiz").question5[q1].checked) points = points + parseInt(document.getElementById("quiz").question5[q1].value);
}
// Question 6
for(q1 = 1; q1 <=4 ; q1++)
{
 if (document.getElementById("quiz").question6[q1].checked) points = points + parseInt(document.getElementById("quiz").question6[q1].value);
}
// Question 7
for(q1 = 1; q1 <=3 ; q1++)
{
 if (document.getElementById("quiz").question7[q1].checked) points = points + parseInt(document.getElementById("quiz").question7[q1].value);
}
// Question 8
for(q1 = 1; q1 <=5 ; q1++)
{
 if (document.getElementById("quiz").question8[q1].checked) points = points + parseInt(document.getElementById("quiz").question8[q1].value);
}
// Question 9
for(q1 = 1; q1 <=4 ; q1++)
{
 if (document.getElementById("quiz").question9[q1].checked) points = points + parseInt(document.getElementById("quiz").question9[q1].value);
}
// Question 10
for(q1 = 1; q1 <=5 ; q1++)
{
 if (document.getElementById("quiz").question10[q1].checked) points = points + parseInt(document.getElementById("quiz").question10[q1].value);
}

// Results
var popupWin = window.open("","","width=350,height=250,scrollbars=yes");
popupWin.document.write('<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"');
popupWin.document.write('\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">');
popupWin.document.write('<html xml:lang=\"en\"><head><title>Ergebnis</title>');
popupWin.document.write('<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />');
popupWin.document.write('<link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\" /></head>');
popupWin.document.write('<body style="padding:10px"><p>');
if (points < 6)
{
 popupWin.document.write("Tut mir leid, aber Lord British wird Sie wohl entschieden ablehnen. Ein ");
 popupWin.document.write("anderer Beruf w&auml;re empfehlenswert. Hei&szlig;er Tip: Angeblich braucht das Museum ");
 popupWin.document.write("von Britain dringend neue Angestellte (z.B. Wachen, Putzkr&auml;fte...)!");
}
if ((points > 5) && (points  < 12))
{
 popupWin.document.write("Sie h&auml;tten sicherlich das Zeug zum neuen Avatar, aber Ihnen fehlen dennoch ");
 popupWin.document.write("entscheidende Kenntnisse. Studieren Sie das Journal und den Gobelin der Zeit, ");
 popupWin.document.write("um sich mehr Wissen &uuml;ber die Geschichte Britannias anzueignen.");
}
if ((points > 11) && (points  < 18))
{
 popupWin.document.write("Gratulation, Sie k&ouml;nnten mit Leichtigkeit der neue Avatar Britannias werden! ");
 popupWin.document.write("Ihr weitreichendes Wissen und Ihr Gesp&uuml;r f&uuml;r die Ursachen verschiedener ");
 popupWin.document.write("gesellschaftlicher und politischer Probleme machen Sie geradezu pr&auml;destiniert ");
 popupWin.document.write("f&uuml;r die Rolle des Idols einer ganzen Welt.");
}
if ((points  > 17) && (points  < 25))
{
 popupWin.document.write("Sofort bei EA(tm) um die Rolle als neuer Avatar bewerben!");
}
popupWin.document.write("</p><p>Vielen Dank f&uuml;r Ihre Teilnahme! (Jegliche &Auml;hnlichkeit mit lebenden Personen ");
popupWin.document.write("und jede Konsistenz ist rein zuf&auml;llig und nicht beabsichtigt.)");
popupWin.document.write('<p><a href="Javascript:window.close();">Fenster schlie&szlig;en</a>');
popupWin.document.write("</p></body></html>");
popupWin.document.close();
}