/*
	This code is created and owned by Christian Davén.
	You are NOT allowed to use this code on your web site or anywhere else.

	(Oh, and I obfuscated it a tiny bit, using Shane Ng's obfuscator.)
*/

var ab=new Array(256);var bb=false;var cb=40;var db=null;var eb;function fb(c,r){return c+"\u003a"+r;}
function gb(){var hb=0;var ib=0;for(var i=0;i<256;i++){ab[fb(hb,ib)]="";var element=document.getElementById(fb(hb,ib));element.firstChild.nodeValue="x";element.className="\165\u006ek\156\u006f\u0077\156";hb++;if(hb==16){hb=0;ib++;}
}
}
function jb(){bb=false;cb=40;gb();kb();document.getElementById("\u0074i\u006de").firstChild.nodeValue="0";for(var i=0;i<40;i++){var c=Math.round(Math.random()*15);var r=Math.round(Math.random()*15);if(ab[fb(c,r)]=="\u0078")i--;else
ab[fb(c,r)]="\u0078";}
}
function lb(){clearTimeout(eb);var mb=new Date().getTime();document.getElementById("t\u0069m\145").firstChild.nodeValue=((mb-db)/1000).toFixed(1);bb=true;db=null;}
function nb(){var mb=new Date().getTime();document.getElementById("time").firstChild.nodeValue=Math.round((mb-db)/1000);eb=setTimeout("nb()",1000);}
function kb(){document.getElementById("\163\143\157r\u0065").firstChild.nodeValue=cb;}
function ob(pb){return ab[pb]=="x";}
function qb(pb){var c=parseInt(pb.split(":")[0]);var r=parseInt(pb.split("\072")[1]);var rb=new Array();var sb;sb=fb(c+1,r-1);if(document.getElementById(sb)!=null&&document.getElementById(sb).className!="\u006b\156o\u0077\u006e")rb.push(sb);sb=fb(c+1,r);if(document.getElementById(sb)!=null&&document.getElementById(sb).className!="k\u006e\u006f\167\156")rb.push(sb);sb=fb(c+1,r+1);if(document.getElementById(sb)!=null&&document.getElementById(sb).className!="known")rb.push(sb);sb=fb(c,r-1);if(document.getElementById(sb)!=null&&document.getElementById(sb).className!="known")rb.push(sb);sb=fb(c,r+1);if(document.getElementById(sb)!=null&&document.getElementById(sb).className!="\153\u006e\u006f\u0077\u006e")rb.push(sb);sb=fb(c-1,r+1);if(document.getElementById(sb)!=null&&document.getElementById(sb).className!="\u006bn\u006fwn")rb.push(sb);sb=fb(c-1,r);if(document.getElementById(sb)!=null&&document.getElementById(sb).className!="\153\u006eo\u0077\156")rb.push(sb);sb=fb(c-1,r-1);if(document.getElementById(sb)!=null&&document.getElementById(sb).className!="\u006bn\u006f\167\156")rb.push(sb);return rb;}
function tb(pb){var rb=qb(pb);var ub=0;for(var i in rb){if(ob(rb[i]))ub++;}
return ub;}
function vb(pb){var rb=qb(pb);for(var i in rb){var element=document.getElementById(rb[i]);if(element==null)continue;element.className="\153\u006e\157\u0077\156";var wb=tb(rb[i]);if(wb==0){element.firstChild.nodeValue=" ";vb(rb[i]);}
else
element.firstChild.nodeValue=wb;}
}
function xb(){for(i in ab){if(ab[i]==""){var element=document.getElementById(i);if(element.className=="que\163\u0074io\u006e\u006d\u0061r\u006b"||element.className=="\165n\153\u006e\u006f\167n")return false;}
}
return true;}
function yb(pb){if(bb){if(confirm("\u0059ou\u0020nee\144\040\u0074\u006f \u0072e\u0073\u0074a\u0072t\u0020t\u0068e \147\141\u006d\u0065\u0020first.\u0020\u0053\u0068\u006f\u0075\u006cd \111\u0020\u0064o\u0020th\u0061t \u0066\u006fr\040\171\157\u0075?"))jb();return;}
if(db==null){db=new Date().getTime();nb();}
var element=document.getElementById(pb);element.className="known";if(ob(pb)){element.firstChild.nodeValue="\u0078";element.className="\u006b\u006e\157w\156 \142\u006fm\u0062";lb();alert("G\u0061\u006d\u0065 o\u0076\u0065r. \u0054\u006f\u006f \u0062\u0061\u0064\u002c\u0020\u0079\u006fu\040\u0062l\u0065\u0077 \u0075\u0070!");}
else
{var wb=tb(pb);if(wb==0){element.firstChild.nodeValue=" ";vb(pb);}
else
element.firstChild.nodeValue=wb;if(xb()){lb();alert("Yo\165 found \141\u006c\u006c \u0074\u0068e mines.\u0020\u0043\157\156g\u0072\u0061\u0074\u0075\u006c\u0061\u0074\151\u006f\156\u0073\u0021");}
}
}
function zb(pb){if(bb){if(confirm("\u0059\157\u0075 \u006e\u0065\u0065d \u0074\u006f\u0020\u0072e\163\u0074\u0061\u0072\164 \164h\145\u0020game\u0020\u0066i\u0072\u0073t\u002e Sh\157\u0075\u006cd\040I \144o that f\u006f\u0072 you?"))jb();return;}
var element=document.getElementById(pb);if(element.className=="q\165e\163\u0074io\u006e\u006d\u0061\u0072\u006b"){element.className="\u0075\u006e\u006b\u006e\u006f\u0077n";element.firstChild.nodeValue="\170";cb++;}
else if(element.className=="\u0075nkn\u006f\u0077\u006e"){element.className="q\u0075\u0065\u0073\164ion\u006d\u0061\162\u006b";element.firstChild.nodeValue="?";cb--;}
kb();}
