var min
var sec
var ShowReadingAgain = 'Show reading again'
var platform = 'win'
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] = 'Correct! The verb in the "if" clause should be in the simple present tense.';
Responses[2] = 'Sorry! The verb in the "if" clause doesn\'t take "will".';
Responses[5] = 'Sorry! This verb is in the main clause.';
Responses[6] = 'Correct! The verb in the main clause takes "will".';
Responses[9] = 'Sorry! In this sentence, the main clause comes first.';
Responses[10] = 'Correct! In this sentence, the main clause comes first, so this verb should take "will".';
Responses[13] = 'Correct! The verb in the "if" clause should be in the simple present tense.';
Responses[14] = 'Sorry! This verb is in the "if" clause...';
Responses[17] = 'Sorry! This is the main clause!';
Responses[18] = 'Correct! This is a little more difficult because the verb includes "be able to", but it\'s still WILL + simple form.';
Responses[21] = 'Sorry! This is the main clause.';
Responses[22] = 'Correct! WILL is used in the main clause.';
Responses[25] = 'Sorry! This is the main clause.';
Responses[26] = 'Correct! The main clause has WILL.';
Responses[29] = 'Correct! This is the "if" clause, so we use the simple present.';
Responses[30] = 'Sorry! This is the "if" clause...';
Responses[33] = '';
Responses[34] = '';
Responses[37] = '';
Responses[38] = '';
IndicatorName = new Array();
IndicatorName[1] = 'document.QuizForm.Q1A';
IndicatorName[2] = 'document.QuizForm.Q1B';
IndicatorName[5] = 'document.QuizForm.Q2A';
IndicatorName[6] = 'document.QuizForm.Q2B';
IndicatorName[9] = 'document.QuizForm.Q3A';
IndicatorName[10] = 'document.QuizForm.Q3B';
IndicatorName[13] = 'document.QuizForm.Q4A';
IndicatorName[14] = 'document.QuizForm.Q4B';
IndicatorName[17] = 'document.QuizForm.Q5A';
IndicatorName[18] = 'document.QuizForm.Q5B';
IndicatorName[21] = 'document.QuizForm.Q6A';
IndicatorName[22] = 'document.QuizForm.Q6B';
IndicatorName[25] = 'document.QuizForm.Q7A';
IndicatorName[26] = 'document.QuizForm.Q7B';
IndicatorName[29] = 'document.QuizForm.Q8A';
IndicatorName[30] = 'document.QuizForm.Q8B';
IndicatorName[33] = 'document.QuizForm.Q9A';
IndicatorName[34] = 'document.QuizForm.Q9B';
IndicatorName[37] = 'document.QuizForm.Q10A';
IndicatorName[38] = 'document.QuizForm.Q10B';
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" ;
}