");
currentInstruction = 0;
currentNarrative = 0;
for (i=0; i < numQuestions; ++i) {
if (currentInstruction < numInstructions) {
if (instructionIndex[currentInstruction] == i) {
document.writeln(" ");
document.writeln(instructionText[currentInstruction]);
document.writeln(" ");
document.writeln(" |
");
++currentInstruction;
}
}
if (currentNarrative < numNarratives) {
if (narrativeIndex[currentNarrative] == i) {
document.writeln(" | | ");
document.writeln(narrativeText[currentNarrative]);
document.writeln(" ");
document.writeln(" |
");
++currentNarrative;
}
}
document.writeln("");
document.writeln("" + prefixText[i] + " | ");
document.writeln("" + numberText[i] + " | ");
document.writeln("" + questionText[i]);
document.writeln(" ");
document.writeln("");
if (listMap.charAt(i) != "1") {
document.writeln("RESPONSE: | ");
document.writeln("" + responseText[i] + " | ");
}
document.writeln("ANSWER: | ");
document.writeln("" + answerText[i] + " | ");
if (showNotes) {
document.writeln("NOTES: | ");
document.writeln("" + notesText[i] + " | ");
}
if (showRef) {
document.writeln("REF: | ");
document.writeln("" + refText[i] + " | ");
}
document.writeln(" ");
document.writeln(" |
");
}
document.writeln("
");
document.writeln("