answer1 = "maybethistime";
q = new Array();

q['q1'] = '129d157ce4fff527da273300cc6f8efeed486e48';
q['q2'] = 'e07aa85ee9c18b8f8086d8d791f4b3c0f6faf446';
q['q3'] = '769916b0c03cf0ac607932a72e2c9ad8ed33ae1c';
q['q4'] = '578be9d485595e1242cd451d6c73b1aa02032c2f';
q['q5'] = '17874c6c4dbce505f7b57d1b4ad079191e4a8909';
q['q6'] = '50d4d00e0a6791ee3036068a8bac0d3342af398d';
q['q7'] = '2497ae14d22185e3edea489d29e6a698ff78120d';
q['q8'] = 'c65174f94e69cea744983127bc39609bedab8a8d';
q['q9'] = 'de5a15ac7a3ed14de9edf7fa2ce4e926d9cfe019';
q['q10'] = 'e120c7e33fe111c31fdcd442b88ab1d95531cb67';
q['q11'] = '4dc1791dabfef15c7e9d750d6e1b00535cb9d2d7';
q['q12'] = '091427f7a4d682783505764a496bf4eabdc9bff9';
q['q13'] = 'a57d97cc21ec3ab7135c5a9357f7626478335d8c';
q['q14'] = '94257b4572cd64149ce5761df723bdf671dc1655';
q['q15'] = '4b6adf0e3b38cdc3ae1b8209a1a45cd54f7ed985';
q['q16'] = 'ecdb73d20b57c222e22da82965a0bb58980a267c';
q['q17'] = '50c6123ba85384df93a8bdd8d810acd854611316';
q['q18'] = '68d5ecdc11b932210ecb7845a0b3210c9321b87a';
q['q19'] = 'd1de1650c250579746e401bc5935224abf106818';
q['q20'] = '7f47db4ac6a12e3562785a6b5b9d226174dccd0b';
q['q21'] = 'cf9dfffa3e76881e7eb0ce78fd50af17b9ffb2f1';
q['q22'] = 'a11312cf88a9c5ba36435d214381c83280e34c2c';
q['q23'] = '966640b75845fc3e4becd7cf24aaccca931ee308';
q['q24'] = 'deef6fedc92239f39b318e1fddc1abf697d9b976';
q['q25'] = '4699d071504ee7a6699e4299e7fff496b3749c72';
q['q26'] = '35da35b9a031e5b65e9060266e21eb6def9e8764';
q['q27'] = '9c1ab0e2f76f8e68205ad976e156da25844afab9';
q['q28'] = 'e2355567e1b63bcfef65adaf060551d517a575e9';
q['q29'] = '7162800d294c24872c872e75a38e961678f2b539';
q['q30'] = '59a66874f0667ddb312b0be83324fb5dfa19b13a';
q['q31'] = '02d88eb4a734f0aad80f0d3e190f1484b9b91e51';
q['q32'] = '44d4195b4fba719f95defb9b1a9308afb0548b6b';
q['q33'] = 'c89b12c166fe98d69aa1f226297f84643507e233';
q['q34'] = '270553c2755a6d7f398600fdacb8c61a9326f373';
q['q35'] = '7eef5d1cc808914bb1f702a60ea92484fb7a2926';
q['q36'] = '762c9749e730ffad87e4abfcbb679e0a8c864a14';
q['q37'] = '9a96bb2b6329db699ce0d823611656defcd146f8';
q['q38'] = 'cdbe5470e6da59d8c07531609f40eb71a3ea7291';
q['q39'] = '01f82ed2275eb1bd41b514d162800d319f4229a5';
q['q40'] = '596503476010c8d99d2d5533a1949ad7824da974';
 
function checkQ(str) {
	if(hex_sha1(document.getElementById(str).value.toUpperCase()) == q[str])
	{
		validate1(str);
	}
	else
	{
		validate2(str);
	}
	
}
function validate1(qstr) {
	if(document.getElementById(qstr).disabled == false) {
	document.getElementById(qstr).disabled = true;
	document.getElementById(qstr).style.border = '2px solid #00FF00'; 
	document.getElementById('correct').innerHTML = document.getElementById('correct').innerHTML*1 + 1;
	document.getElementById('correctB').innerHTML = document.getElementById('correctB').innerHTML*1 + 1;
	}
}

function validate2(qstr) {
	if(document.getElementById(qstr).value=='') {
		document.getElementById(qstr).style.border = '1px solid #A5ACB2'; 
	}
	else
	{
	document.getElementById(qstr).style.border = '2px solid #FF0000'; 
	}
}


/*
 * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
 * in FIPS PUB 180-1
 * Version 2.1a Copyright Paul Johnston 2000 - 2002.
 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
 * Distributed under the BSD License
 * See http://pajhome.org.uk/crypt/md5 for details.
 */

