// forms test

var currentFocus = '';
var ans = new Array(17);
buildAns();

function check(index) {

  if (index==100) {
    var j=0;
    for (j=1; j<=2; j++) { check(j); }
    return false;
  }

  if (index==101) {
    var j=0;
    for (j=1; j<=18; j++) { check(j); }
    return false;
  }

  userAns = document.getElementById('q' + index).value;
  corrAns = ans[index - 1];
  if ( userAns != corrAns) {
    document.getElementById('a' + index).value = '   ' + ans[index - 1];
  }
  else {
    document.getElementById('a' + index).value = '  «';
  }

  return false;
}

function erase(index) {

  if (index==101) {
    var j=0;
    for (j=1; j<=18; j++) { erase(j); }
    return false;
  }

  document.getElementById('q' + index).value = '';
  document.getElementById('a' + index).value = '';
}

