»
EnglishFrenchVietnamese

Print - Javascript Mind Reader - JavaScriptBank.com

Full version: jsB@nk » Game » Puzzle » Javascript Mind Reader
URL: https://www.javascriptbank.com/javascript-mind-reader-index.html

Javascript Mind Reader © JavaScriptBank.comChoose any two digit number, add both digits together and then subtract the total from your original number.

Full version: jsB@nk » Game » Puzzle » Javascript Mind Reader
URL: https://www.javascriptbank.com/javascript-mind-reader-index.html



CSS
<style type="text/css">body{background-color:white;padding:0px;margin:0px;}.symbolCells{font: 18px arial;color: maroon;}.bigSymbol{position:absolute;top:16px;left:35px;width:160px;font:160px arial;color:maroon;text-align:center;cursor:default;}.numCells{font:bold 11px arial;color: black;}.rulesText{font-weight:500;font-size:8pt;font-family:arial;color:black;}</style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<script language="javascript">var w3c=(document.getElementById)?true:false;var ns4=(document.layers)?true:false;var ns6=(w3c && !document.all)?true:false;var ie4=(!w3c && document.all)?true:false;var ie5=(w3c && document.all)?true:false;if(w3c || ie4){var symbols=['&hearts;','&clubs;','&spades;','&diams;','&epsilon;','&eta;','&euro;','&fnof;','&delta;','&dagger;','&ETH;','&gamma;','&theta;','&Omega;','&laquo;','&lambda;','&rho;','&THORN;','&zeta;','&equiv;','&infin;'];//*************** DO NOT EDIT BELOW THIS POINT ****************\\var tmpt;var oktoshow=1;var ieop=.1;var op_id=0;var answerEl;var hideEl;var t='<center><table cellpadding="3" cellspacing=0 border=0 width="95%"><tr valign="top"><td align="center" colspan="2"><span style="color:red; font: bold 24px verdana">Javascript Mind Reader</span></td></tr><tr valign="top">';t+='<td width="50%"><center><div style="position:relative; width:320px; height:245px"><div style="position:absolute; top:0px; left:0px;"><img src="ball.jpg" galleryimg="no"></div><div id="answer" class="bigSymbol" onmousedown="showImg()"></div></div></center><br><br>';t+='<div class="rulesText">Choose any two digit number, add both digits together and then subtract the total from your original number.<br><br>Example, let\'s say you choose 33:<br>Add the two digits together: &nbsp;3 + 3 = 6<br>Subtract the product from the original number: &nbsp;33 - 6<br><br>When you have the final number, look it up on the chart and find the relevant symbol. Concentrate on the symbol and once you have it clearly in your mind, click on the crystal ball and it will mysteriously reveal the symbol you were thinking of...<br><br><span style="font:7pt verdana; color:maroon">This script based on a Flash movie by Andy Naughton. <br>URL: http://mr-31238.mr.valuehost.co.uk/assets/Flash/psychic.swf</span></div>';t+='</td><td width="50%" height="100%">';t+='<table cellpadding=1 cellspacing=0 border=0 width="100%" height="100%"><tr valign="bottom">';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 nowrap><span class="numCells">'+tmpn+':</span><span id="img'+i+'" class="symbolCells">'+symbols[Math.floor(Math.random()*symbols.length)]+'</span>&nbsp;</td>';if(tmpt)t+='</tr><tr valign="bottom">';}t+='</tr></table></td></tr></table><div id="hideEl" style="width:100%; height:100%; top:0px; left:0px; position:absolute; background-color:white; text-align:center; display:block; z-index:1000"><br><br><br><br>Try again? Click <a href="javascript:resetTable()">here</a></div>';document.write(t);function resetTable(){hideEl.style.display="none";oktoshow=false;var tmpel;var magicN=Math.floor(Math.random()*symbols.length); // RANDOMLY PICKS A SYMBOL TO USE FOR THE "MAGIC NUMBER"for(i=1;i<=99;i++){tmpel=(w3c)?document.getElementById('img'+i):document.all['img'+i];// THE LINE BELOW ASSIGNS THE "MAGIC SYMBOL" TO ANY MULTIPLE OF 9 ON THE CHART, ALL OTHER CELLS PICK A RANDOM SYMBOL.tmpel.innerHTML=(Math.ceil(i/9)==Math.floor(i/9))?symbols[magicN]:symbols[Math.floor(Math.random()*symbols.length)];}tmpel=(w3c)?document.getElementById('answer'):document.all['answer'];if(ie4||ie5)tmpel.style.filter="alpha(opacity=0)";else tmpel.style.MozOpacity=0;tmpel.innerHTML=symbols[magicN];oktoshow=1;}function incropacity(){if(ieop<=100){ieop=ieop*1.2;if(ie4||ie5)answerEl.style.filter="alpha(opacity="+ieop+")";if(ns6)answerEl.style.MozOpacity=ieop/100;}else{if(ie4||ie5)answerEl.style.filter='';oktoshow=3;clearInterval(op_id);ieop=.1;setTimeout('hideEl.style.display="block"',5000);}}function showImg(){if(oktoshow==1){oktoshow=2;op_id=setInterval('incropacity()',70);}}window.onload=function(){answerEl=(w3c)?document.getElementById('answer'):document.all['answer'];hideEl=(w3c)?document.getElementById('hideEl'):document.all['hideEl'];resetTable();}}else document.write('As of this writing, this script only supports the following browsers:<br><ul><li>Internet Explorer 4,5,6+<br><li>Netscape 6,7+<br><li>Mozilla 1+</ul>Please upgrade or install a new browser.');</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->