home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Multimedia Spanish 3
/
ProOne-MultimediaSpanishIII-WinMac.bin
/
mac
/
span3web
/
test
< prev
next >
Wrap
Text File
|
1998-04-19
|
994b
|
43 lines
function ShowAnswer( n )
{
var i;
var prob;
var doc;
var correct = new Array(nFields);
var swap;
var fld;
var pos;
prob = order[currProblem]; // save chosen problem in temp. var for ease of reference
top.problemFrame.document.open();
doc = top.problemFrame.document;
doc.writeln("<html><head></head><body bgcolor='#ffffff'>");
doc.writeln("Here is the correct answer:");
doc.writeln("<hr>");
pos = 0;
fld = 0;
i = spanish[prob].indexOf("_");
correct = choiceWords[answer.charAt(2*order[currProblem])].split(',');
while (i >= 0 && pos < spanish[prob].length)
{
doc.write(spanish[prob].substring(pos, i));
doc.write("<font color='#009900'>" + correct[fld] + "</font>");
fld++;
pos = i + 1;
i = spanish[prob].indexOf("_", pos);
}
doc.writeln(spanish[prob].substring(pos), "<br>");
doc.writeln(english[prob], "<p>");
doc.writeln("<a href='javascript:top.PlayAnswer();'>Hear answer</a><p>");
doc.writeln("</body></html>");
doc.close();
SetNav("v");
}