';
if (is.CRAPBrowser){OutString=ResolveAllURLs(OutString);}
//Write it to the frame
TopFrame.document.clear();
TopFrame.document.open();
TopFrame.document.write(OutString);
TopFrame.document.close();
}
function Restart(){
Penalties = 0;
GuessSequence.length = 0;
Segments = Shuffle(Segments);
BuildCurrGuess();
WriteFeedback(RemainingWords + '
' + RemainingList + '');
BuildExercise();
DisplayExercise(Exercise);
}
function Undo(){
if (GuessSequence.length ' + Output + '
' + RemainingWords + '
' + RemainingList + '');
BuildExercise();
DisplayExercise(Exercise);
}
function AddSegment(SegNum){
GuessSequence[GuessSequence.length] = SegNum;
BuildCurrGuess();
WriteFeedback('' + Output + '');
// WriteFeedback('' + Output + '
' + RemainingWords + '
' + RemainingList + '');
BuildExercise();
DisplayExercise(Exercise);
}
function BuildCurrGuess(){
var i = 0;
var j = 0;
var NewSeg = '';
//first, create arrays of all the segments guessed so far and those not yet used
GuessSegs = new Array();
GuessSegs.length = 0;
//set the "used" markers all to 0
for (i=0; i
' + CorrectResponse + '
';
//Do score calculation here
var Score = Math.floor(((Segments.length-Penalties) * 100)/Segments.length);
WellDone += YourScoreIs + ' ' + Score + '%.
';
if (OtherAnswers.length > 0){
WellDone += TheseAnswersToo + '' + OtherAnswers + '';
}
WriteFeedback(WellDone);
return;
}
else{
TryAgain = '' + CompileString(GuessSequence) + '
';
Penalties++;
if (CheckType == 0){
TryAgain += IncorrectResponse + '
';
}
if (LongestCorrect.length > 0){
LongestCorrectBit = CompileString(LongestCorrect);
GuessSequence.length = LongestCorrect.length;
TryAgain += ThisMuchCorrect + '
' + LongestCorrectBit + '
';
}
if (CheckType == 1){
TryAgain += NextCorrect + '
' + FindSegment(HintToReturn);
}
WriteFeedback(TryAgain);
BuildCurrGuess();
BuildExercise();
DisplayExercise(Exercise);
}
}
function FindSegment(SegID){
var Seg = '';
for (var i=0; i';
OutString += TitleCode;
OutString += '
';
OutString += NavBar;
OutString += '';
OutString += '';
OutString += StuffToDisplay;
OutString += '