var antw = new Array;
var antw2 = new Array;
var aw = "";
var bwrt = new Array;
var erledigt = new Array;
var stand = 0;
var bearbeitet = 0;

antw[1] = "C";
antw[2] = "D";
antw[3] = "B";
antw[4] = "D";
antw[5] = "A";
antw[6] = "B";
antw[7] = "C";
antw[8] = "A";
antw[9] = "B";
antw[10] = "D";
antw[11] = "B";
antw[12] = "D";
antw[13] = "C";
antw[14] = "D";
antw[15] = "B";
antw[16] = "D";
antw[17] = "A";
antw[18] = "B";
antw[19] = "C";
antw[20] = "A";
antw[21] = "C";
antw[22] = "A";
antw[23] = "B";
antw[24] = "A";
antw[25] = "C";

antw2[1] = "Rollins";
antw2[2] = "Wild Men of Kurdistan";
antw2[3] = "Ribanna";
antw2[4] = "Geier";
antw2[5] = "Rio Pecos";
antw2[6] = "Kara Nirwan";
antw2[7] = "Treasure of Silverlake";
antw2[8] = "Roswell";
antw2[9] = "Aladschys";
antw2[10] = "Torch";
antw2[11] = "Tschita";
antw2[12] = "Cartridges";
antw2[13] = "Ölprinz";
antw2[14] = "Ballon";
antw2[15] = "Hadschi Halef Omar and Archie";
antw2[16] = "Kiowas";
antw2[17] = "Attack";
antw2[18] = "Totem";
antw2[19] = "Forrester";
antw2[20] = "Schneller Panther";
antw2[21] = "War Cash";
antw2[22] = "Tujunga";
antw2[23] = "Saltlake";
antw2[24] = "Snakes";
antw2[25] = "Großer Wolf";

bwrt[0] = "This was only a Test<br>You have to watch some films!";
bwrt[1] = "Oh, only 1 Hit!<br>You have to watch some films!";
bwrt[2] = "Oh, only 2 Hits!<br>You have to watch some films!";
bwrt[3] = "Oh, only 3 Hits!<br>You have to watch some films!";
bwrt[4] = "Oh, only 4 Hits!<br>You have to watch some films!";
bwrt[5] = "Oh, only 5 Hits!<br>You have to watch some films!";
bwrt[6] = "Oh, only 6 Hits!<br>You have to watch some films!";
bwrt[7] = "Oh, only 7 Hits!<br>You have to watch some films!";
bwrt[8] = "Oh, only 8 Hits!<br>You have to watch some films!";
bwrt[9] = "Oh, only 9 Hits!<br>You have to watch some films!";
bwrt[10] = "Oh, only 10 Hits!<br>You have to watch some films!";
bwrt[11] = "Oh, only 11 Hits!<br>You have to watch some films!";
bwrt[12] = "Oh, only 12 Hits!<br>You have to watch some films!";
bwrt[13] = "Ok, more than the Half<br>You are an half Expert!";
bwrt[14] = "A good result<<br>You know some films!";
bwrt[15] = "A good result<br>You know some films!";
bwrt[16] = "16 Hits is a good result<br>You know some films!";
bwrt[17] = "17 Hits is a good result<br>You know some films!";
bwrt[18] = "18 Hits is a good result<br>You know some films!";
bwrt[19] = "19 Hits is a good result<br>You know some films!";
bwrt[20] = "20 Hits is a good result<br>You know most films!!";
bwrt[21] = "Congratulations! Only 4 faults!<br>You are an Expert!";
bwrt[22] = "Congratulations! Only 3 faults!<br>You are an Expert!";
bwrt[23] = "Congratulations!<br>You are an Expert!";
bwrt[24] = "Gratulation, all 25 only<br>missed by one fault. You are an Expert!!";
bwrt[25] = "Congratulations!<br>You are an Super Expert!!!";

function Kwizz(frage, antwort) {

if (antwort != antw[frage]) {
        if (!erledigt[frage]) {
                erledigt[frage] = -1;
                bearbeitet++;
                document.quiz.Richtig.value = stand + ' of ' + bearbeitet + ' Answers!'
                aw=aw + "<tr bgcolor=#ffa0a0><td valign=top><font size=2><b>Question " + frage + ":</b></font></td>";
                aw=aw + "<td><font size=2><b>Question &quot;" + antwort + "&quot; is wrong!</b><br>";
                aw=aw + "Right was Answer &quot;" + antw[frage] + "&quot; (" + antw2[frage] + ")</font></td></tr>";
                }
        else {
                alert("Good Try, But You have already answered this question !");
                }
        }
else {
        if (!erledigt[frage]) {
                erledigt[frage] = -1;
                stand++;
                bearbeitet++;
                document.quiz.Richtig.value = stand + ' of ' + bearbeitet + ' Answers!'
                aw=aw + "<tr bgcolor=#a0ffa0><td valign=top><font size=2><b>Question " + frage + ":</b></font></td>";
                aw=aw + "<td><font size=2>Correct answered (" + antw2[frage] + ")</font></td></tr>";
                }
        else {
                alert("Good Try, But You have already answered this question !");
                }
        }
}

function NxLv () {
if (bearbeitet <25) {
        alert("No, no?\nYou have not answered all!");
        return false;
        }
var auswert=open("quiz.html","Score","width=550,height=450,menubar=no,resizeable=yes,scrollbars=yes,status=no");
var hc="<html><head><title>Score</title><body bgcolor=white text=blue link=red alink=magenta vlink=darkred>";
hc = hc + "<div align=center><font size=6 color=red><b>Score - Karl May Test</b></font></div>";
hc = hc + "<div align=center>";
hc = hc + "<table border=0 cellspacing=0 cellpadding=5 width=450>";
hc = hc + aw + "</table>";
var prozent = Math.round(stand * 1000 / bearbeitet);
prozent=prozent / 10;
hc = hc + "<font size=4>You have</font><br><font size=5 color=red><b>" + prozent;
hc = hc + " Percent</b></font><br><font size=4>of questions with right answers!</font><br><br>";
hc = hc + "<font size=4 color=black><b>" + bwrt[stand] + "</b></font><br>";
hc = hc + "<form><input type=button value='Close Window' onClick='window.close();'>";
hc = hc + "</form>"
hc = hc + "</div></body></html>";
auswert.document.write(hc);
}