/*
 * Configurable variables. You may need to tweak these to be compatible with
 * the server-side, but the defaults work in most cases.
 */
var hexcase = 0;  /* hex output format. 0 - lowercase; 1 - uppercase        */
var b64pad  = ""; /* base-64 pad character. "=" for strict RFC compliance   */
var chrsz   = 8;  /* bits per input character. 8 - ASCII; 16 - Unicode      */

/*
 * These are the functions you'll usually want to call
 * They take string arguments and return either hex or base-64 encoded strings
 */
function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}
function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));}
function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));}
function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));}
function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));}
function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));}

/*
 * Perform a simple self-test to see if the VM is working
 */
function sha1_vm_test()
{
  return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d";
}

/*
 * Calculate the SHA-1 of an array of big-endian words, and a bit length
 */
function core_sha1(x, len)
{
  /* append padding */
  x[len >> 5] |= 0x80 << (24 - len % 32);
  x[((len + 64 >> 9) << 4) + 15] = len;

  var w = Array(80);
  var a =  1732584193;
  var b = -271733879;
  var c = -1732584194;
  var d =  271733878;
  var e = -1009589776;

  for(var i = 0; i < x.length; i += 16)
  {
    var olda = a;
    var oldb = b;
    var oldc = c;
    var oldd = d;
    var olde = e;

    for(var j = 0; j < 80; j++)
    {
      if(j < 16) w[j] = x[i + j];
      else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);
      var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)),
                       safe_add(safe_add(e, w[j]), sha1_kt(j)));
      e = d;
      d = c;
      c = rol(b, 30);
      b = a;
      a = t;
    }

    a = safe_add(a, olda);
    b = safe_add(b, oldb);
    c = safe_add(c, oldc);
    d = safe_add(d, oldd);
    e = safe_add(e, olde);
  }
  return Array(a, b, c, d, e);

}

/*
 * Perform the appropriate triplet combination function for the current
 * iteration
 */
function sha1_ft(t, b, c, d)
{
  if(t < 20) return (b & c) | ((~b) & d);
  if(t < 40) return b ^ c ^ d;
  if(t < 60) return (b & c) | (b & d) | (c & d);
  return b ^ c ^ d;
}

/*
 * Determine the appropriate additive constant for the current iteration
 */
function sha1_kt(t)
{
  return (t < 20) ?  1518500249 : (t < 40) ?  1859775393 :
         (t < 60) ? -1894007588 : -899497514;
}

/*
 * Calculate the HMAC-SHA1 of a key and some data
 */
function core_hmac_sha1(key, data)
{
  var bkey = str2binb(key);
  if(bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz);

  var ipad = Array(16), opad = Array(16);
  for(var i = 0; i < 16; i++)
  {
    ipad[i] = bkey[i] ^ 0x36363636;
    opad[i] = bkey[i] ^ 0x5C5C5C5C;
  }

  var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz);
  return core_sha1(opad.concat(hash), 512 + 160);
}

/*
 * Add integers, wrapping at 2^32. This uses 16-bit operations internally
 * to work around bugs in some JS interpreters.
 */
function safe_add(x, y)
{
  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
  return (msw << 16) | (lsw & 0xFFFF);
}

/*
 * Bitwise rotate a 32-bit number to the left.
 */
function rol(num, cnt)
{
  return (num << cnt) | (num >>> (32 - cnt));
}

/*
 * Convert an 8-bit or 16-bit string to an array of big-endian words
 * In 8-bit function, characters >255 have their hi-byte silently ignored.
 */
function str2binb(str)
{
  var bin = Array();
  var mask = (1 << chrsz) - 1;
  for(var i = 0; i < str.length * chrsz; i += chrsz)
    bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i%32);
  return bin;
}

/*
 * Convert an array of big-endian words to a string
 */
function binb2str(bin)
{
  var str = "";
  var mask = (1 << chrsz) - 1;
  for(var i = 0; i < bin.length * 32; i += chrsz)
    str += String.fromCharCode((bin[i>>5] >>> (32 - chrsz - i%32)) & mask);
  return str;
}

/*
 * Convert an array of big-endian words to a hex string.
 */
function binb2hex(binarray)
{
  var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
  var str = "";
  for(var i = 0; i < binarray.length * 4; i++)
  {
    str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) +
           hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8  )) & 0xF);
  }
  return str;
}

/*
 * Convert an array of big-endian words to a base-64 string
 */
function binb2b64(binarray)
{
  var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  var str = "";
  for(var i = 0; i < binarray.length * 4; i += 3)
  {
    var triplet = (((binarray[i   >> 2] >> 8 * (3 -  i   %4)) & 0xFF) << 16)
                | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 )
                |  ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF);
    for(var j = 0; j < 4; j++)
    {
      if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
      else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
    }
  }
  return str;
}