ltr = new Array(3);
ltr[0] = 'A';
ltr[1] = 'B';
ltr[2] = 'C';
ltr[3] = 'D';


function checkAns(ques,ans)
{
if (answers[ques]==ans) {
	displayFeedback("y",ques,feedback[ques]);
	}
else
	displayFeedback("n",ques,feedback[ques]);
}

function displayFeedback(which,ques,fdbk) {
var fdbkWindow=window.open("blank.htm","feedBack","menubar=no,resizable=yes,scrollbars=yes,width=350,height=300,top=200,left=200,screenX=100,screenY=100");
var htmlString = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">';
fdbkWindow.document.write(htmlString);
htmlString= '<html><head><title>Quiz Answer</title>';
htmlString += '<link rel="stylesheet" href="../style.css" type="text/css">';
fdbkWindow.document.write(htmlString);
htmlString = '<style><!--';
htmlString += '.Correct {color: #120c80; font-weight: bold; font-size: 13pt;} ';
htmlString += '.Incorrect {color: #120c80; font-weight: bold; font-size: 12pt;} ';
htmlString += '.Fdbk {color: #120c80; font-family: Arial, Helvetica, sans-serif; font-size: 9pt;} ';
htmlString += '--></style>';
fdbkWindow.document.write(htmlString);
htmlString = '</head><body onload="self.focus()" onblur="self.focus()"><div align="center">';
if (which == "y") {
	htmlString += '<p class="head1">Your response is correct.</font></p>';
	htmlString += '<p class="Fdbk">' + fdbk + '</font></p>';
}
else {
	htmlString += '<p class="head2">The correct answer is: ';
	htmlString += ltr[answers[ques]];
	htmlString += '</font></p>';
	htmlString += '<p class="Fdbk">' + fdbk + '</font></p>';
}
fdbkWindow.document.write(htmlString);
htmlString = '<p class="bodytext">Select "Continue" to proceed.</p><form><input type="button" value="Continue" onClick="self.close();"></form></div>';
htmlString += '</body></html>';
fdbkWindow.document.write(htmlString);
}