//// created by www.scriptasylum.com // amended by www.hypedup.co.uk ////

var symbols=['&hearts;','&clubs;','&spades;','&diams;','&epsilon;','&eta;','&euro;','&fnof;','&delta;','&dagger;','&ETH;','&gamma;','&theta;','&Omega;','&laquo;','&lambda;','&rho;','&THORN;','&zeta;','&equiv;','&infin;'];
var magicno, tmpt, tmpel, oktoshow=1, ieop=.1, op_id=0;

var t='<table cellpadding="1" cellspacing="0" border="0" width="480" height="300" style="margin:10px 0px 4px 45px"><tr>';
for(i=1;i<=99;i++){
tmpt=Math.ceil(i/11)==Math.floor(i/11);
tmpn=i+'';
while(tmpn.length<2){
tmpn="&nbsp; "+tmpn;}
t+='<td><span class="numbers">'+tmpn+': <\/span><span id="img'+i+'" class="symbols">'+symbols[Math.floor(Math.random()*symbols.length)]+'<\/span><\/td>';
if(tmpt){
t+='<\/tr><tr>';}}
t+='<\/tr><\/table>';

function resetTable(){
document.getElementById('box1').style.display='block';
document.getElementById('box2').style.display='none';
document.getElementById('answer').style.cursor='pointer';
oktoshow=false;
var magicN=Math.floor(Math.random()*symbols.length);
for(i=1;i<=99;i++){
tmpel=document.getElementById('img'+i);
tmpel.innerHTML=((Math.ceil(i/9)==Math.floor(i/9))&&i<82)?symbols[magicN]:symbols[Math.floor(Math.random()*symbols.length)];}
tmpel=document.getElementById('answer');
if(document.all){
tmpel.style.filter="alpha(opacity=0)";}
else{
tmpel.style.opacity=0;}
tmpel.innerHTML="WI";
magicno=symbols[magicN];
oktoshow=1;}
window.onload=resetTable;

function incropacity(){
if(ieop<=100){
ieop=ieop*1.2;
if(document.all){
document.getElementById('answer').style.filter="alpha(opacity="+ieop+")";}
else{
document.getElementById('answer').style.opacity=ieop/100;}}
else{
if(document.all){
document.getElementById('answer').style.filter='';}
oktoshow=3;
clearInterval(op_id);
ieop=.1;
setTimeout("document.getElementById('box2').style.display='block'; document.getElementById('box1').style.display='none'",5000);}}

function showImg(){
if(oktoshow==1){
oktoshow=2;
tmpel.innerHTML=magicno;
document.getElementById('answer').style.cursor='default';
op_id=setInterval('incropacity()',70);}}
