var min
var sec
var ShowReadingAgain = 'Show reading again'
var platform = 'win'
if (navigator.appVersion.indexOf('Mac') != -1) {platform = 'mac'}
winrightchar = ':-)'
winwrongchar = 'X'
DoneStatus = new Array();
DoneStatus[1] = '0';
DoneStatus[2] = '0';
DoneStatus[3] = '0';
DoneStatus[4] = '0';
DoneStatus[5] = '0';
DoneStatus[6] = '0';
DoneStatus[7] = '0';
DoneStatus[8] = '0';
DoneStatus[9] = '0';
DoneStatus[10] = '0';
Responses = new Array();
Responses[1] = 'Sorry! This word ends in CONSONANT + "y", so you can\'t just add "s".';
Responses[2] = 'Correct! This word ends in CONSONANT + "y", so we change the "y" to "i" and add "es".';
Responses[3] = 'Sorry! This word ends in CONSONANT + "y", so we need to change something before adding "es".';
Responses[4] = 'Sorry! Try again. Hint: this word ends in CONSONANT + "y".';
Responses[5] = 'Correct! This is just an ordinary noun, so we can add "s".';
Responses[6] = 'Sorry! Try again. Hint: this noun doesn\'t end with "s", "sh" or "y"...';
Responses[7] = 'Sorry! Try again. Hint: this noun doesn\'t end with "s", "sh" or "y"...';
Responses[8] = 'Sorry! Try again. Hint: this noun doesn\'t end with "s", "sh" or "y"...';
Responses[9] = 'Sorry! Try again. Hint: this noun ends in VOWEL + "y"...';
Responses[10] = 'Sorry! Try again. Hint: this noun ends in VOWEL + "y"...';
Responses[11] = 'Sorry! Try again. Hint: this noun ends in VOWEL + "y"...';
Responses[12] = 'Correct! This is a regular noun, because it ends in VOWEL + "y", so we can just add "s".';
Responses[13] = 'Sorry! Try again. Hint: this noun ends with "sh"...';
Responses[14] = 'Sorry! Try again. Hint: this noun ends with "sh"...';
Responses[15] = 'Sorry! Try again. Hint: this noun ends with "sh"...';
Responses[16] = 'Correct! This noun ends with "sh", so we need to add "es".';
Responses[17] = 'Sorry! Try again. Hint: this noun ends with "s"...';
Responses[18] = 'Sorry! Try again. Hint: this noun ends with "s"...';
Responses[19] = 'Correct! This noun ends with "s", so we need to add "es".';
Responses[20] = 'Sorry! Try again. Hint: this noun ends with "s"...';
Responses[21] = 'Sorry! Try again. Hint: this noun ends with "x"...';
Responses[22] = 'Sorry! Try again. Hint: this noun ends with "x"...';
Responses[23] = 'Sorry! Try again. Hint: this noun ends with "x"...';
Responses[24] = 'Correct! This noun ends with "x", so we need to add "es".';
Responses[25] = 'Sorry! Try again. Hint: this word ends with CONSONANT + "y"...';
Responses[26] = 'Correct! This word ends with CONSONANT + "y", so we need to change the "y" to "i" and then add "es".';
Responses[27] = 'Sorry! Try again. Hint: this word ends with CONSONANT + "y"...';
Responses[28] = 'Sorry! Try again. Hint: this word ends with CONSONANT + "y"...';
Responses[29] = 'Correct! This noun ends with VOWEL + "y", so we can just add "s".';
Responses[30] = 'Sorry! Try again. Hint: this word ends with VOWEL + "y"...';
Responses[31] = 'Sorry! Try again. Hint: this word ends with VOWEL + "y"...';
Responses[32] = 'Sorry! Try again. Hint: this word ends with VOWEL + "y"...';
Responses[33] = 'Sorry! Try again. Hint: this word ends with "ch"...';
Responses[34] = 'Sorry! Try again. Hint: this word ends with "ch"...';
Responses[35] = 'Correct! This word ends with "ch", so we need to add "es".';
Responses[36] = 'Sorry! Try again. Hint: this word ends with "ch"...';
Responses[37] = 'Sorry! Try again. Hint: this word ends with "w"...';
Responses[38] = 'Sorry! Try again. Hint: this word ends with "w"...';
Responses[39] = 'Sorry! Try again. Hint: this word ends with "w"...';
Responses[40] = 'Correct! This word ends with "w", so we can just add "s".';
IndicatorName = new Array();
IndicatorName[1] = 'document.QuizForm.Q1A';
IndicatorName[2] = 'document.QuizForm.Q1B';
IndicatorName[3] = 'document.QuizForm.Q1C';
IndicatorName[4] = 'document.QuizForm.Q1D';
IndicatorName[5] = 'document.QuizForm.Q2A';
IndicatorName[6] = 'document.QuizForm.Q2B';
IndicatorName[7] = 'document.QuizForm.Q2C';
IndicatorName[8] = 'document.QuizForm.Q2D';
IndicatorName[9] = 'document.QuizForm.Q3A';
IndicatorName[10] = 'document.QuizForm.Q3B';
IndicatorName[11] = 'document.QuizForm.Q3C';
IndicatorName[12] = 'document.QuizForm.Q3D';
IndicatorName[13] = 'document.QuizForm.Q4A';
IndicatorName[14] = 'document.QuizForm.Q4B';
IndicatorName[15] = 'document.QuizForm.Q4C';
IndicatorName[16] = 'document.QuizForm.Q4D';
IndicatorName[17] = 'document.QuizForm.Q5A';
IndicatorName[18] = 'document.QuizForm.Q5B';
IndicatorName[19] = 'document.QuizForm.Q5C';
IndicatorName[20] = 'document.QuizForm.Q5D';
IndicatorName[21] = 'document.QuizForm.Q6A';
IndicatorName[22] = 'document.QuizForm.Q6B';
IndicatorName[23] = 'document.QuizForm.Q6C';
IndicatorName[24] = 'document.QuizForm.Q6D';
IndicatorName[25] = 'document.QuizForm.Q7A';
IndicatorName[26] = 'document.QuizForm.Q7B';
IndicatorName[27] = 'document.QuizForm.Q7C';
IndicatorName[28] = 'document.QuizForm.Q7D';
IndicatorName[29] = 'document.QuizForm.Q8A';
IndicatorName[30] = 'document.QuizForm.Q8B';
IndicatorName[31] = 'document.QuizForm.Q8C';
IndicatorName[32] = 'document.QuizForm.Q8D';
IndicatorName[33] = 'document.QuizForm.Q9A';
IndicatorName[34] = 'document.QuizForm.Q9B';
IndicatorName[35] = 'document.QuizForm.Q9C';
IndicatorName[36] = 'document.QuizForm.Q9D';
IndicatorName[37] = 'document.QuizForm.Q10A';
IndicatorName[38] = 'document.QuizForm.Q10B';
IndicatorName[39] = 'document.QuizForm.Q10C';
IndicatorName[40] = 'document.QuizForm.Q10D';
var Score = 0;
var Tries = 0;
var Percent = 0;
var YourScore = 'Your score is';
var DefaultRight = 'Correct!';
var DefaultWrong = 'Sorry! Try again.';
rightchar = unescape(winrightchar)
wrongchar = unescape(winwrongchar)
function CheckAnswer(QNum, AnsNum, Correct) {
whichfb = (4*(QNum-1) + AnsNum)
if (Correct == 1) {
if (DoneStatus[QNum] != '1'){
Tries = Tries + 1;
DoneStatus[QNum] = '1';
Score = Score + 1;}
if (eval(IndicatorName[whichfb]) != null){
eval(IndicatorName[whichfb]).value = rightchar}
Feedback = Responses[whichfb]
if (Feedback == '') {Feedback = DefaultRight}
Percent = Math.floor(Score*100/Tries) + '%';
Feedback = Feedback + '
' + YourScore + ' ' + Percent + '.';
var i = 0;
var AllDone = true;
for (i=1; i
AllDone = false;
}
}
if (AllDone == true){
Feedback += '
}
WriteFeedback(Feedback);
}
else {
if (DoneStatus[QNum] != '1'){
Tries = Tries + 1;}
if (eval(IndicatorName[whichfb]) != null){
eval(IndicatorName[whichfb]).value = wrongchar}
Feedback = Responses[whichfb]
if (Feedback == '') {Feedback = DefaultWrong}
WriteFeedback(Feedback)
}
}
function WriteFeedback(Feedback) {
var x=document.getElementById("xfeedback")
var e = window.event
getMouseXY(e)
//x.style.top="300px"
//x.style.left="100px"
//alert(mY)
x.style.left=mX+20+"px"
x.style.top=mY-25+"px"
x.style.visibility="visible"
x.innerHTML=Feedback
//Object.style.visibility=visible|hidden|collapse
//alert(Feedback);
}
function getMouseXY(e) {
var IE = document.all?true:false;
if (IE) { // grab the x-y pos.s if browser is IE
mX = document.body.scrollLeft;
mY = document.body.scrollTop;
}
else { // grab the x-y pos.s if browser is NS
mX = e.pageX;
mY = e.pageY;
}
}
function HideFeedback() {
document.getElementById("xfeedback").style.visibility="hidden" ;
}