// This program was compiled from OCaml by js_of_ocaml 1.0 function caml_raise_with_arg (tag, arg) { throw [0, tag, arg]; } function caml_raise_with_string (tag, msg) { caml_raise_with_arg (tag, new MlWrappedString (msg)); } function caml_invalid_argument (msg) { caml_raise_with_string(caml_global_data[4], msg); } function caml_array_bound_error () { caml_invalid_argument("index out of bounds"); } function caml_str_repeat(n, s) { if (!n) { return ""; } if (n & 1) { return caml_str_repeat(n - 1, s) + s; } var r = caml_str_repeat(n >> 1, s); return r + r; } function MlString(param) { if (param != null) { this.bytes = this.fullBytes = param; this.last = this.len = param.length; } } MlString.prototype = { string:null, bytes:null, fullBytes:null, array:null, len:null, last:0, toJsString:function() { return this.string = decodeURIComponent (escape(this.getFullBytes())); }, toBytes:function() { if (this.string != null) var b = unescape (encodeURIComponent (this.string)); else { var b = "", a = this.array, l = a.length; for (var i = 0; i < l; i ++) b += String.fromCharCode (a[i]); } this.bytes = this.fullBytes = b; this.last = this.len = b.length; return b; }, getBytes:function() { var b = this.bytes; if (b == null) b = this.toBytes(); return b; }, getFullBytes:function() { var b = this.fullBytes; if (b !== null) return b; b = this.bytes; if (b == null) b = this.toBytes (); if (this.last < this.len) { this.bytes = (b += caml_str_repeat(this.len - this.last, '\0')); this.last = this.len; } this.fullBytes = b; return b; }, toArray:function() { var b = this.bytes; if (b == null) b = this.toBytes (); var a = [], l = this.last; for (var i = 0; i < l; i++) a[i] = b.charCodeAt(i); for (l = this.len; i < l; i++) a[i] = 0; this.string = this.bytes = this.fullBytes = null; this.last = this.len; this.array = a; return a; }, getArray:function() { var a = this.array; if (!a) a = this.toArray(); return a; }, getLen:function() { var len = this.len; if (len !== null) return len; this.toBytes(); return this.len; }, toString:function() { var s = this.string; return s?s:this.toJsString(); }, valueOf:function() { var s = this.string; return s?s:this.toJsString(); }, blitToArray:function(i1, a2, i2, l) { var a1 = this.array; if (a1) for (var i = 0; i < l; i++) a2 [i2 + i] = a1 [i1 + i]; else { var b = this.bytes; if (b == null) b = this.toBytes(); var l1 = this.last - i1; if (l <= l1) for (var i = 0; i < l; i++) a2 [i2 + i] = b.charCodeAt(i1 + i); else { for (var i = 0; i < l1; i++) a2 [i2 + i] = b.charCodeAt(i1 + i); for (; i < l; i++) a2 [i2 + i] = 0; } } }, get:function (i) { var a = this.array; if (a) return a[i]; var b = this.bytes; if (b == null) b = this.toBytes(); return (i<this.last)?b.charCodeAt(i):0; }, safeGet:function (i) { if (!this.len) this.toBytes(); if ((i < 0) || (i >= this.len)) caml_array_bound_error (); return this.get(i); }, set:function (i, c) { var a = this.array; if (!a) { if (this.last == i) { this.bytes += String.fromCharCode (c & 0xff); this.last ++; return 0; } a = this.toArray(); } else if (this.bytes != null) { this.bytes = this.fullBytes = this.string = null; } a[i] = c & 0xff; return 0; }, safeSet:function (i, c) { if (this.len == null) this.toBytes (); if ((i < 0) || (i >= this.len)) caml_array_bound_error (); this.set(i, c); }, fill:function (ofs, len, c) { if (ofs >= this.last && this.last && c == 0) return; var a = this.array; if (!a) a = this.toArray(); else if (this.bytes != null) { this.bytes = this.fullBytes = this.string = null; } var l = ofs + len; for (var i = ofs; i < l; i++) a[i] = c; }, compare:function (s2) { if (this.string != null && s2.string != null) { if (this.string < s2.string) return -1; if (this.string > s2.string) return 1; return 0; } var b1 = this.getFullBytes (); var b2 = s2.getFullBytes (); if (b1 < b2) return -1; if (b1 > b2) return 1; return 0; }, equal:function (s2) { if (this.string != null && s2.string != null) return this.string == s2.string; return this.getFullBytes () == s2.getFullBytes (); }, lessThan:function (s2) { if (this.string != null && s2.string != null) return this.string < s2.string; return this.getFullBytes () < s2.getFullBytes (); }, lessEqual:function (s2) { if (this.string != null && s2.string != null) return this.string <= s2.string; return this.getFullBytes () <= s2.getFullBytes (); } } function MlWrappedString (s) { this.string = s; } MlWrappedString.prototype = new MlString(); function MlMakeString (l) { this.bytes = ""; this.len = l; } MlMakeString.prototype = new MlString (); function caml_array_get (array, index) { if ((index < 0) || (index >= array.length - 1)) caml_array_bound_error(); return array[index+1]; } function caml_array_set (array, index, newval) { if ((index < 0) || (index >= array.length - 1)) caml_array_bound_error(); array[index+1]=newval; return 0; } function caml_blit_string(s1, i1, s2, i2, len) { if (len === 0) return; if (i2 === s2.last && s2.bytes != null) { var b = s1.bytes; if (b == null) b = s1.toBytes (); if (i1 > 0 || s1.last > len) b = b.slice(i1, i1 + len); s2.bytes += b; s2.last += b.length; return; } var a = s2.array; if (!a) a = s2.toArray(); else { s2.bytes = s2.string = null; } s1.blitToArray (i1, a, i2, len); } function caml_call_gen(f, args) { if(f.fun) return caml_call_gen(f.fun, args); var n = f.length; var d = n - args.length; if (d == 0) return f.apply(null, args); else if (d < 0) return caml_call_gen(f.apply(null, args.slice(0,n)), args.slice(n)); else return function (x){ return caml_call_gen(f, args.concat([x])); }; } function caml_int64_compare(x,y) { var x3 = x[3] << 16; var y3 = y[3] << 16; if (x3 > y3) return 1; if (x3 < y3) return -1; if (x[2] > y[2]) return 1; if (x[2] < y[2]) return -1; if (x[1] > y[1]) return 1; if (x[1] < y[1]) return -1; return 0; } function caml_int_compare (a, b) { if (a < b) return (-1); if (a == b) return 0; return 1; } function caml_compare_val (a, b, total) { var stack = []; for(;;) { if (!(total && a === b)) { if (a instanceof MlString) { if (b instanceof MlString) { if (a != b) { var x = a.compare(b); if (x != 0) return x; } } else return 1; } else if (a instanceof Array && a[0] === (a[0]|0)) { var ta = a[0]; if (ta === 250) { a = a[1]; continue; } else if (b instanceof Array && b[0] === (b[0]|0)) { var tb = b[0]; if (tb === 250) { b = b[1]; continue; } else if (ta != tb) { return (ta < tb)?-1:1; } else { switch (ta) { case 248: { var x = caml_int_compare(a[2], b[2]); if (x != 0) return x; break; } case 255: { var x = caml_int64_compare(a, b); if (x != 0) return x; break; } default: if (a.length != b.length) return (a.length < b.length)?-1:1; if (a.length > 1) stack.push(a, b, 1); } } } else return 1; } else if (b instanceof MlString || (b instanceof Array && b[0] === (b[0]|0))) { return -1; } else { if (a < b) return -1; if (a > b) return 1; if (total && a != b) { if (a == a) return 1; if (b == b) return -1; } } } if (stack.length == 0) return 0; var i = stack.pop(); b = stack.pop(); a = stack.pop(); if (i + 1 < a.length) stack.push(a, b, i + 1); a = a[i]; b = b[i]; } } function caml_compare (a, b) { return caml_compare_val (a, b, true); } function caml_create_string(len) { if (len < 0) caml_invalid_argument("String.create"); return new MlMakeString(len); } function caml_raise_constant (tag) { throw [0, tag]; } var caml_global_data = [0]; function caml_raise_zero_divide () { caml_raise_constant(caml_global_data[6]); } function caml_div(x,y) { if (y == 0) caml_raise_zero_divide (); return (x/y)|0; } function caml_parse_format (fmt) { fmt = fmt.toString (); var len = fmt.length; if (len > 31) caml_invalid_argument("format_int: format too long"); var f = { justify:'+', signstyle:'-', filler:' ', alternate:false, base:0, signedconv:false, width:0, uppercase:false, sign:1, prec:-1, conv:'f' }; for (var i = 0; i < len; i++) { var c = fmt.charAt(i); switch (c) { case '-': f.justify = '-'; break; case '+': case ' ': f.signstyle = c; break; case '0': f.filler = '0'; break; case '#': f.alternate = true; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': f.width = 0; while (c=fmt.charCodeAt(i) - 48, c >= 0 && c <= 9) { f.width = f.width * 10 + c; i++ } i--; break; case '.': f.prec = 0; i++; while (c=fmt.charCodeAt(i) - 48, c >= 0 && c <= 9) { f.prec = f.prec * 10 + c; i++ } i--; case 'd': case 'i': f.signedconv = true; /* fallthrough */ case 'u': f.base = 10; break; case 'x': f.base = 16; break; case 'X': f.base = 16; f.uppercase = true; break; case 'o': f.base = 8; break; case 'e': case 'f': case 'g': f.signedconv = true; f.conv = c; break; case 'E': case 'F': case 'G': f.signedconv = true; f.uppercase = true; f.conv = c.toLowerCase (); break; } } return f; } function caml_finish_formatting(f, rawbuffer) { if (f.uppercase) rawbuffer = rawbuffer.toUpperCase(); var len = rawbuffer.length; if (f.signedconv && (f.sign < 0 || f.signstyle != '-')) len++; if (f.alternate) { if (f.base == 8) len += 1; if (f.base == 16) len += 2; } var buffer = ""; if (f.justify == '+' && f.filler == ' ') for (var i = len; i < f.width; i++) buffer += ' '; if (f.signedconv) { if (f.sign < 0) buffer += '-'; else if (f.signstyle != '-') buffer += f.signstyle; } if (f.alternate && f.base == 8) buffer += '0'; if (f.alternate && f.base == 16) buffer += "0x"; if (f.justify == '+' && f.filler == '0') for (var i = len; i < f.width; i++) buffer += '0'; buffer += rawbuffer; if (f.justify == '-') for (var i = len; i < f.width; i++) buffer += ' '; return new MlWrappedString (buffer); } function caml_format_int(fmt, i) { if (fmt.toString() == "%d") return new MlWrappedString(""+i); var f = caml_parse_format(fmt); if (i < 0) { if (f.signedconv) { f.sign = -1; i = -i; } else i >>>= 0; } var s = i.toString(f.base); if (f.prec >= 0) { f.filler = ' '; var n = f.prec - s.length; if (n > 0) s = caml_str_repeat (n, '0') + s; } return caml_finish_formatting(f, s); } function caml_greaterequal (x, y) { return +(caml_compare(x,y,false) >= 0); } function caml_parse_sign_and_base (s) { var i = 0, base = 10, sign = s.get(0) == 45?(i++,-1):1; if (s.get(i) == 48) switch (s.get(i + 1)) { case 120: case 88: base = 16; i += 2; break; case 111: case 79: base = 8; i += 2; break; case 98: case 66: base = 2; i += 2; break; } return [i, sign, base]; } function caml_parse_digit(c) { if (c >= 48 && c <= 57) return c - 48; if (c >= 65 && c <= 90) return c - 55; if (c >= 97 && c <= 122) return c - 87; return -1; } function caml_failwith (msg) { caml_raise_with_string(caml_global_data[3], msg); } function caml_int_of_string (s) { var r = caml_parse_sign_and_base (s); var i = r[0], sign = r[1], base = r[2]; var threshold = -1 >>> 0; var c = s.get(i); var d = caml_parse_digit(c); if (d < 0 || d >= base) caml_failwith("int_of_string"); var res = d; for (;;) { i++; c = s.get(i); if (c == 95) continue; d = caml_parse_digit(c); if (d < 0 || d >= base) break; res = base * res + d; if (res > threshold) caml_failwith("int_of_string"); } if (i != s.getLen()) caml_failwith("int_of_string"); res = sign * res; if ((res | 0) != res) caml_failwith("int_of_string"); return res; } var caml_js_regexps = { amp:/&/g, lt:/</g, quot:/\"/g, all:/[&<\"]/ }; function caml_js_html_escape (s) { if (!caml_js_regexps.all.test(s)) return s; return s.replace(caml_js_regexps.amp, "&") .replace(caml_js_regexps.lt, "<") .replace(caml_js_regexps.quot, """); } function caml_js_on_ie () { var ua = window.navigator?window.navigator.userAgent:""; return ua.indexOf("MSIE") != -1 && ua.indexOf("Opera") != 0; } function caml_js_wrap_callback(f) { var toArray = Array.prototype.slice; return function () { var args = (arguments.length > 0)?toArray.call (arguments):[undefined]; return caml_call_gen(f, args); } } function caml_lessequal (x, y) { return +(caml_compare(x,y,false) <= 0); } function caml_make_vect (len, init) { var b = [0]; for (var i = 1; i <= len; i++) b[i] = init; return b; } function MlStringFromArray (a) { var len = a.length; this.array = a; this.len = this.last = len; } MlStringFromArray.prototype = new MlString (); var caml_md5_string = function () { function add (x, y) { return (x + y) | 0; } function xx(q,a,b,x,s,t) { a = add(add(a, q), add(x, t)); return add((a << s) | (a >>> (32 - s)), b); } function ff(a,b,c,d,x,s,t) { return xx((b & c) | ((~b) & d), a, b, x, s, t); } function gg(a,b,c,d,x,s,t) { return xx((b & d) | (c & (~d)), a, b, x, s, t); } function hh(a,b,c,d,x,s,t) { return xx(b ^ c ^ d, a, b, x, s, t); } function ii(a,b,c,d,x,s,t) { return xx(c ^ (b | (~d)), a, b, x, s, t); } function md5(buffer, length) { var i = length; buffer[i >> 2] |= 0x80 << (8 * (i & 3)); for (i = (i & ~0x3) + 4;(i & 0x3F) < 56 ;i += 4) buffer[i >> 2] = 0; buffer[i >> 2] = length << 3; i += 4; buffer[i >> 2] = (length >> 29) & 0x1FFFFFFF; var w = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476]; for(i = 0; i < buffer.length; i += 16) { var a = w[0], b = w[1], c = w[2], d = w[3]; a = ff(a, b, c, d, buffer[i+ 0], 7, 0xD76AA478); d = ff(d, a, b, c, buffer[i+ 1], 12, 0xE8C7B756); c = ff(c, d, a, b, buffer[i+ 2], 17, 0x242070DB); b = ff(b, c, d, a, buffer[i+ 3], 22, 0xC1BDCEEE); a = ff(a, b, c, d, buffer[i+ 4], 7, 0xF57C0FAF); d = ff(d, a, b, c, buffer[i+ 5], 12, 0x4787C62A); c = ff(c, d, a, b, buffer[i+ 6], 17, 0xA8304613); b = ff(b, c, d, a, buffer[i+ 7], 22, 0xFD469501); a = ff(a, b, c, d, buffer[i+ 8], 7, 0x698098D8); d = ff(d, a, b, c, buffer[i+ 9], 12, 0x8B44F7AF); c = ff(c, d, a, b, buffer[i+10], 17, 0xFFFF5BB1); b = ff(b, c, d, a, buffer[i+11], 22, 0x895CD7BE); a = ff(a, b, c, d, buffer[i+12], 7, 0x6B901122); d = ff(d, a, b, c, buffer[i+13], 12, 0xFD987193); c = ff(c, d, a, b, buffer[i+14], 17, 0xA679438E); b = ff(b, c, d, a, buffer[i+15], 22, 0x49B40821); a = gg(a, b, c, d, buffer[i+ 1], 5, 0xF61E2562); d = gg(d, a, b, c, buffer[i+ 6], 9, 0xC040B340); c = gg(c, d, a, b, buffer[i+11], 14, 0x265E5A51); b = gg(b, c, d, a, buffer[i+ 0], 20, 0xE9B6C7AA); a = gg(a, b, c, d, buffer[i+ 5], 5, 0xD62F105D); d = gg(d, a, b, c, buffer[i+10], 9, 0x02441453); c = gg(c, d, a, b, buffer[i+15], 14, 0xD8A1E681); b = gg(b, c, d, a, buffer[i+ 4], 20, 0xE7D3FBC8); a = gg(a, b, c, d, buffer[i+ 9], 5, 0x21E1CDE6); d = gg(d, a, b, c, buffer[i+14], 9, 0xC33707D6); c = gg(c, d, a, b, buffer[i+ 3], 14, 0xF4D50D87); b = gg(b, c, d, a, buffer[i+ 8], 20, 0x455A14ED); a = gg(a, b, c, d, buffer[i+13], 5, 0xA9E3E905); d = gg(d, a, b, c, buffer[i+ 2], 9, 0xFCEFA3F8); c = gg(c, d, a, b, buffer[i+ 7], 14, 0x676F02D9); b = gg(b, c, d, a, buffer[i+12], 20, 0x8D2A4C8A); a = hh(a, b, c, d, buffer[i+ 5], 4, 0xFFFA3942); d = hh(d, a, b, c, buffer[i+ 8], 11, 0x8771F681); c = hh(c, d, a, b, buffer[i+11], 16, 0x6D9D6122); b = hh(b, c, d, a, buffer[i+14], 23, 0xFDE5380C); a = hh(a, b, c, d, buffer[i+ 1], 4, 0xA4BEEA44); d = hh(d, a, b, c, buffer[i+ 4], 11, 0x4BDECFA9); c = hh(c, d, a, b, buffer[i+ 7], 16, 0xF6BB4B60); b = hh(b, c, d, a, buffer[i+10], 23, 0xBEBFBC70); a = hh(a, b, c, d, buffer[i+13], 4, 0x289B7EC6); d = hh(d, a, b, c, buffer[i+ 0], 11, 0xEAA127FA); c = hh(c, d, a, b, buffer[i+ 3], 16, 0xD4EF3085); b = hh(b, c, d, a, buffer[i+ 6], 23, 0x04881D05); a = hh(a, b, c, d, buffer[i+ 9], 4, 0xD9D4D039); d = hh(d, a, b, c, buffer[i+12], 11, 0xE6DB99E5); c = hh(c, d, a, b, buffer[i+15], 16, 0x1FA27CF8); b = hh(b, c, d, a, buffer[i+ 2], 23, 0xC4AC5665); a = ii(a, b, c, d, buffer[i+ 0], 6, 0xF4292244); d = ii(d, a, b, c, buffer[i+ 7], 10, 0x432AFF97); c = ii(c, d, a, b, buffer[i+14], 15, 0xAB9423A7); b = ii(b, c, d, a, buffer[i+ 5], 21, 0xFC93A039); a = ii(a, b, c, d, buffer[i+12], 6, 0x655B59C3); d = ii(d, a, b, c, buffer[i+ 3], 10, 0x8F0CCC92); c = ii(c, d, a, b, buffer[i+10], 15, 0xFFEFF47D); b = ii(b, c, d, a, buffer[i+ 1], 21, 0x85845DD1); a = ii(a, b, c, d, buffer[i+ 8], 6, 0x6FA87E4F); d = ii(d, a, b, c, buffer[i+15], 10, 0xFE2CE6E0); c = ii(c, d, a, b, buffer[i+ 6], 15, 0xA3014314); b = ii(b, c, d, a, buffer[i+13], 21, 0x4E0811A1); a = ii(a, b, c, d, buffer[i+ 4], 6, 0xF7537E82); d = ii(d, a, b, c, buffer[i+11], 10, 0xBD3AF235); c = ii(c, d, a, b, buffer[i+ 2], 15, 0x2AD7D2BB); b = ii(b, c, d, a, buffer[i+ 9], 21, 0xEB86D391); w[0] = add(a, w[0]); w[1] = add(b, w[1]); w[2] = add(c, w[2]); w[3] = add(d, w[3]); } var t = []; for (var i = 0; i < 4; i++) for (var j = 0; j < 4; j++) t[i * 4 + j] = (w[i] >> (8 * j)) & 0xFF; return t; } return function (s, ofs, len) { var buf = []; if (s.array) { var a = s.array; for (var i = 0; i < len; i+=4) { var j = i + ofs; buf[i>>2] = a[j] | (a[j+1] << 8) | (a[j+2] << 16) | (a[j+3] << 24); } for (; i < len; i++) buf[i>>2] |= a[i + ofs] << (8 * (i & 3)); } else { var b = s.getFullBytes(); for (var i = 0; i < len; i+=4) { var j = i + ofs; buf[i>>2] = b.charCodeAt(j) | (b.charCodeAt(j+1) << 8) | (b.charCodeAt(j+2) << 16) | (b.charCodeAt(j+3) << 24); } for (; i < len; i++) buf[i>>2] |= b.charCodeAt(i + ofs) << (8 * (i & 3)); } return new MlStringFromArray(md5(buf, len)); } } (); function caml_ml_out_channels_list () { return 0; } function caml_mod(x,y) { if (y == 0) caml_raise_zero_divide (); return x%y; } function caml_mul(x,y) { return ((((x >> 16) * y) << 16) + (x & 0xffff) * y)|0; } function caml_register_global (n, v) { caml_global_data[n + 1] = v; } var caml_named_values = {}; function caml_register_named_value(nm,v) { caml_named_values[nm] = v; return 0; } function caml_sys_get_config () { return [0, new MlWrappedString("Unix"), 32]; } var caml_initial_time = new Date() * 0.001; function caml_sys_time () { return new Date() * 0.001 - caml_initial_time; } (function(){function bT(ex,ey,ez){return ex.length==2?ex(ey,ez):caml_call_gen(ex,[ey,ez]);}function aA(ev,ew){return ev.length==1?ev(ew):caml_call_gen(ev,[ew]);}var a=[0,new MlString("Invalid_argument")],b=new MlString("input"),c=[0,10,10,15];caml_register_global(5,[0,new MlString("Division_by_zero")]);caml_register_global(3,a);caml_register_global(2,[0,new MlString("Failure")]);var T=[0,new MlString("Assert_failure")],S=new MlString("%d"),R=new MlString("Pervasives.do_at_exit"),Q=new MlString("Random.int"),P=new MlString("x"),O=[0,2061652523,1569539636,364182224,414272206,318284740,2064149575,383018966,1344115143,840823159,1098301843,536292337,1586008329,189156120,1803991420,1217518152,51606627,1213908385,366354223,2077152089,1774305586,2055632494,913149062,526082594,2095166879,784300257,1741495174,1703886275,2023391636,1122288716,1489256317,258888527,511570777,1163725694,283659902,308386020,1316430539,1556012584,1938930020,2101405994,1280938813,193777847,1693450012,671350186,149669678,1330785842,1161400028,558145612,1257192637,1101874969,1975074006,710253903,1584387944,1726119734,409934019,801085050],N=new MlString("img"),M=new MlString("br"),L=new MlString("div"),K=new MlString("\""),J=new MlString(" name=\""),I=new MlString("\""),H=new MlString(" type=\""),G=new MlString("<"),F=new MlString(">"),E=new MlString(""),D=new MlString("YOU LOSE"),C=new MlString("sprites/bomb.png"),B=new MlString("sprites/flag.png"),A=new MlString("Mode : "),z=new MlString("sprites/bomb.png"),y=new MlString("sprites/normal.png"),x=new MlString("0"),w=new MlString("YOU WIN"),v=new MlString("GAME OVER"),u=new MlString("sprites/flag.png"),t=new MlString("sprites/bomb.png"),s=new MlString("sprites/empty.png"),r=new MlString(".png"),q=new MlString("sprites/"),p=new MlString("sprites/normal.png"),o=[0,0,0],n=[0,new MlString("main.ml"),42,17],m=new MlString("main"),l=new MlString("Number of columns"),k=new MlString("Number of rows"),j=new MlString("Number of mines"),i=new MlString("nouvelle partie"),h=new MlString("submit"),g=new MlString("text");function f(e,d){return caml_greaterequal(e,d)?e:d;}function ag(U,W){var V=U.getLen(),X=W.getLen(),Y=caml_create_string(V+X|0);caml_blit_string(U,0,Y,0,V);caml_blit_string(W,0,Y,V,X);return Y;}function ah(Z){return caml_format_int(S,Z);}function $(_,aa){if(_){var ab=_[1];return [0,ab,$(_[2],aa)];}return aa;}function ai(af){var ac=caml_ml_out_channels_list(0);for(;;){if(ac){var ad=ac[2];try {}catch(ae){}var ac=ad;continue;}return 0;}}caml_register_named_value(R,ai);function ar(aj,ap,ao){var ak=caml_make_vect(aj,[0]),al=0,am=aj-1|0;if(!(am<al)){var an=al;for(;;){ak[an+1]=caml_make_vect(ap,ao);var aq=an+1|0;if(am!==an){var an=aq;continue;}break;}}return ak;}function aK(as){var at=as,au=0;for(;;){if(at){var av=at[2],aw=[0,at[1],au],at=av,au=aw;continue;}return au;}}function aL(az,ax){var ay=ax;for(;;){if(ay){var aB=ay[2];aA(az,ay[1]);var ay=aB;continue;}return 0;}}function aM(aI){return aA(function(aC,aE){var aD=aC,aF=aE;for(;;){if(aF){var aG=aF[2],aH=aF[1];if(aA(aI,aH)){var aJ=[0,aH,aD],aD=aJ,aF=aG;continue;}var aF=aG;continue;}return aK(aD);}},0);}var aN=[0,0];32===caml_sys_get_config(0)[2];var aO=[0,O.slice(),0],aP=false,aQ=Array,aT=null,aS=undefined;function aU(aR){return aR instanceof aQ?0:[0,new MlWrappedString(aR.toString())];}aN[1]=[0,aU,aN[1]];function a2(aV,aW){aV.appendChild(aW);return 0;}function a3(aY){return caml_js_wrap_callback(function(aX){if(aX){var aZ=aA(aY,aX);if(!(aZ|0))aX.preventDefault();return aZ;}var a0=event,a1=aA(aY,a0);a0.returnValue=a1;return a1;});}var a4=window,bf=caml_js_on_ie(0)|0;function bi(a5,a6){return a5?aA(a6,a5[1]):0;}function a9(a8,a7){return a8.createElement(a7.toString());}function bn(a$,a_){return a9(a$,a_);}function bq(ba,bb,bc){if(0===ba&&0===bb){var bd=a9(bc,b),be=1;}else var be=0;if(!be)if(bf){var bg=new aQ();bg.push(G.toString(),b.toString());bi(ba,function(bh){bg.push(H.toString(),caml_js_html_escape(bh),I.toString());return 0;});bi(bb,function(bj){bg.push(J.toString(),caml_js_html_escape(bj),K.toString());return 0;});bg.push(F.toString());var bd=bc.createElement(bg.join(E.toString()));}else{var bk=a9(bc,b);bi(ba,function(bl){return bk.type=bl;});bi(bb,function(bm){return bk.name=bm;});var bd=bk;}return bd;}function br(bo){return bn(bo,M);}function bs(bp){return bn(bp,N);}window.HTMLElement===aS;function bu(bt){return bt.toString();}var bv=a4.document;function cg(bx,bD){var bw=0,by=bx[1]-1|0;if(!(by<bw)){var bz=bw;for(;;){var bA=0,bB=bx[2]-1|0;if(!(bB<bA)){var bC=bA;for(;;){aA(bD,[0,bz,bC]);var bE=bC+1|0;if(bB!==bC){var bC=bE;continue;}break;}}var bF=bz+1|0;if(by!==bz){var bz=bF;continue;}break;}}return 0;}function bS(bK,bG){var bH=bG[2],bI=bG[1],bJ=0<=bI?1:0;if(bJ){var bL=bI<bK[1]?1:0;if(bL){var bM=0<=bH?1:0,bN=bM?bH<bK[2]?1:0:bM;}else var bN=bL;}else var bN=bJ;return bN;}function ch(bR,bO){var bP=bO[2],bQ=bO[1];return bT(aM,aA(bS,bR),[0,[0,bQ-1|0,bP-1|0],[0,[0,bQ-1|0,bP],[0,[0,bQ-1|0,bP+1|0],[0,[0,bQ,bP-1|0],[0,[0,bQ,bP+1|0],[0,[0,bQ+1|0,bP-1|0],[0,[0,bQ+1|0,bP],[0,[0,bQ+1|0,bP+1|0],0]]]]]]]]);}function b4(bW,bU){var bV=bU[3]?u:bU[1]?t:bU[2]?0===bU[4]?s:ag(q,ag(ah(bU[4]),r)):p;return bW.src=bu(bV);}function ci(bY){var bX=0,bZ=bY[3][2]-1|0;if(!(bZ<bX)){var b0=bX;for(;;){var b1=0,b2=bY[3][1]-1|0;if(!(b2<b1)){var b3=b1;for(;;){b4(caml_array_get(caml_array_get(bY[2],b0),b3),caml_array_get(caml_array_get(bY[1],b3),b0));var b5=b3+1|0;if(b2!==b3){var b3=b5;continue;}break;}}var b6=b0+1|0;if(bZ!==b0){var b0=b6;continue;}break;}}return 0;}function cj(b8){var b7=0,b9=b8[3][2]-1|0;if(!(b9<b7)){var b_=b7;for(;;){var b$=0,ca=b8[3][1]-1|0;if(!(ca<b$)){var cb=b$;for(;;){var cd=caml_array_get(caml_array_get(b8[2],b_),cb);cd.onclick=a3(function(cc){a4.alert(bu(v));return aP;});var ce=cb+1|0;if(ca!==cb){var cb=ce;continue;}break;}}var cf=b_+1|0;if(b9!==b_){var b_=cf;continue;}break;}}return 0;}function cl(ck){return ck.toString();}var cm=a4.document;function cx(co,cq){var cn=cm.createDocumentFragment();a2(cn,cm.createTextNode(cl(co)));var cp=bq([0,cl(g)],0,cm);cp.value=cl(ah(cq[1]));cp.onchange=a3(function(cs){try {cq[1]=caml_int_of_string(new MlWrappedString(cp.value));}catch(cr){if(cr[1]!==a)throw cr;}cp.value=cl(ah(cq[1]));return aP;});a2(cn,cp);return cn;}a4.onload=a3(function(eu){var ct=cm.getElementById(cl(m));if(ct==aT)throw [0,T,n];var cu=[0,15],cv=[0,12],cw=[0,10];a2(ct,cx(l,cw));a2(ct,br(cm));a2(ct,cx(k,cv));a2(ct,br(cm));a2(ct,cx(j,cu));a2(ct,br(cm));var es=function(eq){var cy=bn(cm,L);a2(ct,cy);var cB=cu[1],cA=cw[1],cz=f(c[1],cv[1]),cC=f(c[2],cA),cD=f(1,cB),cE=caml_mul(cz,cC),cF=caml_lessequal(cE,cD)?cE:cD,cG=[0,cz,cC,cF],cH=[0,(caml_sys_time(0)*1000|0)%100000|0],cI=0===cH.length-1?[0,0]:cH,cJ=cI.length-1,cK=0,cL=54;if(!(cL<cK)){var cM=cK;for(;;){caml_array_set(aO[1],cM,cM);var cN=cM+1|0;if(cL!==cM){var cM=cN;continue;}break;}}var cO=[0,P],cP=0,cQ=54+f(55,cJ)|0;if(!(cQ<cP)){var cR=cP;for(;;){var cS=cR%55|0,cT=cO[1],cU=ag(cT,ah(caml_array_get(cI,caml_mod(cR,cJ))));cO[1]=caml_md5_string(cU,0,cU.getLen());var cV=cO[1];caml_array_set(aO[1],cS,(caml_array_get(aO[1],cS)^(((cV.safeGet(0)+(cV.safeGet(1)<<8)|0)+(cV.safeGet(2)<<16)|0)+(cV.safeGet(3)<<24)|0))&1073741823);var cW=cR+1|0;if(cQ!==cR){var cR=cW;continue;}break;}}aO[2]=0;var de=0,dd=caml_mul(cG[2],cG[1])-cG[3]|0,dc=0,db=caml_make_vect(cC,[0]);function cZ(cX){return [0,0,0,0,0];}function df(c2,cY){var c1=cY[2],c0=cY[1],c3=cZ(0);return caml_array_set(caml_array_get(c2,c0),c1,c3);}function dg(c5,c4){caml_array_get(caml_array_get(c5,caml_div(c4,cG[2])),caml_mod(c4,cG[2]))[1]=1;return 0;}function dh(c9,c6){var c7=c6[2],c8=c6[1];if(caml_array_get(caml_array_get(c9,c8),c7)[1])return 0;var c_=[0,0],da=function(c$){return caml_array_get(caml_array_get(c9,c$[1]),c$[2])[1]?(c_[1]+=1,0):0;};aL(da,ch(cG,[0,c8,c7]));caml_array_get(caml_array_get(c9,c8),c7)[4]=c_[1];return 0;}var di=caml_mul(cG[1],cG[2]),dj=[0,0],dp=cG[3];a:for(;;){var dk=0,dl=dj[1];for(;;){if(dl){var dn=dl[2],dm=dk+1|0,dk=dm,dl=dn;continue;}if(dk<dp){if(!(1073741823<di)&&0<di)for(;;){aO[2]=(aO[2]+1|0)%55|0;var dq=caml_array_get(aO[1],aO[2]),dr=(caml_array_get(aO[1],(aO[2]+24|0)%55|0)+(dq^dq>>>25&31)|0)&1073741823;caml_array_set(aO[1],aO[2],dr);var ds=caml_mod(dr,di);if(((1073741823-di|0)+1|0)<(dr-ds|0))continue;var dt=dj[1];for(;;){if(dt){var du=dt[2],dv=0===caml_compare(dt[1],ds)?1:0;if(!dv){var dt=du;continue;}var dw=dv;}else var dw=0;if(!dw)dj[1]=[0,ds,dj[1]];continue a;}}throw [0,a,Q];}var dx=dj[1],dy=cZ(0),dz=ar(cG[1],cG[2],dy);cg(cG,aA(df,dz));aL(aA(dg,dz),dx);cg(cG,aA(dh,dz));var dA=[0,dz,db,cG,dc,dd,de],dB=[0,0],dC=bv.createDocumentFragment();a2(dC,bv.createTextNode(bu(A)));var dD=bs(bv);a2(dC,dD);dD.src=bu(z);dD.onclick=a3(function(dE){if(0===dB[1]){dB[1]=1;dD.src=bu(B);}else{dB[1]=0;dD.src=bu(C);}return aP;});a2(dC,br(bv));var dF=0,dG=dA[3][2]-1|0;if(!(dG<dF)){var dH=dF;for(;;){var dI=[0,0],dJ=0,dK=dA[3][1]-1|0;if(!(dK<dJ)){var dL=dJ;for(;;){var dM=bs(bv);dI[1]=[0,dM,dI[1]];dM.src=bu(y);dM.onclick=a3(function(dH,dL,dM){return function(d$){if(0===dB[1]){if(!caml_array_get(caml_array_get(dA[1],dL),dH)[2])if(dA[6]){if(caml_array_get(caml_array_get(dA[1],dL),dH)[3]){dA[4]=dA[4]-1|0;caml_array_get(caml_array_get(dA[1],dL),dH)[3]=0;}else{dA[4]=dA[4]+1|0;caml_array_get(caml_array_get(dA[1],dL),dH)[3]=1;}b4(caml_array_get(caml_array_get(dA[2],dH),dL),caml_array_get(caml_array_get(dA[1],dL),dH));}else if(!caml_array_get(caml_array_get(dA[1],dL),dH)[3])if(caml_array_get(caml_array_get(dA[1],dL),dH)[1]){ci(dA);cj(dA);a4.alert(bu(D));}else{var dR=function(dN){var dO=dN[2],dP=dN[1];caml_array_get(caml_array_get(dA[1],dP),dO)[2]=1;b4(caml_array_get(caml_array_get(dA[2],dO),dP),caml_array_get(caml_array_get(dA[1],dP),dO));dA[5]=dA[5]-1|0;return 0;},dQ=dA[3],dS=dA[1],dT=ar(dQ[1],dQ[2],0),d1=function(dU){var dV=dU;for(;;){if(dV){var dW=dV[2],dX=dV[1],dY=dX[2],dZ=dX[1],d0=caml_array_get(caml_array_get(dS,dZ),dY);if(!d0[1]&&!d0[3]&&!d0[2]&&!caml_array_get(caml_array_get(dT,dZ),dY)){var d2=d1(dW),d3=d2[2],d4=d2[1];caml_array_set(caml_array_get(dT,dZ),dY,1);return 0===d0[4]?[0,d4,[0,dX,d3]]:[0,[0,dX,d4],d3];}var dV=dW;continue;}return o;}},d_=function(d5){if(d5){var d6=d5[2],d7=d5[1];if(0===caml_array_get(caml_array_get(dS,d7[1]),d7[2])[4]){var d8=d1(ch(dQ,d7)),d9=d8[1];return $([0,d7,d9],d_($(d8[2],d6)));}return [0,d7,d_(d6)];}return 0;};caml_array_set(caml_array_get(dT,dL),dH,1);aL(dR,d_([0,[0,dL,dH],0]));if(0===dA[5]){ci(dA);cj(dA);a4.alert(bu(w));}}}else{caml_array_get(caml_array_get(dA[1],dL),dH)[3]=1-caml_array_get(caml_array_get(dA[1],dL),dH)[3];b4(dM,caml_array_get(caml_array_get(dA[1],dL),dH));}return aP;};}(dH,dL,dM));a2(dC,dM);var ea=dL+1|0;if(dK!==dL){var dL=ea;continue;}break;}}a2(dC,br(bv));var eb=aK(dI[1]);if(eb){var ec=0,ed=eb,ej=eb[2],eg=eb[1];for(;;){if(ed){var ef=ed[2],ee=ec+1|0,ec=ee,ed=ef;continue;}var eh=caml_make_vect(ec,eg),ei=1,ek=ej;for(;;){if(ek){var el=ek[2];eh[ei+1]=ek[1];var em=ei+1|0,ei=em,ek=el;continue;}var en=eh;break;}break;}}else var en=[0];caml_array_set(dA[2],dH,en);var eo=dH+1|0;if(dG!==dH){var dH=eo;continue;}break;}}var ep=cy.style;ep.lineHeight=bu(x);a2(cy,dC);return aP;}}},er=cm.createDocumentFragment(),et=bq([0,cl(h)],0,cm);et.value=cl(i);et.onclick=a3(es);a2(er,et);a2(ct,er);return aP;});ai(0);return;}());