<html>
<head>
<title>Find the Numbers Highlighting Game - RJM Programming - April, 2024</title>
<style>
* {
font-family: Courier New;
margin: 0 0 0 0;
padding: 0 0 0 0;
}
body {
background-color: yellow;
}
textarea {
background-color: rgb(250,250,250);
text-shadow: -1px 1px 1px #952dff;
}
td {
background-color: rgb(250,250,250);
text-shadow: -1px 1px 1px #952dff;
}
#tablemy {
background-color: white;
}
#myta {
background-color: white;
}
#results {
background-color: pink;
}
#clue {
font-weight: bold;
}
</style>
<script type='text/javascript'>
var mode=(location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('mode=')[1] ? (decodeURIComponent((location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('mode=')[1].split('&')[0])) : '';
var cfindings=(location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('seq=')[1] ? (decodeURIComponent((location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('seq=')[1].split('&')[0])).replace(/\+/g,' ') : '';
var tabularize=(location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('table=')[1] ? (decodeURIComponent((location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('table=')[1].split('&')[0])) : 'Null';
var minwordlength=(location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('min=')[1] ? Math.min(3,eval(decodeURIComponent((location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('min=')[1].split('&')[0]))) : 3;
var maxwordlength=(location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('max=')[1] ? eval(decodeURIComponent((location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('max=')[1].split('&')[0])) : 3;
var numlettersacross=(location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('across=')[1] ? eval(decodeURIComponent((location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('across=')[1].split('&')[0])) : (tabularize == 'Null' ? 50 : 80);
var numlettersdown=(location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('down=')[1] ? eval(decodeURIComponent((location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('down=')[1].split('&')[0])) : 40;
var fontpixels=(location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('pixels=')[1] ? eval(decodeURIComponent((location.search + ('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&')).split('pixels=')[1].split('&')[0])) : 13;
var thesel='', showsel=false, lastsel='', lesssel='', tdclickno=0, sparewes=null, snum='';
var tog=['lightgreen', 'olive'];
var defv='', lastinidea='';
var firstdate=new Date();
var seconddate=new Date();
var updatehowlong=false;
var oops=false;
var linesarr=[], colsarr=[], ilines=0, icols=0, tableih='', defemail='', defsms='', timesecs=0;
var complines=[], origcomplines=[], diagl=0, isvalid=true, iiis=0, ioff=0, clickthere=true;
var twowordstocheck=['',''];
var lastpinks=[];
var eol=String.fromCharCode(10);
var tworesults=['',''];
var altsel='', firstval='', jhis='';
var ish=false, rstart=-1, rend=-1, isd=false, isg0=false, isg1=false;
var xzhr=null, rhzx=null, curri=0, score=0, goes=0;
var sofar=';', documenttitle='', ovcont='';
var xnumlettersacross=eval(eval('' + eol.length) + eval('' + numlettersacross));
var indxofinterest=-1, oureol=eol;
var letteremojis=[], blankemojis=[], loweremojis=[], upperemojis=[];
var findings=[], clues=[], findlen=minwordlength, thisq=0, jthisq=0, alreadydone=';000;';
if (cfindings.indexOf(' ') != -1) {
findings=cfindings.split(' ');
} else {
for (var icf=1; icf<cfindings.length; icf+=findlen) {
findings.push(cfindings.substring(eval(-1 + icf).substring(0,findlen)));
}
}
if (mode.trim() != '') {
mode=mode.substring(0,1); //.toUpperCase() + mode.substring(1).toLowerCase();
}
if (('' + window.localStorage.getItem('findwordcollaboratoremailee')).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
defemail=window.localStorage.getItem('findwordcollaboratoremailee');
}
if (('' + window.localStorage.getItem('findwordcollaboratorsmsno')).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
defsms=window.localStorage.removeItem('findwordcollaboratorsmsno');
}
function isithard(insimplecluepart) {
var outhardpart=insimplecluepart;
if (defv == 'C') {
}
}
function changesel(osel) {
defv=osel.value;
if ((osel.value + ' ').substring(0,1).toLowerCase() == 'c') {
document.getElementById('sclue').style.display='inline';
document.getElementById('sclue').innerHTML='Find number ' + isithard('' + findings[eval(-1 + findings.length - thisq)]);
} else {
document.getElementById('sclue').style.display='none';
}
}
function defval(inidea) {
//alert(1);
return inidea;
}
function doemail(inidea) {
////alert(3);
var zfrom='youllneverfindthis', zto='youllneverfindthis';
var azx=top.document.getElementById('xae' + 'mail');
//alert(33);
if (!azx) { azx=top.document.createElement("a"); }
//alert(3333);
//if (1 == 1) {
//document.getElementById('divas').appendChild(azx);
//} else {
top.document.body.appendChild(azx);
//}
//(334);
azx.style = "display: none";
//alert(2334);
azx.target = "_top";
//alert(6334);
azx.id = 'xae' + 'mail';
//if (1 == 6 && bihbig.indexOf('</he' + 'ad>') != -1 || bihbig.indexOf('<b' + 'o' + 'dy') != -1 || bihbig.indexOf('<h' + '1') == 0) {
//azx.href = 'mailto:' + inidea + '?subject=' + encodeURIComponent(document.getElementsByTagName('h2')[0].innerHTML.split('&')[0].split('<')[0].replace(/\`/g,'').replace(/^Events\ in\ /g, 'Events in Month ').substring(0)) + '&body=' + encodeURIComponent(document.URL.split('?')[0].split('#')[0] + '#bih=' + encodeURIComponent(bihbig)); //encodeURIComponent(document.URL.split('#')[0] + '<h2' + document.body.innerHTML.split('<h2')[1]));
//} else {
var newurl=document.URL.split('?')[0].split('#')[0] + '?seq=' + cfindings + '&across=' + numlettersacross + '&down=' + numlettersdown + '&fontpixels=' + fontpixels + '&wordlenmin=' + minwordlength + '&wordlenmax=' + maxwordlength + '&table=' + tabularize + '#' + encodeURIComponent(jhis.replace(/\<br\>/g,''));
if (!oops && tabularize == 'Null' && !document.getElementById('tablemy')) {
zfrom=encodeURIComponent('Highlighting');
zto=encodeURIComponent('Click Start/End');
newurl=document.URL.split('?')[0].split('#')[0] + '?seq=' + cfindings + '&across=' + numlettersacross + '&down=' + numlettersdown + '&fontpixels=' + fontpixels + '&wordlenmin=' + minwordlength + '&wordlenmax=' + maxwordlength + '&table=y#' + encodeURIComponent(jhis.replace(/\<br\>/g,''));
}
if (sparewes) {
azx.href = 'mailto:' + inidea + '?subject=' + encodeURIComponent(sparewes.document.getElementsByTagName('h1')[0].innerText).replace(zfrom,zto) + '&body=' + encodeURIComponent(newurl); //encodeURIComponent(document.URL.split('#')[0] + '<h2' + sparewes.document.body.innerHTML.split('<h2')[1]));
} else {
azx.href = 'mailto:' + inidea + '?subject=' + encodeURIComponent(document.getElementsByTagName('h1')[0].innerText).replace(zfrom,zto) + '&body=' + encodeURIComponent(newurl); //encodeURIComponent(document.URL.split('#')[0] + '<h2' + document.body.innerHTML.split('<h2')[1]));
}
//}
azx.click();
if (!oops && tabularize == 'Null' && !document.getElementById('tablemy')) {
location.href=newurl;
}
if (!updatehowlong) {
updatehowlong=true;
setInterval(upscore, 5000);
}
return '';
}
function dosms() {
if (('' + window.localStorage.getItem('findwordcollaboratoremailee')).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
defemail=window.localStorage.getItem('findwordcollaboratoremailee');
}
if (('' + window.localStorage.getItem('findwordcollaboratorsmsno')).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
defsms=window.localStorage.removeItem('findwordcollaboratorsmsno');
}
//alert('' + eval('' + ('sms:' + snum + '&body=' + encodeURIComponent(document.URL.split('?')[0].split('#')[0] + '#bih=' + encodeURIComponent(parent.hfanalyze()))).length));
if (1 == 1 || eval('' + ('sms:' + snum + '&body=' + encodeURIComponent(document.URL.split('?')[0].split('#')[0] + '?mode=' + encodeURIComponent(mode.trim()) + '&across=' + numlettersacross + '&down=' + numlettersdown + '&fontpixels=' + fontpixels + '&wordlenmin=' + minwordlength + '&wordlenmax=' + maxwordlength + '&table=' + tabularize + '#' + encodeURIComponent(jhis.replace(/\<br\>/g,'')))).length) >= 18000) {
snum=('' + prompt('Please enter SMS number to send to. We suspect message is too long for an SMS and if you enter an email address here instead, we will try to send an email instead. Append space(s) to remember, whatever you enter, for next time.', snum)).replace(/^null/g, (defemail.indexOf('@') != -1 ? defemail : (defsms != '' ? defsms : '')) );
} else {
snum=('' + prompt('Please enter SMS number to send to. Append space(s) to remember for next time.', snum)).replace(/^null/g, (defsms != '' ? defsms : (defemail.indexOf('@') != -1 ? defemail : '')));
}
if (snum == null) { snum=''; }
if (snum.indexOf('@') != -1) {
if (snum.trim() != snum) {
snum=snum.trim();
if (('' + window.localStorage.getItem('findwordcollaboratoremailee')).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
window.localStorage.removeItem('findwordcollaboratoremailee');
}
window.localStorage.setItem('findwordcollaboratoremailee', snum);
defemail=snum;
}
return doemail(snum);
} else if (snum.trim() != '' && snum.trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'').trim() == '') {
//alert('Snum=' + snum + '?');
if (snum.trim() != snum) {
snum=snum.trim();
if (('' + window.localStorage.getItem('findwordcollaboratorsmsno')).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
window.localStorage.removeItem('findwordcollaboratorsmsno');
}
window.localStorage.setItem('findwordcollaboratorsmsno', snum);
defsms=snum;
}
var azx=top.document.getElementById('xas' + 'ms');
if (azx == null) { azx=top.document.createElement("a"); }
//if (1 == 1) {
// document.getElementById('divas').appendChild(azx);
//} else {
top.document.body.appendChild(azx);
// }
azx.id = 'xas' + 'ms';
azx.target = "_top";
azx.style = "display: none";
var newurl=document.URL.split('?')[0].split('#')[0] + '?mode=' + encodeURIComponent(mode.trim()) + '&across=' + numlettersacross + '&down=' + numlettersdown + '&fontpixels=' + fontpixels + '&wordlenmin=' + minwordlength + '&wordlenmax=' + maxwordlength + '&table=' + tabularize + '#' + encodeURIComponent(jhis.replace(/\<br\>/g,''));
if (!oops && tabularize == 'Null' && !document.getElementById('tablemy')) {
newurl=document.URL.split('?')[0].split('#')[0] + '?mode=' + encodeURIComponent(mode.trim()) + '&across=' + numlettersacross + '&down=' + numlettersdown + '&fontpixels=' + fontpixels + '&wordlenmin=' + minwordlength + '&wordlenmax=' + maxwordlength + '&table=y#' + encodeURIComponent(jhis.replace(/\<br\>/g,''));
}
azx.href = 'sms:' + snum + '&body=' + encodeURIComponent(newurl.replace('#','&').replace('?','#')); //encodeURIComponent(document.URL.split('#')[0] + '<h2' + document.body.innerHTML.split('<h2')[1]));
azx.click();
if (!oops && tabularize == 'Null' && !document.getElementById('tablemy')) {
location.href=newurl;
}
if (!updatehowlong) {
updatehowlong=true;
setInterval(upscore, 5000);
}
}
return '';
}
function emailaskit() {
if (defemail == defemail.trim()) {
defemail=defemail.trim() + ' ';
var emailm=prompt('Enter default email address.', defemail.trim());
if (emailm == null) { emailm=''; }
if (emailm.trim() != '' && emailm.trim().indexOf('@') != -1) {
defemail=emailm.trim() + ' ';
if (('' + window.localStorage.getItem('findwordcollaboratoremailee')).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
defemail=window.localStorage.removeItem('findwordcollaboratoremailee');
}
window.localStorage.setItem('findwordcollaboratoremailee', emailm.trim());
}
}
defemail=defemail.trim() + ' ';
}
function smsaskit() {
if (defsms == defsms.trim()) {
defsms=defsms.trim() + ' ';
var smsm=prompt('Enter default SMS number.', defsms.trim());
if (smsm == null) { smsm=''; }
if (smsm.trim() != '' && smsm.trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'').trim() == '') {
defsms=smsm.trim() + ' ';
if (('' + window.localStorage.getItem('findwordcollaboratorsmsno')).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
window.localStorage.removeItem('findwordcollaboratorsmsno');
}
window.localStorage.setItem('findwordcollaboratorsmsno', smsm.trim());
}
}
defsms=defsms.trim() + ' ';
}
function lemode(insg) {
if (insg.indexOf(' numbers ') != -1) {
if (mode.replace('Numbers','') != '') {
return insg.replace(' numbers ', ' ' + mode.toLowerCase() + ' ');
}
} else if (insg.indexOf(' word ') != -1) {
if (mode.replace('Numbers','') != '') {
return insg.replace(' word ', ' ' + (mode.replace(/s$/g,'')).toLowerCase() + ' ');
}
} else if (mode == 'Names') {
return insg.substring(0,1).toUpperCase() + insg.substring(1).toLowerCase();
}
return insg;
}
function modesel(osel, ospanid) {
mode=osel.value;
document.getElementById(ospanid).innerHTML=(osel.value.trim() == '' ? 'Numbers' : osel.value.replace('Connectives', '<br> Connectives'));
}
function modeize(ospan) {
if (1 == 4) {
var ihis=ospan.innerHTML.replace('<br> ',''), huhi=1;
var chcs=['', 'Names','Connectives'];
var rest='';
for (var ijk=0; ijk<chcs.length; ijk++) {
if (ihis.replace('Numbers','') != chcs[ijk]) {
rest+='<option value="' + chcs[ijk].replace('Numbers','') + ('">' + chcs[ijk] + '<').replace('"><', '">Numbers<') + '/option>';
huhi++;
}
}
if (ihis.indexOf('<') == -1) {
ospan.innerHTML='<select size=' + huhi + ' onclick="event.stopPropagation();" onchange="modesel(this,' + "'" + ospan.id + "'" + ');"><option value="' + ihis.replace('Numbers','') + ('">' + ihis + '<').replace('"><', '">Numbers<') + '/option>' + rest + '</select>';
}
}
}
function jfleshout(md) {
var lcis='';
if (mode.trim() != '') {
if (mode.trim() == 'Names') {
if (md.indexOf('&') != -1) {
lcis=md.split('iswordthere=')[1].substring(0,1);
return md.replace('iswordthere=' + lcis, 'iswordthere=' + lcis.toUpperCase());
} else {
return '&firstname=' + encodeURIComponent(md.trim().substring(0,1).toUpperCase() + md.trim().substring(1).toLowerCase());
}
} else if (md.trim() == 'Connectives' && md.indexOf('&') == -1) {
return '&littlewords=' + encodeURIComponent(md.trim());
} else if (md.indexOf('&') != -1) {
return md;
}
} else if (md.indexOf('&') != -1) {
return md;
}
return '';
}
function fleshout(md) {
if (md.trim() != '') {
return '&mode=' + encodeURIComponent(md);
}
return md.trim();
}
function orflag(thiscc) {
var lri='ABCDEFGHIJKLMNOPQRSTUVWXYZ';
var dri=['127462','127463','127464','127465','127466','127467','127468','127469','127470','127471','127472','127473','127474','127475','127476','127477','127478','127479','127480','127481','127482','127483','127484','127485','127486','127487'];
var ccsuff='', ccchar=' ', cde='';
for (var iccsuff=0; iccsuff<thiscc.length; iccsuff++) {
ccchar=thiscc.substring(iccsuff, eval(1 + eval('' + iccsuff))).toUpperCase();
ccsuff+=String.fromCodePoint(dri[eval('' + lri.indexOf(ccchar))]); //'&#' + dri[eval('' + lri.indexOf(ccchar))] + ';';
cde='.';
}
return ccsuff;
}
function tailor() {
var argscanbe=prompt('Optionally change argument string presented (including blank out for none) in a refreshed Find the Number game. Mode can be clues or Clues (for harder clues) or nothing. Cancel stays with the game you are playing.', '?mode=&across=' + numlettersacross + '&down=' + numlettersdown + '&fontpixels=' + fontpixels + '&wordlenmin=' + minwordlength + '&wordlenmax=' + maxwordlength + '&table=' + tabularize);
if (argscanbe != null) {
location.href=document.URL.split('?')[0].split('#')[0] + argscanbe;
}
}
function changedNumber(gthis) {
var iii=0;
if ((gthis.indexOf(lemode(twowordstocheck[curri].toLowerCase())) == 0 || gthis.indexOf('<p>' + lemode(twowordstocheck[curri].toLowerCase()) + '</p>') != -1) && twowordstocheck[curri].trim() != '' && gthis.trim() != '') {
tworesults[curri]=twowordstocheck[curri];
score+=eval('' + twowordstocheck[curri].length);
document.getElementById('score').innerHTML=' Score: ' + score + '/' + goes;
document.getElementById('results').style.backgroundColor='orange';
document.getElementById('results').innerHTML+=lemode(' Well done <br> ... found number ' + lemode(twowordstocheck[curri].toLowerCase()) + '<br> ... worth ' + eval('' + twowordstocheck[curri].length) + '<br>');
document.title='Score: ' + score + '/' + goes;
if (eval('' + lastpinks.length) > 0) {
for (iii=0; iii<lastpinks.length; iii++) {
document.getElementById(lastpinks[iii]).style.backgroundColor=tog[curri]; //'lightgreen';
}
if (curri == 0) { tog[1]='teal'; } else { lastpinks=[]; }
}
}
if (curri == 0) {
curri++;
if (4 == 4) {
numberChanged(findings[jthisq]);
} else {
rhzx = new XMLHttpRequest();
rhzx.onreadystatechange=stateChanged;
rhzx.open('get',jfleshout('/PHP/surprise.php?iswordthere=' + twowordstocheck[curri].toLowerCase() + fleshout(mode) + '&youllneverfindthis=y'),true);
rhzx.send(null);
}
} else {
document.getElementById('score').innerHTML=' Score: ' + score + '/' + goes;
if (document.getElementById('tablemy')) {
document.getElementById('tablemy').style.cursor='pointer';
} else {
document.getElementById('myta').style.cursor='pointer';
}
document.getElementById('results').style.backgroundColor='orange';
document.getElementById('results').innerHTML+='<br><br> Ready for your next try!';
document.getElementById('myta').value=firstval; //document.getElementById('myta').value.toUpperCase();
document.getElementById('doverlay').innerHTML='';
document.getElementById('myta').style.opacity='1.0';
if (!document.getElementById('tablemy')) {
thisq++;
jthisq=thisq;
if (eval(1 + thisq) < eval('' + findings.length)) {
document.getElementById('clue').innerHTML=defval(' Find number ' + findings[thisq] + '<br>');
} else {
thisq=0;
document.getElementById('clue').innerHTML=defval(' Find number ' + findings[thisq] + '<br>');
}
document.getElementById('myta').style.visibility='visible';
document.getElementById('myta').style.backgroundColor='white';
}
if (eval('' + lastpinks.length) > 0 && tog[1] == 'olive') {
for (iii=0; iii<lastpinks.length; iii++) {
document.getElementById(lastpinks[iii]).style.backgroundColor='yellow';
}
lastpinks=[];
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (!document.getElementById('tablemy')) { clickthere=false; }
if (document.getElementById('mybut')) { document.getElementById('mybut').style.display='none'; }
}
lastsel='';
ish=false;
isd=false;
isg0=false;
isg1=false;
rstart=-1;
rend=-1;
ovcont='';
lastpinks=[];
tog[1]='olive';
}
}
function changedState() {
var iii=0;
if (rhzx.readyState == 4) {
if (rhzx.status == 200) {
//alert(rhzx.response);
//document.getElementById('results').innerHTML+=rhzx.response.replace(/\</g, '<').replace(/\>/g, '>') + ' ... <p>' + twowordstocheck[curri] + '</p>';
if ((rhzx.response.indexOf(lemode(twowordstocheck[curri].toLowerCase())) == 0 || rhzx.response.indexOf('<p>' + lemode(twowordstocheck[curri].toLowerCase()) + '</p>') != -1) && twowordstocheck[curri].trim() != '' && rhzx.response.trim() != '') {
tworesults[curri]=twowordstocheck[curri];
score+=eval('' + twowordstocheck[curri].length);
document.getElementById('score').innerHTML=' Score: ' + score + '/' + goes;
document.getElementById('results').style.backgroundColor='orange';
document.getElementById('results').innerHTML+=lemode(' Well done ' + gthis + 'VS' + twowordstocheck[curri] + '<br> ... found number ' + lemode(twowordstocheck[curri].toLowerCase()) + '<br> ... worth ' + eval('' + twowordstocheck[curri].length) + '<br>');
document.title='Score: ' + score + '/' + goes;
if (eval('' + lastpinks.length) > 0) {
for (iii=0; iii<lastpinks.length; iii++) {
document.getElementById(lastpinks[iii]).style.backgroundColor=tog[curri]; //'lightgreen';
}
if (curri == 0) { tog[1]='teal'; } else { lastpinks=[]; }
}
}
if (curri == 0) {
curri++;
if (4 == 4) {
numberChanged(findings[jthisq]);
} else {
rhzx = new XMLHttpRequest();
rhzx.onreadystatechange=stateChanged;
rhzx.open('get',jfleshout('/PHP/surprise.php?iswordthere=' + twowordstocheck[curri].toLowerCase() + fleshout(mode) + '&youllneverfindthis=y'),true);
rhzx.send(null);
}
} else {
document.getElementById('score').innerHTML=' Score: ' + score + '/' + goes;
if (document.getElementById('tablemy')) {
document.getElementById('tablemy').style.cursor='pointer';
} else {
document.getElementById('myta').style.cursor='pointer';
}
document.getElementById('results').style.backgroundColor='orange';
document.getElementById('results').innerHTML+='<br><br> Ready for your next try!';
document.getElementById('myta').value=firstval; //document.getElementById('myta').value.toUpperCase();
document.getElementById('doverlay').innerHTML='';
document.getElementById('myta').style.opacity='1.0';
if (!document.getElementById('tablemy')) {
document.getElementById('myta').style.visibility='visible';
document.getElementById('myta').style.backgroundColor='white';
}
if (eval('' + lastpinks.length) > 0 && tog[1] == 'olive') {
for (iii=0; iii<lastpinks.length; iii++) {
document.getElementById(lastpinks[iii]).style.backgroundColor='yellow';
}
lastpinks=[];
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (!document.getElementById('tablemy')) { clickthere=false; }
if (document.getElementById('mybut')) { document.getElementById('mybut').style.display='none'; }
}
lastsel='';
ish=false;
isd=false;
isg0=false;
isg1=false;
rstart=-1;
rend=-1;
ovcont='';
lastpinks=[];
tog[1]='olive';
}
}
}
}
function numberChanged(gthis) {
var iii=0;
//alert('gthis=' + gthis + ' vs ' + twowordstocheck[curri]);
if ((gthis.indexOf(lemode(twowordstocheck[curri].toLowerCase())) == 0 || gthis.indexOf('<p>' + lemode(twowordstocheck[curri].toLowerCase()) + '</p>') != -1) && twowordstocheck[curri].trim() != '' && gthis.trim() != '') {
tworesults[curri]=twowordstocheck[curri];
score+=eval('' + twowordstocheck[curri].length);
document.getElementById('score').innerHTML=' Score: ' + score + '/' + goes;
document.getElementById('results').style.backgroundColor='orange';
document.getElementById('results').innerHTML+=lemode(' Well done<br> ... found number ' + lemode(twowordstocheck[curri].toLowerCase()) + '<br> ... worth ' + eval('' + twowordstocheck[curri].length) + '<br>');
if (eval('' + lastpinks.length) > 0) {
for (iii=0; iii<lastpinks.length; iii++) {
document.getElementById(lastpinks[iii]).style.backgroundColor=tog[curri]; //'lightgreen';
}
if (curri == 0) { tog[1]='teal'; } else { lastpinks=[]; }
}
}
if (curri == 0) {
curri++;
if (4 == 4) {
changedNumber(findings[jthisq]);
} else {
rhzx = new XMLHttpRequest();
rhzx.onreadystatechange=changedState;
rhzx.open('get',jfleshout('/PHP/surprise.php?iswordthere=' + twowordstocheck[curri].toLowerCase() + jfleshout(twowordstocheck[curri].toLowerCase()) + '&youllneverfindthis=y'),true);
rhzx.send(null);
}
} else {
document.getElementById('score').innerHTML=' Score: ' + score + '/' + goes;
if (document.getElementById('tablemy')) {
document.getElementById('tablemy').style.cursor='pointer';
} else {
document.getElementById('myta').style.cursor='pointer';
}
document.getElementById('results').style.backgroundColor='orange';
document.getElementById('results').innerHTML+='<br><br> Ready for your next try!';
document.getElementById('myta').value=firstval; //document.getElementById('myta').value.toUpperCase();
document.getElementById('doverlay').innerHTML='';
document.getElementById('myta').style.opacity='1.0';
document.getElementById('myta').style.visibility='visible';
document.getElementById('myta').style.backgroundColor='white';
if (!document.getElementById('tablemy')) {
thisq++;
jthisq=thisq;
if (eval(1 + thisq) < eval('' + findings.length)) {
document.getElementById('clue').innerHTML=defval(' Find number ' + findings[thisq] + '<br>');
} else {
thisq=0;
document.getElementById('clue').innerHTML=defval(' Find number ' + findings[thisq] + '<br>');
}
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (!document.getElementById('tablemy')) { clickthere=false; }
if (document.getElementById('mybut')) { document.getElementById('mybut').style.display='none'; }
}
if (eval('' + lastpinks.length) > 0 && tog[1] == 'olive') {
for (iii=0; iii<lastpinks.length; iii++) {
document.getElementById(lastpinks[iii]).style.backgroundColor='yellow';
}
lastpinks=[];
}
ish=false;
isd=false;
isg0=false;
isg1=false;
rend=-1;
rstart=-1;
lastsel='';
ovcont='';
lastpinks=[];
tog[1]='teal';
}
}
function stateChanged() {
var iii=0;
if (xzhr.readyState == 4) {
if (xzhr.status == 200) {
//alert(xzhr.response);
//document.getElementById('results').innerHTML+=xzhr.response.replace(/\</g, '<').replace(/\>/g, '>') + ' ... <p>' + twowordstocheck[curri] + '</p>';
if ((xzhr.response.indexOf(lemode(twowordstocheck[curri].toLowerCase())) == 0 || xzhr.response.indexOf('<p>' + lemode(twowordstocheck[curri].toLowerCase()) + '</p>') != -1) && twowordstocheck[curri].trim() != '' && xzhr.response.trim() != '') {
tworesults[curri]=twowordstocheck[curri];
score+=eval('' + twowordstocheck[curri].length);
document.getElementById('score').innerHTML=' Score: ' + score + '/' + goes;
document.getElementById('results').style.backgroundColor='orange';
document.getElementById('results').innerHTML+=lemode(' Well done ' + gthis + 'Vs' + twowordstocheck[curri] + '<br> ... found number ' + lemode(twowordstocheck[curri].toLowerCase()) + '<br> ... worth ' + eval('' + twowordstocheck[curri].length) + '<br>');
if (eval('' + lastpinks.length) > 0) {
for (iii=0; iii<lastpinks.length; iii++) {
document.getElementById(lastpinks[iii]).style.backgroundColor=tog[curri]; //'lightgreen';
}
if (curri == 0) { tog[1]='teal'; } else { lastpinks=[]; }
}
}
if (curri == 0) {
curri++;
if (4 == 4) {
changedNumber(findings[jthisq]);
} else {
rhzx = new XMLHttpRequest();
rhzx.onreadystatechange=changedState;
rhzx.open('get',jfleshout('/PHP/surprise.php?iswordthere=' + twowordstocheck[curri].toLowerCase() + jfleshout(twowordstocheck[curri].toLowerCase()) + '&youllneverfindthis=y'),true);
rhzx.send(null);
}
} else {
document.getElementById('score').innerHTML=' Score: ' + score + '/' + goes;
if (document.getElementById('tablemy')) {
document.getElementById('tablemy').style.cursor='pointer';
} else {
document.getElementById('myta').style.cursor='pointer';
}
document.getElementById('results').style.backgroundColor='orange';
document.getElementById('results').innerHTML+='<br><br> Ready for your next try!';
document.getElementById('myta').value=firstval; //document.getElementById('myta').value.toUpperCase();
document.getElementById('doverlay').innerHTML='';
document.getElementById('myta').style.opacity='1.0';
document.getElementById('myta').style.visibility='visible';
document.getElementById('myta').style.backgroundColor='white';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (!document.getElementById('tablemy')) { clickthere=false; }
if (document.getElementById('mybut')) { document.getElementById('mybut').style.display='none'; }
}
if (eval('' + lastpinks.length) > 0 && tog[1] == 'olive') {
for (iii=0; iii<lastpinks.length; iii++) {
document.getElementById(lastpinks[iii]).style.backgroundColor='yellow';
}
lastpinks=[];
}
ish=false;
isd=false;
isg0=false;
isg1=false;
rend=-1;
rstart=-1;
lastsel='';
ovcont='';
lastpinks=[];
tog[1]='teal';
}
}
}
}
function upscore() {
seconddate=new Date();
timesecs=Math.round(Math.abs(seconddate.getTime() - firstdate.getTime()) / 1000);
if (document.getElementById('score').innerHTML.indexOf(' (') == -1) {
document.getElementById('score').innerHTML+=' (' + timesecs + ' secs)';
} else {
document.getElementById('score').innerHTML=document.getElementById('score').innerHTML.split(' (')[0] + ' (' + timesecs + ' secs)';
}
}
function pickletters() {
var fillin=(eval('' + findings.length) == 0 ? true : false);
var valis='', randval=eval(Math.floor(Math.random() * 10) % 10), ihis='', lvalis='', lci=0, lkj=0, pl='';
var lcsub=('' + location.hash).replace(/^null/g,'').replace(/^undefined/g,'').replace(/^\#/g,'&');
if (lcsub .indexOf('&') != -1) {
lcsub=lcsub.split('&')[eval(-1 + lcsub.split('&').length)]
}
if (eval('' + lcsub.length) == eval(numlettersdown * numlettersacross)) {
updatehowlong=true;
setInterval(upscore, 5000);
randval=eval(eval('' + lcsub.substring(lci).substring(0,1).charCodeAt(0)) - eval('' + eval(('0').charCodeAt(0))));
lci++;
}
for (var ir=1; ir<=numlettersdown; ir++) {
lvalis='';
for (var ic=1; ic<=numlettersacross; ic++) {
valis+=String.fromCharCode(eval(randval + '0'.charCodeAt(0)));
lvalis+=String.fromCharCode(eval(randval + '0'.charCodeAt(0)));
if (eval(linesarr.length) < ir) {
linesarr.push(valis.slice(-1));
} else {
linesarr[eval(-1 + ir)]+=valis.slice(-1);
}
if (eval(colsarr.length) < ic) {
colsarr.push(valis.slice(-1));
} else {
colsarr[eval(-1 + ic)]+=valis.slice(-1);
}
ihis+=String.fromCharCode(eval(randval + '0'.charCodeAt(0)));
randval=eval(Math.floor(Math.random() * 10) % 10);
if (eval('' + lcsub.length) == eval(numlettersdown * numlettersacross)) {
randval=eval(eval('' + lcsub.substring(lci).substring(0,1).charCodeAt(0)) - eval('' + eval(('0').charCodeAt(0))));
lci++;
}
}
if (fillin) {
pl='000';
while (alreadydone.indexOf(';' + pl + ';') != -1 || alreadydone.indexOf(';' + pl.split('').reverse().join('') + ';') != -1) {
lkj=Math.floor(Math.random() * eval(-findlen + lvalis.length));
pl=lvalis.substring(lkj).substring(0,findlen);
if (pl.substring(0,1) == '0') { pl='000'; }
}
if (lvalis.substring(lkj).substring(0,1) != '0') {
alreadydone+=pl + ';' + pl.split('').reverse().join('') + ';';
findings.push(lvalis.substring(lkj).substring(0,findlen));
if (cfindings != '') { cfindings+='+'; }
cfindings+=lvalis.substring(lkj).substring(0,findlen);
}
if (eval(Math.floor(Math.random() * 198786754) % 2) == 1) {
findings.sort();
} else {
findings.sort();
}
cfindings='';
for (lkj=0; lkj<findings.length; lkj++) {
if (cfindings != '') { cfindings+='+'; }
cfindings+=findings[lkj];
}
}
origcomplines.push(lvalis);
lvalis='';
if (ir < 50) {
valis+=String.fromCharCode(10);
ihis+='<br>';
}
}
jhis=ihis;
//alert(valis);
document.getElementById('myta').value=valis;
eol=document.getElementById('myta').value.substring(numlettersacross).split('0')[0].split('1')[0].split('2')[0].split('3')[0].split('4')[0].split('5')[0].split('6')[0].split('7')[0].split('8')[0].split('9')[0];
oureol=eol;
var lris='0123456789'.split('');
for (var ii=0; ii<lris.length; ii++) {
letteremojis.push((lris[ii]));
blankemojis.push(' '); // ' ';
loweremojis.push(lris[ii]); // ' ';
upperemojis.push(lris[ii]); // ' ';
}
firstval=document.getElementById('myta').value;
document.getElementById('mya').href=document.URL.split('#')[0];
if ((tabularize + 'n').toLowerCase().substring(0,1) == 'y' || (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && tabularize == 'Null')) {
document.getElementById('myh1').innerHTML=document.getElementById('myh1').innerHTML.replace('Highlighting', 'Click Start/End')
var rectta=document.getElementById('myta').getBoundingClientRect();
var trline='', ninis=0, icis=0, jicis=0, lettersare=[], tableouter=document.getElementsByTagName('textarea')[0].outerHTML.replace(' style="', ' style="position:absolute;z-index:92;opacity:1.0;background-color:rgba(0,255,0,0.6);top:0px;left:0px;margin:0 0 0 0;padding:0 0 0 0;').replace('myta', 'tablemy').replace(/textarea/g,'table');
for (icis=0; icis<origcomplines.length; icis++) {
lettersare=origcomplines[icis].split('');
trline='<tr></tr>';
for (jicis=0; jicis<lettersare.length; jicis++) {
trline=trline.replace('</tr>', '<td id=td' + ninis + ' onclick=tdanalyze(this);>' + lettersare[jicis] + '</td></tr>');
ninis++;
}
for (jicis=0; jicis<eol.length; jicis++) {
ninis++;
}
tableouter=tableouter.replace('</table>', trline + '</table>');
}
document.body.style.backgroundColor='white';
document.getElementById('myta').style.visibility='hidden';
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('tdright').style.textAlign='right';
}
document.getElementById('dtable').innerHTML=tableouter;
if (document.getElementById('mybut')) { document.getElementById('mybut').style.display='none'; }
tableih=document.getElementById('dtable').innerHTML;
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (!document.getElementById('tablemy')) { ioff=10000; }
if (!document.getElementById('tablemy')) { clickthere=false; }
}
if (eval(1 + thisq) < eval('' + findings.length)) {
document.getElementById('clue').innerHTML=defval(' Find number ' + findings[thisq] + '<br>');
}
}
function tdanalyze(tdo) {
var ridea=-1, lastlet='';
//alert('here at click no ' + eval(1 + tdclickno) + ' of 2');
if (tdclickno == 0) { rstart=eval(('' + tdo.id).replace('td','')); if (tdo.outerHTML.indexOf('pink') == -1) { lastpinks.push(tdo.id); } tdo.style.backgroundColor='pink'; } else { ridea=eval(('' + tdo.id).replace('td','')); if (ridea > rstart) { rend=ridea; } else { rend=rstart; rstart=ridea; } if (tdo.outerHTML.indexOf('pink') == -1) { lastpinks.push(tdo.id); } tdo.style.backgroundColor='pink'; }
tdclickno++;
if (tdclickno == 2 && rend > rstart) {
thesel='';
for (ridea=rstart; ridea<=rend; ridea++) {
if (document.getElementById('td' + ridea)) {
lastlet=document.getElementById('td' + ridea).innerHTML;
thesel+=lastlet;
} else if (lastlet != eol) {
lastlet=eol;
thesel+=lastlet;
}
}
// thesel=blah;
// rstart=blah;
// rend=blah;
//alert(thesel);
hansel();
//alert(thesel);
changedNumber(thesel);
if (document.getElementById('tablemy')) {
thisq++;
jthisq=thisq;
if (eval(1 + thisq) < eval('' + findings.length)) {
document.getElementById('clue').innerHTML=defval(' Find number ' + findings[thisq] + '<br>');
} else {
thisq=0;
document.getElementById('clue').innerHTML=defval(' Find number ' + findings[thisq] + '<br>');
}
}
tdclickno=0;
}
}
function togglelem(insg) {
var outsg='';
var inarr=insg.split('');
for (var jin=0; jin<insg.length; jin++) {
if (insg.substring(jin).substring(0,1) == insg.substring(jin).substring(0,1).toLowerCase() && insg.substring(jin).substring(0,1) != insg.substring(jin).substring(0,1).toUpperCase()) {
outsg+=insg.substring(jin).substring(0,1).toUpperCase();
} else if (insg.substring(jin).substring(0,1) != insg.substring(jin).substring(0,1).toLowerCase() && insg.substring(jin).substring(0,1) == insg.substring(jin).substring(0,1).toUpperCase()) {
outsg+=insg.substring(jin).substring(0,1).toLowerCase();
} else {
outsg+=insg.substring(jin).substring(0,1)
}
}
return outsg;
}
function ovlem(insg) {
ovcont=insg.replace(/A/g, blankemojis[0]).replace(/B/g, blankemojis[1]).replace(/C/g, blankemojis[2]).replace(/D/g, blankemojis[3]).replace(/E/g, blankemojis[4]).replace(/F/g, blankemojis[5]).replace(/G/g, blankemojis[6]).replace(/H/g, blankemojis[7]).replace(/I/g, blankemojis[8]).replace(/J/g, blankemojis[9]).replace(/K/g, blankemojis[10]).replace(/L/g, blankemojis[11]).replace(/M/g, blankemojis[12]).replace(/N/g, blankemojis[13]).replace(/O/g, blankemojis[14]).replace(/P/g, blankemojis[15]).replace(/Q/g, blankemojis[16]).replace(/R/g, blankemojis[17]).replace(/S/g, blankemojis[18]).replace(/T/g, blankemojis[19]).replace(/U/g, blankemojis[20]).replace(/V/g, blankemojis[21]).replace(/W/g, blankemojis[22]).replace(/X/g, blankemojis[23]).replace(/Y/g, blankemojis[24]).replace(/Z/g, blankemojis[25]);
if (ovcont.trim() != '') {
if (2 == 22) {
document.getElementById('myta').value=ovcont;
//alert('ovcont=' + ovcont);
return ovcont;
} else {
document.getElementById('doverlay').innerHTML=document.getElementsByTagName('textarea')[0].outerHTML.replace(' style="', ' style="position:absolute;z-index:90;opacity:0.3;background-color:rgba(0,255,0,0.6);top:0px;left:0px;margin:0 0 0 0;padding:0 0 0 0;').replace('myta', 'tamy');
document.getElementById('myta').style.visibility='hidden';
document.getElementById('myta').style.opacity='0.1';
document.getElementById('tamy').value=ovcont;
//alert(decodeURIComponent(document.getElementById('myta').getAttribute('data-alt')));
return decodeURIComponent(document.getElementById('myta').getAttribute('data-alt')).replace(/a/g, blankemojis[0]).replace(/b/g, blankemojis[1]).replace(/c/g, blankemojis[2]).replace(/d/g, blankemojis[3]).replace(/e/g, blankemojis[4]).replace(/f/g, blankemojis[5]).replace(/g/g, blankemojis[6]).replace(/h/g, blankemojis[7]).replace(/i/g, blankemojis[8]).replace(/j/g, blankemojis[9]).replace(/k/g, blankemojis[10]).replace(/l/g, blankemojis[11]).replace(/m/g, blankemojis[12]).replace(/n/g, blankemojis[13]).replace(/o/g, blankemojis[14]).replace(/p/g, blankemojis[15]).replace(/q/g, blankemojis[16]).replace(/r/g, blankemojis[17]).replace(/s/g, blankemojis[18]).replace(/t/g, blankemojis[19]).replace(/u/g, blankemojis[20]).replace(/v/g, blankemojis[21]).replace(/w/g, blankemojis[22]).replace(/x/g, blankemojis[23]).replace(/y/g, blankemojis[24]).replace(/z/g, blankemojis[25]);
}
}
return insg;
}
function newhlem(insg) {
return insg.replace(/a/g, letteremojis[0]).replace(/b/g, letteremojis[1]).replace(/c/g, letteremojis[2]).replace(/d/g, letteremojis[3]).replace(/e/g, letteremojis[4]).replace(/f/g, letteremojis[5]).replace(/g/g, letteremojis[6]).replace(/h/g, letteremojis[7]).replace(/i/g, letteremojis[8]).replace(/j/g, letteremojis[9]).replace(/k/g, letteremojis[10]).replace(/l/g, letteremojis[11]).replace(/m/g, letteremojis[12]).replace(/n/g, letteremojis[13]).replace(/o/g, letteremojis[14]).replace(/p/g, letteremojis[15]).replace(/q/g, letteremojis[16]).replace(/r/g, letteremojis[17]).replace(/s/g, letteremojis[18]).replace(/t/g, letteremojis[19]).replace(/u/g, letteremojis[20]).replace(/v/g, letteremojis[21]).replace(/w/g, letteremojis[22]).replace(/x/g, letteremojis[23]).replace(/y/g, letteremojis[24]).replace(/z/g, letteremojis[25]);
}
function hlem(insg) {
return insg;
}
function lem(insg) {
return insg.replace(/a/g, letteremojis[0]).replace(/b/g, letteremojis[1]).replace(/c/g, letteremojis[2]).replace(/d/g, letteremojis[3]).replace(/e/g, letteremojis[4]).replace(/f/g, letteremojis[5]).replace(/g/g, letteremojis[6]).replace(/h/g, letteremojis[7]).replace(/i/g, letteremojis[8]).replace(/j/g, letteremojis[9]).replace(/k/g, letteremojis[10]).replace(/l/g, letteremojis[11]).replace(/m/g, letteremojis[12]).replace(/n/g, letteremojis[13]).replace(/o/g, letteremojis[14]).replace(/p/g, letteremojis[15]).replace(/q/g, letteremojis[16]).replace(/r/g, letteremojis[17]).replace(/s/g, letteremojis[18]).replace(/t/g, letteremojis[19]).replace(/u/g, letteremojis[20]).replace(/v/g, letteremojis[21]).replace(/w/g, letteremojis[22]).replace(/x/g, letteremojis[23]).replace(/y/g, letteremojis[24]).replace(/z/g, letteremojis[25]);
}
function preshowthesel() {
if (showsel) {
if (rend >= 0 && rstart >= 0) {
if (!clickthere) {
setTimeout(preshowthesel, 5000);
return '';
}
if (isd || isg0 || isg1) {
if (altsel.trim() != '' && thesel != '') {
//alert('here ' + document.getElementById('myta').value.indexOf(thesel) + ' ... ' + altsel)
document.getElementById('myta').setAttribute('data-alt', encodeURIComponent(document.getElementById('myta').value.replace(thesel.substring(0,eval('' + altsel.length)), hlem(altsel))));
document.getElementById('myta').value=ovlem(document.getElementById('myta').value.replace(thesel.substring(0,eval('' + altsel.length)), lem(altsel)));
} else if (altsel.trim() != '' && lastsel != '') {
//alert('hEre ' + document.getElementById('myta').value.indexOf(lastsel) + ' ... ' + altsel)
document.getElementById('myta').setAttribute('data-alt', encodeURIComponent(document.getElementById('myta').value.replace(lastsel.substring(0,eval('' + altsel.length)), lem(altsel))));
document.getElementById('myta').value=ovlem(document.getElementById('myta').value.replace(lastsel.substring(0,eval('' + altsel.length)), lem(altsel)));
} // else {
//alert('Why? ' + thesel);
//}
} else if (ish) {
if (eval('' + rstart) > 0) {
document.getElementById('myta').setAttribute('data-alt', encodeURIComponent(document.getElementById('myta').value.substring(0,rstart).toUpperCase() + hlem(document.getElementById('myta').value.substring(rstart).substring(0, eval(eval('' + rend) - eval('' + rstart) )).toLowerCase()) + document.getElementById('myta').value.substring(rend).toUpperCase()));
document.getElementById('myta').value=togglelem(document.getElementById('myta').value.substring(0,rstart).toUpperCase() + hlem(document.getElementById('myta').value.substring(rstart).substring(0, eval(eval('' + rend) - eval('' + rstart) )).toLowerCase()) + document.getElementById('myta').value.substring(rend).toUpperCase());
} else {
document.getElementById('myta').setAttribute('data-alt', encodeURIComponent(hlem(document.getElementById('myta').value.substring(rstart).substring(0, eval(eval('' + rend) - eval('' + rstart) )).toLowerCase()) + document.getElementById('myta').value.substring(rend).toUpperCase()));
document.getElementById('myta').value=togglelem(hlem(document.getElementById('myta').value.substring(rstart).substring(0, eval(eval('' + rend) - eval('' + rstart) )).toLowerCase()) + document.getElementById('myta').value.substring(rend).toUpperCase());
}
}
}
altsel=' ';
}
}
function showthesel() {
var uwords=[], iuw=1, ils=0;
if (showsel) {
if (!clickthere) {
setTimeout(showthesel, 5000);
return '';
}
document.getElementById('results').style.backgroundColor='pink';
document.getElementById('results').innerHTML=documenttitle.replace(' numbers ', ' numbers <br> ').replace(' being checked', ' <br> being checked') + '<br><br>';
document.title='Score:' + document.getElementById('score').innerHTML.split('Score:')[1] + ' ... Find the Numbers Highlighting Game - RJM Programming - April, 2024';
if (document.getElementById('tablemy')) {
document.getElementById('tablemy').style.cursor='progress';
} else {
document.getElementById('myta').style.cursor='progress';
}
//document.getElementById('myta').setAttribute('disabled', true);
showsel=false;
if (lastsel != thesel) {
lastsel=thesel;
thesel='';
}
if (lastsel != '' && thesel == '') {
curri=0;
goes++;
xzhr = new XMLHttpRequest();
xzhr.onreadystatechange=stateChanged;
xzhr.open('get',jfleshout('/PHP/surprise.php?iswordthere=' + twowordstocheck[0].toLowerCase() + jfleshout(twowordstocheck[0].toLowerCase()) + '&youllneverfindthis=y'),true);
xzhr.send(null);
}
}
}
function hansel() {
var joff=rstart, koff=eval('' + eol.length);
lesssel=thesel;
var huheol=eol;
if (huheol == '') { huheol=String.fromCharCode(10); }
while (lesssel.indexOf(huheol) != -1) {
lesssel=lesssel.replace(huheol, '');
}
complines=(thesel + '~').replace(huheol + '~', '').replace('~','').split(huheol);
//diagl=eval('' + complines.length);
//diagl+=eval(eval(-1 + eval('' + complines.length)) * 80);
//document.title='' + eval('' + lesssel.length) + ' vs ' + eval(eval(eval(-1 + eval('' + complines.length)) * 80) + eval(2 - eval('' + complines.length)));
if (sofar.indexOf(';' + thesel + ';') != -1) {
document.title=document.title.replace('Score:','Score+'); //'Score :' + document.getElementById('score').innerHTML.split('Score:')[1] + ' ... Repeat selection ...';
} else if (sofar.indexOf(';' + thesel + ';') == -1 && eval('' + complines.length) >= minwordlength && eval('' + complines.length) <= maxwordlength && eval('' + lesssel.length) == eval(eval(eval('' + complines.length) + eval(eval(-1 + eval('' + complines.length)) * numlettersacross)))) {
// 3 goes with 163 (2x80 + 3) or 159 (2x80 - 1)
// 4 goes with 244 (3x80 + 4) or 238 (3x80 - 2)
// 5 goes with 325 (4x80 + 5) or 317 (4x80 - 3)
icols=0;
twowordstocheck=[lesssel.substring(icols).toUpperCase().substring(0,1), lesssel.substring(icols).toUpperCase().substring(0,1)];
tworesults=['',''];
//eol=complines[1].substring(numlettersacross);
xnumlettersacross=eval(eval('' + eol.length) + eval('' + numlettersacross));
altsel=thesel.substring(0,1).toLowerCase() + complines[0].substring(1).split(eol)[0] + eol;
//rstart=eval('' + range.start);
//rend=eval('' + range.end);
indxofinterest=eval(rstart % eval(1 * eval(eval('' + eol.length) + eval('' + numlettersacross))));
indxofinterest++;
oureol=eol;
for (ilines=1; ilines<eval('' + complines.length); ilines++) {
if (eval(1 + ilines) >= eval('' + complines.length)) { oureol=''; }
icols+=eval(1 + numlettersacross);
joff+=eval(1 + numlettersacross);
if (document.getElementById('td' + eval(joff + koff))) {
if (document.getElementById('td' + eval(joff + koff)).outerHTML.indexOf('pink') == -1) { lastpinks.push('td' + eval(joff + koff)); }
document.getElementById('td' + eval(joff + koff)).style.backgroundColor='pink';
koff+=eval('' + eol.length);
}
if (indxofinterest > 0) {
altsel+=complines[ilines].substring(0,indxofinterest).toUpperCase() + complines[ilines].substring(indxofinterest).substring(0,1).toLowerCase() + complines[ilines].substring(eval(1 + indxofinterest)).toUpperCase() + oureol;
} else {
altsel+=complines[ilines].substring(0,1).toLowerCase() + complines[ilines].substring(1).toUpperCase() + oureol;
}
indxofinterest++;
twowordstocheck[0]+=lesssel.substring(icols).toUpperCase().substring(0,1);
//alert('twowordstocheck_so_far=' + twowordstocheck[0] + ' ilines=' + ilines + ' rstart % xnumlettersacross+=' + eval(rstart % xnumlettersacross) + ' rstart % numlettersacross=' + eval(rstart % numlettersacross) + ' rstart=' + rstart + ' rend=' + rend + ' complines[ilines]=' + complines[ilines] + ' altsel_so_far=' + altsel);
twowordstocheck[1]=lesssel.substring(icols).toUpperCase().substring(0,1) + twowordstocheck[1];
}
altsel+=thesel.substring(rend);
//alert('twowordstocheck_so_far=' + twowordstocheck[0] + ' ilines=' + ilines + ' rstart % xnumlettersacross+=' + eval(rstart % xnumlettersacross) + ' rstart % numlettersacross=' + eval(rstart % numlettersacross) + ' rstart=' + rstart + ' rend=' + rend + ' complines[ilines]=' + complines[ilines] + ' altsel_so_far=' + altsel);
document.title=lemode('Left Diagonal numbers ' + lemode(twowordstocheck[0]) + ' and ' + lemode(twowordstocheck[1]) + ' being checked ...');
documenttitle=' ' + document.title;
document.getElementById('results').style.backgroundColor='pink';
document.getElementById('results').innerHTML=documenttitle.replace(' numbers ', ' numbers <br> ').replace(' being checked', ' <br> being checked');
document.getElementById('myta').style.backgroundColor='rgb(230,230,230)';
if (!document.getElementById('tablemy')) {
if (document.getElementById('mybut')) { document.getElementById('mybut').disabled=false; document.getElementById('mybut').style.display='block'; }
}
sofar+=thesel + ';';
//document.getElementById('myta').style.cursor='progress';
if (!showsel) { setTimeout(preshowthesel, eval(ioff + 4000)); setTimeout(showthesel, eval(ioff + 6000)); }
//rstart=eval('' + range.start);
//rend=eval('' + range.end);
isg1=true;
ish=false;
isd=false;
isg0=false;
showsel=true;
} else if (sofar.indexOf(';' + thesel + ';') == -1 && eval('' + complines.length) >= minwordlength && eval('' + complines.length) <= maxwordlength && eval('' + lesssel.length) == eval(eval(eval(-1 + eval('' + complines.length)) * numlettersacross) + eval(2 - eval('' + complines.length)))) {
// 3 goes with 163 (2x80 + 3) or 159 (2x80 - 1)
// 4 goes with 244 (3x80 + 4) or 238 (3x80 - 2)
// 5 goes with 325 (4x80 + 5) or 317 (4x80 - 3)
icols=0;
twowordstocheck=[lesssel.substring(icols).toUpperCase().substring(0,1), lesssel.substring(icols).toUpperCase().substring(0,1)];
tworesults=['',''];
sofar+=thesel + ';';
//eol=complines[1].substring(numlettersacross);
xnumlettersacross=eval(eval('' + eol.length) + eval('' + numlettersacross));
altsel=thesel.substring(0,1).toLowerCase() + complines[0].substring(1).split(eol)[0] + eol;
//rstart=eval('' + range.start);
//rend=eval('' + range.end);
indxofinterest=eval(rstart % eval(1 * eval(eval('' + eol.length) + eval('' + numlettersacross))));
indxofinterest--;
oureol=eol;
for (ilines=1; ilines<eval('' + complines.length); ilines++) {
if (eval(1 + ilines) >= eval('' + complines.length)) { oureol=''; }
icols+=eval(-1 + numlettersacross);
joff+=eval(-1 + numlettersacross);
if (document.getElementById('td' + eval(joff + koff))) {
if (document.getElementById('td' + eval(joff + koff)).outerHTML.indexOf('pink') == -1) { lastpinks.push('td' + eval(joff + koff)); }
document.getElementById('td' + eval(joff + koff)).style.backgroundColor='pink';
koff+=eval('' + eol.length);
}
if (indxofinterest > 0) {
altsel+=complines[ilines].substring(0,indxofinterest).toUpperCase() + complines[ilines].substring(indxofinterest).substring(0,1).toLowerCase() + complines[ilines].substring(eval(1 + indxofinterest)).toUpperCase() + oureol;
} else {
altsel+=complines[ilines].substring(0,1).toLowerCase() + complines[ilines].substring(1).toUpperCase() + oureol;
}
indxofinterest--;
twowordstocheck[0]+=lesssel.substring(icols).toUpperCase().substring(0,1);
//alert('Twowordstocheck_so_far=' + twowordstocheck[0] + ' ilines=' + ilines + ' rstart % xnumlettersacross+=' + eval(rstart % xnumlettersacross) + ' rstart % numlettersacross=' + eval(rstart % numlettersacross) + ' rstart=' + rstart + ' rend=' + rend + ' complines[ilines]=' + complines[ilines] + ' altsel_so_far=' + altsel);
twowordstocheck[1]=lesssel.substring(icols).toUpperCase().substring(0,1) + twowordstocheck[1];
}
altsel+=thesel.substring(rend);
document.title=lemode('Right Diagonal numbers ' + lemode(twowordstocheck[0]) + ' and ' + lemode(twowordstocheck[1]) + ' being checked ...');
documenttitle=' ' + document.title;
document.getElementById('results').style.backgroundColor='pink';
document.getElementById('results').innerHTML=documenttitle.replace(' numbers ', ' numbers <br> ').replace(' being checked', ' <br> being checked');
document.getElementById('myta').style.backgroundColor='rgb(245,245,245)';
if (!document.getElementById('tablemy')) {
if (document.getElementById('mybut')) { document.getElementById('mybut').disabled=false; document.getElementById('mybut').style.display='block'; }
}
//document.getElementById('myta').style.cursor='progress';
if (!showsel) { setTimeout(preshowthesel, eval(ioff + 4000)); setTimeout(showthesel, eval(ioff + 6000)); }
//rstart=eval('' + range.start);
//rend=eval('' + range.end);
isg0=true;
ish=false;
isd=false;
isg1=false;
showsel=true;
} else if (sofar.indexOf(';' + thesel + ';') == -1 && eval('' + complines.length) >= minwordlength && eval('' + complines.length) <= maxwordlength && eval(-1 + eval('' + lesssel.length)) == eval(eval(eval(-1 + eval('' + complines.length)) * numlettersacross) + eval(0 * eval('' + complines.length)))) {
// 6 goes with 401
// 4 goes with 241
icols=0;
twowordstocheck=[lesssel.substring(icols).toUpperCase().substring(0,1), lesssel.substring(icols).toUpperCase().substring(0,1)];
tworesults=['',''];
sofar+=thesel + ';';
//eol=complines[1].substring(numlettersacross);
xnumlettersacross=eval(eval('' + eol.length) + eval('' + numlettersacross));
altsel=thesel.substring(0,1).toLowerCase() + complines[0].substring(1).split(eol)[0] + eol;
//rstart=eval('' + range.start);
//rend=eval('' + range.end);
indxofinterest=eval(rstart % eval(1 * eval(eval('' + eol.length) + eval('' + numlettersacross))));
oureol=eol;
for (ilines=1; ilines<eval('' + complines.length); ilines++) {
icols+=numlettersacross;
joff+=numlettersacross;
if (document.getElementById('td' + eval(joff + koff))) {
if (document.getElementById('td' + eval(joff + koff)).outerHTML.indexOf('pink') == -1) { lastpinks.push('td' + eval(joff + koff)); }
document.getElementById('td' + eval(joff + koff)).style.backgroundColor='pink';
koff+=eval('' + eol.length);
}
if (eval(1 + ilines) >= eval('' + complines.length)) { oureol=''; }
if (indxofinterest > 0) {
altsel+=complines[ilines].substring(0,indxofinterest).toUpperCase() + complines[ilines].substring(indxofinterest).substring(0,1).toLowerCase() + complines[ilines].substring(eval(1 + indxofinterest)).toUpperCase() + oureol;
} else {
altsel+=complines[ilines].substring(0,1).toLowerCase() + complines[ilines].substring(1).toUpperCase() + oureol;
}
twowordstocheck[0]+=lesssel.substring(icols).toUpperCase().substring(0,1);
//alert('TWowordstocheck_so_far=' + twowordstocheck[0] + ' indxofinterest=' + indxofinterest + ' ilines=' + ilines + ' rstart % xnumlettersacross+=' + eval(rstart % xnumlettersacross) + ' rstart % numlettersacross=' + eval(rstart % numlettersacross) + ' rstart=' + rstart + ' rend=' + rend + ' complines[ilines]=' + complines[ilines] + ' altsel_so_far=' + altsel);
twowordstocheck[1]=lesssel.substring(icols).toUpperCase().substring(0,1) + twowordstocheck[1];
}
altsel+=thesel.substring(rend);
//alert('TWowordstocheck_so_far=' + twowordstocheck[0] + ' indxofinterest=' + indxofinterest + ' ilines=' + ilines + ' rstart % xnumlettersacross+=' + eval(rstart % xnumlettersacross) + ' rstart % numlettersacross=' + eval(rstart % numlettersacross) + ' rstart=' + rstart + ' rend=' + rend + ' complines[ilines]=' + complines[ilines] + ' altsel_so_far=' + altsel);
document.title=lemode('Down numbers ' + lemode(twowordstocheck[0]) + ' and ' + lemode(twowordstocheck[1]) + ' being checked ...');
documenttitle=' ' + document.title;
document.getElementById('results').style.backgroundColor='pink';
document.getElementById('results').innerHTML=documenttitle.replace(' numbers ', ' numbers <br> ').replace(' being checked', ' <br> being checked');
document.getElementById('myta').style.backgroundColor='rgb(230,230,230)';
if (!document.getElementById('tablemy')) {
if (document.getElementById('mybut')) { document.getElementById('mybut').disabled=false; document.getElementById('mybut').style.display='block'; }
}
//document.getElementById('myta').style.cursor='progress';
if (!showsel) { setTimeout(preshowthesel, eval(ioff + 4000)); setTimeout(showthesel, eval(ioff + 6000)); }
//rstart=eval('' + range.start);
//rend=eval('' + range.end);
isd=true;
ish=false;
isg1=false;
isg0=false;
showsel=true;
} else if (sofar.indexOf(';' + thesel + ';') == -1 && thesel.indexOf(String.fromCharCode(10)) == -1 && eval('' + thesel.length) >= minwordlength && eval('' + thesel.length) <= maxwordlength) {
//alert('Horizontal word ' + eval('' + thesel.length) + ' ... ' + thesel);
twowordstocheck=[lesssel.toUpperCase(), lesssel.split('').reverse().join('').toUpperCase()];
tworesults=['',''];
sofar+=thesel + ';';
document.title=lemode('Horizontal numbers ' + lemode(twowordstocheck[0]) + ' and ' + lemode(twowordstocheck[1]) + ' being checked ...');
documenttitle=' ' + document.title;
document.getElementById('results').style.backgroundColor='pink';
document.getElementById('results').innerHTML=documenttitle.replace(' numbers ', ' numbers <br> ').replace(' being checked', ' <br> being checked');
document.getElementById('myta').style.backgroundColor='rgb(230,230,230)';
if (document.getElementById('tablemy')) {
for (var iicols=rstart; iicols<=rend; iicols++) {
if (document.getElementById('td' + iicols)) {
if (document.getElementById('td' + iicols).outerHTML.indexOf('pink') == -1) { lastpinks.push('td' + iicols); }
document.getElementById('td' + iicols).style.backgroundColor='pink';
}
}
}
if (!document.getElementById('tablemy')) {
if (document.getElementById('mybut')) { document.getElementById('mybut').disabled=false; document.getElementById('mybut').style.display='block'; }
}
//document.getElementById('myta').style.cursor='progress';
if (!showsel) { setTimeout(preshowthesel, eval(ioff + 4000)); setTimeout(showthesel, eval(ioff + 6000)); }
showsel=true;
//rstart=eval('' + range.start);
//rend=eval('' + range.end);
ish=true;
isg1=false;
isd=false;
isg0=false;
} else {
document.title='Score:' + document.getElementById('score').innerHTML.split('Score:')[1] + ' ... Find the Numbers Highlighting Game - RJM Programming - April, 2024';
}
}
function handleSelection() { // thanks to https://stackoverflow.com/questions/46651479/reacting-to-selection-changes-in-an-html-textarea
const activeElement = document.activeElement;
// Make sure this is your textarea
if (activeElement && activeElement.outerHTML.indexOf('<textarea') == 0) {
const range = {
start: activeElement.selectionStart,
end: activeElement.selectionEnd
};
// Do something with your range
isvalid=true;
if (!document.getElementById('tablemy') && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
for (iiis=0; iiis<origcomplines.length; iiis++) {
if (thesel.indexOf(origcomplines[iiis]) == 0) {
isvalid=false;
}
}
}
if (isvalid && eval('' + range.end) > eval('' + range.start)) {
oops=true;
thesel=(activeElement.value.substring(range.start).substring(0, eval(eval('' + range.end) - eval('' + range.start) )));
rstart=eval('' + range.start);
rend=eval('' + range.end);
hansel();
}
}
}
document.addEventListener('selectionchange', handleSelection);
</script>
</head>
<body onload="if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { document.getElementById('mytable').style.width='100%'; } else { document.getElementById('mytable').style.width='100vw'; } pickletters();">
<table id=mytable><tr><td style='vertical-align:top;'><div id=dtable></div>
<script type=text/javascript>
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.write("<textarea title='Double click here to change across and down and font size criteria for Find the Number game. Use the Ready button after your selections to analyze your selection.' ondblclick='tailor();' style='overflow:hidden;font-size:" + fontpixels + "px;' cols=" + numlettersacross + " rows=" + numlettersdown + " id=myta></textarea>");
} else {
document.write("<textarea title='Double click here to change across and down and font size criteria for Find the Number game.' ondblclick='tailor();' style='overflow:hidden;font-size:" + fontpixels + "px;' cols=" + numlettersacross + " rows=" + numlettersdown + " id=myta></textarea>");
}
</script>
</td><td style='vertical-align:top;' id=tdright>
<script type=text/javascript>
document.write("<h1 id=myh1> Find the <br> <span id=smode onclick=modeize(this); style=text-decoration:none;cursor:pointer; title='Click for modes of data for game'>" + (mode.trim() == '' ? 'Numbers' : mode.trim()) + "</span> <br> Highlighting <br> Game</h1><br>");
</script>
<h2> Horizontally, <br> Vertically, <br> Diagonally<br> ... Reversed</h2><br><div id=clue></div><br><br>
<h3> RJM Programming <a id=mya target=_blank href='./textarea_find_numbers.html' title='New game'>-</a> <br> April, 2024 <button style=display:inline-block; title='Share via Email' id=semail onclick="doemail(defemail);">📧</button> <button style=display:inline-block; title='Share via SMS' id=ssms onclick=dosms();>📟</button></h3><br><br>
<h4 id=score> Score: 0/1</h4><br><br>
<script type=text/javascript>
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.write("<button id=mybut onclick='clickthere=true;' style='display:block;' disabled>Ready to Analyze?</button><br><br>");
}
</script>
<div id=results></div>
</td></tr></table>
<div id=doverlay></div>
</body>
</html>