<html>
<head>
<title id=myt>Clairvoyance Game - RJM Programming - May, 2026 ... </title>
<meta charset="UTF-8"/>
<style>
#tdstatus[title^='Awaiting Other '] {
border: 3px solid red;
}

#tdstatus[title^='Awaiting a '] {
border: 3px solid rgb(127,0,0);
}


#tdstatus[title^='Awaiting Guess '] {
border: 3px solid orange;
}

#tdstatus[title^='Select the '] {
border: 6px solid lightgreen;
}

#tdstatus[title^='Select a '] {
border: 6px solid green;
}

#tdstatus { padding: 5 5 5 5; }

#td1 { border-right: 1px dotted pink; }
#td2 { border-right: 1px dotted pink; }
#td3 { border-right: 1px dotted pink; }
#td4 { border-right: 1px dotted pink; }

td { vertical-align: top; }

.tdiframe { height: 220px; }

.spip { margin: 4 4 4 4; }

</style>
<script type=text/javascript>
// clairvoyance_game.html
// RJM Programming - May, 2026

var prevmto='', pcolour='black';
var documentreferrer=('' + document.referrer).replace(/^undefined/g,'').replace(/^null/g,'');
if (document.URL.replace('?one=','?itype=').indexOf('?itype=') != -1) { documentreferrer=''; } else if (window.self == window.parent) { documentreferrer=''; }

var justvalidity=false, igarr=[], kig=0, ioissrc='', imorder=[1,2,3,4,5];
var numerator='', denominator='', operator='', operators=['+','-','*','/','%'];
var pluseq=1;
var userquestions=['What year is it?'];
var useranswers=['' + new Date().getFullYear()];
var useranswersalt=[''];
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 lri='ABCDEFGHIJKLMNOPQRSTUVWXYZ';
var usereletype='';

var dataeltypes=',object,';
var valueeltypes=',input,';
var srceltypes=',iframe,audio,video,embed,';

var xtypes = ['image/tif', 'audio/x-m4r','audio/wav','audio/x-wav','audio/x-pn-realaudio','audio/x-mpegurl','audio/x-aiff','audio/mpeg','audio/mid',
'audio/basic','audio/ogg','video/x-sgi-movie','video/x-msvideo','video/quicktime','audio/mp3','video/mp4','video/mpeg',
'video/x-la-asf','video/ogg','video/webm','audio/mp4', 'image/jpeg', 'image/jpeg', 'image/png', 'image/gif', 'image/bmp',
'text/html', 'text/html', 'text/html', 'text/javascript', 'text/css', 'text/plain', 'text/xml', 'text/csv',
'application/vnd.ms-word', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/x-php', 'application/pdf', 'IMAGE/pdf',
'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.ms-powerpoint',
'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'video/mp4'];
var xexts = ['.tif','.m4r','.wav','.wav','.ram','.m3u','.aiff','.mp3','.rmi',
'.snd','.ogg','.movie','.avi','.mov','.mp3','.m4v','.mpeg',
'.lsx','.ogv','.webm','.m4a', '.jpg', '.jpeg', '.png', '.gif', '.bmp',
'.htm', '.html', '.htmls', '.js', '.css', '.txt', '.xml', '.csv',
'.doc', '.docx', '.php', '.pdf', '.pdf',
'.pptx', '.ppt',
'.xls', '.xlsx', '.mp4'];

var bonusmode=(document.URL.indexOf('bonus=') != -1 ? decodeURIComponent(document.URL.split('bonus=')[1].split('&')[0].split('#')).replace(/\+/g,' ') : '');
var defq=(document.URL.indexOf('question=') != -1 ? decodeURIComponent(document.URL.split('question=')[1].split('&')[0].split('#')).replace(/\+/g,' ') : '');
var defa=(document.URL.indexOf('answer=') != -1 ? decodeURIComponent(document.URL.split('answer=')[1].split('&')[0].split('#')).replace(/\+/g,' ') : '');
var defaalt=(document.URL.indexOf('answeralt=') != -1 ? decodeURIComponent(document.URL.split('answeralt=')[1].split('&')[0].split('#')).replace(/\+/g,' ') : '');
var bcblurb=' At any answer append + modus operandi bonus Scoring Mode as per + is Extra Maths Question ++ is Extra Your Own Question.';
if (bonusmode != '') {
if (eval('' + bonusmode.length) == 1) {
bcblurb=' Your game is set to Extra Maths Question modus operandi.';
} else {
bcblurb=' Your game is set to Extra User Question modus operandi.';
}
}
var blen=eval('' + bcblurb.length);
var invitb='';

var outofifc=true, nexttime=false, do_once=false, midway='', midwaytwo='';
var zener_cards=['/circle_yellow.jpg#circle_yellow','/cross_red.jpg#cross_red','/waves_blue.jpg#waves_blue','/square_black.jpg#square_black','/star_green.jpg#star_green'];

var theword='Clairvoyance';
var thenoun='Zener Card';
var theelem="<img style='object-fit:contain;' src=";
var thewords=['Clairvoyance', 'Fruit', 'Food', 'Animal', 'Bird', 'Carpentry', 'London', 'India', 'Australian Indigenous Language', 'Cell'];
var theelems=["<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src="];
var theihs=[">", ">", ">", ">", ">", ">", ">", ">", ">", ">"];
var thenouns=['Zener Card', 'Fruit', 'Meal', 'Creature', 'Bird', 'Framework Feature', 'Day', 'State', 'Language Area', 'Cell Part'];
var wordg=(document.URL.indexOf('wordg=') != -1 ? decodeURIComponent(document.URL.split('wordg=')[1].split('&')[0].split('#')).replace(/\+/g,' ') : '');
//alert('Wordg=' + wordg);
wordg=(document.URL.indexOf('one=') != -1 ? decodeURIComponent(document.URL.split('one=')[1].split('&')[0].split('#')).replace(/\+/g,' ') : wordg);
//alert('wordg=' + wordg);
var theiw=(document.URL.indexOf('itype=') != -1 && wordg == '' ? eval(-1 + eval('' + document.URL.split('itype=')[1].split('&')[0].split('#'))) : 0);
var sharingremembereds='';
var theiwbefore=0;
var documentURL=document.URL;


var wastw=theiw;
var ppsuff='';
var youare='';
var otheris='', delay=0, imlist=[], tds=[], squaredim=0, wourl='', randomize=false;
var score=0, goes=0;
var woois=null;
var pick=-1, awaiting=false, holdon=false;
var bihnull=true, imname='', imgelsarr=[], coordsarr=[], xaltdu='';
var anchor=null;
var initval='';
if (document.URL.indexOf('iam=%40&') != -1) { initval='Wait'; }
var lastafterscore='';
var wherewrong=false;
var sharemyscore=false, allowsdone=false;
var zcblurb=' You can enter ? to find out more about the history of Zener Cards. ';

/**
* Convert a string to HTML entities ... thanks to https://stackoverflow.com/questions/18749591/encode-html-entities-in-javascript
*/
String.prototype.toHtmlEntities = function() {
return this.replace(/./gm, function(s) {
return "&#" + s.charCodeAt(0) + ";";
});
};

var yehbut=false;
theiwbefore=eval('' + thewords.length);
if (document.URL.indexOf('mysel=') != -1) { getridof(); }
//if (document.URL.indexOf('sharels=') != -1) { setTimeout(function(){ wastw=theiw; theiw=0; fireup(); theiw=wasiw; documentURL=document.URL; reassemble(''); }, 5000); }
//lookforremembereds();

if (theiw > 0) {
zcblurb='';
document.title=document.title.replace('Clairvoyance ', thewords[theiw] + ' ');
if (thewords[theiw] == 'Food') {
theelems[theiw]='<button style=font-size:100px; title=';
theihs[theiw]='>';
zener_cards[0]+='|🍛';
zener_cards[1]+='|🍱';
zener_cards[2]+='|🍘';
zener_cards[3]+='|🍙';
zener_cards[4]+='|🍣';
} else if (thewords[theiw] == 'Fruit') { // '127825', '127825', '127818', '127827', '127821'
theelems[theiw]='<button style=font-size:100px; title=';
theihs[theiw]='>';
zener_cards[0]+='|🍉';
zener_cards[1]+='|🍑';
zener_cards[2]+='|🍊';
zener_cards[3]+='|🍓';
zener_cards[4]+='|🍍';
} else if (thewords[theiw] == 'Animal') {
theelems[theiw]='<button style=font-size:100px; title=';
theihs[theiw]='>';
zener_cards[0]+='|🐒';
zener_cards[1]+='|🦍';
zener_cards[2]+='|🦧';
zener_cards[3]+='|🐶';
zener_cards[4]+='|🐕';
} else if (thewords[theiw] == 'Bird') {
delay=8000;
randomize=true;
if (document.URL.indexOf('rjmprogramming.com.au/') != -1) {
theelems[theiw]='<img data-url="//www.rjmprogramming.com.au/HTMLCSS/bird_quiz.htm" style="object-fit:contain;" src="';
} else {
theelems[theiw]='<img data-url="/bird_quiz.htm" style="object-fit:contain;" src="';
}
theihs[theiw]='>';
zener_cards[0]+=''; // |//www.rjmprogramming.com.au/HTMLCSS/birdyquiz.jpeg#8,5,374,370';
zener_cards[1]+=''; // |//www.rjmprogramming.com.au/HTMLCSS/birdyquiz.jpeg#374,5,930,370';
zener_cards[2]+=''; // |//www.rjmprogramming.com.au/HTMLCSS/birdyquiz.jpeg#930,5,1164,370';
zener_cards[3]+=''; // |//www.rjmprogramming.com.au/HTMLCSS/birdyquiz.jpeg#1164,5,1500,370';
zener_cards[4]+=''; // |//www.rjmprogramming.com.au/HTMLCSS/birdyquiz.jpeg#5,680,374,1120';
} else if (thewords[theiw] == 'Carpentry') {
delay=8000;
randomize=true;
if (document.URL.indexOf('rjmprogramming.com.au/') != -1) {
theelems[theiw]='<img data-url="//www.rjmprogramming.com.au/HTMLCSS/floor_wall_roof_framing_members.html" style="object-fit:Cover;" src="';
} else {
theelems[theiw]='<img data-url="/HTMLCSS/floor_wall_roof_framing_members.html" style="object-fit:Cover;" src="';
}
theihs[theiw]='>';
zener_cards[0]+='';
zener_cards[1]+='';
zener_cards[2]+='';
zener_cards[3]+='';
zener_cards[4]+='';
} else if (thewords[theiw] == 'London') {
delay=8000;
if (document.URL.indexOf('rjmprogramming.com.au/') != -1) {
theelems[theiw]='<img data-url="//www.rjmprogramming.com.au/HTMLCSS/london_trip_via_map_element.html" style="object-fit:Cover;" src="';
} else {
theelems[theiw]='<img data-url="/HTMLCSS/london_trip_via_map_element.html" style="object-fit:Cover;" src="';
}
theihs[theiw]='>';
zener_cards[0]+='';
zener_cards[1]+='';
zener_cards[2]+='';
zener_cards[3]+='';
zener_cards[4]+='';
} else if (thewords[theiw] == 'India') {
delay=8000;
randomize=true;
if (document.URL.indexOf('rjmprogramming.com.au/') != -1) {
theelems[theiw]='<img data-url="//www.rjmprogramming.com.au/HTMLCSS/india_map.html" style="object-fit:Cover;" src="';
} else {
theelems[theiw]='<img data-url="/HTMLCSS/india_map.html" style="object-fit:Cover;" src="';
}
theihs[theiw]='>';
zener_cards[0]+='';
zener_cards[1]+='';
zener_cards[2]+='';
zener_cards[3]+='';
zener_cards[4]+='';
} else if (thewords[theiw] == 'Australian Indigenous Language') {
delay=8000;
randomize=true;
if (document.URL.indexOf('rjmprogramming.com.au/') != -1) {
theelems[theiw]='<img data-url="//www.rjmprogramming.com.au/HTMLCSS/ImageMap/Languages/aboriginal_language_regions.html" style="object-fit:Cover;" src="';
} else {
theelems[theiw]='<img data-url="/HTMLCSS/ImageMap/Languages/aboriginal_language_regions.html" style="object-fit:Cover;" src="';
}
theihs[theiw]='>';
zener_cards[0]+='';
zener_cards[1]+='';
zener_cards[2]+='';
zener_cards[3]+='';
zener_cards[4]+='';
} else if (thewords[theiw] == 'Cell') {
delay=8000;
randomize=true;
if (document.URL.indexOf('rjmprogramming.com.au/') != -1) {
theelems[theiw]='<img data-url="//www.rjmprogramming.com.au/HTMLCSS/the_cell.html" style="object-fit:Cover;" src="';
} else {
theelems[theiw]='<img data-url="/HTMLCSS/the_cell.html" style="object-fit:Cover;" src="';
}
theihs[theiw]='>';
zener_cards[0]+='';
zener_cards[1]+='';
zener_cards[2]+='';
zener_cards[3]+='';
zener_cards[4]+='';
}
}

if (wordg != '') {
if (thewords.indexOf(wordg) != -1) {
theiw=eval('' + thewords.indexOf(wordg));
document.title=thewords[theiw] + ' Game ' + document.title.split(' Game ')[1];
setTimeout(function(){
document.getElementById('muh1').innerHTML=document.getElementById('muh1').innerHTML.replace(document.getElementById('muh1').innerHTML.split(' Game')[0] + ' Game', thewords[theiw] + ' Game');
}, 5000);
}
}

if ((theihs[theiw] + '>').substring(0,1) == ' ') { randomize=true; } else { randomize=false; }

var sideas=['Awaiting Other Player Choosing a ' + thenouns[theiw] + ' to Guess','Select the ' + thenouns[theiw] + ' Your Player Partner Selected','Select a ' + thenouns[theiw] + ' You Are Asking Your Player Partner to Guess','Awaiting Guess from Your Player Partner','Awaiting a ' + thenouns[theiw] + ' Selection from Your Playing Partner'];

function lookforremembereds() {
var foundarr=[], ifo=0, blankis='%20';
var founds=decodeURIComponent(('' + window.localStorage.getItem('clairvoyance_incarnations')).replace(/^undefined/g,'').replace(/^null/g,'')).replace(/\;base64\,/g,';base64c').replace(/\;utf8\,/g,';utf8c');
if (founds.indexOf('+') != -1) { blankis='+'; }
if (founds.trim() != '') {
//alert(0);
//alert('founds=' + founds);
foundarr=founds.replace(/\;base64\,/g,';base64c').replace(/\;utf8\,/g,';utf8c').split('~!~');
var wasdu=documentURL;
for (ifo=0; ifo<foundarr.length; ifo++) {
foundarr[ifo]=foundarr[ifo].replace(';base64c',';base64,').replace(';utf8c',';utf8,');
if (eval('' + foundarr[ifo].split(',').length) < 5) {
//alert(foundarr[ifo]);
documentURL='?one=' + encodeURIComponent(foundarr[ifo].split('|')[0]) + '&two=' + encodeURIComponent(foundarr[ifo].split('|')[1]) + '&three=' + encodeURIComponent(foundarr[ifo].replace(foundarr[ifo].split('|')[0] + '|' + foundarr[ifo].split('|')[1] + '|','')) + '&four=&five=' + (foundarr[ifo].replace(foundarr[ifo].split('|')[0] + '|' + foundarr[ifo].split('|')[1] + '|','').slice(-1) == ' ' ? '&randomized=y' : '');
assemblyadd(foundarr[ifo],0);
} else if (foundarr[ifo].split(',')[1].substring(0,1) >= '0' && foundarr[ifo].split(',')[1].substring(0,1) <= '9') {
documentURL='?one=' + encodeURIComponent(foundarr[ifo].split('|')[0]) + '&two=' + encodeURIComponent(foundarr[ifo].split('|')[1]) + '&four=' + encodeURIComponent(foundarr[ifo].replace(foundarr[ifo].split('|')[0] + '|' + foundarr[ifo].split('|')[1] + '|','')) + '&three=&five=' + (foundarr[ifo].replace(foundarr[ifo].split('|')[0] + '|' + foundarr[ifo].split('|')[1] + '|','').slice(-1) == ' ' ? '&randomized=y' : '');
assemblyadd(foundarr[ifo],1);
} else {
//alert(2);
documentURL='?one=' + encodeURIComponent(foundarr[ifo].split('|')[0]) + '&two=' + encodeURIComponent(foundarr[ifo].split('|')[1]) + '&five=' + encodeURIComponent(foundarr[ifo].replace(foundarr[ifo].split('|')[0] + '|' + foundarr[ifo].split('|')[1] + '|','')) + '&four=&three=' + (foundarr[ifo].replace(foundarr[ifo].split('|')[0] + '|' + foundarr[ifo].split('|')[1] + '|','').slice(-1) == ' ' ? '&randomized=y' : '');
//alert(documentURL);
assemblyadd(foundarr[ifo],2);
//alert(22);
}
}
documentURL=wasdu;
}
}

function orflag(thiscc) {
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 qanda() {
if (eval('' + bonusmode.length) > 0) {
return '&question=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-question')) + '&answer=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answer'));
}
return '';
}

function getnoun() {
return thenouns[theiw];
}

function setbm(tow) {
bonusmode='' + tow;
if (eval('' + bonusmode.length) == 1) {
document.getElementById('hbonus').innerHTML='  <input type=checkbox id=cbonus disabled checked><font size=1>Extra Maths questions</font></input>  ';
document.getElementById('ibonus').title='Place extra Maths question here if you do not like this default one you use as bonus scoring question.';
} else if (eval('' + bonusmode.length) == 2) {
document.getElementById('hbonus').innerHTML='  <input type=checkbox id=cbonus disabled checked><font size=1>Extra User questions</font></input>  ';
document.getElementById('ibonus').title='Place extra User question here if you do not like this default one you use as bonus scoring question.';
}
}

function xsim(osel) {
var juser=-1;
if (osel.value == '1') {
document.getElementById(osel.id.replace('c','h')).innerHTML='  <input type=checkbox id=cbonus disabled checked><font size=1>Extra Maths questions</font></input>  ';
bonusmode='x';
document.getElementById('ibonus').title='Place extra Maths question here if you do not like this default one you use as bonus scoring question.';
denominator=eval(-782 + eval('' + Math.floor(Math.random() * 1564)));
numerator=eval(-782 + eval('' + Math.floor(Math.random() * 1564)));
if (denominator == 0) {
operator=operators[Math.floor(Math.random() * 3)];
} else {
if (eval(numerator % denominator) == 0) {
operator=operators[Math.floor(Math.random() * eval('' + operators.length))];
} else {
operator=operators[Math.floor(Math.random() * 3)];
}
}
if (defq != '') {
document.getElementById('myguess').setAttribute('data-question', defq);
document.getElementById('myguess').setAttribute('data-answer', (defa + ' '));
document.getElementById('myguess').setAttribute('data-answeralt', (defaalt + ''));
defq='';
defa='';
defaalt='';
} else {
document.getElementById('myguess').setAttribute('data-question', 'What is ' + numerator + ' ' + operator + ' ' + denominator + ' ?');
document.getElementById('myguess').setAttribute('data-answer', '' + eval('' + numerator + ' ' + operator + ' ' + denominator));
document.getElementById('myguess').setAttribute('data-answeralt', '');
}
bcblurb=' ';
invitb='?bonus=x';
document.getElementById('ibonus').placeholder=document.getElementById('myguess').getAttribute('data-question');
if (woois) {
woois.setbm(bonusmode);
woois.setdefa(document.getElementById('myguess').getAttribute('data-answer'));
woois.setdefaalt(document.getElementById('myguess').getAttribute('data-answeralt'));
woois.setdefq(document.getElementById('myguess').getAttribute('data-question'));
} else if (window.opener) {
//alert(56);
window.opener.setbm(bonusmode);
window.opener.setdefa(document.getElementById('myguess').getAttribute('data-answer'));
window.opener.setdefaalt(document.getElementById('myguess').getAttribute('data-answeralt'));
window.opener.setdefq(document.getElementById('myguess').getAttribute('data-question'));
}
} else if (osel.value == '2') {
document.getElementById(osel.id.replace('c','h')).innerHTML='  <input type=checkbox id=cbonus disabled checked><font size=1>Extra User questions</font></input>  ';
bonusmode='xx';
document.getElementById('ibonus').title='Place extra User question here if you do not like this default one you use as bonus scoring question.';
if (defq != '') {
document.getElementById('myguess').setAttribute('data-question', defq);
document.getElementById('myguess').setAttribute('data-answer', (defa + ' '));
document.getElementById('myguess').setAttribute('data-answeralt', (defaalt + ''));
defq='';
defa='';
defaalt='';
} else {
if (eval('' + userquestions.length) > 1) {
juser=Math.floor(Math.random() * eval('' + eval('' + userquestions.length)));
document.getElementById('myguess').setAttribute('data-question', '' + userquestions[juser]);
document.getElementById('myguess').setAttribute('data-answer', '' + useranswers[juser]);
document.getElementById('myguess').setAttribute('data-answeralt', '' + useranswersalt[juser]);
} else {
document.getElementById('myguess').setAttribute('data-question', 'What year is it?');
document.getElementById('myguess').setAttribute('data-answer', '' + new Date().getFullYear());
document.getElementById('myguess').setAttribute('data-answeralt', '');
}
}
bcblurb=' ';
invitb='?bonus=xx';
document.getElementById('ibonus').placeholder=document.getElementById('myguess').getAttribute('data-question');
if (woois) {
woois.setbm(bonusmode);
woois.setdefa(document.getElementById('myguess').getAttribute('data-answer'));
woois.setdefaalt(document.getElementById('myguess').getAttribute('data-answeralt'));
woois.setdefq(document.getElementById('myguess').getAttribute('data-question'));
} else if (window.opener) {
//alert(256);
window.opener.setbm(bonusmode);
window.opener.setdefa(document.getElementById('myguess').getAttribute('data-answer'));
window.opener.setdefa(document.getElementById('myguess').getAttribute('data-answeralt'));
window.opener.setdefq(document.getElementById('myguess').getAttribute('data-question'));
}
}
}



function multimaybe() {
var selbit='', jsel=0, bonusbit='';
if (bonusmode == '') {
bonusbit='  <span id=hbonus><select onchange=xsim(this); id=cbonus><option value="">Optional bonus Scoring ...</option><option value=1>Extra Maths questions</option><option value=2>Extra User questions</option></select></span>  ';
} else if (eval('' + bonusmode.length) == 1) {
bonusbit='  <input type=checkbox id=cbonus disabled checked><font size=1>Extra Maths questions</font></input>  ';
} else if (eval('' + bonusmode.length) == 2) {
bonusbit='  <input type=checkbox id=cbonus disabled checked><font size=1>Extra User questions</font></input>  ';
}
if (eval('' + thenouns.length) > 1) {
selbit="<sup><select id=selmy ontouchmove='event.stopPropagation();' onmousedown='event.stopPropagation();' style=width:30px; onchange=\"if (this.value == 'reload') { window.open(document.URL,'_self'); } if (eval('' + this.value) != eval(1 + eval('' + theiw))) { if (this.value == '') { this.value=this.value; } else if (this.value == ' ') { this.value=''; newask(); } else if (eval('' + this.value) > theiwbefore) { location.href=document.URL.split('?')[0].split('#')[0] + '?itype=' + this.value + '&wordg=' + encodeURIComponent(this.innerHTML.split(' value=' + String.fromCharCode(34) + this.value + String.fromCharCode(34))[1].split('>')[1].split(' Game')[0]); } else { location.href=document.URL.split('?')[0].split('#')[0] + '?itype=' + this.value; } }\"><option value=" + eval(1 + theiw) + ">?</option><option value=' '>Your Own ...</option><option value='reload'>Reload ...</option></select> </sup> ";
for (jsel=0; jsel<thewords.length; jsel++) {
selbit=selbit.replace('</select>', '<option value=' + eval(1 + jsel) + '>' + thewords[jsel] + ' Game</option></select>');
}
}
return selbit + bonusbit;
}

function lastcall() {
if (outofifc && nexttime) {
nexttime=false;
if (document.URL.indexOf('iam=%40&') == -1) { if (4 == 6) { document.title='why'; } setTimeout(ifcontentious, 20000); }
} else if (!outofifc && nexttime) {
setTimeout(lastcall, 1000);
}
}

function ifcok() {
var fval='false';
if (yehbut) { return false; }
//if (document.getElementById('morethanonedisplay').innerHTML == ' ') { return false; }
if (!outofifc && !nexttime) {
nexttime=true;
fval='False';
setTimeout(lastcall, 1000);
}
if (document.body.innerHTML == '' || document.URL.indexOf('iam=%40&') != -1 || !outofifc || (document.getElementById('iam').value.replace('@','').trim() != '' && document.getElementById('otheris').value.trim() != '')) {
if (4 == 6) { document.title=fval; }
return false;
}
if (4 == 6) { document.title='true'; }
return true;
}

function getsms() {
return sharemyscore;
}

function getcontsms() {
if (sharemyscore) {
return ' <font size=1 id=myfont>Score: ' + score + '/' + goes + '</font> ';
}
return '';
}

function mbga(inis) {
if (('' + inis).indexOf('About_Us.htm') == -1) { return inis; }
//alert('youare=' + youare + ' and otheris=' + otheris);
//if (youare == otheris) { youare+='X'; parent.document.getElementById('ifplay').setAttribute('data-src',parent.document.getElementById('ifplay').getAttribute('data-src').replace('%20','X')); }
//if (otheris != '') { parent.document.getElementById('otheris').value=otheris; }
//if (youare != '') { parent.document.getElementById('iam').value=youare; }
return '' + parent.document.getElementById('ifplay').getAttribute('data-src');
}

function setdefq(tow) {
defq='' + tow;
}

function setdefa(tow) {
defa='' + tow;
}

function setdefaalt(tow) {
defaalt='' + tow;
}

function resetq(useforce) {
var juser=-1;
if (eval('' + bonusmode.length) == 0) {
bonusmode=(document.URL.indexOf('bonus=') != -1 ? decodeURIComponent(document.URL.split('bonus=')[1].split('&')[0].split('#')).replace(/\+/g,' ') : '');
bcblurb=' At any answer append + modus operandi bonus Scoring Mode as per + is Extra Maths Question ++ is Extra Your Own Question.';
if (bonusmode != '') {
if (eval('' + bonusmode.length) == 1) {
bcblurb=' Your game is set to Extra Maths Question modus operandi.';
} else {
bcblurb=' Your game is set to Extra User Question modus operandi.';
}
}
blen=eval('' + bcblurb.length);
invitb='';
}
if (eval('' + bonusmode.length) == 1) {
denominator=eval(-782 + eval('' + Math.floor(Math.random() * 1564)));
numerator=eval(-782 + eval('' + Math.floor(Math.random() * 1564)));
if (denominator == 0) {
operator=operators[Math.floor(Math.random() * 3)];
} else {
if (eval(numerator % denominator) == 0) {
operator=operators[Math.floor(Math.random() * eval('' + operators.length))];
} else {
operator=operators[Math.floor(Math.random() * 3)];
}
}
document.getElementById('ibonus').style.display='inline-block';
document.getElementById('ibonus').title='Place extra Maths question here if you do not like this default one you use as bonus scoring question.';
if (defq != '') {
document.getElementById('myguess').setAttribute('data-question', defq);
document.getElementById('myguess').setAttribute('data-answer', (defa + ' '));
document.getElementById('myguess').setAttribute('data-answeralt', (defaalt + ' '));
defq='';
defa='';
defaalt='';
} else {
document.getElementById('myguess').setAttribute('data-question', 'What is ' + numerator + ' ' + operator + ' ' + denominator + ' ?');
document.getElementById('myguess').setAttribute('data-answer', '' + eval('' + numerator + ' ' + operator + ' ' + denominator));
document.getElementById('myguess').setAttribute('data-answeralt', '');
}
if (document.getElementById('ibonus').placeholder != document.getElementById('myguess').getAttribute('data-question') || useforce) {
document.getElementById('ibonus').placeholder=document.getElementById('myguess').getAttribute('data-question');
document.getElementById('ibonus').value='';
}
bcblurb=' ';
invitb='?bonus=x';
if (useforce) {
if (woois) {
woois.setdefa(document.getElementById('myguess').getAttribute('data-answer'));
woois.setdefaalt(document.getElementById('myguess').getAttribute('data-answeralt'));
woois.setdefq(document.getElementById('myguess').getAttribute('data-question'));
} else if (window.opener) {
window.opener.setdefa(document.getElementById('myguess').getAttribute('data-answer'));
window.opener.setdefaalt(document.getElementById('myguess').getAttribute('data-answeralt'));
window.opener.setdefq(document.getElementById('myguess').getAttribute('data-question'));
}
}
} else if (eval('' + bonusmode.length) == 2) {
document.getElementById('ibonus').title='Place extra User question here if you do not like this default one you use as bonus scoring question.';
document.getElementById('ibonus').style.display='inline-block';
if (defq != '') {
document.getElementById('myguess').setAttribute('data-question', defq);
document.getElementById('myguess').setAttribute('data-answer', (defa + ' '));
document.getElementById('myguess').setAttribute('data-answer', (defaalt + ''));
defq='';
defa='';
defaalt='';
} else {
if (eval('' + userquestions.length) > 1) {
juser=Math.floor(Math.random() * eval('' + eval('' + userquestions.length)));
document.getElementById('myguess').setAttribute('data-question', '' + userquestions[juser]);
document.getElementById('myguess').setAttribute('data-answer', '' + useranswers[juser]);
document.getElementById('myguess').setAttribute('data-answeralt', '' + useranswersalt[juser]);
} else {
document.getElementById('myguess').setAttribute('data-question', 'What year is it?');
document.getElementById('myguess').setAttribute('data-answer', '' + new Date().getFullYear());
document.getElementById('myguess').setAttribute('data-answeralt', '');
}
}
if (document.getElementById('ibonus').placeholder != document.getElementById('myguess').getAttribute('data-question') || useforce) {
document.getElementById('ibonus').placeholder=document.getElementById('myguess').getAttribute('data-question');
document.getElementById('ibonus').value='';
}
bcblurb=' ';
invitb='?bonus=xx';
if (useforce) {
if (woois) {
woois.setdefa(document.getElementById('myguess').getAttribute('data-answer'));
woois.setdefaalt(document.getElementById('myguess').getAttribute('data-answeralt'));
woois.setdefq(document.getElementById('myguess').getAttribute('data-question'));
} else if (window.opener) {
window.opener.setdefa(document.getElementById('myguess').getAttribute('data-answer'));
window.opener.setdefaalt(document.getElementById('myguess').getAttribute('data-answeralt'));
window.opener.setdefq(document.getElementById('myguess').getAttribute('data-question'));
}
}
}
}

function ifcontentious() {
var ims=[], jims=0, decis='';
var juser=-1;
if (!ifcok()) { return ''; }
//if (document.URL.indexOf('iam=%40&') != -1) {
// return '';
//}
outofifc=false;
if (document.getElementById('iam').value.replace('@','').trim() != '' && document.getElementById('otheris').value.trim() != '') {
setTimeout(function(){ if (document.getElementById('spmy')) { document.getElementById('spmy').style.color='white'; } if (document.getElementById('spmytwo')) { document.getElementById('spmytwo').style.color='white'; } document.getElementById('morethanonedisplay').style.color='white'; }, 4000);
otheris=document.getElementById('otheris').value;
youare=document.getElementById('iam').value.replace(/^\@$/g,'');
holdon=false;
inform(youare);
initval='Wait';
outofifc=true;
return '';
} else {
decis=(document.getElementById('myh3').innerHTML.indexOf('are playing with') != -1 ? (initval.trim().replace('Wait','') != '' ? initval : 'Wait') : initval);
if (decis == '') {
// // document.getElementById('morethanonedisplay').style.display='block';
//decis=prompt('Other players are ' + document.getElementById('morethanone').value + ' ... enter a player to play Clairvoyance Game with, as listed (where you are ' + document.getElementById('iam').value + ' and you can play yourself) or invite someone via an email adddress or mobile SMS number (and append this with a space to keep returning to the list here in the meantime) or leave answer as Wait to return a bit later and reanswer with a refreshed list.', 'Wait');
if (('' + documentreferrer).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
decis='Wait';
} else {
decis=prompt('Other players are ' + document.getElementById('morethanone').value + ' ... enter a player to play ' + thewords[theiw] + ' Game with, as listed (where you are ' + document.getElementById('iam').value + ' and you can play yourself) or invite someone via an email adddress or mobile SMS number or leave answer as Wait to return a bit later and reanswer with a refreshed list. Entering Pause or Stop can stop the prompting.' + zcblurb + bcblurb, 'Wait');
}
setTimeout(function(){
if (document.getElementById('spmy')) {
setTimeout(function(){ document.getElementById('spmy').style.color='white'; }, 600);
}
if (document.getElementById('spmytwo')) {
//alert('4:white');
setTimeout(function(){ document.getElementById('spmytwo').style.color='white'; }, 1200);
}
document.getElementById('morethanonedisplay').style.color='white';
}, 4000);
}
if (document.URL.indexOf('iam=%40&') == -1 || decis == null) { initval=(initval.trim().replace('Wait','') != '' ? initval : ''); }
if (decis != null) {
if ((' ' + decis).slice(-1) == '+') {
bonusmode='x';
document.getElementById('ibonus').title='Place extra Maths question here if you do not like this default one you use as bonus scoring question.';
denominator=eval(-782 + eval('' + Math.floor(Math.random() * 1564)));
numerator=eval(-782 + eval('' + Math.floor(Math.random() * 1564)));
if (denominator == 0) {
operator=operators[Math.floor(Math.random() * 3)];
} else {
if (eval(numerator % denominator) == 0) {
operator=operators[Math.floor(Math.random() * eval('' + operators.length))];
} else {
operator=operators[Math.floor(Math.random() * 3)];
}
}
if (defq != '') {
document.getElementById('myguess').setAttribute('data-question', defq);
document.getElementById('myguess').setAttribute('data-answer', (defa + ' '));
document.getElementById('myguess').setAttribute('data-answeralt', (defaalt + ''));
defq='';
defa='';
defaalt='';
} else {
document.getElementById('myguess').setAttribute('data-question', 'What is ' + numerator + ' ' + operator + ' ' + denominator + ' ?');
document.getElementById('myguess').setAttribute('data-answer', '' + eval('' + numerator + ' ' + operator + ' ' + denominator));
document.getElementById('myguess').setAttribute('data-answeralt', '');
}
bcblurb=' ';
invitb='?bonus=x';
if ((' ' + decis).slice(-2) == '++') {
bonusmode='xx';
document.getElementById('ibonus').title='Place extra User question here if you do not like this default one you use as bonus scoring question.';
if (defq != '') {
document.getElementById('myguess').setAttribute('data-question', defq);
document.getElementById('myguess').setAttribute('data-answer', (defa + ' '));
document.getElementById('myguess').setAttribute('data-answeralt', (defaalt + ''));
defq='';
defa='';
defaalt='';
} else {
if (eval('' + userquestions.length) > 1) {
juser=Math.floor(Math.random() * eval('' + eval('' + userquestions.length)));
document.getElementById('myguess').setAttribute('data-question', '' + userquestions[juser]);
document.getElementById('myguess').setAttribute('data-answer', '' + useranswers[juser]);
document.getElementById('myguess').setAttribute('data-answeralt', '' + useranswersalt[juser]);
} else {
document.getElementById('myguess').setAttribute('data-question', 'What year is it?');
document.getElementById('myguess').setAttribute('data-answer', '' + new Date().getFullYear());
document.getElementById('myguess').setAttribute('data-answeralt', '');
}
}
bcblurb=' ';
invitb='?bonus=xx';
decis=decis.replace(/\+\+$/g,'');
setbm(bonusmode);
} else {
decis=decis.replace(/\+$/g,'');
setbm(bonusmode);
}
document.getElementById('ibonus').placeholder=document.getElementById('myguess').getAttribute('data-question');
}
}
if (decis != null && ('' + decis).replace(/^null/g,'').replace(/^undefined/g,'').trim() != '') {
if (decis.trim() == '?') {
window.open('//wikipedia.org/wiki/Zener_cards','_blank','top=50,left=50,width=600,height=600');
zcblurb='';
decis='Wait';
}
//alert(',' + decis + ', ,' + document.getElementById('morethanone').value + ', ' + document.getElementById('iam').value);
if (decis.toLowerCase() == 'pause' || decis.toLowerCase() == 'stop') {
location.href='./clairvoyance_game.php?linktorestart=' + Math.floor(Math.random() * 19897865);
} else if (decis.toLowerCase() == 'wait') {
//alert('chereit');
bihnull=false;
holdon=true;
//if (!awaiting) {
//awaiting=true;
youare=document.getElementById('iam').value.replace(/^\@$/g,'');
document.getElementById('ifplay').setAttribute('data-src',document.getElementById('ifplay').getAttribute('data-src').replace('iam=%40&','iam=' + encodeURIComponent(youare) + '&').replace('iam=&','iam=' + encodeURIComponent(youare) + '&'));
ims=document.getElementsByTagName('img');
for (jims=0; jims<ims.length; jims++) {
ims[jims].setAttribute('disabled',true);
}
//}
document.body.style.cursor='progress';
if (document.URL.indexOf('iam=%40&') == -1) { if (4 == 6) { document.title='why?'; } outofifc=true; if (ifcok()) { setTimeout(mtodtob, 17000); setTimeout(ifcontentious, 20000); } } //document.getElementById('amoffnow').click();
} else if ((',' + document.getElementById('morethanone').value + ',').indexOf(',' + decis + ',') != -1 && decis.trim() != '' && decis.trim() == document.getElementById('iam').value.trim()) {
//alert(26745);
holdon=false;
document.body.style.cursor='pointer';
otheris=decis;
document.getElementById('otheris').value=otheris;
youare=document.getElementById('iam').value.replace(/^\@$/g,'');
if (youare == otheris) {
otheris+=' ';
document.getElementById('otheris').value=otheris;
}
document.getElementById('ifplay').setAttribute('data-src',document.getElementById('ifplay').getAttribute('data-src').replace('iam=%40&','iam=' + encodeURIComponent(youare) + '&').replace('iam=&','iam=' + encodeURIComponent(youare) + '&'));
document.getElementById('myh3').style.cursor='pointer';
if (!document.getElementById('myfont')) {
document.getElementById('myh3').innerHTML=document.getElementById('myh3').innerHTML.split(' ...')[0] + ' ... you (' + youare + ') are playing with ' + otheris + ' our ' + thewords[theiw] + ' Game';
}
document.title='' + thewords[theiw] + ' Game' + ' ... you (' + youare + ') are playing with ' + otheris + ' our ' + thewords[theiw] + ' Game';
if (otheris.replace(/X$/g,'').replace(/x$/g,'').replace(/\ $/g,'') == youare.replace(/X$/g,'').replace(/x$/g,'').replace(/\ $/g,'')) {
woois=window.open(document.URL.split('?')[0].split('#')[0] + '?itype=' + eval(1 + theiw) + (invitb != '' ? (invitb.replace('?','&') + '&question=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-question')) + '&answer=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answer')) + '&answeralt=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answeralt'))) : '') + '&blankatend=y', '_blank', 'top=50,left=50,width=' + eval(-100 + screen.width) + ',height=' + eval(-100 + screen.height));
}
document.getElementById('ifplay').src=document.getElementById('ifplay').getAttribute('data-src') + encodeURIComponent(decis);
} else if (decis.indexOf('@') != -1) { // email invitation
//alert('zhereit');
holdon=true;
document.body.style.cursor='progress';
youare=document.getElementById('iam').value.replace(/^\@$/g,'');
document.getElementById('ifplay').setAttribute('data-src',document.getElementById('ifplay').getAttribute('data-src').replace('iam=%40&','iam=' + encodeURIComponent(youare) + '&').replace('iam=&','iam=' + encodeURIComponent(youare) + '&'));
//if (!awaiting) {
//awaiting=true;
ims=document.getElementsByTagName('img');
for (jims=0; jims<ims.length; jims++) {
ims[jims].setAttribute('disabled',true);
}
//}
//document.getElementById('tdstatus').innerHTML='Awaiting Other Player Choosing a ' + thenouns[theiw] + ' to Guess';
//document.getElementById('tdstatus').innerHTML+='?';
anchor = document.createElement('a');
anchor.href = 'mailto:' + decis.trim() + '?subject=' + encodeURIComponent('' + thewords[theiw] + ' Game player ' + youare + ' has logged in and is inviting you to play by clicking link below ...') + '&body=' + encodeURIComponent(document.URL.split('?')[0].split('#')[0] + '?iam=' + encodeURIComponent(decis.trim()) + (invitb != '' ? (invitb.replace('?','&') + '&question=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-question')) + '&answer=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answer')) + '&answeralt=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answeralt'))) : '') + '&playwith=' + encodeURIComponent(youare) + whataboutyourown('&itype=' + eval(1 + theiw)) + '&rand=' + Math.floor(Math.random() * 16754));
anchor.style.display='none';
anchor.innerHTML='Email';
anchor.target='_top';
anchor.click();
if (decis.trim() != decis || 14 == 14) {
if (4 == 6) { document.title='Why'; } if (document.getElementById('iam').value.replace('@','').trim() == '' || document.getElementById('otheris').value.trim() == '') { setTimeout(mtodtob, 17000); setTimeout(ifcontentious, 20000); } //document.getElementById('amoffnow').click();
}
} else if (decis.replace(/\ /g,'').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,'') == '') { // sms invitation
//alert('xhereit');
holdon=true;
document.body.style.cursor='progress';
youare=document.getElementById('iam').value.replace(/^\@$/g,'');
document.getElementById('ifplay').setAttribute('data-src',document.getElementById('ifplay').getAttribute('data-src').replace('iam=%40&','iam=' + encodeURIComponent(youare) + '&').replace('iam=&','iam=' + encodeURIComponent(youare) + '&'));
//if (!awaiting) {
//awaiting=true;
ims=document.getElementsByTagName('img');
for (jims=0; jims<ims.length; jims++) {
ims[jims].setAttribute('disabled',true);
}
//}
//document.getElementById('tdstatus').innerHTML='Awaiting Other Player Choosing a ' + thenouns[theiw] + ' to Guess';
//document.getElementById('tdstatus').innerHTML+='?';
anchor = document.createElement('a');
anchor.href = 'sms:' + decis.trim() + '&body=' + encodeURIComponent(document.URL.split('?')[0].split('#')[0] + '?iam=' + encodeURIComponent(decis.trim()) + (invitb != '' ? (invitb.replace('?','&') + '&question=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-question')) + '&answer=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answer')) + '&answeralt=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answeralt'))) : '') + '&playwith=' + encodeURIComponent(youare) + whataboutyourown('&itype=' + eval(1 + theiw)) + '&rand=' + Math.floor(Math.random() * 19876754));
anchor.style.display='none';
anchor.innerHTML='SMS';
anchor.target='_top';
anchor.click();
if (decis.trim() != decis || 14 == 14) {
if (4 == 6) { document.title='Why??'; } if (document.getElementById('iam').value.replace('@','').trim() == '' || document.getElementById('otheris').value.trim() == '') { setTimeout(mtodtob, 17000); setTimeout(ifcontentious, 20000); } //document.getElementById('amoffnow').click();
}
} else {
holdon=true;
document.body.style.cursor='pointer';
initval='Wait';
//alert('hereit');
if (1 == 1) {
window.open(document.URL.split('?')[0].split('#')[0] + '?iam=%40' + (invitb != '' ? (invitb.replace('?','&') + '&question=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-question')) + '&answer=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answer')) + '&answeralt=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answeralt'))) : '') + '&playwith=' + decis.trim() + '&rand=' + Math.floor(Math.random() * 1989675) + whataboutyourown('#itype=' + eval(1 + eval('' + theiw))), '_top');
//document.body.innerHTML='';
} else {
//bihnull=false;
//document.getElementById('amoffnow').click();
location.href=document.URL.split('?')[0].split('#')[0] + '?iam=%40' + (invitb != '' ? (invitb.replace('?','&') + '&question=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-question')) + '&answer=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answer')) + '&answeralt=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answeralt'))) : '') + '&playwith=' + decis.trim() + '&rand=' + Math.floor(Math.random() * 1989675) + whataboutyourown('#itype=' + eval(1 + eval('' + theiw)));
//document.body.innerHTML='';
}
//bihnull=false;
//document.getElementById('amoffnow').click();
//window.stop();
}
} else {
//alert('qhereit');
holdon=false;
document.body.style.cursor='pointer';
bihnull=false;
document.getElementById('amoffnow').click();
}
}
outofifc=true;
}

function newquestion() {
}

function sendquestion() {
}

function inform(iamw) {
var isemsm=false;
document.getElementById('iam').value=iamw;
if (otheris == '') {
otheris=iamw.trim();
} else {
document.getElementById('otheris').value=otheris;
isemsm=true;
}
youare=document.getElementById('iam').value.replace(/^\@$/g,'');
document.getElementById('ifplay').setAttribute('data-src',document.getElementById('ifplay').getAttribute('data-src').replace('iam=%40&','iam=' + encodeURIComponent(youare) + '&').replace('iam=&','iam=' + encodeURIComponent(youare) + '&'));
document.getElementById('myh3').style.cursor='pointer';
if (!document.getElementById('myfont')) {
document.getElementById('myh3').innerHTML=document.getElementById('myh3').innerHTML.split(' ...')[0] + ' ... you (' + youare + ') are playing with ' + otheris + ' our ' + thewords[theiw] + ' Game';
}
document.title='' + thewords[theiw] + ' Game' + ' ... you (' + youare + ') are playing with ' + otheris+ ' our ' + thewords[theiw] + ' Game';
if (otheris == youare && !isemsm) {
woois=window.open(document.URL.split('?')[0].split('#')[0] + '?itype=' + eval(1 + theiw) + (invitb != '' ? (invitb.replace('?','&') + '&question=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-question')) + '&answer=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answer')) + '&answeralt=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answeralt'))) : '') + '&blankatend=y', '_blank', 'top=50,left=50,width=' + eval(-100 + screen.width) + ',height=' + eval(-100 + screen.height));
} else if (otheris == youare) {
if (3 == 5) { alert('Weird, huh?!'); }
} //else {
//alert('More to do?!');
//}
//alert(mbga(document.getElementById('ifplay').src) + encodeURIComponent(otheris));
if (decodeURIComponent(document.getElementById('ifplay').src).indexOf('@') != -1 || document.URL.indexOf('playwith=') != -1) {
if ((document.getElementById('ifplay').src + '&').indexOf('=' + encodeURIComponent(otheris) + '&') != -1) {
if (otheris == youare) {
otheris+='x';
document.getElementById('otheris').value=otheris;
}
//alert('1:' + holdon + './clairvoyance_game.php?iam=' + encodeURIComponent(youare) + (invitb != '' ? (invitb.replace('?','&') + '&question=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-question')) + '&answer=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answer')) + '&answeralt=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answeralt'))) : '') + '&playwith=' + encodeURIComponent(otheris));
document.getElementById('ifplay').src='./clairvoyance_game.php?iam=' + encodeURIComponent(youare) + (invitb != '' ? (invitb + '&question=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-question')) + '&answer=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answer')) + '&answeralt=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answeralt'))) : '') + '&playwith=' + encodeURIComponent(otheris);
} else {
//alert('2:' + holdon + './clairvoyance_game.php?iam=' + encodeURIComponent(youare) + (invitb != '' ? (invitb.replace('?','&') + '&question=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-question')) + '&answer=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answer')) + '&answeralt=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answeralt'))) : '') + '&playwith=' + encodeURIComponent(otheris));
document.getElementById('ifplay').src='./clairvoyance_game.php?iam=' + encodeURIComponent(youare) + (invitb.replace('?','&') != '' ? (invitb + '&question=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-question')) + '&answer=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answer')) + '&answeralt=' + encodeURIComponent(document.getElementById('myguess').getAttribute('data-answeralt'))) : '') + '&playwith=' + encodeURIComponent(otheris);
}
} else {
//alert(otheris + ':' + youare + ' pre3:' + document.getElementById('ifplay').src + ' ' + document.getElementById('ifplay').getAttribute('data-src'));
//alert('3:' + holdon + mbga(document.getElementById('ifplay').src) + encodeURIComponent(otheris));
document.getElementById('ifplay').src=mbga(document.getElementById('ifplay').src) + encodeURIComponent(otheris);
}
}

function signoff(regardingme) {
document.getElementById('ifnomore').src=document.getElementById('ifnomore').getAttribute('data-src') + encodeURIComponent(regardingme);
document.getElementById('ifyesmore').src=document.getElementById('ifnomore').src + '&affects=' + encodeURIComponent(otheris);
if (bihnull) { document.body.innerHTML=''; window.stop(); }
}

function sendstatus(what, regardingwho) {
}


function bye() {

var ansis=confirm('Your playing partner has signed off. Do you want to restart?');
if (ansis) {
//alert('yes' + document.URL.split('?')[0].split('#')[0]);
location.href=document.URL.split('?')[0].split('#')[0];
window.stop();
} else {
if (bihnull) { document.body.innerHTML=''; window.stop(); }
}

}



function gameask() {
goes++;
var synopsis=' ... bad luck' + (wherewrong ? ' ... it was ' + document.getElementById('yourguess').value : '');
var ans=prompt('What do you reckon was selected by ' + otheris, '');
if (ans) {
if (ans == document.getElementById('yourguess').value) {
synopsis=' ... well done ... spot on!';
document.getElementById('myguess').value=document.getElementById('yourguess').value;
score+=pluseq;
}
}
if (eval('' + bonusmode.length) > 1) { resetq(true); }
document.getElementById('score').innerHTML='Score: ' + score + '/' + goes + synopsis;
sendstatus(synopsis, document.getElementById('iam').value);
}

function fireup() {
var thisiw=theiw;
var zrect=document.getElementById('td1').getBoundingClientRect();
if (thisiw >= eval('' + thewords.length)) { thisiw=0; }
for (var ii=1; ii<=5; ii++) {
if (document.getElementById('td' + ii).outerHTML.indexOf('background') == -1 && window.parent == window.self) {
//alert(theelems[thisiw] + ' ... ' + zener_cards[eval(-1 + ii)]);
if (theelems[thisiw].indexOf('<img ') == 0) {
//document.getElementById('td' + ii).innerHTML=theelems[thisiw] + (theelems[thisiw].slice(-1) == '=' ? '' : '') + zener_cards[eval(-1 + ii)] + theelems[thisiw].slice(-1).replace('=','') + ' id=img' + ii + " onclick=\"if (!awaiting && !holdon) { pick=changeover(eval(this.id.replace('img',''))); } else { alert('' + ' Sorry, not your turn, so please wait.'); }\"" + theihs[thisiw] + (zener_cards[[eval(-1 + ii)]] + '|').split('|')[1] + (theelems[thisiw].split(' ')[0] + '>').replace('<','</');
document.getElementById('td' + ii).innerHTML=theelems[thisiw] + (theelems[thisiw].slice(-1) == '=' ? '' : '') + zener_cards[eval(-1 + ii)] + theelems[thisiw].slice(-1).replace('=','') + ' id=img' + ii + " onclick=\"if (!awaiting && !holdon) { pick=changeover(eval(this.id.replace('img',''))); } else { alert('' + ' Sorry, not your turn, so please wait.'); }\"" + theihs[thisiw] + (theelems[thisiw].split(' ')[0] + '>').replace('<','</');
} else if (usereletype != '') {
document.getElementById('td' + ii).innerHTML=theelems[thisiw] + (theelems[thisiw].slice(-1) == '=' ? '' : '') + zener_cards[eval(-1 + ii)] + theelems[thisiw].slice(-1).replace('=','') + " id=img" + ii + " onclick=\"if (!awaiting && !holdon) { pick=changeover(eval(this.id.replace('img',''))); } else { alert('' + ' Sorry, not your turn, so please wait.'); }\"" + theihs[thisiw] + (theelems[thisiw].split(' ')[0] + '>').replace('<','</');
//alert('1:' + document.getElementById('td' + ii).innerHTML);
if (document.getElementById('img' + ii).title != '' && ('' + document.getElementById('img' + ii).innerHTML).replace(/^null/g,'').replace(/^undefined/g,'') == '') {
if ((document.getElementById('img' + ii).title + zener_cards[0]).indexOf('&#') != -1) {
document.getElementById('img' + ii).style.width='100%';
document.getElementById('img' + ii).style.height='100%';
if (dataeltypes.toLowerCase().indexOf(',' + usereletype + ',') != -1) {
//alert(0);
document.getElementById('img' + ii).style.background='url("data:image/svg+xml;base64,' + window.btoa(unescape(encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' width='" + zrect.width + "' height='" + zrect.height + "' viewport='0 0 100 100' style='fill:black;font-family:Verdana;font-size:100px;'><text x='5%' y='80%' xml:space='preserve'>" + document.getElementById('img' + ii).title.split('|')[1] + "</text></svg>"))) + '")';
//alert(10);
document.getElementById('img' + ii).style.backgroundRepeat='no-repeat';
document.getElementById('img' + ii).style.backgroundSize='contain';
} else if (valueeltypes.toLowerCase().indexOf(',' + usereletype + ',') != -1) {
document.getElementById('img' + ii).style.background='url("data:image/svg+xml;base64,' + window.btoa(unescape(encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' width='" + zrect.width + "' height='" + zrect.height + "' viewport='0 0 100 100' style='fill:black;font-family:Verdana;font-size:100px;'><text x='5%' y='80%' xml:space='preserve'>" + document.getElementById('img' + ii).title.split('|')[1] + "</text></svg>"))) + '")';
document.getElementById('img' + ii).style.backgroundRepeat='no-repeat';
document.getElementById('img' + ii).style.backgroundSize='contain';
} else if (srceltypes.toLowerCase().indexOf(',' + usereletype + ',') != -1) {
if ((document.getElementById('img' + ii).title.split('|')[1] + ('' + document.getElementById('img' + ii).src)).indexOf('/recording_ideas.php?') != -1) {
document.getElementById('td' + ii).className='tdiframe';
document.getElementById('td' + ii).onclick=function(event){ genclick(event); };
document.getElementById('img' + ii).src=document.getElementById('img' + ii).title;
} else {
document.getElementById('img' + ii).style.background='url("data:image/svg+xml;base64,' + window.btoa(unescape(encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' width='" + zrect.width + "' height='" + zrect.height + "' viewport='0 0 100 100' style='fill:black;font-family:Verdana;font-size:100px;'><text x='5%' y='80%' xml:space='preserve'>" + document.getElementById('img' + ii).title.split('|')[1] + "</text></svg>"))) + '")';
document.getElementById('img' + ii).style.backgroundRepeat='no-repeat';
document.getElementById('img' + ii).style.backgroundSize='contain';
}
} else {
document.getElementById('img' + ii).innerHTML=document.getElementById('img' + ii).title.split('|')[1];
}
//alert('2:' + document.getElementById('td' + ii).innerHTML);
} else {
document.getElementById('img' + ii).style.width='100%';
document.getElementById('img' + ii).style.height='100%';
document.getElementById('img' + ii).style.background='url(' + document.getElementById('img' + ii).title.split('|')[1] + ')';
document.getElementById('img' + ii).style.backgroundRepeat='no-repeat';
document.getElementById('img' + ii).style.backgroundSize='contain';
//alert('3:' + document.getElementById('td' + ii).outerHTML);
}
}
} else {
if (dataeltypes.toLowerCase().indexOf(',' + usereletype + ',') != -1) {
document.getElementById('img' + ii).style.width='100%';
document.getElementById('img' + ii).style.height='100%';
//alert(0);
document.getElementById('img' + ii).style.background='url("' + (zener_cards[[eval(-1 + ii)]] + '|').split('|')[1].replace('https:','').replace('http:','') + '")';
//alert(10);
document.getElementById('img' + ii).style.backgroundRepeat='no-repeat';
document.getElementById('img' + ii).style.backgroundSize='contain';
} else if (valueeltypes.toLowerCase().indexOf(',' + usereletype + ',') != -1) {
document.getElementById('img' + ii).style.width='100%';
document.getElementById('img' + ii).style.height='100%';
document.getElementById('img' + ii).style.background='url("' + (zener_cards[[eval(-1 + ii)]] + '|').split('|')[1].replace('https:','').replace('http:','') + '")';
document.getElementById('img' + ii).style.backgroundRepeat='no-repeat';
document.getElementById('img' + ii).style.backgroundSize='contain';
} else if (srceltypes.toLowerCase().indexOf(',' + usereletype + ',') != -1) {
document.getElementById('img' + ii).style.width='100%';
document.getElementById('img' + ii).style.height='100%';
document.getElementById('img' + ii).style.background='url("' + (zener_cards[[eval(-1 + ii)]] + '|').split('|')[1].replace('https:','').replace('http:','') + '")';
document.getElementById('img' + ii).style.backgroundRepeat='no-repeat';
document.getElementById('img' + ii).style.backgroundSize='contain';
} else {
document.getElementById('td' + ii).innerHTML=theelems[thisiw] + (theelems[thisiw].slice(-1) == '=' ? '' : '') + zener_cards[eval(-1 + ii)] + theelems[thisiw].slice(-1).replace('=','') + " id=img" + ii + " onclick=\"if (!awaiting && !holdon) { pick=changeover(eval(this.id.replace('img',''))); } else { alert('' + ' Sorry, not your turn, so please wait.'); }\"" + theihs[thisiw] + (zener_cards[[eval(-1 + ii)]] + '|').split('|')[1] + (theelems[thisiw].split(' ')[0] + '>').replace('<','</');
}
}
//document.getElementById('td' + ii).style.background="url('" + zener_cards[eval(-1 + ii)] + "')";
//document.getElementById('td' + ii).style.backgroundSize='contain';
//document.getElementById('td' + ii).style.backgroundRepeat='no-repeat';
//alert(ii);
}
}
}

function mtodtob() {
if (document.getElementById('morethanonedisplay').innerHTML == ' ') {
if (document.getElementById('spmy')) {
document.getElementById('spmy').style.color=pcolour.replace('black','blue');
}
if (document.getElementById('spmytwo')) {
//alert('1:' + pcolour);
document.getElementById('spmytwo').style.color=pcolour.replace('black','blue');
}
document.getElementById('morethanonedisplay').style.display='none';
document.getElementById('detmorethanonedisplay').style.display='none';
document.getElementById('morethanonedisplay').style.color=pcolour;
} else {
if (document.getElementById('spmy')) {
document.getElementById('spmy').style.color=pcolour.replace('black','blue');
}
if (document.getElementById('spmytwo')) {
//alert('2:' + pcolour);
document.getElementById('spmytwo').style.color=pcolour.replace('black','blue');
}
document.getElementById('morethanonedisplay').style.display='block';
document.getElementById('morethanonedisplay').style.color=pcolour;
}
}

function pcb(initx) {
pcolour='white';
setTimeout(function(){ document.getElementById('morethanonedisplay').innerHTML=' '; }, 1000);
return initx;
}

function fleshoutmto(dtob) {
var newdih='', jnew=0, cm='', wasdih='', colextra='';
if (document.getElementById('morethanonedisplay').innerHTML != ' ') {
if (prevmto.replace(/\ \;/g,' ') != document.getElementById('morethanonedisplay').innerText.replace(/\ \;/g,' ') || document.getElementById('morethanone').value != document.getElementById('morethanonedisplay').innerText.replace(/\ \;/g,' ') || document.getElementById('morethanone').value != prevmto) {
var entries=document.getElementById('morethanone').value.split(',');
entries.sort();
if (document.getElementById('morethanonedisplay').innerHTML == '') {
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('morethanonedisplay').style.width='32%';
}
document.getElementById('morethanonedisplay').style.backgroundColor='yellow';
for (jnew=0; jnew<entries.length; jnew++) {
colextra='';
if (entries[jnew].trim() == document.getElementById('iam').value.trim()) { colextra='color:blue;font-color:blue; id=spmy' + (entries[jnew] == document.getElementById('iam').value ? '' : 'two') + ' title="You are ' + entries[jnew] + '" '; } else { colextra=' title="' + entries[jnew] + '" '; }
newdih+=cm + '<span class=spip onmousedown=event.stopPropagation(); ontouchmove=event.stopPropagation(); style=text-decoration:underline;cursor:pointer;' + colextra + ' onclick="event.stopPropagation(); initval=pcb(this.innerText).replace(/\ \;/g,' + "' '" + ');">' + entries[jnew] + '</span>';
cm=',';
}
} else {
document.getElementById('morethanonedisplay').style.backgroundColor='white';
for (jnew=0; jnew<entries.length; jnew++) {
if ((',' + prevmto + ',').indexOf(',' + entries[jnew] + ',') != -1) {
colextra='';
if (entries[jnew].trim() == document.getElementById('iam').value.trim()) { colextra='color:blue;font-color:blue; id=spmy' + (entries[jnew] == document.getElementById('iam').value ? '' : 'two') + ' title="You are ' + entries[jnew] + '" '; } else { colextra=' title="' + entries[jnew] + '" '; }
newdih+=cm + '<span class=spip onmousedown=event.stopPropagation(); ontouchmove=event.stopPropagation(); style=text-decoration:underline;cursor:pointer;' + colextra + ' onclick="event.stopPropagation(); initval=pcb(this.innerText).replace(/\ \;/g,' + "' '" + ');">' + entries[jnew] + '</span>';
cm=',';
} else if (cm == '') {
colextra='';
if (entries[jnew].trim() == document.getElementById('iam').value.trim()) { colextra='color:blue;font-color:blue; id=spmy' + (entries[jnew] == document.getElementById('iam').value ? '' : 'two') + ' title="You are ' + entries[jnew] + '" '; } else { colextra=' title="' + entries[jnew] + '" '; }
newdih+=cm + '<span class=spip onmousedown=event.stopPropagation(); ontouchmove=event.stopPropagation(); style=text-decoration:underline;cursor:pointer;background-color:orange;' + colextra + ' onclick="event.stopPropagation(); initval=pcb(this.innerText).replace(/\ \;/g,' + "' '" + ');">' + entries[jnew] + '</span>';
cm=',';
} else {
colextra='';
wasdih=newdih;
if (wasdih != '') { cm=','; }
if (entries[jnew].trim() == document.getElementById('iam').value.trim()) { colextra='color:blue;font-color:blue; id=spmy' + (entries[jnew] == document.getElementById('iam').value ? '' : 'two') + ' title="You are ' + entries[jnew] + '" '; } else { colextra=' title="' + entries[jnew] + '" '; }
newdih='<span class=spip onmousedown=event.stopPropagation(); ontouchmove=event.stopPropagation(); style=text-decoration:underline;cursor:pointer;background-color:orange;' + colextra + ' onclick="event.stopPropagation(); initval=pcb(this.innerText).replace(/\ \;/g,' + "' '" + ');">' + entries[jnew] + '</span>' + cm + wasdih;
cm=',';
}
}
}
document.getElementById('morethanonedisplay').innerHTML=newdih;
prevmto=document.getElementById('morethanonedisplay').innerText.replace(/\ \;/g,' ');
if (dtob) { document.getElementById('morethanonedisplay').style.display='block'; }
//} else {
// alert('why' + prevmto);
// alert('wHy' + document.getElementById('morethanone').value);
} else {
document.getElementById('morethanonedisplay').style.backgroundColor='white';
}
}
}

function statuscheck() {
var ims=[], jims=0, fourstr='', fournum=0, flagemoji='', flaghint='';
if (document.URL.indexOf('blankatend=') != -1) {
document.getElementById('morethanonedisplay').innerHTML=' ';
document.getElementById('morethanonedisplay').style.display='none';
document.getElementById('detmorethanonedisplay').style.display='none';
} else if (document.getElementById('morethanone').value != '' && ('' + documentreferrer).replace(/^undefined/g,'').replace(/^null/g,'') == '') {
fleshoutmto(false);
} else if (document.getElementById('morethanone').value != '') {
document.getElementById('morethanonedisplay').innerHTML=' ';
document.getElementById('morethanonedisplay').style.display='none';
document.getElementById('detmorethanonedisplay').style.display='none';
} else if (('' + documentreferrer).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
document.getElementById('morethanonedisplay').innerHTML=' ';
document.getElementById('morethanonedisplay').style.display='none';
document.getElementById('detmorethanonedisplay').style.display='none';
}
if (('' + document.getElementById('myrow').title).replace(/^undefined/g,'').replace(/^null/g,'').trim() != '' && eval('' + userquestions.length) <= 1) {

if (('' + document.getElementById('myrow').title).indexOf(' OR ') != -1) {
if (('' + document.getElementById('myrow').title).split(' speaking ')[1].split(' or ')[1].split(' ; ')[0].trim() != '') {
flagemoji=orflag(('' + document.getElementById('myrow').title).split(' OR ')[0].split(' ; ')[eval(-1 + ('' + document.getElementById('myrow').title).split(' OR ')[0].split(' ; ').length)].trim());
flaghint=' ( Hint: ' + flagemoji + ' ) ';
}
userquestions.push('What is the name (or 2 letter code) of my country' + flaghint + '?');
useranswers.push(('' + document.getElementById('myrow').title).split(' OR ')[1].split(' ; ')[0].trim());
if (('' + document.getElementById('myrow').title).split(' speaking ')[1].split(' or ')[1].split(' ; ')[0].trim() != '') {
useranswersalt.push(('' + document.getElementById('myrow').title).split(' OR ')[0].split(' ; ')[eval(-1 + ('' + document.getElementById('myrow').title).split(' OR ')[0].split(' ; ').length)].trim());
} else {
useranswersalt.push('');
}
}

if (('' + document.getElementById('myrow').title).indexOf(' GMT') != -1) {
userquestions.push('How many hours offset to Greenwich Mean Time is my timezone' + flaghint.replace(')','& time right now is ' + ('' + new Date()).split(' GMT')[0] + ' )') + '?');
fournum=eval(eval(('' + document.getElementById('myrow').title).split(' GMT')[1].substring(0,5).replace('+','').replace('-','').slice(-2).replace(/^0/g,'')) / 60);
fournum+=eval(('' + document.getElementById('myrow').title).split(' GMT')[1].substring(0,5).replace('+','').replace('-','').substring(0,2).replace(/^0/g,''));
if (('' + document.getElementById('myrow').title).split(' GMT')[1].substring(0,1) == '-') { fournum=eval(-1 * fournum); }
//useranswers.push(('' +
//(
//('' + document.getElementById('myrow').title).split(' GMT')[1].substring(0,1) == '-' ?
//eval(-1 * eval('' + ('' + document.getElementById('myrow').title).split(' GMT')[1].substring(0,3).replace('-','').replace('+','').replace(/^0/g,'')) + eval(eval('' + ('' + document.getElementById('myrow').title).split(' GMT')[1].substring(0,3).replace('-','').replace('+','').substring(2).substring(0,2).replace(/^0/g,'')) / 60)) :
//eval('' + ('' + document.getElementById('myrow').title).split(' GMT')[1].substring(0,3).replace('-','').replace('+','').replace(/^0/g,'')) + eval(eval('' + ('' + document.getElementById('myrow').title).split(' GMT')[1].substring(0,3).replace('-','').replace('+','').substring(2).substring(0,2).replace(/^0/g,'')) / 60))
//).replace('.0',''));
useranswers.push(('' + fournum).replace('.0',''));
useranswersalt.push('');
}

if (('' + document.getElementById('myrow').title).indexOf('(') != -1) {
userquestions.push('What is the specific name of my timezone ( eg. Australian Eastern Standard Time )' + flaghint.replace(')','& time right now is ' + ('' + new Date()).split(' GMT')[0] + ' )') + '?');
useranswers.push(document.getElementById('myrow').title.split('(')[1].split(')')[0]);
if (('' + Intl.DateTimeFormat().resolvedOptions().timeZone).replace(/^undefined/g,'').replace(/^null/g,'').trim() != '') {
useranswersalt.push(('' + Intl.DateTimeFormat().resolvedOptions().timeZone));
} else {
useranswersalt.push('');
}
}

if (('' + Intl.DateTimeFormat().resolvedOptions().timeZone).replace(/^undefined/g,'').replace(/^null/g,'').trim() != '') {
userquestions.push('What is the geographic location name of my timezone ( eg. Australia/Sydney )' + flaghint.replace(')','& time right now is ' + ('' + new Date()).split(' GMT')[0] + ' )') + '?');
useranswers.push(('' + Intl.DateTimeFormat().resolvedOptions().timeZone));
if (('' + document.getElementById('myrow').title).indexOf('(') != -1) {
useranswersalt.push(document.getElementById('myrow').title.split('(')[1].split(')')[0]);
} else {
useranswersalt.push('');
}
}

if (('' + document.getElementById('myrow').title).indexOf(' speaking ') != -1) {
userquestions.push('What language might I speak' + flaghint + '?');
useranswers.push(('' + document.getElementById('myrow').title).split(' speaking ')[1].split(' or ')[0]);
if (('' + document.getElementById('myrow').title).split(' speaking ')[1].split(' or ')[1].split(' ; ')[0].trim() != '') {
useranswersalt.push(('' + document.getElementById('myrow').title).split(' speaking ')[1].split(' or ')[1].split(' ; ')[0].trim());
} else {
useranswersalt.push('');
}
}

if (('' + document.getElementById('myrow').title).indexOf(' has a capital city called ') != -1) {
userquestions.push('What is the capital city of my country' + flaghint + '?');
useranswers.push(('' + document.getElementById('myrow').title).split(' has a capital city called ')[1].split(' ; ')[0].trim());
useranswersalt.push('');
}

if (('' + document.getElementById('myrow').title).indexOf(' 1234.56 is ') != -1) {
userquestions.push('What is the amount 1234.56 in the currency coding of my country' + flaghint + '?');
useranswers.push(('' + document.getElementById('myrow').title).split(' 1234.56 is ')[1].split(' Or ')[0].split(' ; ')[0].trim());
if (('' + document.getElementById('myrow').title).split(' 1234.56 is ')[1].split(' Or ')[1].split(' ; ')[0].trim() != '') {
useranswersalt.push(('' + document.getElementById('myrow').title).split(' 1234.56 is ')[1].split(' Or ')[1].split(' ; ')[0].trim());
} else {
useranswersalt.push('');
}
}

}
if (document.getElementById('myguess').getAttribute('data-question') != '' || document.getElementById('myguess').getAttribute('data-answer') != '') {
//document.getElementById('sbonus').style.display='inline-block';
document.getElementById('ibonus').style.display='inline-block';
}
if (document.getElementById('yourguess').getAttribute('data-question') != '' || document.getElementById('yourguess').getAttribute('data-answer') != '') {
//document.getElementById('sbonus').style.display='inline-block';
document.getElementById('ibonus').style.display='inline-block';
}
if (defq != '' && eval('' + bonusmode.length) > 0) {
resetq(false);
}
document.getElementById('tdstatus').title=document.getElementById('tdstatus').innerHTML;
if (document.getElementById('iam').value.replace(/^\@$/g,'') != '' && document.getElementById('otheris').value != '' && document.getElementById('myh3').innerHTML.indexOf(' ... checking for other game players now') != -1) {
document.getElementById('myh3').style.cursor='pointer';
if (!document.getElementById('myfont')) {
document.getElementById('myh3').innerHTML=document.getElementById('myh3').innerHTML.split(' ...')[0] + ' ... you (' + document.getElementById('iam').value + ') are playing with ' + document.getElementById('otheris').value + ' our ' + thewords[theiw] + ' Game';
}
}
if (document.getElementById('iam').value != '' && document.getElementById('otheris').value != '' && document.getElementById('myh3').innerHTML.indexOf(' ... checking for other game players now') == -1 && !allowsdone) {
allowsdone=true;
document.getElementById('allows').style.display='inline-block';
document.getElementById('fshare').style.display='inline-block';
document.getElementById('allowstwo').style.display='inline-block';
document.getElementById('fsharetwo').style.display='inline-block';
}
if (document.getElementById('tdstatus').innerHTML == 'Select a ' + thenouns[theiw] + ' You Are Asking Your Player Partner to Guess ...') {
holdon=false;
}
if (document.getElementById('tdstatus').innerHTML.indexOf('Awaiting ') == 0) {
if (!awaiting) {
awaiting=true;
ims=document.getElementsByTagName('img');
for (jims=0; jims<ims.length; jims++) {
ims[jims].setAttribute('disabled',true);
}
}
} else if (awaiting) {
awaiting=false;
ims=document.getElementsByTagName('img');
for (jims=0; jims<ims.length; jims++) {
ims[jims].removeAttribute('disabled');
}
}
}

function isitok(wasthisval, suggestedbecoming) {
var outidea=suggestedbecoming;
if (sideas.indexOf(wasthisval) != -1 && sideas.indexOf(suggestedbecoming) != -1) {
if ((eval(sideas.indexOf(suggestedbecoming)) + 1 - eval(sideas.indexOf(wasthisval))) == 0) {
outidea=outidea;
alert(1);
} else if (eval(sideas.indexOf(wasthisval)) == eval(-1 + sideas.length) && eval(sideas.indexOf(suggestedbecoming)) == 0) {
outidea=outidea;
alert(2);
} else {
alert('Oops ' + wasthisval + ' onto ' + suggestedbecoming);
}
}
return outidea;
}


function toggle() {
if (document.getElementById('tdstatus').innerHTML.toLowerCase().indexOf(('Awaiting Guess from Your Player Partner').toLowerCase()) == 0) {
//alert('one');
document.getElementById('tdstatus').innerHTML='Awaiting Other Player Choosing a ' + thenouns[theiw] + ' to Guess ...'; //Awaiting a Zener Card Selection from Your Playing Partner ...';
} else if (document.getElementById('tdstatus').innerHTML.toLowerCase().indexOf(('Awaiting a ' + thenouns[theiw] + ' Selection from Your Playing Partner').toLowerCase()) == 0) {
//alert('three');
document.getElementById('tdstatus').innerHTML='Select the ' + thenouns[theiw] + ' Your Player Partner Selected ...'; //Awaiting a Zener Card Selection from Your Playing Partner ...';
} else if (document.getElementById('tdstatus').innerHTML.indexOf('Awaiting ') == 0) {
//alert('two');
document.getElementById('tdstatus').innerHTML='Select the ' + thenouns[theiw] + ' Your Player Partner Selected ...';
} else {
document.getElementById('tdstatus').innerHTML='Select a ' + thenouns[theiw] + ' You Are Asking Your Player Partner to Guess ...';
if (woois) {
//alert('11woois ' + holdon + ' ' + document.URL);
setTimeout(function(){
//woois.focus();
woois.document.getElementById('tdstatus').innerHTML='Awaiting a ' + thenouns[theiw] + ' Selection from Your Playing Partner ... ';
//alert('11wooisX ' + holdon + ' ' + document.URL);
}, 5000); // ???
} else if (window.opener) {
//alert('11wopener ' + holdon + ' ' + document.URL);
setTimeout(function(){
//window.opener.focus();
if (2 == 23) {
window.opener.document.getElementById('tdstatus').innerHTML='Select the ' + thenouns[theiw] + ' Your Player Partner Selected ... ';
} else if (5 == 5) {
window.opener.document.getElementById('tdstatus').innerHTML='Awaiting Guess from Your Player Partner ... ';
//alert('11wopenerZ ' + holdon + ' ' + document.URL);
} else {
window.opener.document.getElementById('tdstatus').innerHTML='Awaiting a ' + thenouns[theiw] + ' Selection from Your Playing Partner ... ';
}
//alert('11wopenerX ' + holdon + ' ' + document.URL);
}, 5000); // ???
} else if (document.URL.indexOf('playwith=') != -1) { // is guest
// //alert('1 ' + holdon + ' ' + document.URL);
//if (sharemyscore) {
// ppsuff+=" setTimeout(function(){ var wash3=parent.document.getElementById('myh3').innerHTML.split(' <')[0].split(' ')[0].split(' <')[0].split('<')[0].split(' our ')[0]; if (parent.document.getElementById('score').innerHTML != 'Score: " + score + "JU/NK" + goes + "') { parent.document.getElementById('myh3').innerHTML=wash3 + ('" + getcontsms() + "' + ' our ' + thewords[theiw] + ' Game').replace(' ',' ').replace('  ',' '); } }, 3000); ";
//}
document.getElementById('ifpiam').src=document.getElementById('ifpiam').src.split('?')[0] + '?to=' + encodeURIComponent(document.getElementById('otheris').value) + '¬=' + encodeURIComponent(document.URL) + '&from=' + encodeURIComponent(document.getElementById('iam').value + (ppsuff != '' ? ('Score: ' + score + '/' + goes) : '')) + '&js=' + encodeURIComponent(" parent.document.getElementById('tdstatus').innerHTML='Awaiting a " + thenouns[theiw] + " Selection from Your Playing Partner ... '; ");
////if (ppsuff != '') {
////setTimeout(function(){
////document.getElementById('ifpiamtwo').src=document.getElementById('ifpiamtwo').src.split('?')[0] + '?to=' + encodeURIComponent(document.getElementById('iam').value) + '¬=' + encodeURIComponent(document.URL) + '&from=' + encodeURIComponent(document.getElementById('otheris').value + (ppsuff != '' ? ('Score: ' + score + '/' + goes) : '')) + '&js=' + encodeURIComponent(ppsuff);
//ppsuff='';
//alert(456);
////}, 2300);
////}
//alert(456);
//toggle(); //document.getElementById('ifpiamtwo').src=document.getElementById('ifpiamtwo').src.split('?')[0] + '?to=' + encodeURIComponent(document.getElementById('iam').value) + '¬=' + encodeURIComponent(document.URL) + '&js=' + encodeURIComponent(" parent.document.getElementById('tdstatus').innerHTML='Select the " + thenouns[theiw] + " Your Player Partner Selected ...'; ");
} else { // is originator
//alert('What do I do?');
// //alert('11 ' + holdon + ' ' + document.URL);
//if (sharemyscore) {
// ppsuff+=" setTimeout(function(){ var wash3=parent.document.getElementById('myh3').innerHTML.split(' <')[0].split(' ')[0].split(' <')[0].split('<')[0].split(' our ')[0]; if (parent.document.getElementById('score').innerHTML != 'Score: " + score + "JU/NK" + goes + "') { parent.document.getElementById('myh3').innerHTML=wash3 + ('" + getcontsms() + "' + ' our ' + thewords[theiw] + ' Game').replace(' ',' ').replace('  ',' '); } }, 3000); ";
//}
document.getElementById('ifpiam').src=document.getElementById('ifpiam').src.split('?')[0] + '?to=' + encodeURIComponent(document.getElementById('iam').value) + '¬=' + encodeURIComponent(document.URL) + '&from=' + encodeURIComponent(document.getElementById('otheris').value + (ppsuff != '' ? ('Score: ' + score + '/' + goes) : '')) + '&js=' + encodeURIComponent(" parent.document.getElementById('tdstatus').innerHTML='Awaiting a " + thenouns[theiw] + " Selection from Your Playing Partner ... '; ");
////if (ppsuff != '') {
////setTimeout(function(){
////document.getElementById('ifpiamtwo').src=document.getElementById('ifpiamtwo').src.split('?')[0] + '?to=' + encodeURIComponent(document.getElementById('otheris').value) + '¬=' + encodeURIComponent(document.URL) + '&from=' + encodeURIComponent(document.getElementById('iam').value + (ppsuff != '' ? ('Score: ' + score + '/' + goes) : '')) + '&js=' + encodeURIComponent(ppsuff.replace('setTimeout(function(){ ',' '),replace(' , 3000);',''));
//ppsuff='';
//alert(4256);
////}, 2300);
////}
//alert(4256);
//alert('11 ' + holdon + ' ' + decodeURIComponent(document.getElementById('ifpiam').src));
//toggle(); //document.getElementById('ifpiamtwo').src=document.getElementById('ifpiamtwo').src.split('?')[0] + '?to=' + encodeURIComponent(document.getElementById('iam').value) + '¬=' + encodeURIComponent(document.URL) + '&js=' + encodeURIComponent(" parent.document.getElementById('tdstatus').innerHTML='Select the " + thenouns[theiw] + " Your Player Partner Selected ...'; ");
}
//setTimeout(function(){ alert('huh ' + document.URL + ' RE Select a Zener Card You Are Asking Your Player Partner to Guess'); }, 5000);
}
}

function washing(inscore,inq,ina) {
var wash3=document.getElementById('myh3').innerHTML.split(' <')[0].split(' our ')[0];
if (inscore.trim() == 'Score:') {
if (lastafterscore != '') {
if (lastafterscore != (' ' + score + '/' + goes) || !document.getElementById('myfont')) {
document.getElementById('myh3').innerHTML=wash3 + (' <font size=1 id=myfont>Score:' + lastafterscore + '</font> our ' + thewords[theiw] + ' Game').replace(' ',' ').replace('  ',' ');
}
}
} else {
if (inscore != ('Score: ' + score + '/' + goes) || !document.getElementById('myfont')) {
lastafterscore=inscore.split('Score:')[1];
document.getElementById('myh3').innerHTML=wash3 + (' <font size=1 id=myfont>' + inscore + '</font> our ' + thewords[theiw] + ' Game').replace(' ',' ').replace('  ',' ');
}
}
if (('' + inq).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
defq=decodeURIComponent(inq).replace(/\+/g,' ').replace(/\ \ \ /g,' + ');
defa=decodeURIComponent(ina).replace(/\+/g,' ').replace(/\ \ \ /g,' + ');
}
}

function changeover(pck) {
var doit=true, wash3='', newsc='';
var synopsis=' ... bad luck'; // ... it was ' + document.getElementById('yourguess').value;
pick=pck;

// false ... Select a Zener Card You Are Asking Your Player Partner to Guess ... is working
// false ... Select the Zener Card Your Player Partner Selected ... is not working
//document.title=('' + awaiting + ' ' + document.URL + ' ... ' + document.getElementById('tdstatus').innerHTML);
// alert('' + awaiting + ' ' + document.URL + ' ... ' + document.getElementById('tdstatus').innerHTML);
if (document.getElementById('tdstatus').innerHTML.indexOf('Select a ') == 0) {
ppsuff='';
}
if (!awaiting && (document.getElementById('tdstatus').innerHTML.indexOf('Select a ' + thenouns[theiw] + ' You Are Asking Your Player Partner to Guess') == 0)) {
document.getElementById('tdstatus').innerHTML='Awaiting Guess from Your Player Partner ...';
if (woois) {
//document.title=('woois:' + awaiting + ' ' + document.URL + ' ... ' + document.getElementById('tdstatus').innerHTML);
// alert('yourguess=' + document.getElementById('yourguess').value + ' yourguesswop=' + woois.document.getElementById('yourguess').value);
// alert('myguess=' + document.getElementById('myguess').value + ' myguesswop=' + woois.document.getElementById('myguess').value);
if (('' + woois.document.getElementById('yourguess').value) == '' || 1 == 1) {
woois.document.getElementById('yourguess').value='' + pck;
document.getElementById('yourguess').value='' + pck; // new
}
woois.document.getElementById('ifplay').src=woois.document.getElementById('ifplay').src.split('&statustoggle=')[0] + '&statustoggle=' + Math.floor(Math.random() * 19897865);
setTimeout(function(){ woois.document.getElementById('tdstatus').innerHTML='Select the ' + thenouns[theiw] + ' Your Player Partner Selected ...'; }, 3000); // ???
//setTimeout(function(){ alert('What should child be saying now?'); }, 5000);
} else if (window.opener) {
//document.title=('wop:' + awaiting + ' ' + document.URL + ' ... ' + document.getElementById('tdstatus').innerHTML);
if (('' + window.opener.document.getElementById('yourguess').value) == '') {
window.opener.document.getElementById('yourguess').value='' + pck;
}
window.opener.document.getElementById('ifplay').src=window.opener.document.getElementById('ifplay').src.split('&statustoggle=')[0] + '&statustoggle=' + Math.floor(Math.random() * 19897865);
setTimeout(function(){ window.opener.document.getElementById('tdstatus').innerHTML='Select the ' + thenouns[theiw] + ' Your Player Partner Selected ...'; }, 3000); // ???
//setTimeout(function(){ alert('What should parent be saying now?'); }, 5000);
} else if (document.URL.indexOf('playwith=') != -1) { // is guest
//alert(111);
//doit=false;
document.getElementById('ifpiam').src=document.getElementById('ifpiam').src.split('?')[0] + '?pck=' + pck + '&from=' + encodeURIComponent(document.getElementById('iam').value) + '&to=' + encodeURIComponent(document.getElementById('otheris').value) + '¬=' + encodeURIComponent(document.URL) + qanda() + '&js=' + encodeURIComponent(" if (('' + parent.document.getElementById('yourguess').value) == '') { parent.document.getElementById('yourguess').value='' + pck; } parent.document.getElementById('ifplay').src=parent.mbga(parent.document.getElementById('ifplay').src).split('&statustoggle=')[0] + '&statustoggle=' + Math.floor(Math.random() * 19897865); setTimeout(function(){ parent.document.getElementById('tdstatus').innerHTML='Select the " + thenouns[theiw] + " Your Player Partner Selected ...'; }, 3000); ");
document.getElementById('ifpiamtwo').src=document.getElementById('ifpiamtwo').src.split('?')[0] + '?pck=' + pck + '&to=' + encodeURIComponent(document.getElementById('iam').value) + '¬=' + encodeURIComponent(document.URL) + qanda() + '&js=' + encodeURIComponent(" if (('' + parent.document.getElementById('yourguess').value) == '') { parent.document.getElementById('yourguess').value='' + pck; } parent.document.getElementById('ifplay').src=parent.mbga(parent.document.getElementById('ifplay').src).split('&statustoggle=')[0] + '&statustoggle=' + Math.floor(Math.random() * 19897865); ");
} else { // is originator
//doit=false;
//alert('What dost I do?');
//alert('1111 ' + holdon + ' ' + otheris);

document.getElementById('ifpiam').src=document.getElementById('ifpiam').src.split('?')[0] + '?pck=' + pck + '&to=' + encodeURIComponent(document.getElementById('otheris').value) + '¬=' + encodeURIComponent(document.URL) + qanda() + '&from=' + encodeURIComponent(document.getElementById('iam').value + (ppsuff != '' ? ('Score: ' + score + '/' + goes) : '')) + '&js=' + encodeURIComponent(" if (('' + parent.document.getElementById('yourguess').value) == '') { parent.document.getElementById('yourguess').value='' + pck; } parent.document.getElementById('ifplay').src=parent.mbga(parent.document.getElementById('ifplay').src).split('&statustoggle=')[0] + '&statustoggle=' + Math.floor(Math.random() * 19897865); setTimeout(function(){ parent.document.getElementById('tdstatus').innerHTML='Select the " + thenouns[theiw] + " Your Player Partner Selected ...'; }, 3000); ");
//alert('1111a ' + holdon + ' ' + decodeURIComponent(document.getElementById('ifpiam').src)); // new below
document.getElementById('ifpiamtwo').src=document.getElementById('ifpiamtwo').src.split('?')[0] + '?pck=' + pck + '&to=' + encodeURIComponent(document.getElementById('iam').value) + '¬=' + encodeURIComponent(document.URL) + qanda() + '&js=' + encodeURIComponent(" if (5 == 6) { parent.document.getElementById('tdstatus').innerHTML='Select the " + thenouns[theiw] + " Your Player Partner Selected ...'; } parent.document.getElementById('ifplay').src=parent.mbga(parent.document.getElementById('ifplay').src).split('&statustoggle=')[0] + '&statustoggle=' + Math.floor(Math.random() * 19897865); ");
}
} else if (document.getElementById('tdstatus').innerHTML.indexOf('Select the ' + thenouns[theiw] + ' Your Player Partner Selected') == 0) {
goes++;
if (('' + document.getElementById('yourguess').value) == ('' + pck)) {
synopsis=' ... well done ... spot on!';
score+=pluseq;
pluseq=1;
if (sharemyscore) {
ppsuff=" setTimeout(function(){ var wash3=parent.document.getElementById('myh3').innerHTML.split(' <')[0].split(' ')[0].split(' <')[0].split('<')[0].split(' our ')[0]; if (parent.document.getElementById('score').innerHTML != 'Score: " + score + "JU/NK" + goes + "') { parent.document.getElementById('myh3').innerHTML=(wash3 + ('" + getcontsms() + "' + ' our " + thewords[theiw] + " Game').replace(' ',' ')).replace(/\ \;\ \;/g,' ').replace(/\ \;\ \;/g,' '); } }, 3000); ";
}
} else {
score+=eval(-1 + pluseq);
pluseq=1;
if (woois) {
if (('' + woois.document.getElementById('yourguess').value) == ('' + pck)) {
synopsis=' ... well done ... spot on!';
score+=pluseq;
pluseq=1;
} else {
score+=eval(-1 + pluseq);
pluseq=1;
}
}
synopsis=' ... bad luck' + (wherewrong ? ' ... it was ' + document.getElementById('yourguess').value : '');
if (sharemyscore) {
ppsuff=" setTimeout(function(){ var wash3=parent.document.getElementById('myh3').innerHTML.split(' <')[0].split(' ')[0].split(' <')[0].split('<')[0].split(' our ')[0]; if (parent.document.getElementById('score').innerHTML != 'Score: " + score + "JU/NK" + goes + "') { parent.document.getElementById('myh3').innerHTML=(wash3 + ('" + getcontsms() + "' + ' our " + thewords[theiw] + " Game').replace(' ',' ')).replace(/\ \;\ \;/g,' ').replace(/\ \;\ \;/g,' ').trim().replace(/\ /g,'_') + '^');
if (gdefv.indexOf('?') == -1) {
gdefv=gdefv.replace(/\^/g, '').replace(/\%3f/g, '?');
//alert('gdefv=' + gdefv);
scmok=true;
movesallowed=true;
gmovesallowed=true;
five=5;
gfive=5;
document.getElementById('myimg').click(); //scmove();
} else {
setTimeout(dountilnoquestion, 1000);
}
} else {
//alert('curgdefv=' + curgdefv);
document.getElementById('placegeo').value=' ';
//alert('111:' + '/PHP/fgc/index.php?placegeo=' + encodeURIComponent(curgdefv.replace(/\ /g,'_')));
//document.getElementById('wif').src='/PHP/fgc/index.php?placegeo=' + encodeURIComponent(curgdefv.replace(/\ \(/g,', ').replace(/\)$/g,'')).replace(/\%20/g,'_');
document.getElementById('wif').src='/PHP/fgc/index.php?placegeo=' + encodeURIComponent(curgdefv.split(',')[eval(-1 + curgdefv.split(',').length)].split('-')[eval(-1 + curgdefv.split(',')[eval(-1 + curgdefv.split(',').length)].split('-').length)].split('{')[0].trim().replace(/\ /g,'_'));
//alert('111:' + '/PHP/fgc/index.php?tzexact=&tznickname=' + encodeURIComponent(curgdefv.split(',')[eval(-1 + curgdefv.split(',').length)].split('-')[eval(-1 + curgdefv.split(',')[eval(-1 + curgdefv.split(',').length)].split('-').length)].split('{')[0].trim().replace(/\ /g,'_')));
// document.getElementById('wiftwo').src='/PHP/fgc/index.php?tzexact=&tznickname=' + encodeURIComponent(curgdefv.split(',')[eval(-1 + curgdefv.split(',').length)].split('-')[eval(-1 + curgdefv.split(',')[eval(-1 + curgdefv.split(',').length)].split('-').length)].split('{')[0].trim().replace(/\ /g,'_'));
}

}
}

function woit(what) {
if (what.trim() != '') {
//alert(what + ' ... ' + bigback);
if (bigback.indexOf(what + ':') != -1 || bigback.indexOf(what.replace(/\ /g,'_') + ':') != -1) {
if (wobi) {
if (!wobi.closed) { wobi.close(); }
}
wobi=window.open('', '_blank', 'top=50,left=50,width=900,height=800');
if (bigback.indexOf(what + ':') != -1) {
wobi.document.write(bigback.split(what + ':')[1].split('</div>')[0] + '</div>');
} else {
wobi.document.write(bigback.split(what.replace(/\ /g,'_') + ':')[1].split('</div>')[0] + '</div>');
}
setTimeout(function(){ wobi.document.title=what + ' ... Wikipedia images ... thanks'; }, 6000);
}
}
}

function coordittwo(xiois) {
var xxaconto = (xiois.contentWindow || xiois.contentDocument);
if (xxaconto != null) {
if (xxaconto.document) { xxaconto = xxaconto.document; }
var xxacontobodyouterHTML=xxaconto.body.outerHTML.replace(/\"\;/g,'"');
//alert(xxacontobodyouterHTML);
if (xxacontobodyouterHTML.indexOf('.style.background="URL(') != -1) {
//alert('URL(' + xxacontobodyouterHTML.split('.style.background="URL(')[1].split('"')[0] + '');
//alert('"' + xxacontobodyouterHTML.split('.style.backgroundRepeat="')[1].split('"')[0] + '"');
//alert('"' + xxacontobodyouterHTML.split('.style.backgroundPosition="')[1].split('"')[0] + '"');
if (bigback.indexOf(xiois.src.split('tznickname=')[1].split('&')[0].split('#')[0] + ':') == -1) {
if (document.getElementById('span' + xiois.src.split('tznickname=')[1].split('&')[0].split('#')[0])) {
document.getElementById('span' + xiois.src.split('tznickname=')[1].split('&')[0].split('#')[0].replace(/\ /g,'_')).style.cursor='pointer';
document.getElementById('span' + xiois.src.split('tznickname=')[1].split('&')[0].split('#')[0].replace(/\ /g,'_')).title='Wikipedia images available for ' + xiois.src.split('tznickname=')[1].split('&')[0].split('#')[0].replace(/\_/g,' ') + ' clicking here now.';
}
bigback+=xiois.src.split('tznickname=')[1].split('&')[0].split('#')[0] + ':' + document.getElementById('ourcanvas').outerHTML.replace('<canvas','<div title="Images for ' + xiois.src.split('tznickname=')[1].split('&')[0].split('#')[0].replace(/\_/g,' ') + ' thanks to Wikipedia at https://wikipedia.org" ').replace('</canvas>','</div>').replace(':none;',':block;background:' + 'URL(' + xxacontobodyouterHTML.split('.style.background="URL(')[1].split('"')[0] + ';background-repeat:no-repeat;background-position:' + xxacontobodyouterHTML.split('.style.backgroundPosition="')[1].split('"')[0]);
}
}
wiftwoavailable=true;
if (nextwiftwo.split('#')[0] != '') {
if (nextwiftwo.split('#')[0].indexOf('dopg=') != -1) {
document.getElementById('placegeo').value=' ';
override=nextwiftwo.split('#')[0].replace('dopg=y&','').split('tznickname=')[1].split('&')[0].split('#')[0];
//alert('2:' + '/PHP/fgc/index.php?placegeo=' + encodeURIComponent(override.replace(/\ \(/g,', ').replace(/\)$/g,'')).replace(/\%20/g,'_'));
document.getElementById('wif').src='/PHP/fgc/index.php?placegeo=' + encodeURIComponent(override.replace(/\ \(/g,', ').replace(/\)$/g,'')).replace(/\%20/g,'_');
}
xiois.src=nextwiftwo.split('#')[0].replace('dopg=y&','');
nextwiftwo=nextwiftwo.replace(nextwiftwo.split('#')[0] + '#', '');
wiftwoavailable=false;
}
}
}

function coordit(xiois) {
var thisoverride=override;
override='';
xaconto = (xiois.contentWindow || xiois.contentDocument);
//alert(11);
if (xaconto != null) {
//alert('111 ' + xiois.src);
try {
if (xaconto.document) { xaconto = xaconto.document; }
//alert('1111 ' + xaconto.body.innerHTML);
if (xaconto.body.innerHTML.indexOf('>Coordinates') != -1) {
var subpart=xaconto.body.innerHTML.split('>Coordinates')[1];
latdeg=-999;
longdeg=-999;
latmin=0;
longmin=0;
latsec=0;
longsec=0;
sparelat='';
sparelong='';
if (subpart.indexOf('"latitude"') != -1 && subpart.indexOf('"longitude"') != -1) {
latdeg=subpart.split('"latitude"')[1].split('>')[1].split("°")[0].split('<')[0];
sparelat=subpart.split('"latitude"')[1].split('>')[1].split('<')[0].slice(-1);
latmin=subpart.split('"latitude"')[1].split('>')[1].split('<')[0].substring(eval(1 + eval('' + latdeg.length))).split("′")[0].split(sparelat)[0].split('<')[0];
if (sparelat == 'S') { latdeg=eval(eval(eval(-1 * latmin) / 60) - latdeg); } else { latdeg+=eval(eval('' + latmin) / 60) }

longdeg=subpart.split('"longitude"')[1].split('>')[1].split("°")[0].split('<')[0];
sparelong=subpart.split('"longitude"')[1].split('>')[1].split('<')[0].slice(-1);
longmin=subpart.split('"longitude"')[1].split('>')[1].split('<')[0].substring(eval(1 + eval('' + longdeg.length))).split("′")[0].split(sparelong)[0].split('<')[0];
if (sparelong == 'W') { longdeg=eval(eval(eval(-1 * longmin) / 60) - longdeg); } else { longdeg+=eval(eval('' + longmin) / 60) }


if (gdefv.indexOf(curgdefv + '?') != -1) {
gdefv=gdefv.replace(curgdefv + '?', curgdefv + ('|' + longdeg).replace('|-','|_') + + ('|' + latdeg).replace('|-','|_') + '^');
dountilnoquestion();
}

return true;

} else if (('' + document.getElementById('placegeo').value).trim().indexOf(',') != -1) {
//alert(document.getElementById('placegeo').value);
if (eval('' + document.getElementById('placegeo').title.split(',').length) >= 3) {
isotwo+=curgdefv + document.getElementById('placegeo').title.split(',')[eval(-3 + document.getElementById('placegeo').title.split(',').length)];
if (thisoverride != '') { alert(isotwo + ' ... regarding ' + thisoverride); }
setTimeout(newhashit, 5000);
}
latdeg=document.getElementById('placegeo').value.split(',')[eval(-2 + document.getElementById('placegeo').value.split(',').length)];
longdeg=document.getElementById('placegeo').value.split(',')[eval(-1 + document.getElementById('placegeo').value.split(',').length)];
//alert('' + longdeg);

if (gdefv.indexOf(curgdefv + '?') != -1) {
gdefv=gdefv.replace(curgdefv + '?', curgdefv + ('|' + longdeg).replace('|-','|_') + ('|' + latdeg).replace('|-','|_') + '^');
if (gdefv.indexOf('?') == -1) {
gdefv=gdefv.replace(/\^/g, '').replace(/\%3f/g, '?');
//document.title=gdefv;
//alert('gdefv=' + gdefv);
scmok=true;
movesallowed=true;
gmovesallowed=true;
five=5;
gfive=5;
document.getElementById('myimg').click(); //scmove();
return '';
} else {
setTimeout(dountilnoquestion, 1000);
}
//dountilnoquestion();
}

return true;
}

} else {

if (('' + document.getElementById('placegeo').value).trim().indexOf(',') != -1) {
//alert(document.getElementById('placegeo').value);
//alert(document.getElementById('placegeo').value);
if (eval('' + document.getElementById('placegeo').title.split(',').length) >= 3) {
isotwo+=curgdefv + document.getElementById('placegeo').title.split(',')[eval(-3 + document.getElementById('placegeo').title.split(',').length)];
if (thisoverride != '') { alert(isotwo + ' ... Regarding ' + thisoverride); }
setTimeout(newhashit, 5000);
}
latdeg=document.getElementById('placegeo').value.split(',')[eval(-2 + document.getElementById('placegeo').value.split(',').length)];
longdeg=document.getElementById('placegeo').value.split(',')[eval(-1 + document.getElementById('placegeo').value.split(',').length)];
//alert('7:' + longdeg + ' ' + document.getElementById('placegeo').value);
//alert('77:' + latdeg + ' gdefv=' + gdefv + ' and curgdefv?=' + curgdefv + '?');
// 77:-23.70000 gdefv=Alice Springs?-Sydney? and curgdefv?=Alice Springs?
// 77:-33.86778 gdefv=Alice Springs|133.87000|_23.70000^-Sydney? and curgdefv?=Sydney?

if (gdefv.indexOf(curgdefv + '?') != -1) {
//alert('r:' + document.getElementById('placegeo').value);
gdefv=gdefv.replace(curgdefv + '?', curgdefv + ('|' + longdeg).replace('|-','|_') + ('|' + latdeg).replace('|-','|_') + '^');
if (gdefv.indexOf('?') == -1) {
gdefv=gdefv.replace(/\^/g, '').replace(/\%3f/g, '?');
//document.title=gdefv;
//alert('gdefv =' + gdefv);
scmok=true;
movesallowed=true;
gmovesallowed=true;
five=5;
gfive=5;
document.getElementById('myimg').click(); //scmove();
return '';
} else {
dountilnoquestion(); //setTimeout(dountilnoquestion, 1000);
}
// dountilnoquestion();
}
} else {
if (gdefv.indexOf(curgdefv + '?') != -1) {
//alert('q:' + document.getElementById('placegeo').value);
gdefv=gdefv.replace(curgdefv + '?', curgdefv + caret.trim());
if (gdefv.indexOf('?') == -1) {
gdefv=gdefv.replace(/\^/g, '').replace(/\%3f/g, '?');
//document.title=gdefv;
//alert('gdefv= ' + gdefv);
scmok=true;
movesallowed=true;
gmovesallowed=true;
five=5;
gfive=5;
document.getElementById('myimg').click(); //scmove();
return '';
} else {
dountilnoquestion(); //setTimeout(dountilnoquestion, 1000);
}
//
}
}


//gextras='';
//if (window.opener) {
// window.opener.putgextras(gextras);
//} else if (window.parent) {
// parent.putgextras(gextras);
//}
}
} catch(hgjg) { }
}
return true;
}

function iuo(newtooldmaybe) {
var outmel=newtooldmaybe, pref='', suff='';
var flds=[];

//alert('0:' + outmel);

if (outmel.trim() != '') {

if (outmel != outmel.replace(/^\ /g, '')) {
while (outmel != outmel.replace(/^\ /g, '')) {
outmel=outmel.replace(/^\ /g, '');
pref+=' ';
}
}
//alert('00:' + outmel);

if (outmel != outmel.replace(/\ $/g, '')) {
while (outmel != outmel.replace(/\ $/g, '')) {
outmel=outmel.replace(/\ $/g, '');
suff+=' ';
}
}
//alert('000:' + outmel);

if (outmel.indexOf('|') != -1) {
//alert('10:' + outmel);
outmel=outmel.replace(/\|\_/g, '|-').replace(/^\_/g, '-'); //.replace(/\ /g,'_');
//alert('110:' + outmel);
flds=outmel.replace('[', '').replace(']', '').split('|');
if (eval('' + flds.length) == 2 || (eval('' + flds.length) == 3 && flds[eval(-1 + flds.length)].trim() == '')) {
if (outmel.indexOf('.') == -1) {
//if (outmel.trim() != '') { alert(newtooldmaybe + ' Vs ' + pref + flds[0] + ',' + flds[1] + suff); }
return pref + flds[0] + ',' + flds[1] + suff;
} else {
//if (outmel.trim() != '') { alert(outmel); alert(newtooldmaybe + ' vS ' + pref + '[' + flds[0] + ',' + flds[1] + ']' + suff); }
return pref + '[' + flds[0] + ',' + flds[1] + ']' + suff;
}
} else if (eval('' + flds.length) >= 3) {
//if (outmel.trim() != '') { alert(outmel); alert(newtooldmaybe + ' VS ' + pref + '[' + flds[eval(-2 + flds.length)] + ',' + flds[eval(-1 + flds.length)] + ',' + outmel.replace('|' + flds[eval(-2 + flds.length)] + '|' + flds[eval(-1 + flds.length)], '').replace('[','').replace(']','') + ']' + suff); }
return pref + '[' + flds[eval(-2 + flds.length)] + ',' + flds[eval(-1 + flds.length)] + ',' + outmel.replace('|' + flds[eval(-2 + flds.length)] + '|' + flds[eval(-1 + flds.length)], '').replace('[','').replace(']','') + ']' + suff;
}
}

// Budgewoi33.2329° S, 151.5516° E

}

//if (outmel.trim() != '') { alert(newtooldmaybe + ' vs ' + pref + outmel + suff); }
return pref + outmel + suff;
}

function toiuo(meldaccordingly) {
var minus=String.fromCharCode(9), haveseencapital=false, outmel=meldaccordingly, pref='', suff='', icom=0, degfixes=[], ideg=0, xtlat='', xtlong='', nums='', ijk=0, xtplace='', tobechanged='', comfixes=[];

if (outmel.trim() != '') {

if (outmel != outmel.replace(/^\ /g, '')) {
while (outmel != outmel.replace(/^\ /g, '')) {
outmel=outmel.replace(/^\ /g, '');
pref+=' ';
}
}

if (outmel != outmel.replace(/\ $/g, '')) {
while (outmel != outmel.replace(/\ $/g, '')) {
outmel=outmel.replace(/\ $/g, '');
suff+=' ';
}
}

degfixes=outmel.split('[');
if (eval('' + degfixes.length) > 1) {
for (ideg=1; ideg<degfixes.length; ideg++) {
xtlat='';
xtlong='';
xtplace='';
tobechanged='[' + degfixes[ideg].split(']')[0] + ']';
comfixes=degfixes[ideg].split(']')[0].split(',');
if (eval('' + comfixes.length) >= 2) {
if (eval('' + comfixes.length) == 2) {
xtlong='' + comfixes[0];
xtlat='' + comfixes[1];
//outmel=outmel.replace('' + tobechanged + '', '[' + xtplace.replace(/\-/g,'%2d') + '|' + xtlong.replace('-','_') + '|' + xtlat.replace('-','_') + ']');
outmel=outmel.replace('' + tobechanged + '', '' + xtplace.replace(/\-/g,'%2d') + '|' + xtlong.replace('-','_') + '|' + xtlat.replace('-','_') + '');
} else {
xtlong='' + comfixes[0];
xtlat='' + comfixes[1];
xtplace=degfixes[ideg].split(']')[0].replace(xtlong + ',' + xtlat + ',', '');
//outmel=outmel.replace('' + tobechanged + '', '[' + xtplace.replace(/\-/g,'%2d') + '|' + xtlong.replace('-','_') + '|' + xtlat.replace('-','_') + ']');
outmel=outmel.replace('' + tobechanged + '', '' + xtplace.replace(/\-/g,'%2d') + '|' + xtlong.replace('-','_') + '|' + xtlat.replace('-','_') + '');
}
}
}
}

degfixes=outmel.split(String.fromCodePoint(176));
if (eval('' + degfixes.length) > 1) {
for (ideg=1; ideg<degfixes.length; ideg+=2) {
xtlat='';
xtlong='';
xtplace='';
nums='';
tobechanged=String.fromCodePoint(176) + degfixes[eval(0 + ideg)] + String.fromCodePoint(176);
switch (degfixes[eval(1 + ideg)].substring(0,2).trim().split(',')[0].split('-')[0].split('|')[0].split('_')[0]) {
case 'E':
tobechanged+=degfixes[eval(1 + ideg)].split('E')[0] + 'E';
for (ijk=0; ijk<degfixes[eval(0 + ideg)].length; ijk++) {
if (degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) == '.' || degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) == '-' || (degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) >= '0' && degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) <= '9')) { nums+=degfixes[eval(0 + ideg)].substring(ijk).substring(0,1); }
}
xtlong='' + nums.replace(/^\-/g,'');
break;
case 'W':
tobechanged+=degfixes[eval(1 + ideg)].split('W')[0] + 'W';
for (ijk=0; ijk<degfixes[eval(0 + ideg)].length; ijk++) {
if (degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) == '.' || degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) == '-' || (degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) >= '0' && degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) <= '9')) { nums+=degfixes[eval(0 + ideg)].substring(ijk).substring(0,1); }
}
xtlong='_' + nums.replace(/^\-/g,'');
break;
case 'S':
tobechanged+=degfixes[eval(1 + ideg)].split('S')[0] + 'S';
for (ijk=0; ijk<degfixes[eval(0 + ideg)].length; ijk++) {
if (degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) == '.' || degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) == '-' || (degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) >= '0' && degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) <= '9')) { nums+=degfixes[eval(0 + ideg)].substring(ijk).substring(0,1); }
}
xtlat='_' + nums.replace(/^\-/g,'');
break;
case 'N':
tobechanged+=degfixes[eval(1 + ideg)].split('N')[0] + 'N';
for (ijk=0; ijk<degfixes[eval(0 + ideg)].length; ijk++) {
if (degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) == '.' || degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) == '-' || (degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) >= '0' && degfixes[eval(0 + ideg)].substring(ijk).substring(0,1) <= '9')) { nums+=degfixes[eval(0 + ideg)].substring(ijk).substring(0,1); }
}
xtlat='' + nums.replace(/^\-/g,'');
break;
default:
break;
}

//alert('1:' + tobechanged + ' to ' + xtplace + '|' + xtlong + '|' + xtlat);
nums='';
haveseencapital=false;
minus='-';
if (degfixes[eval(-1 + ideg)].indexOf('}') != -1) { minus=String.fromCharCode(9); }
// Budgewoi33.2329° S, 151.5516° E{ydney}-{yes}Budge-Xwoi31.2329° S, 149.5516° E{elbourne}
//if (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1).toUpperCase() && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1).toLowerCase()) {
// haveseencapital;
// minus='-';
//}

switch (degfixes[eval(0 + ideg)].substring(0,2).trim().split(',')[0].split('-')[0].split('|')[0].split('_')[0]) {
case 'E':
ijk=eval(-1 + degfixes[eval(0 + ideg)].length);
while (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '.' || (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) >= '0' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) <= '9')) {
nums=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + nums;
tobechanged=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + tobechanged;
ijk--;
}
xtlong='' + nums.replace(/^\-/g,'');
while (ijk >= 0 && (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == ',' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == ' ' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '-' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '[' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '|' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == ';')) {
tobechanged=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + tobechanged;
ijk--;
}
while (ijk >= 0 && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != minus && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != '}' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != '[' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != '|' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != ';') {
xtplace=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + xtplace;
tobechanged=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + tobechanged;
ijk--;
}
//if (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '}') { xtplace=',' + xtplace; }
break;
case 'W':
ijk=eval(-1 + degfixes[eval(-1 + ideg)].length);
while (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '.' || (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) >= '0' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) <= '9')) {
nums=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + nums;
tobechanged=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + tobechanged;
ijk--;
}
xtlong='_' + nums.replace(/^\-/g,'');
while (ijk >= 0 && (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == ',' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == ' ' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '-' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '[' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '|' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == ';')) {
tobechanged=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + tobechanged;
ijk--;
}
while (ijk >= 0 && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != minus && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != '}' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != '[' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != '|' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != ';') {
xtplace=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + xtplace;
tobechanged=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + tobechanged;
ijk--;
}
//if (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '}') { xtplace=',' + xtplace; }
break;
case 'S':
ijk=eval(-1 + degfixes[eval(-1 + ideg)].length);
while (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '.' || (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) >= '0' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) <= '9')) {
nums=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + nums;
tobechanged=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + tobechanged;
ijk--;
//alert('2s:' + tobechanged + ' to ' + xtplace + '|' + xtlong + '|' + xtlat);
}
xtlat='_' + nums.replace(/^\-/g,'');
while (ijk >= 0 && (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == ',' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == ' ' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '-' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '[' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '|' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == ';')) {
tobechanged=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + tobechanged;
ijk--;
//alert('3s:' + tobechanged + ' to ' + xtplace + '|' + xtlong + '|' + xtlat);
}
while (ijk >= 0 && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != minus && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != '}' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != '[' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != '|' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != ';') {
xtplace=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + xtplace;
tobechanged=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + tobechanged;
ijk--;
//alert('4s:' + tobechanged + ' to ' + xtplace + '|' + xtlong + '|' + xtlat);
}
//alert('5s:' + tobechanged + ' to ' + xtplace + '|' + xtlong + '|' + xtlat);
//if (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '}') { xtplace=',' + xtplace; }
break;
case 'N':
ijk=eval(-1 + degfixes[eval(-1 + ideg)].length);
while (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '.' || (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) >= '0' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) <= '9')) {
nums=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + nums;
tobechanged=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + tobechanged;
ijk--;
}
xtlat='' + nums.replace(/^\-/g,'');
while (ijk >= 0 && (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == ',' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == ' ' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '-' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '[' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '|' || degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == ';')) {
tobechanged=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + tobechanged;
ijk--;
}
while (ijk >= 0 && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != minus && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != '}' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != '[' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != '|' && degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) != ';') {
xtplace=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + xtplace;
tobechanged=degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) + tobechanged;
ijk--;
}
//if (degfixes[eval(-1 + ideg)].substring(ijk).substring(0,1) == '}') { xtplace=',' + xtplace; }
break;
default:
break;
}

if (xtlong != '' && xtlat != '') {
if (xtplace.trim() != '') {
//alert('9:' + tobechanged + ' to ' + xtplace.replace(/\-/g,'%2d') + '|' + xtlong + '|' + xtlat);
outmel=outmel.replace('[' + tobechanged + ']', xtplace.replace(/\-/g,'%2d') + '|' + xtlong + '|' + xtlat);
outmel=outmel.replace('' + tobechanged + '', xtplace.replace(/\-/g,'%2d') + '|' + xtlong + '|' + xtlat);
} else {
//alert(938);
outmel=outmel.replace('[' + tobechanged + ']', ('[' + xtplace.replace(/\-/g,'%2d')).replace('[,',',[') + '|' + xtlong + '|' + xtlat + ']');
outmel=outmel.replace('' + tobechanged + '', ('[' + xtplace.replace(/\-/g,'%2d')).replace('[,',',[') + '|' + xtlong + '|' + xtlat + ']');
}
}
xtlat='';
xtlong='';
xtplace='';
nums='';
tobechanged='';
}
}

// 151.5516,-33.2329,Budgewoi{ydney}-{yes}149.5516,-31.2329,Budge-Xwoi{elbourne}
degfixes=outmel.split(',');
var youtmel=outmel, wasmel='', thisfld='';
var atstart=0, itstart=-1, degihj='', repl='';
if (eval('' + degfixes.length) > 3) {
if (outmel.indexOf('--') != -1) {
outmel=outmel.replace(/\-\-/g,'-_');
degfixes=outmel.split(',');
youtmel=outmel;
//alert('YoutMel=' + youtmel);
}
if (outmel.indexOf(',-') != -1) {
outmel=outmel.replace(/\,\-/g,',_');
degfixes=outmel.split(',');
youtmel=outmel;
}
if (outmel.toLowerCase().indexOf(' to -') != -1) {
outmel=outmel.replace(/\ to\ \-/g,' to _').replace(/\ TO\ \-/g,' to _');
degfixes=outmel.split(',');
youtmel=outmel;
}
if (outmel.toLowerCase().indexOf(' from -') != -1) {
outmel=outmel.replace(/\ from\ \-/g,' from _').replace(/\ FROM\ \-/g,' from _');
degfixes=outmel.split(',');
youtmel=outmel;
}
if ((outmel.trim() + ' ').substring(0,1) == '-') {
outmel=outmel.replace('-','_');
degfixes=outmel.split(',');
youtmel=outmel;
}
//alert('Youtmel=' + youtmel + ' ' + meldaccordingly);
for (var ihj=0; ihj<degfixes.length; ihj++) {
if (atstart == 0) {
if (degfixes[ihj].trim() != '') {
if (degfixes[ihj].indexOf('{') == -1 && degfixes[ihj].indexOf('[') == -1 && degfixes[ihj].indexOf('}') == -1 && degfixes[ihj].indexOf(']') == -1) {
if (degfixes[ihj].slice(-1) >= '0' && degfixes[ihj].slice(-1) <= '9') {
itstart=ihj;
atstart++;
//alert('found ' + degfixes[ihj]);
}
}
}
} else if (atstart == 1) {
if (degfixes[ihj].trim() != '') {
if (degfixes[ihj].indexOf('{') == -1 && degfixes[ihj].indexOf('[') == -1 && degfixes[ihj].indexOf('}') == -1 && degfixes[ihj].indexOf(']') == -1) {
if (degfixes[ihj].slice(-1) >= '0' && degfixes[ihj].slice(-1) <= '9') {
atstart++;
} else {
atstart=0;
itstart=-1;
}
} else {
atstart=0;
itstart=-1;
}
} else {
atstart=0;
itstart=-1;
}
} else if (atstart == 2) {
wasmel=youtmel;
if (repl == '' && youtmel.indexOf(degfixes[itstart].replace(/\-/g,'%2d')) != -1) {
repl=degfixes[itstart]; //.replace(/\-/g,'%2d');
} else if (repl == '') {
repl=degfixes[itstart];
}
thisfld=degfixes[ihj];
thisfld=thisfld.split('{')[0].split('_')[0].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].split(' to ')[0].split(' TO ')[0].split(' from ')[0].split(' FROM ')[0].replace(/\-$/g,'').replace(/\-/g,'%2d');
if (thisfld.indexOf('%2d') != -1) {
youtmel=youtmel.replace(thisfld.replace(/\%2d/g,'-'), thisfld);
}
//thisfld=thisfld.split('-')[0];
repl=repl.split('}')[eval(-1 + repl.split('}').length)];
repl=repl.split('-')[eval(-1 + repl.split('-').length)];
//alert('thisfld=' + thisfld + ' and repl=' + repl);
//alert('repl=' + repl + ',' + degfixes[eval(-1 + ihj)] + ', replaced by ' + thisfld.split('{')[0].replace(/\-/g,'%2d').split('-')[0] + ' via ' + degfixes[ihj]);
degihj=degfixes[ihj].split('}')[eval(-1 + degfixes[ihj].split('}').length)];
degihj=degfixes[ihj].split('-')[eval(-1 + degfixes[ihj].split('-').length)];
if ((degfixes[ihj] + ' ').toUpperCase().substring(0,1) >= 'A' && (degfixes[ihj] + ' ').toUpperCase().substring(0,1) <= 'Z') {
//alert(' change ' + degfixes[itstart] + ',' + degfixes[eval(-1 + ihj)] + ',' + degfixes[ihj].split('{')[0].replace(/\-/g,'%2d').split('-')[0] + ' in ' + outmel);
youtmel=youtmel.replace(repl + ',' + degfixes[eval(-1 + ihj)] + ',' + thisfld.split('{')[0].split('-')[0], thisfld.split('{')[0].replace(/\-/g,'%2d').split('-')[0] + '|' + repl.replace('-','_') + '|' + degfixes[eval(-1 + ihj)].replace('-','_'))
} else {
youtmel=youtmel.replace(repl + ',' + degfixes[eval(-1 + ihj)], '||' + repl.replace('-','_') + '|' + thisfld.replace('-','_'))
}
//if (wasmel == youtmel) {
//alert('Oops change ' + repl + ',' + degfixes[eval(-1 + ihj)] + ',' + degfixes[ihj].split('{')[0].replace(/\-/g,'%2d').split('-')[0] + ' IN ' + youtmel);
//} else {
//alert('youtmel=' + youtmel + ' via ' + thisfld.split('{')[0].replace(/\-/g,'%2d').split('-')[0] + '|' + repl.replace('-','_') + '|' + degfixes[eval(-1 + ihj)].replace('-','_'));
//}
repl='';
atstart=0;
itstart=-1;
if (degihj.trim() != '') {
degihj=degihj.split('}')[eval(-1 + degihj.split('}').length)];
//alert(degihj);
if (degihj.indexOf('{') == -1 && degihj.indexOf('[') == -1 && degihj.indexOf('}') == -1 && degihj.indexOf(']') == -1) {
if (degihj.slice(-1) >= '0' && degihj.slice(-1) <= '9') {
itstart=ihj;
atstart++;
repl=degihj;
//alert('Found ' + degihj);
} else {
degihj='';
}
} else {
degihj='';
}
} else {
degihj='';
}
}
}
if (youtmel != outmel) { outmel=youtmel; }
//alert(outmel);
}


}

//if (outmel.trim() != '') { alert(pref + outmel + suff); }
return pref + outmel + suff;
}


function retyour(propis) {
if (!realtz) {
return eventualyourtzlist;
}
return yourtzlist;
}

function yourtzlistindexOf(proposedplace) {
if (yourtzlist.indexOf(proposedplace) != -1) {
realtz=true;
var xproposedplace=proposedplace.replace('/','').replace('<','');
var idx=yourtzlist.toUpperCase().indexOf('/' + xproposedplace.toUpperCase() + '<');
if (idx != -1) {
var idxtwo=eval(eval('' + yourtzlist.substring(eval(-30 + idx)).toUpperCase().indexOf('>')) + idx - 29);
if (bigback.indexOf(xproposedplace + ':') == -1 && bigback.indexOf(xproposedplace.replace(/\ /g,'_') + ':') == -1 && nextwiftwo.indexOf(encodeURIComponent(xproposedplace)) == -1) {
if (wiftwoavailable) {
wiftwoavailable=false;
//alert('3:' + '/PHP/fgc/index.php?tzexact=' + encodeURIComponent(yourtzlist.substring(idxtwo).split('<')[0]) + '&tznickname=' + encodeURIComponent(xproposedplace.replace(/\ /g,'_')));
document.getElementById('wiftwo').src='/PHP/fgc/index.php?tzexact=' + encodeURIComponent(yourtzlist.substring(idxtwo).split('<')[0]) + '&tznickname=' + encodeURIComponent(xproposedplace.replace(/\ /g,'_'));
//alert(document.getElementById('wiftwo').src);
} else {
nextwiftwo+='/PHP/fgc/index.php?tzexact=' + encodeURIComponent(yourtzlist.substring(idxtwo).split('<')[0]) + '&tznickname=' + encodeURIComponent(xproposedplace.replace(/\ /g,'_')) + '#';
}
}
}
return yourtzlist.indexOf(proposedplace);
} else if (eventualyourtzlist.indexOf(proposedplace) != -1) {
realtz=false;
return eventualyourtzlist.indexOf(proposedplace);
} else {
realtz=true;
}
return yourtzlist.indexOf(proposedplace);
}

function plotalert(inanno) {
if (inanno.trim() != '') {
var arrp=plotanno.indexOf(inanno);
if (arrp >= 0) {
var defplace=plotplace[arrp].replace(/\ /g,'_').split(',_')[0];
var ddef='' + defplace + '{' + inanno + '}';
var makechanges=prompt('Change as needed.' + String.fromCharCode(10) + String.fromCharCode(10) + ddef, ddef);
if (makechanges == null) { makechanges=''; }
if (makechanges.trim() != '' && makechanges != ddef) {
if (makechanges.indexOf('{') != -1) {
plotanno[arrp]=makechanges.split('{')[1].split('}')[0];
plotplace[arrp]=plotplace[arrp].replace(defplace.replace(/\_/g,' '), makechanges.split('{')[0]);
} else {
plotanno[arrp]='';
plotplace[arrp]=makechanges;
}
}
} else {
alert(inanno);
}
}
return null;
}

function legsalert(inanno, ddef) {
//alert(ddef);
if (ddef.trim() != '') {
ddef='' + ddef.replace(/\`/g, '"');
var arrp=legsanno.indexOf(ddef);
//alert('' + arrp + ' ' + ddef);
if (arrp >= 0) {
var makechanges=prompt(inanno, ddef);
if (makechanges == null) { makechanges=''; }
if (makechanges != '' && makechanges != ddef) {
legsanno[arrp]=makechanges.trim();
}
} else {
alert(inanno);
}
}
return null;
}

function newhashit() {
var newh='#', legi=0, interim='', thedelim='';
if (document.getElementById('sdurl')) {
var washash='';
if (document.getElementById('sdurl').value.indexOf('#') != -1) {
washash='#' + document.getElementById('sdurl').value.split('#')[1];
}
for (var ii=0; ii<plotplace.length; ii++) {
thedelim='-';
//alert('cseplocans=' + cseplocans + ' and plotplace[ii]=' + plotplace[ii].split(', ')[0])
if (cseplocans.indexOf(',' + plotplace[ii].split(', ')[0]) != -1) {
thedelim=',';
}
//alert('argstuff=' + argstuff + ' and plotplace[ii]=' + plotplace[ii].split(', ')[0]);
//if (argstuff.indexOf(encodeURIComponent(',' + plotplace[ii].split(', ')[0].replace(/\ /g,'_'))) != -1) {
// thedelim=',';
//alert('Argstuff=' + argstuff + ' and plotplace[ii]=' + plotplace[ii].split(', ')[0]);
//}
if ((plotplace[ii] + ' ').toUpperCase().substring(0,1) >= 'A' && (plotplace[ii] + ' ').toUpperCase().substring(0,1) <= 'Z') {
if (newh == '#') {
if (plotanno[ii].trim() != '') {
newh+=encodeURIComponent(plotplace[ii].replace(/\ /g,'_').split(',_')[0] + '{' + plotanno[ii] + '}');
} else if (legc.indexOf(',' + eval(-1 + ii) + '.' + eval(0 + ii) + ',') != -1) {
legi=legs.indexOf('' + eval(-1 + ii) + '.' + eval(0 + ii) + '');
if (legi == -1) {
newh+=encodeURIComponent(thedelim) + encodeURIComponent(plotplace[ii].replace(/\ /g,'_').split(',_')[0]);
} else if (legsanno[legi].trim() != '') {
newh+=encodeURIComponent(thedelim + '{' + legsanno[legi] + '}') + encodeURIComponent(plotplace[ii].replace(/\ /g,'_').split(',_')[0]);
} else {
newh+=encodeURIComponent(thedelim) + encodeURIComponent(plotplace[ii].replace(/\ /g,'_').split(',_')[0]);
}
} else {
newh+=encodeURIComponent(',') + encodeURIComponent(plotplace[ii].replace(/\ /g,'_').split(',_')[0]);
}
} else if (plotplace[ii].trim() != '') {
interim=encodeURIComponent(plotplace[ii].replace(/\ /g,'_').split(',_')[0]);
if (plotanno[ii].trim() != '') {
interim=encodeURIComponent(plotplace[ii].replace(/\ /g,'_').split(',_')[0] + '{' + plotanno[ii] + '}');
}
if (legc.indexOf(',' + eval(-1 + ii) + '.' + eval(0 + ii) + ',') != -1) {
legi=legs.indexOf('' + eval(-1 + ii) + '.' + eval(0 + ii) + '');
if (legi == -1) {
newh+=encodeURIComponent(thedelim) + interim;
} else if (legsanno[legi].trim() != '') {
newh+=encodeURIComponent(thedelim + '{' + legsanno[legi] + '}') + interim;
} else {
newh+=encodeURIComponent(thedelim) + interim;
}
} else {
newh+=encodeURIComponent(',') + interim;
}
}
}
}
//alert(argstuff + ' and isotwo=' + isotwo);
var its=isotwo.split(',');
// ?nontz=Chiang_Mai%7C98.99861%7C18.79528%7CMM and isotwo=Chiang MaiTH
for (var jits=0; jits<its.length; jits++) {
if (eval('' + its[jits].length) > 2) {
if (argstuff.indexOf(its[jits].substring(0, eval(-2 + its[jits].length)).replace(/\ /g,'_') + '%7C') != -1) {
//alert('found ' + its[jits].substring(0, eval(-2 + its[jits].length)));
var thingos=argstuff.split(its[jits].substring(0, eval(-2 + its[jits].length)).replace(/\ /g,'_') + '%7C')[1].split(',')[0].split('%7C');
//alert(thingos[eval(-1 + thingos.length)].toUpperCase() + ' versus ' + its[jits].slice(-2));
//alert(thingos[eval(-1 + thingos.length)].toUpperCase() + ' vs ' + its[jits].slice(-2));
if (thingos[eval(-1 + thingos.length)].toUpperCase() != its[jits].slice(-2)) {
argstuff=argstuff.replace(thingos[eval(-3 + thingos.length)] + '%7C' + thingos[eval(-2 + thingos.length)] + '%7C' + thingos[eval(-1 + thingos.length)], thingos[eval(-3 + thingos.length)] + '%7C' + thingos[eval(-2 + thingos.length)] + '%7C' + its[jits].slice(-2));
}
if (1 == 6) {
for (var ijk=0; ijk<iso_country_codes.length; ijk+=2) {
if (iso_country_codes[ijk].toUpperCase() == its[jits].slice(-2)) {
argstuff=argstuff.replace(its[jits].substring(0, eval(-2 + its[jits].length)).replace(/\ /g,'_') + '%7C', its[jits].substring(0, eval(-2 + its[jits].length)).replace(/\ /g,'_') + encodeURIComponent(', ' + iso_country_codes[ijk]) + '%7C');
}
}
}
//alert(argstuff + ' aNd isotwo=' + isotwo);
}
}
}
var ssargstuff=argstuff;
if (prefixingstuff.trim() != '') {
if (ssargstuff == '') {
ssargstuff='?nontz=' + encodeURIComponent(nomc(prefixingstuff));
} else if (ssargstuff.indexOf('nontz=') != -1 && ssargstuff.indexOf(encodeURIComponent(nomc(prefixingstuff))) == -1) {
ssargstuff=ssargstuff.replace('nontz=', 'nontz=' + encodeURIComponent(nomc(prefixingstuff)));
}
} else if (5 == 7) {
if (dstylestuff.trim() != '') {
if (ssargstuff == '') {
ssargstuff='?nontz=' + encodeURIComponent(dstylestuff);
} else if (ssargstuff.indexOf('nontz=') != -1) {
ssargstuff=ssargstuff.replace('nontz=', 'nontz=' + encodeURIComponent(nomc(dstylestuff)));
}
}
if (dscriptstuff.trim() != '') {
if (ssargstuff == '') {
ssargstuff='?nontz=' + encodeURIComponent(dscriptstuff);
} else if (ssargstuff.indexOf('nontz=') != -1) {
ssargstuff=ssargstuff.replace('nontz=', 'nontz=' + encodeURIComponent(nomc(dscriptstuff)));
}
}
//alert('ssargstuff = ' + ssargstuff);
}
gnewh=newh;
//alert('before:' + document.getElementById('sdurl').value);
if (newh != lasthcalc && newh != '#' && newh != washash) {
//alert('using ssargstuff=' + ssargstuff);
document.getElementById('sdurl').value=(document.getElementById('sdurl').value.split('#')[0].split('?')[0] + thecssarg + ((argstuff + '#') == '#' ? argstuff + '#' : '#' + argstuff.substring(1) + '&') + newh.substring(1).replace(/^\%2C/g,'')).replace('&#', '&');
lasthcalc=newh;
} else if (document.getElementById('sdurl').value.indexOf('?') == -1 && argstuff.indexOf('?') == 0) {
//alert('Using ssargstuff=' + ssargstuff);
document.getElementById('sdurl').value=(document.getElementById('sdurl').value.split('#')[0].split('?')[0] + thecssarg + ((argstuff + '#') == '#' ? argstuff + '#' : '#' + argstuff.substring(1) + '&') + ('#' + newh.substring(1).replace(/^\%2C/g,'')).replace(/^\#$/g, '')).replace('&#', '&');
if (newh.replace('#','') != '') { lasthcalc=newh; }
}
}
if (prefixingstuff != '' && argstuff.indexOf('nontz=') != -1) {
if (argstuff.indexOf(encodeURIComponent(prefixingstuff)) == -1) {
argstuff=argstuff.replace('nontz=', 'nontz=' + encodeURIComponent(prefixingstuff));
}
}
//alert('thecssarg=' + thecssarg + ' and argstuff=' + argstuff + ' and after:' + document.getElementById('sdurl').value);
}

function myFunction(opening) {
if (opening) {
document.body.style.backgroundColor='lightgreen';
if (!playing && restart) {
//document.title='Restarting video play at ' + document.URL + ' at ' + ('' + new Date()) + '.';
if (firstopn && eval('' + plotplace.length) > 0) {
if (plotplace[eval(-1 + plotplace.length)].trim() != '') {
lastdtplace='' + plotplace[eval(-1 + plotplace.length)];
document.title='' + plotplace[eval(-1 + plotplace.length)] + ' ... ';
}
}
movesallowed=gmovesallowed; five=gfive; //document.getElementById('main-video').play();
playing=true;
} else {
//alert('2:' + document.title);
movesallowed=gmovesallowed; five=gfive; //document.getElementById('main-video').play();
document.title=(document.title + ' ... ').split(' ... ')[0] + ' ... ' + 'Welcome back to Earth Scanner at ' + ('' + new Date()) + '.';
}
restart=false;
} else {
document.body.style.backgroundColor='yellow';
if (playing) {
movesallowed=false; five=0; // document.getElementById('main-video').pause();
playing=false;
restart=true;
document.title=(document.title + ' ... ').split(' ... ')[0] + ' ... ' + 'Paused Earth Scanner at ' + ('' + new Date()) + '.';
} else {
//alert('0:' + document.title);
movesallowed=false; five=0; // document.getElementById('main-video').pause();
document.title=(document.title + ' ... ').split(' ... ')[0] + ' ... ' + 'You left Earth Scanner at ' + ('' + new Date()) + '.';
}
}
//alert(0);
firstopn=false;
}

function myCloseFunction() {
if (document.visibilityState === "hidden") {
if (playing) {
movesallowed=false; five=0; // document.getElementById('main-video').pause();
playing=false;
restart=true;
document.title=(document.title + ' ... ').split(' ... ')[0] + ' ... ' + 'Paused Earth Scanner at ' + ('' + new Date()) + '.';
} else {
//alert('1:' + document.title);
movesallowed=false; five=0; // document.getElementById('main-video').pause();
document.title=(document.title + ' ... ').split(' ... ')[0] + ' ... ' + 'You Left Earth Scanner at ' + ('' + new Date()) + '.';
}
document.body.style.backgroundColor='yellow';
} else {
myFunction(true);
}
}

function orflag(thisincc) {
var thiscc='';
if (eval('' + thisincc.length) >= 2) {
thiscc=thisincc.substring(0,2);
if (eval('' + thisincc.length) > 2) {
if (ocprefix == ' ') {
ocprefix='<div id=yourcanvas>';
ocsuffix='</div>';
//alert(965);
//} else {
// ocprefix='';
// ocsuffix='';
//fivethousand=35000;
//alert(456);
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + '?y=y&tzexact=' + encodeURIComponent(thisincc.substring(2)) + '&tznickname=' + encodeURIComponent(thisincc.substring(2));
} //else {
//alert(location.hash);
//}
}
} else {
return '';
}
var ccchar='', ccsuff='';
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'];
for (var iccsuff=0; iccsuff<thiscc.length; iccsuff++) {
ccchar=thiscc.substring(iccsuff, eval(1 + eval('' + iccsuff))).toUpperCase();
ccsuff+=String.fromCodePoint(eval('' + dri[eval('' + lri.indexOf(ccchar))])); //'&#' + dri[eval('' + lri.indexOf(ccchar))] + ';';
}
return ccsuff;
}

function clockit(hoursoffgmt) {
// 1 o'clock is 🕐
// 2 o'clock is 🕑
// 12 o'clock is 🕛
// 2:30 is 🕝
// 11:30 is 🕦
// 12:30 is 🕧
var along='Saturday,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday';
var gmtdatetimeis='' + new Date().toUTCString();
var daybit='';
var ampm=' am';
if (gmtdatetimeis.indexOf('day') != -1) {
ampm+=', ' + gmtdatetimeis.split('day')[0].split(' ')[eval(-1 + gmtdatetimeis.split('day')[0].split(' ').length)] + 'day';
} else if (gmtdatetimeis.indexOf(',') != -1) {
ampm+=', ' + (gmtdatetimeis.split(',')[0].split(' ')[eval(-1 + gmtdatetimeis.split(',')[0].split(' ').length)] + '').replace(/^Sat$/g,'Saturday').replace(/^Sun$/g,'Sunday').replace(/^Mon$/g,'Monday').replace(/^Tue$/g,'Tuesday').replace(/^Wed$/g,'Wednesday').replace(/^Thu$/g,'Thursday').replace(/^Fri$/g,'Friday');
}
if (ampm.length > 3) { daybit=ampm.substring(5); }
var minis=eval('' + gmtdatetimeis.split(':')[1]);
var hris=eval(('' + gmtdatetimeis.split(':')[0]).split(' ')[eval(-1 + ('' + gmtdatetimeis.split(':')[0]).split(' ').length)]);
if (('' + hoursoffgmt).indexOf('-') != -1 && eval(eval('' + hoursoffgmt.replace('+','')) + hris) < 0.0) {
ampm=ampm.replace('am', 'pm');
if (daybit != '') { ampm=ampm.replace(daybit, along.split(',' + daybit)[0].split(',')[eval(-1 + along.split(',' + daybit)[0].split(',').length)]); }
} else if (('' + hoursoffgmt).indexOf('-') == -1 && eval(eval('' + hoursoffgmt.replace('+','')) + hris) >= 24) {
if (daybit != '') { ampm=ampm.replace(daybit, along.split(daybit + ',')[1].split(',')[0]); }
} else if (('' + hoursoffgmt).indexOf('-') == -1 && eval(eval('' + hoursoffgmt.replace('+','')) + hris) >= 12) {
ampm=ampm.replace('am', 'pm');
}
hris+=eval(eval(24 + eval('' + hoursoffgmt.replace('+','').split('.')[0])) % 24);
if (('' + hoursoffgmt.replace('+','')).indexOf('.5') != -1) {
if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1 && minis >= 30) {
minis-=30;
} else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) {
hris--;
if (hris < 24) { hris=23; ampm=ampm.replace('am', 'pm'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(',' + daybit)[0].split(',')[eval(-1 + along.split(',' + daybit)[0].split(',').length)]); } }
minis+=30;
} else if (('' + hoursoffgmt.replace('+','')).indexOf('-') == -1 && minis < 30) {
minis+=30;
} else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) {
hris++;
if (hris > 24) { hris=24; ampm=ampm.replace('pm', 'am'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(daybit + ',')[1].split(',')[0]); } }
minis-=30;
}
} else if (('' + hoursoffgmt.replace('+','')).indexOf('.25') != -1) {
if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1 && minis >= 15) {
minis-=15;
} else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) {
hris--;
if (hris < 24) { hris=23; ampm=ampm.replace('am', 'pm'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(',' + daybit)[0].split(',')[eval(-1 + along.split(',' + daybit)[0].split(',').length)]); } }
minis+=15;
} else if (('' + hoursoffgmt.replace('+','')).indexOf('-') == -1 && minis < 45) {
minis+=15;
} else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) {
hris++;
if (hris > 24) { hris=24; ampm=ampm.replace('pm', 'am'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(daybit + ',')[1].split(',')[0]); } }
minis-=15;
}
} else if (('' + hoursoffgmt.replace('+','')).indexOf('.75') != -1) {
if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1 && minis >= 45) {
minis-=45;
} else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) {
hris--;
if (hris < 24) { hris=23; ampm=ampm.replace('am', 'pm'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(',' + daybit)[0].split(',')[eval(-1 + along.split(',' + daybit)[0].split(',').length)]); } }
minis+=45;
} else if (('' + hoursoffgmt.replace('+','')).indexOf('-') == -1 && minis < 15) {
minis+=45;
} else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) {
hris++;
if (hris > 24) { hris=24; ampm=ampm.replace('pm', 'am'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(daybit + ',')[1].split(',')[0]); } }
minis-=45;
}
}
//alert('' + hoursoffgmt + ' ' + hris + ' ' + minis + ' ' + gmtdatetimeis);

if (minis > 45 && eval(hris % 12) == 0) {
return ' ' + String.fromCodePoint(128336) + ampm;
} else if (eval(hris % 12) == 0 && minis <= 15) {
return ' ' + String.fromCodePoint(128347) + ampm;
} else if (eval(hris % 12) == 0) {
return ' ' + String.fromCodePoint(128359) + ampm;
} else if (minis >= 45) {
return ' ' + String.fromCodePoint(eval(eval(hris % 12) + 128336)) + ampm;
} else if (minis <= 15) {
return ' ' + String.fromCodePoint(eval(eval(hris % 12) + 128335)) + ampm;
} else {
return ' ' + String.fromCodePoint(eval(eval(hris % 12) + 128347)) + ampm;
}
return '';
}


function retnearest(tolong, tolat) {
//alert(1);
var diff, date0, date1, utcDate, tzDate, udate, utzdate;
//alert(0);
gmtemj='|' + clockit('0');
var datetime_str='';
var sofardist=-12, ntolong=tolong, ntolat=tolat, thisfardist=0, extratz='', extratztime='', extraemj=''; // thisplace='', thiscc='', thiscn=''
var iplacesarr=yourtzlist.split(' data-geo="');
for (var jk=1; jk<iplacesarr.length; jk++) {
thisfardist=eval(Math.abs(tolong - eval(iplacesarr[jk].split(',')[1])) * Math.abs(tolong - eval(iplacesarr[jk].split(',')[1])) + Math.abs(tolat - eval(iplacesarr[jk].split(',')[0])) * Math.abs(tolat - eval(iplacesarr[jk].split(',')[0])));
if (sofardist < 0) {
sofardist=thisfardist;
ntolong=eval('' + iplacesarr[jk].split(',')[1]);
ntolat=eval('' + iplacesarr[jk].split(',')[0]);
thiscc=iplacesarr[jk].split(',')[3];
thisplace=iplacesarr[jk].split('>')[1].split('<')[0];
extratz=',' + thisplace; //.split('/')[eval(-1 + iplacesarr[jk].split('>')[1].split('<')[0].replace('GMT','Europe/London').split('/').length)].replace(/\_/g,' ');
date0=new Date().toLocaleString("en-US", { timeZone: thisplace.replace('GMT','UTC') });
extratztime=('|' + date0);
gmttztime=extratztime;
udate=new Date();
utcDate = new Date(udate.toLocaleString('en-US', { timeZone: 'UTC' }));
thisplace=iplacesarr[jk].split('>')[1].split('<')[0].replace('GMT','Europe/London').split('/')[eval(-1 + iplacesarr[jk].split('>')[1].split('<')[0].replace('GMT','Europe/London').split('/').length)].replace(/\_/g,' ');
//alert(0);
gmtemj='|' + clockit('0');
//alert(gmtemj);
} else if (thisfardist < sofardist) {
sofardist=thisfardist;
ntolong=eval('' + iplacesarr[jk].split(',')[1]);
ntolat=eval('' + iplacesarr[jk].split(',')[0]);
thiscc=iplacesarr[jk].split(',')[3];
thisplace=iplacesarr[jk].split('>')[1].split('<')[0];
utzdate=new Date();
tzDate = new Date(utzdate.toLocaleString('en-US', { timeZone: thisplace.replace('GMT','UTC') }));
extratz='|' + thisplace; //.split('/')[eval(-1 + iplacesarr[jk].split('>')[1].split('<')[0].replace('GMT','Europe/London').split('/').length)].replace(/\_/g,' ');
date1=new Date().toLocaleString("en-US", { timeZone: thisplace.replace('GMT','UTC') });
extratztime=('|' + date1);
thisplace=thisplace.replace('GMT','Europe/London').split('/')[eval(-1 + iplacesarr[jk].split('>')[1].split('<')[0].replace('GMT','Europe/London').split('/').length)].replace(/\_/g,' ');
diff = Math.abs(tzDate.getTime() - utcDate.getTime()) / 3600000;
if (diff > 0 && (eval('' + utcDate.getDay()) == 0 && eval('' + tzDate.getDay()) == 6 || eval('' + utcDate.getDay()) > eval('' + tzDate.getDay()))) {
diff=-diff;
}
extraemj='|' + clockit('' + diff);
}
}
if (thiscc != '') {
if (thefirst) {
thefirst=false;
//document.title='' + diff + ' ... ' + extratztime + extraemj + ' ... ' + diff;
//if (diff > 0 && tzDate > utcDate) {
//alert('not okay: ' + tzDate + tzDate.getDay() + ' - ' + utcDate + utcDate.getDay());
//} else {
//alert('okay: ' + tzDate + tzDate.getDay() + ' - ' + utcDate + utcDate.getDay());
//}
}
for (var ijk=0; ijk<iso_country_codes.length; ijk+=2) {
if (iso_country_codes[ijk].toUpperCase() == thiscc) {
thisplace+=', ' + iso_country_codes[eval(1 + ijk)];
}
}
}
//alert('' + ntolong + '|' + ntolat + '|' + thiscc + '|' + thisplace + extratz + extratztime + extraemj + gmttztime + gmtemj);
return '' + ntolong + '|' + ntolat + '|' + thiscc + '|' + thisplace + extratz + extratztime + extraemj + gmttztime + gmtemj;
}

function newprompt(inpt, indt) {
inpt=inpt.replace(inpt.split(String.fromCharCode(10))[0], inpt.split(String.fromCharCode(10))[0] + ' ( ie. ' + nckname + ' ) ');
reta=prompt(inpt, inpt);
if (reta == null) {
reta='';
return null;
} else if (reta != null) {
if (reta.trim() != '' && reta.trim() != inpt.trim()) {
reta+='youllneverfindthis';
document.getElementById('myimg').click(); // ourprompt(gevent, reta, '');
}
}
return reta.replace(/youllneverfindthis$/g, '');
}

function ocm(sthis,intenlong,smlt,lglt) {
gevent=sthis;
var mten=-10, startat=1;
var wasvl='';
var alertbit=" var ap=newprompt('" + intenlong + "'.replace(/\~/g,String.fromCharCode(10)),'" + intenlong + "'.replace(/\~/g,String.fromCharCode(10))); ";
var ijk=1, kcnt=0, tzp='', datetime_str='', xkcnt='';
var findsare=yourtzlist.split((',' + intenlong).replace(/^0/g,'00').replace(/0$/g,''));
if (nckname == ' ') {
nckname='';
document.body.oncontextmenu=function(evt){ evt.stopPropagation(); if (nckname == '') { alert('Right click on Longitudes will show Timezone Place current times of relevance'); } };
}
if (intenlong == 0) { findsare=yourtzlist.split(',+0"'); } else if (intenlong < 0) { mten=10; }
var findsaretwo=yourtzlist.split((',' + eval(mten + intenlong)).replace(/^0/g,'00').replace(/0$/g,''));
for (ijk=1; ijk<findsare.length; ijk++) {
if ((intenlong == 0 || (findsare[ijk].substring(0,1) >= '0' && findsare[ijk].substring(0,1) <= '4' && findsare[ijk].substring(1).substring(0,1) < '0')) && findsare[ijk].indexOf('>') != -1 && findsare[ijk].indexOf('<') != -1) {
tzp=findsare[ijk].split('>')[1].split('<')[0];
if (tzp.indexOf('/') != -1) {
console.log(tzp);
datetime_str = new Date().toLocaleString("en-AU", { timeZone: tzp });
console.log(datetime_str);
if (eval('' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[0]) >= eval('' + smlt) && eval('' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[0]) <= eval('' + lglt)) {
wasvl=xkcnt;
xkcnt='~' + tzp + ' ' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[0] + ',' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[1] + ' ' + datetime_str + ' ' + wasvl;
} else {
xkcnt+='~' + tzp + ' ' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[0] + ',' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[1] + ' ' + datetime_str + ' ';
kcnt++;
}
if (eval('' + findsaretwo.length) > ijk) {
startat++;
if (findsaretwo[ijk].substring(0,1) >= '6' && findsaretwo[ijk].substring(0,1) <= '9' && findsaretwo[ijk].substring(1).substring(0,1) < '0' && findsaretwo[ijk].indexOf('>') != -1 && findsaretwo[ijk].indexOf('<') != -1) {
tzp=findsaretwo[ijk].split('>')[1].split('<')[0];
if (tzp.indexOf('/') != -1) {
datetime_str = new Date().toLocaleString("en-AU", { timeZone: tzp });
if (eval('' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[0]) >= eval('' + smlt) && eval('' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[0]) <= eval('' + lglt)) {
wasvl=xkcnt;
xkcnt='~' + tzp + ' ' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[0] + ',' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[1] + ' ' + datetime_str + ' ' + wasvl;
} else {
xkcnt+='~' + tzp + ' ' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[0] + ',' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[1] + ' ' + ' ' + datetime_str + ' ';
}
kcnt++;
}
}
}
}
}
}
for (ijk=startat; ijk<findsaretwo.length; ijk++) {
if (findsaretwo[ijk].substring(0,1) >= '6' && findsaretwo[ijk].substring(0,1) <= '9' && findsaretwo[ijk].substring(1).substring(0,1) < '0' && findsaretwo[ijk].indexOf('>') != -1 && findsaretwo[ijk].indexOf('<') != -1) {
tzp=findsaretwo[ijk].split('>')[1].split('<')[0];
if (tzp.indexOf('/') != -1) {
datetime_str = new Date().toLocaleString("en-AU", { timeZone: tzp });
if (eval('' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[0]) >= eval('' + smlt) && eval('' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[0]) <= eval('' + lglt)) {
wasvl=xkcnt;
xkcnt='~' + tzp + ' ' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[0] + ',' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[1] + ' ' + datetime_str + ' ' + wasvl;
} else {
xkcnt+='~' + tzp + ' ' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[0] + ',' + yourtzlist.split(tzp)[1].split('data-geo="')[1].split(',')[1] + ' ' + ' ' + datetime_str + ' ';
}
kcnt++;
}
}
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
return ' class=along ontouchend=" nckname=event.target.innerText; event.stopPropagation(); ' + alertbit.replace(/\'\.replace/g, "" + xkcnt + "'.replace") + ' " ';
}
return ' class=along oncontextmenu=" nckname=event.target.innerText; event.stopPropagation(); ' + alertbit.replace(/\'\.replace/g, "" + xkcnt + "'.replace") + ' " ';
}

function checkll(smlong, lglat, lglong, smlat) {
setTimeout(function(){ prevf='' + smlong + ',' + lglat + ',' + lglong + ',' + smlat; }, fivethousand);
for (var am=-180; am<=180; am+=10) {
if (am >= smlong && am <= lglong) {
if (eval((am + 180) % 180) == 0) {
bmeridian+='<span ' + ocm(event,am,smlat,lglat) + ' onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';left:' + eval(eval(am - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;top:90px;">  ' + (('' + am).replace('-','') + (('' + am).substring(0,1) == '-' ? 'W' : 'E')).replace(/^0E$/g,' Greenwich<br> Meridian').replace(/^180E/g,'  International<br>  Date<br>  Line').replace(/^180W/g,'International<br> Date<br> Line').replace('E','°E').replace('W','°W') + '</span><hr class=mydm title="Meridian ' + am + '" style="z-index:675;position:' + posval + ';left:' + eval(eval(am - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;top:0px;height:' + screenheight + 'px;width:1px;background-color:rgba(255,0,0,0.5);"></hr>';
} else {
bmeridian+='<span ' + ocm(event,am,smlat,lglat) + ' onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';left:' + eval(eval(am - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;top:90px;">  ' + (('' + am).replace('-','') + (('' + am).substring(0,1) == '-' ? 'W' : 'E')).replace(/^0E$/g,' Greenwich<br> Meridian').replace(/^180E/g,'  International<br>  Date<br>  Line').replace(/^180W/g,'International<br> Date<br> Line').replace('E','°E').replace('W','°W') + '</span><hr class=mydm title="Meridian ' + am + '" style="z-index:675;position:' + posval + ';left:' + eval(eval(am - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;top:0px;height:' + screenheight + 'px;width:1px;background-color:rgba(0,0,255,0.5);"></hr>';
}
}
}
}

function bmeranalyze(whatb) {
if (whatb.indexOf('<div id="') != -1 && bmeridian.indexOf('<div id="') != -1) {
var whatid=whatb.split('<div id="')[1].split('"')[0];
var bids=bmeridian.split('<div id="' + whatid + '"');
if (eval('' + bids.length) > 1) {
var underthis=bids[1].split('</div>')[0];
var plonkthis=whatb.split('<div id="' + whatid + '"')[1].split('</div>')[0];
console.log('7:' + underthis + ' + ' + plonkthis.replace(plonkthis.split('>')[0] + '>',''));
bmeridian=bmeridian.replace(underthis, underthis + plonkthis.replace(plonkthis.split('>')[0] + '>', ''));
return bmeridian;
}
}
bmeridian+=whatb;
console.log('8:' + whatb);
return bmeridian;
}

function panno(bec, idx) {
if (plotanno[idx] != bec.replace(/\`/g, '"')) {
plotanno[idx]=bec.replace(/\`/g, '"').replace(/\{/g, '[').replace(/\}/g, ']');
newhashit();
//alert(plotanno[idx]);
}
}

function lganno(bec, idx) {
if (legsanno[idx] != bec.replace(/\`/g, '"')) {
legsanno[idx]=bec.replace(/\`/g, '"').replace(/\{/g, '[').replace(/\}/g, ']');
newhashit();
//alert(legsanno[idx]);
}
}

function doplotplace(ipl, maybeg) {
var jpl=0, detbegin='', detend='', nearend='', textras='', legend='', prelegend='', ileg=0, lpart='';
var thisclock='', nonclock='', aclocl='', thatplace='', utzdate=null, tzDate=null, xdiff=0, xdate1=null;
if (!reveal) {
detbegin='<details onclick="reveal=!reveal;"><summary></summary>';
detend='</details>';
} else {
detbegin='<details open onclick="reveal=!reveal;"><summary>';
detend='</summary></details>';
}
if (plotcc[ipl].trim() && plottz[ipl].trim() != '') { // && plotplace[ipl].indexOf(':') == -1) {
//alert(plotplace[ipl]);
//alert(plotct[ipl]);
//alert(plotemj[ipl]);
if (maybeg == 'g') {
for (ileg=kleg; ileg<legs.length; ileg++) {
if (('~' + legs[ileg] + '~').indexOf('~' + ipl + '.') != -1) {
jpl=eval(('~' + legs[ileg] + '~').split('~' + ipl + '.')[1].split('~')[0]);
if (pleasenolist.indexOf('|' + plotplace[ipl].split(', ')[0].split(',_')[0] + '|') == -1 && pleasenolist.indexOf('|' + ipl + '|') == -1) {
lpart='<details onclick="event.stopPropagation();" title="Annotations for Leg from ' + plotplace[ipl].replace(/\_/g,' ') + ' ' + orflag(plotcc[ipl]) + ' to ' + plotplace[jpl].replace(/\_/g,' ') + ' ' + orflag(plotcc[jpl]) + ' ..."><summary class=lanno> --> ' + plotplace[jpl].replace(/\_/g,' ') + ' ' + orflag(plotcc[jpl]) + '</summary><textarea class=txleg onclick="event.stopPropagation();" rows=9 cols=40 onblur="lganno(this.value,' + ileg + ');">' + legsanno[ileg].replace(/\"/g,'`') + '</textarea></details>';
if (legend.indexOf(lpart.split('<summary')[0]) == -1) { legend+=lpart; }
}
}
if (('~' + legs[ileg] + '~').indexOf('.' + ipl + '~') != -1) {
jpl=eval(('~' + legs[ileg] + '~').split('.' + ipl + '~')[0].split('~')[1]);
if (pleasenolist.indexOf('|' + plotplace[jpl].split(', ')[0].split(',_')[0] + '|') == -1 && pleasenolist.indexOf('|' + jpl + '|') == -1) {
lpart='<details onclick="event.stopPropagation();" title="Annotations for Leg from ' + plotplace[jpl].replace(/\_/g,' ') + ' ' + orflag(plotcc[jpl]) + ' to ' + plotplace[ipl].replace(/\_/g,' ') + ' ' + orflag(plotcc[ipl]) + ' ..."><summary class=lanno>' + plotplace[jpl].replace(/\_/g,' ') + ' ' + orflag(plotcc[jpl]) + ' --></summary><textarea class=txleg onclick="event.stopPropagation();" rows=9 cols=40 onblur="lganno(this.value,' + ileg + ');">' + legsanno[ileg].replace(/\"/g,'`') + '</textarea></details>';
if (prelegend.indexOf(lpart.split('<summary')[0]) == -1) { prelegend+=lpart; }
}
}
}
if (bmeridian.indexOf(' id="div' + plotlong[ipl] + plotlat[ipl] + '"') != -1) {
textras=bmeridian.split(' id="div' + plotlong[ipl] + plotlat[ipl] + '"')[1].split('>')[0].replace(/\"$/g, String.fromCharCode(10) + plotanno[ipl].replace(/\"/g,'`') + '"');
} else {
textras=' title="' + plotanno[ipl].replace(/\"/g,'`') + '"';
}
nearend='<div id="div' + plotlong[ipl] + plotlat[ipl] + '"' + textras + '>' + prelegend + '<details onclick="event.stopPropagation();" title="Annotations for ' + plotplace[ipl].replace(/\_/g,' ') + ' ' + orflag(plotcc[ipl]) + ' ..."><summary class=panno>🖋</summary><textarea class=txplc onclick="event.stopPropagation();" rows=9 cols=40 onblur="panno(this.value,' + ipl + ');">' + plotanno[ipl].replace(/\"/g,'`') + '</textarea></details>' + legend + '</div>';
thatplace=plottz[ipl];
utzdate=new Date();
tzDate = new Date(utzdate.toLocaleString('en-US', { timeZone: thatplace.replace('GMT','UTC').replace(/\ /g,'_') }));
xdiff = Math.abs(tzDate.getTime() - gutcDate.getTime()) / 3600000;
xdate1=new Date().toLocaleString("en-US", { timeZone: thatplace.replace('GMT','UTC').replace(/\ /g,'_') });
if (xdiff > 0 && (eval('' + utzdate.getDay()) == 0 && eval('' + tzDate.getDay()) == 6 || eval('' + utzdate.getDay()) > eval('' + tzDate.getDay()))) {
xdiff=-xdiff;
}
xextraemj=',' + clockit('' + xdiff);
plotct[ipl]=('' + xdate1);
plotemj[ipl]=(clockit('' + xdiff));
}
if (plotemj[ipl].indexOf('pm') != -1) {
aclock=plotemj[ipl].split('pm')[0];
nonclock=plotemj[ipl].split(aclock)[1];
thisclock='<span class=pm>' + aclock + '</span>';
return plotplace[ipl] + ' ' + orflag(plotcc[ipl]) + detbegin + '<br>' + plotct[ipl] + '<br>' + thisclock + nonclock + nearend + detend;
}
return plotplace[ipl] + ' ' + orflag(plotcc[ipl]) + detbegin + '<br>' + plotct[ipl] + '<br>' + plotemj[ipl] + nearend + detend;
}
return plotplace[ipl];
}

function great_circle_bearing(talis, gnolis, latis, longis) {
// Let ‘R’ be the radius of Earth,
// ‘L’ be the longitude,
// ‘θ’ be latitude,
// ‘β‘ be Bearing.

// Bearing from point A to B, can be calculated as,
// β = atan2(X,Y),
// where, X and Y are two quantities and can be calculated as:
// X = cos θb * sin ∆L
// Y = cos θa * sin θb – sin θa * cos θb * cos ∆L

var ourbrg=eval(eval(360.0 + eval(eval(eval(180.0 / Math.PI) * Math.atan2(
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + latis))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval(eval('' + longis) - eval('' + gnolis))))),
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + talis))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + latis)))) -
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + talis))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + latis))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval(eval('' + longis) - eval('' + gnolis)))))
)))) % 360.0);

return '' + ourbrg;
}

function great_circle_distance(talis, gnolis, latis, longis) {
var ourdist=0.0;
var rgnol=eval((gnolis) * Math.PI / 180.0);
var rtal=eval((talis) * Math.PI / 180.0);
var rlong=eval((longis) * Math.PI / 180.0);
var rlat=eval((latis) * Math.PI / 180.0);
var deltalong = Math.abs(eval(((gnolis)-(longis)) * Math.PI / 180.0));
var acof = eval(Math.sin(rtal) * Math.sin(rlat)) + (Math.cos(rtal) * Math.cos(rlat) * Math.cos(deltalong)); // via //en.wikipedia.org/wiki/Great-circle_distance ... thanks
ourdist = eval(Math.round((Math.acos(acof) * 6371000.0) + 0.00001) * 100) / 100;
return '' + ourdist;
}


function plotleg(thisleg, smlong, lglat, lglong, smlat) {
var brgtoset=0.0, disttoset=0.0, gbrgtoset=0.0, gdisttoset=0.0, legi=-1, plusbit='', clabit='', isok=true;
legi=legs.indexOf(thisleg);
var ij=eval('' + plotplace.length);
if (('' + thisleg).indexOf('.') != -1) {
if (ij <= eval('' + ('' + thisleg).split('.')[0])) { if (legi >= 0) { kleg=eval(1 + legi); } isok=false; }
if (ij <= eval('' + ('' + thisleg).split('.')[1])) { if (legi >= 0) { kleg=eval(1 + legi); } isok=false; }
}
if (isok && ('' + thisleg).indexOf('.') != -1 && pleasenolist.indexOf('|' + plotplace[eval('' + (thisleg + '.0').replace(/^\./g,'0.').split('.')[0])].split(', ')[0].split(',_')[0] + '|') == -1 && pleasenolist.indexOf('|' + eval('' + (thisleg + '.0').replace(/^\./g,'0.').split('.')[0]) + '|') == -1) {
if (legi >= 0) {
plusbit=String.fromCharCode(10) + legsanno[legi].replace(/\"/g, '`');
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
plusbit+=String.fromCharCode(10);
}
}
console.log('thisleg=' + thisleg + ' and plotplace.length=' + plotplace.length);
if (1 == 1) {
disttoset=Math.sqrt((eval(0 + eval(eval('' + plotlong[eval(thisleg.split('.')[0])]) - smlong) / eval(lglong - smlong) * eval(screenwidth)) - eval(0 + eval(eval('' + plotlong[eval(thisleg.split('.')[1])]) - smlong) / eval(lglong - smlong) * eval(screenwidth))) * (eval(0 + eval(eval('' + plotlong[eval(thisleg.split('.')[0])]) - smlong) / eval(lglong - smlong) * eval(screenwidth)) - eval(0 + eval(eval('' + plotlong[eval(thisleg.split('.')[1])]) - smlong) / eval(lglong - smlong) * eval(screenwidth))) + (eval(0 + eval(eval(lglat - eval('' + plotlat[eval(thisleg.split('.')[0])])) / eval(lglat - smlat) * eval(screenheight))) - eval(0 + eval(eval(lglat - eval('' + plotlat[eval(thisleg.split('.')[1])])) / eval(lglat - smlat) * eval(screenheight)))) * (eval(0 + eval(eval(lglat - eval('' + plotlat[eval(thisleg.split('.')[0])])) / eval(lglat - smlat) * eval(screenheight))) - eval(0 + eval(eval(lglat - eval('' + plotlat[eval(thisleg.split('.')[1])])) / eval(lglat - smlat) * eval(screenheight)))));
}
gdisttoset=great_circle_distance(plotlat[eval(thisleg.split('.')[0])], plotlong[eval(thisleg.split('.')[0])], plotlat[eval(thisleg.split('.')[1])], plotlong[eval(thisleg.split('.')[1])]);
var meanlong=eval(0 + eval(eval('' + plotlong[eval(thisleg.split('.')[0])]) - smlong) / eval(lglong - smlong) * eval(screenwidth));
var meanlat=eval(0 + eval(eval(lglat - eval('' + plotlat[eval(thisleg.split('.')[0])])) / eval(lglat - smlat) * eval(screenheight)));
gbrgtoset=great_circle_bearing(plotlat[eval(thisleg.split('.')[0])], plotlong[eval(thisleg.split('.')[0])], plotlat[eval(thisleg.split('.')[1])], plotlong[eval(thisleg.split('.')[1])]);
brgtoset=Math.atan2(eval(0 + eval(eval(lglat - eval('' + plotlat[eval(thisleg.split('.')[1])])) / eval(lglat - smlat) * eval(screenheight))) - meanlat, eval(0 + eval(eval('' + plotlong[eval(thisleg.split('.')[1])]) - smlong) / eval(lglong - smlong) * eval(screenwidth)) - meanlong) * 180 / Math.PI;
if (brgtoset <= 180.0) { clabit=' class=hrright '; } else { clabit=' class=hrleft '; }
meanlong+=eval(0 + eval(eval('' + plotlong[eval(thisleg.split('.')[1])]) - smlong) / eval(lglong - smlong) * eval(screenwidth))
meanlong/=2.0;
meanlat+=eval(0 + eval(eval(lglat - eval('' + plotlat[eval(thisleg.split('.')[1])])) / eval(lglat - smlat) * eval(screenheight)));
meanlat/=2.0;
console.log(thisleg + ' ' + brgtoset + ' ' + thisleg + ' ... ' + plotlat[eval(thisleg.split('.')[0])] + ',' + plotlong[eval(thisleg.split('.')[0])] + ' to ' + plotlat[eval(thisleg.split('.')[1])] + ',' + plotlong[eval(thisleg.split('.')[1])]);
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (plusbit == '') {
//alert(298);
bmeridian+='<hr' + clabit + ' onclick="event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(' + "'//www.google.com/maps/dir/" + encodeURIComponent(plotplace[eval(thisleg.split('.')[0])]) + '/' + encodeURIComponent(plotplace[eval(thisleg.split('.')[1])]) + "#In a minute we will start moving the map again','_blank','top=50,left=50,width=1000,height=900')" + '; canlooknow=true; alert(this.title); " ondblclick="event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(' + "'//www.google.com/maps/dir/" + plotlat[eval(thisleg.split('.')[0])] + ',' + plotlong[eval(thisleg.split('.')[0])] + '/' + plotlat[eval(thisleg.split('.')[1])] + ',' + plotlong[eval(thisleg.split('.')[1])] + "#In a minute we will start moving the map again','_blank','top=50,left=50,width=1000,height=900')" + '; canlooknow=true; alert(this.title); " title="' + plusbit + '' + plotplace[eval(thisleg.split('.')[0])] + ' to ' + plotplace[eval(thisleg.split('.')[1])] + ' has the crow flying (' + gbrgtoset + ' degrees setting off at versus on Mercator Projection ...) ' + eval(eval(brgtoset + 450) % 360) + ' degrees for ' + eval(gdisttoset / 1000.0) + ' kilometers. Click (for placename) or double click (for geographicals) to open a Google Directions window." data-class=leg style="transform:rotate(' + eval(eval('' + brgtoset) - 0) + 'deg);z-index:975;opacity:0.3;position:' + posval + ';top:' +
meanlat +
'px;left:' +
eval(meanlong - disttoset / 2) +
'px;background-color:rgba(255,0,0,0.5);width:' + disttoset + 'px;height:6px;"></hr><span onclick="event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(' + "'//www.google.com/maps/dir/" + encodeURIComponent(plotplace[eval(thisleg.split('.')[0])]) + '/' + encodeURIComponent(plotplace[eval(thisleg.split('.')[1])]) + "#In a minute we will start moving the map again','_blank','top=50,left=50,width=1000,height=900')" + '; canlooknow=true; " ondblclick="event.stopPropagation(); canlooknow=false; clearwo(); gleg=glegit(this); wo=windowopen(' + "'//www.google.com/maps/dir/" + plotlat[eval(thisleg.split('.')[0])] + ',' + plotlong[eval(thisleg.split('.')[0])] + '/' + plotlat[eval(thisleg.split('.')[1])] + ',' + plotlong[eval(thisleg.split('.')[1])] + "#In a minute we will start moving the map again','_blank','top=50,left=50,width=1000,height=900')" + '; canlooknow=true; " title="' + plusbit + '' + plotplace[eval(thisleg.split('.')[0])] + ' to ' + plotplace[eval(thisleg.split('.')[1])] + ' has the crow flying (' + gbrgtoset + ' degrees setting off at versus on Mercator Projection ...) ' + eval(eval(360 - brgtoset) % 360) + ' degrees for ' + eval(gdisttoset / 1000.0) + ' kilometers. Click (for placename) or double click (for geographicals) to open a Google Directions window. ' + '" data-class=leg style="cursor:pointer;font-size:6px;z-index:976;margin-top:6px;margin-left:-6px;position:' + posval + ';top:' + meanlat + 'px;left:' + meanlong + 'px;" data-oncontextmenu="event.stopPropagation(); woit(' + "'" + plotplace[eval(thisleg.split('.')[1])].split(', ')[0] + "'" + ');" data-tleg="' + thisleg + '">' + thecompass + '</span>';
} else {
//alert('98 ' + plusbit);
bmeridian+='<hr' + clabit + ' onclick="event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(' + "'//www.google.com/maps/dir/" + encodeURIComponent(plotplace[eval(thisleg.split('.')[0])]) + '/' + encodeURIComponent(plotplace[eval(thisleg.split('.')[1])]) + "#In a minute we will start moving the map again','_blank','top=50,left=50,width=1000,height=900')" + '; canlooknow=true; ' + " legsalert(this.title + String.fromCharCode(10) + this.getAttribute('data-titlemore'), this.getAttribute('data-anno')" + '); " ondblclick="event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(' + "'//www.google.com/maps/dir/" + plotlat[eval(thisleg.split('.')[0])] + ',' + plotlong[eval(thisleg.split('.')[0])] + '/' + plotlat[eval(thisleg.split('.')[1])] + ',' + plotlong[eval(thisleg.split('.')[1])] + "#In a minute we will start moving the map again','_blank','top=50,left=50,width=1000,height=900')" + '; canlooknow=true; " data-anno="' + legsanno[legi].replace(/\"/g, '`') + '" title="' + plusbit + '" data-titlemore="' + plotplace[eval(thisleg.split('.')[0])] + ' to ' + plotplace[eval(thisleg.split('.')[1])] + ' has the crow flying (' + gbrgtoset + ' degrees setting off at versus on Mercator Projection ...) ' + eval(eval(brgtoset + 450) % 360) + ' degrees for ' + eval(gdisttoset / 1000.0) + ' kilometers. Click (for placename) or double click (for geographicals) to open a Google Directions window." data-class=leg style="transform:rotate(' + eval(eval('' + brgtoset) - 0) + 'deg);z-index:975;opacity:0.3;position:' + posval + ';top:' +
meanlat +
'px;left:' +
eval(meanlong - disttoset / 2) +
'px;background-color:rgba(255,0,0,0.5);width:' + disttoset + 'px;height:6px;"></hr><span onclick="event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(' + "'//www.google.com/maps/dir/" + encodeURIComponent(plotplace[eval(thisleg.split('.')[0])]) + '/' + encodeURIComponent(plotplace[eval(thisleg.split('.')[1])]) + "#In a minute we will start moving the map again','_blank','top=50,left=50,width=1000,height=900')" + '; canlooknow=true; " ondblclick="event.stopPropagation(); canlooknow=false; clearwo(); gleg=glegit(this); wo=windowopen(' + "'//www.google.com/maps/dir/" + plotlat[eval(thisleg.split('.')[0])] + ',' + plotlong[eval(thisleg.split('.')[0])] + '/' + plotlat[eval(thisleg.split('.')[1])] + ',' + plotlong[eval(thisleg.split('.')[1])] + "#In a minute we will start moving the map again','_blank','top=50,left=50,width=1000,height=900')" + '; canlooknow=true; " title="' + plusbit + '' + plotplace[eval(thisleg.split('.')[0])] + ' to ' + plotplace[eval(thisleg.split('.')[1])] + ' has the crow flying (' + gbrgtoset + ' degrees setting off at versus on Mercator Projection ...) ' + eval(eval(360 - brgtoset) % 360) + ' degrees for ' + eval(gdisttoset / 1000.0) + ' kilometers. Click (for placename) or double click (for geographicals) to open a Google Directions window. ' + '" data-class=leg style="cursor:pointer;font-size:6px;z-index:976;margin-top:6px;margin-left:-6px;position:' + posval + ';top:' + meanlat + 'px;left:' + meanlong + 'px;" data-oncontextmenu="event.stopPropagation(); woit(' + "'" + plotplace[eval(thisleg.split('.')[1])].split(', ')[0] + "'" + ');" data-tleg="' + thisleg + '">' + thecompass + '</span>';
}
} else {
bmeridian+='<hr' + clabit + ' onclick="event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(' + "'//www.google.com/maps/dir/" + encodeURIComponent(plotplace[eval(thisleg.split('.')[0])]) + '/' + encodeURIComponent(plotplace[eval(thisleg.split('.')[1])]) + "#In a minute we will start moving the map again','_blank','top=50,left=50,width=1000,height=900')" + '; canlooknow=true; ' + " legsalert(this.title + String.fromCharCode(10) + this.getAttribute('data-titlemore'), this.getAttribute('data-anno')" + '); " ondblclick="event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(' + "'//www.google.com/maps/dir/" + plotlat[eval(thisleg.split('.')[0])] + ',' + plotlong[eval(thisleg.split('.')[0])] + '/' + plotlat[eval(thisleg.split('.')[1])] + ',' + plotlong[eval(thisleg.split('.')[1])] + "#In a minute we will start moving the map again','_blank','top=50,left=50,width=1000,height=900')" + '; canlooknow=true; " data-anno="' + legsanno[legi].replace(/\"/g, '`') + '" title="' + plotplace[eval(thisleg.split('.')[0])] + ' to ' + plotplace[eval(thisleg.split('.')[1])] + ' has the crow flying (' + gbrgtoset + ' degrees setting off at versus on Mercator Projection ...) ' + eval(eval(brgtoset + 450) % 360) + ' degrees for ' + eval(gdisttoset / 1000.0) + ' kilometers. Click (for placename) or double click (for geographicals) to open a Google Directions window. ' + plusbit + '" data-titlemore="' + plotplace[eval(thisleg.split('.')[0])] + ' to ' + plotplace[eval(thisleg.split('.')[1])] + ' has the crow flying (' + gbrgtoset + ' degrees setting off at versus on Mercator Projection ...) ' + eval(eval(brgtoset + 450) % 360) + ' degrees for ' + eval(gdisttoset / 1000.0) + ' kilometers. Click (for placename) or double click (for geographicals) to open a Google Directions window." data-class=leg style="transform:rotate(' + eval(eval('' + brgtoset) - 0) + 'deg);z-index:975;opacity:0.3;position:' + posval + ';top:' +
meanlat +
'px;left:' +
eval(meanlong - disttoset / 2) +
'px;background-color:rgba(255,0,0,0.5);width:' + disttoset + 'px;height:6px;"></hr><span onclick="event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(' + "'//www.google.com/maps/dir/" + encodeURIComponent(plotplace[eval(thisleg.split('.')[0])]) + '/' + encodeURIComponent(plotplace[eval(thisleg.split('.')[1])]) + "#In a minute we will start moving the map again','_blank','top=50,left=50,width=1000,height=900')" + '; canlooknow=true; " ondblclick="event.stopPropagation(); canlooknow=false; clearwo(); gleg=glegit(this); wo=windowopen(' + "'//www.google.com/maps/dir/" + plotlat[eval(thisleg.split('.')[0])] + ',' + plotlong[eval(thisleg.split('.')[0])] + '/' + plotlat[eval(thisleg.split('.')[1])] + ',' + plotlong[eval(thisleg.split('.')[1])] + "#In a minute we will start moving the map again','_blank','top=50,left=50,width=1000,height=900')" + '; canlooknow=true; " title="' + plotplace[eval(thisleg.split('.')[0])] + ' to ' + plotplace[eval(thisleg.split('.')[1])] + ' has the crow flying (' + gbrgtoset + ' degrees setting off at versus on Mercator Projection ...) ' + eval(eval(360 - brgtoset) % 360) + ' degrees for ' + eval(gdisttoset / 1000.0) + ' kilometers. Click (for placename) or double click (for geographicals) to open a Google Directions window. ' + plusbit + '" class=leg style="cursor:pointer;font-size:6px;z-index:976;margin-top:6px;margin-left:-6px;position:' + posval + ';top:' + meanlat + 'px;left:' + meanlong + 'px;" data-oncontextmenu="event.stopPropagation(); woit(' + "'" + plotplace[eval(thisleg.split('.')[1])].split(', ')[0] + "'" + ');" data-tleg="' + thisleg + '">' + thecompass + '</span>';
}
if (ofive == fivethousand) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
fivethousand*=2;
} else {
fivethousand*=10;
}
setTimeout(callintoplay, 5000);
}
}
}

function clearwo() {
if (wo) {
if (wo.closed) {
wo=null;
} else {
wo.close();
wo=null;
}
}
if (wo == null) {
setTimeout(moback, 16000);
}
}

function moback() {
woclosed=true;
if (wo != null) {
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
movesallowed=false;
gmovesallowed=false;
five=0;
gfive=0;
}
woclosed=wo.closed;
console.log('made false ' + wo.closed);
}
if (!woclosed) {
setTimeout(backmo, 2000);
} else {
setTimeout(amnestyinoneminute, 60000);
}
}

function amnestyinoneminute() {
movesallowed=true;
gmovesallowed=true;
five=5;
gfive=5;
}

function backmo() {
if (wo != null) {
if (wo.closed != woclosed) {
if (canlooknow) {
console.log('made true ' + wo.closed);
movesallowed=true;
gmovesallowed=true;
five=5;
gfive=5;
wo=null;
} else {
setTimeout(backmo, 2000);
}
} else {
setTimeout(backmo, 2000);
}
} else {
console.log('Made true ' + wo.closed);
woclosed=wo.closed;
movesallowed=true;
gmovesallowed=true;
five=5;
gfive=5;
}
}

function rightchecklls(smlong, lglat, lglong, smlat, scbl) {
var sofardone=',';
var diff, date0, date1, utcDate, tzDate, udate, utzdate;
gdate0=new Date().toLocaleString("en-US", { timeZone: 'UTC' });
gextratztime=('|' + gdate0);
gudate=new Date();
gutcDate = new Date(gudate.toLocaleString('en-US', { timeZone: 'UTC' }));
setTimeout(function(){ prevf='' + smlong + ',' + lglat + ',' + lglong + ',' + smlat; }, fivethousand);
var iplot=0;
var joff=0;
topc='90';
bmeridian='';
bcircleoflatitude='';
if (lglong > 180) {
joff=eval(-180 + lglong);
}
smlong-=joff;
lglong-=joff;
for (var al=90; al>=-90; al-=10) {
if (al >= smlat && al <= lglat) {
if (topc == '90') { topc='' + eval(91 + eval(eval(lglat - al) / eval(lglat - smlat) * eval(screenheight))); }
if (eval((al + 90) % 90) == 0) {
bcircleoflatitude+='<span onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';top:' + eval(10 + eval(eval(lglat - al) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:0px;">  ' + (('' + al).replace('-','') + (('' + al).substring(0,1) == '-' ? 'S' : 'N')).replace(/^90N$/g,'   North Pole').replace(/^90S$/g,'   South Pole').replace(/^0N$/g,'   Equator').replace(/^0S$/g,' Equator').replace(/S$/g,'°S').replace(/N$/g,'°N') + '</span><hr class=mydl title="Circle of latitude ' + al + '" style="z-index:675;position:' + posval + ';top:' + eval(eval(lglat - al) / eval(lglat - smlat) * eval(screenheight)) + 'px;left:0px;height:1px;width:' + screenwidth + 'px;background-color:rgba(255,0,0,0.5);"></hr>';
} else {
bcircleoflatitude+='<span onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';top:' + eval(10 + eval(eval(lglat - al) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:0px;">  ' + (('' + al).replace('-','') + (('' + al).substring(0,1) == '-' ? 'S' : 'N')).replace(/^90N$/g,'   North Pole').replace(/^90S$/g,'   South Pole').replace(/^0N$/g,'   Equator').replace(/^0S$/g,' Equator').replace(/S$/g,'°S').replace(/N$/g,'°N') + '</span><hr class=mydl title="Circle of latitude ' + al + '" style="z-index:675;position:' + posval + ';top:' + eval(eval(lglat - al) / eval(lglat - smlat) * eval(screenheight)) + 'px;left:0px;height:1px;width:' + screenwidth + 'px;background-color:rgba(0,0,255,0.5);"></hr>';
}

for (iplot=0; iplot<plotlat.length; iplot++) {
if (Math.abs(plotlat[iplot] - al) <= 5) {
if (plotlong[iplot] >= smlong && plotlong[iplot] <= lglong) {

if (plotplace[iplot].trim() == '') {
if (('' + plotlat[iplot] + plotlong[iplot]).indexOf('.') != -1) {
if (legc.indexOf(',' + iplot + '.') != -1 && sofardone.indexOf(',' + '' + iplot + '.' + legc.split(',' + iplot + '.')[1].split(',')[0] + ',') == -1) {
sofardone+='' + iplot + '.' + legc.split(',' + iplot + '.')[1].split(',')[0] + ',';
plotleg('' + iplot + '.' + legc.split(',' + iplot + '.')[1].split(',')[0], smlong, lglat, lglong, smlat);
}
if (legc.indexOf('.' + iplot + ',') != -1 && sofardone.indexOf(',' + legc.split('.' + iplot + ',')[0].split(',')[eval(-1 + legc.split('.' + iplot + ',')[0].split(',').length)] + '.' + iplot + ',') == -1) {
sofardone+=legc.split('.' + iplot + ',')[0].split(',')[eval(-1 + legc.split('.' + iplot + ',')[0].split(',').length)] + '.' + iplot + ',';
plotleg(legc.split('.' + iplot + ',')[0].split(',')[eval(-1 + legc.split('.' + iplot + ',')[0].split(',').length)] + '.' + iplot, smlong, lglat, lglong, smlat);
}
prebmeridian='<span class=place style="z-index:1675;position:' + posval + ';top:' + eval(0 + eval(eval(lglat - eval('' + plotlat[iplot])) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:' + eval(0 + eval(eval('' + plotlong[iplot]) - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;" onclick="event.stopPropagation(); woit(' + "'" + plotplace[iplot].split(', ')[0] + "'" + ');">' + thepin + '</span>';
if (prebmeridian.indexOf(oneotherway) != -1) {
ocprefix='<div id=yourcanvas>';
ocsufix='</div>';
}
if (prebmeridian.indexOf('<div id="div') != -1 && ocprefix.trim() != '') {
bmeridian+=ocprefix.trim() + prebmeridian + ocsuffix.trim();
if (ocprefix.trim() != '') {
//alert('0: ' + bmeridian.split(ocprefix.trim())[1]);
if (prebmeridian.indexOf('<div id="div') != -1) {
oneotherway='<div id="div' + prebmeridian.split('<div id="div')[1].split('"')[0] + '"';
}
}
ocprefix='';
ocsuffix='';
} else {
bmeridian+=prebmeridian;
}
}
} else {
if (legc.indexOf(',' + iplot + '.') != -1 && sofardone.indexOf(',' + '' + iplot + '.' + legc.split(',' + iplot + '.')[1].split(',')[0] + ',') == -1) {
sofardone+='' + iplot + '.' + legc.split(',' + iplot + '.')[1].split(',')[0] + ',';
plotleg('' + iplot + '.' + legc.split(',' + iplot + '.')[1].split(',')[0], smlong, lglat, lglong, smlat);
}
if (legc.indexOf('.' + iplot + ',') != -1 && sofardone.indexOf(',' + legc.split('.' + iplot + ',')[0].split(',')[eval(-1 + legc.split('.' + iplot + ',')[0].split(',').length)] + '.' + iplot + ',') == -1) {
sofardone+=legc.split('.' + iplot + ',')[0].split(',')[eval(-1 + legc.split('.' + iplot + ',')[0].split(',').length)] + '.' + iplot + ',';
plotleg(legc.split('.' + iplot + ',')[0].split(',')[eval(-1 + legc.split('.' + iplot + ',')[0].split(',').length)] + '.' + iplot, smlong, lglat, lglong, smlat);
}
prebmeridian=bmeranalyze('<span class=place style="z-index:675;position:' + posval + ';top:' + eval(10 + eval(eval(lglat - eval('' + plotlat[iplot])) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:' + eval(10 + eval(eval('' + plotlong[iplot]) - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;" onclick=" if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || 1 == 1) { if (this.title.trim().length > 0) { plotalert(this.title); } }" title="' + plotanno[iplot].replace(/\"/g,'`').replace(/^/g, String.fromCharCode(10)) + '">' + doplotplace(iplot,'g') + '</span><span class=place style="z-index:1675;position:' + posval + ';top:' + eval(0 + eval(eval(lglat - eval('' + plotlat[iplot])) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:' + eval(0 + eval(eval('' + plotlong[iplot]) - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;" id=span' + plotplace[iplot].split(', ')[0].replace(/\ /g,'_') + ' onclick="event.stopPropagation(); woit(' + "'" + plotplace[iplot].split(', ')[0] + "'" + ');">' + thepin + '</span>');
if (prebmeridian.indexOf(oneotherway) != -1) {
ocprefix='<div id=yourcanvas>';
ocsufix='</div>';
}
if (prebmeridian.indexOf('<div id="div') != -1 && ocprefix.trim() != '') {
bmeridian=ocprefix.trim() + prebmeridian + ocsuffix.trim();
if (ocprefix.trim() != '') {
//alert('1: ' + bmeridian.split(ocprefix.trim())[1]);
if (prebmeridian.indexOf('<div id="div') != -1) {
oneotherway='<div id="div' + prebmeridian.split('<div id="div')[1].split('"')[0] + '"';
}
} //else {
//alert('8: ' + oneotherway + ' ' + bmeridian);
//}
ocprefix='';
ocsuffix='';
} else {
bmeridian=prebmeridian;
}
}

}
}
}

if (Math.abs(latis - al) <= 5) {
if (acircleoflatitude == '') {
if (('' + latis).split('.0')[0].slice(-1) == '0') {
bcircleoflatitude+='<span onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';top:' + eval(10 + eval(eval(lglat - eval('' + latis)) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:0px;">  ' + (('' + latis).replace('-','') + (('' + latis).substring(0,1) == '-' ? 'S' : 'N')).replace(/^90N$/g,'   North Pole').replace(/^90S$/g,'   South Pole').replace(/^0N$/g,'   Equator').replace(/^0S$/g,' Equator').replace(/S$/g,'°S').replace(/N$/g,'°N') + '</span><hr id=mydl title="Circle of latitude ' + latis + '" style="z-index:675;position:' + posval + ';top:' + eval(eval(lglat - eval('' + latis)) / eval(lglat - smlat) * eval(screenheight)) + 'px;left:0px;height:1px;width:' + screenwidth + 'px;background-color:rgba(255,0,0,0.5);"></hr>';
} else {
bcircleoflatitude+='<span onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';top:' + eval(10 + eval(eval(lglat - eval('' + latis)) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:0px;">  ' + (('' + latis).replace('-','') + (('' + latis).substring(0,1) == '-' ? 'S' : 'N')).replace(/^90N$/g,'   North Pole').replace(/^90S$/g,'   South Pole').replace(/^0N$/g,'   Equator').replace(/^0S$/g,' Equator').replace(/S$/g,'°S').replace(/N$/g,'°N') + '</span><hr id=mydl title="Circle of latitude ' + latis + '" style="border-style:dotted;z-index:675;position:' + posval + ';top:' + eval(eval(lglat - eval('' + latis)) / eval(lglat - smlat) * eval(screenheight)) + 'px;left:0px;height:1px;width:' + screenwidth + 'px;background-color:rgba(255,0,0,0.1);"></hr>';
}
}
}
if (al == 70) {
bcircleoflatitude+='<span onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';top:' + eval(10 + eval(eval(lglat - eval(66 + 34 / 60)) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:0px;">  ' + 'Arctic Circle' + '</span><hr class=mydl title="Circle of latitude ' + eval(66 + 34 / 60) + '" style="z-index:675;position:' + posval + ';top:' + eval(eval(lglat - eval(66 + 34 / 60)) / eval(lglat - smlat) * eval(screenheight)) + 'px;left:0px;height:1px;width:' + screenwidth + 'px;background-color:rgba(0,255,0,0.5);"></hr>';
}
if (al == 30) {
bcircleoflatitude+='<span onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';top:' + eval(10 + eval(eval(lglat - eval(23 + 26 / 60)) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:0px;">  ' + 'Tropic of Cancer' + '</span><hr class=mydl title="Circle of latitude ' + eval(23 + 26 / 60) + '" style="z-index:675;position:' + posval + ';top:' + eval(eval(lglat - eval(23 + 26 / 60)) / eval(lglat - smlat) * eval(screenheight)) + 'px;left:0px;height:1px;width:' + screenwidth + 'px;background-color:rgba(0,255,0,0.5);"></hr>';
}
if (al == -20) {
bcircleoflatitude+='<span onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';top:' + eval(10 + eval(eval(lglat - eval(-23 - 26 / 60)) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:0px;">  ' + 'Tropic of Capricorn' + '</span><hr class=mydl title="Circle of latitude ' + eval(-23 - 26 / 60) + '" style="z-index:675;position:' + posval + ';top:' + eval(eval(lglat - eval(-23 - 26 / 60)) / eval(lglat - smlat) * eval(screenheight)) + 'px;left:0px;height:1px;width:' + screenwidth + 'px;background-color:rgba(0,255,0,0.5);"></hr>';
}
if (al == -60) {
bcircleoflatitude+='<span onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';top:' + eval(10 + eval(eval(lglat - eval(-66 - 34 / 60)) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:0px;">  ' + 'Antarctic Circle' + '</span><hr class=mydl title="Circle of latitude ' + eval(-66 - 34 / 60) + '" style="z-index:675;position:' + posval + ';top:' + eval(eval(lglat - eval(-66 - 34 / 60)) / eval(lglat - smlat) * eval(screenheight)) + 'px;left:0px;height:1px;width:' + screenwidth + 'px;background-color:rgba(0,255,0,0.5);"></hr>';
}
}
}
for (var am=-180; am<=250; am+=10) {
if (am >= smlong && am <= lglong) {
if (Math.abs(longis - am) <= 5) {
if (ameridian == '') {
if (('' + longis).split('.0')[0].slice(-1) == '0') {
bmeridian+='<span ' + ocm(event,am,smlat,lglat) + ' onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';left:' + eval(eval(eval('' + longis) - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;top:90px;">  ' + (('' + longis).replace('-','') + (('' + longis).substring(0,1) == '-' ? 'W' : 'E')).replace(/^0E$/g,' Greenwich<br> Meridian').replace(/^180E/g,'  International<br>  Date<br>  Line').replace(/^180W/g,'International<br> Date<br> Line').replace('E','°E').replace('W','°W') + '</span><hr id=mydm title="Meridian ' + longis + '" style="z-index:675;position:' + posval + ';left:' + eval(eval(eval('' + longis) - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;top:0px;height:' + screenheight + 'px;width:1px;background-color:rgba(255,0,0,0.5);"></hr>';
} else {
bmeridian+='<span ' + ocm(event,am,smlat,lglat) + ' onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';left:' + eval(eval(eval('' + longis) - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;top:90px;">  ' + (('' + longis).replace('-','') + (('' + longis).substring(0,1) == '-' ? 'W' : 'E')).replace(/^0E$/g,' Greenwich<br> Meridian').replace(/^180E/g,'  International<br>  Date<br>  Line').replace(/^180W/g,'International<br> Date<br> Line').replace('E','°E').replace('W','°W') + '</span><hr id=mydm title="Meridian ' + longis + '" style="z-index:675;border-style:dotted;position:' + posval + ';left:' + eval(eval(eval('' + longis) - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;top:0px;height:' + screenheight + 'px;width:1px;background-color:rgba(255,0,0,0.1);"></hr>';
}
}
}
if (am > 180) {
bmeridian+='<span ' + ocm(event,am,smlat,lglat) + ' onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';left:' + eval(eval(am - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;top:' + topc + 'px;">  ' + (('' + eval(am - 360)).replace('-','') + (('' + eval(am - 360)).substring(0,1) == '-' ? 'W' : 'E')).replace(/^0E$/g,' Greenwich<br> Meridian').replace(/^180E/g,'  International<br>  Date<br>  Line').replace(/^180W/g,'International<br> Date<br> Line').replace('E','°E').replace('W','°W') + '</span><hr class=mydm title="Meridian ' + eval(am - 180) + '" style="z-index:675;position:' + posval + ';left:' + eval(eval(am - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;top:0px;height:' + screenheight + 'px;width:1px;background-color:rgba(255,0,0,0.5);"></hr>';
} else {
bmeridian+='<span ' + ocm(event,am,smlat,lglat) + ' onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';left:' + eval(eval(am - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;top:' + topc + 'px;">  ' + (('' + am).replace('-','') + (('' + am).substring(0,1) == '-' ? 'W' : 'E')).replace(/^0E$/g,' Greenwich<br> Meridian').replace(/^180E/g,'  International<br>  Date<br>  Line').replace(/^180W/g,'International<br> Date<br> Line').replace('E','°E').replace('W','°W') + '</span><hr class=mydm title="Meridian ' + am + '" style="z-index:675;position:' + posval + ';left:' + eval(eval(am - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;top:0px;height:' + screenheight + 'px;width:1px;background-color:rgba(255,0,0,0.5);"></hr>';
}
}
}
}

function checklls(smlong, lglat, lglong, smlat) {
var sofardone=',';
var diff, date0, date1, utcDate, tzDate, udate, utzdate;
gdate0=new Date().toLocaleString("en-US", { timeZone: 'UTC' });
gextratztime=('|' + gdate0);
gudate=new Date();
gutcDate = new Date(gudate.toLocaleString('en-US', { timeZone: 'UTC' }));
setTimeout(function(){ prevf='' + smlong + ',' + lglat + ',' + lglong + ',' + smlat; }, fivethousand);
var iplot=0;
var joff=0;
topc='90';
bmeridian='';
bcircleoflatitude='';
//if (lglong > 180) {
// joff=eval(-180 + lglong);
//}
smlong-=joff;
lglong-=joff;
for (var al=90; al>=-90; al-=10) {
if (al >= smlat && al <= lglat) {
if (topc == '90') { topc='' + eval(91 + eval(eval(lglat - al) / eval(lglat - smlat) * eval(screenheight))); }
if (eval((al + 90) % 90) == 0) {
bcircleoflatitude+='<span onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';top:' + eval(10 + eval(eval(lglat - al) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:0px;">  ' + (('' + al).replace('-','') + (('' + al).substring(0,1) == '-' ? 'S' : 'N')).replace(/^90N$/g,'   North Pole').replace(/^90S$/g,'   South Pole').replace(/^0N$/g,'   Equator').replace(/^0S$/g,' Equator').replace(/S$/g,'°S').replace(/N$/g,'°N') + '</span><hr class=mydl title="Circle of latitude ' + al + '" style="z-index:675;position:' + posval + ';top:' + eval(eval(lglat - al) / eval(lglat - smlat) * eval(screenheight)) + 'px;left:0px;height:1px;width:' + screenwidth + 'px;background-color:rgba(255,0,0,0.5);"></hr>';
} else {
bcircleoflatitude+='<span onclick="event.stopPropagation(); if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { alert(this.title); }" title="At prompt window, prefixing, and persevering, CSS map image styling available (and able to be turned off via nocssplease and special decimal entity number parts for emojis eg. pin:128204; (versus ' + String.fromCodePoint(128205) + ') compass:127993; (versus ' + String.fromCodePoint(129517) + ') eg. filter:sepia(74%); Or you can specify <st' + 'yle></st' + 'yle> non-persevering or <st' + 'yle></ST' + 'YLE> persevering CSS of your own (or use a URL ending with .css (or persevering .CSS)) to begin with and/or <sc' + 'ript></sc' + 'ript> non-persevering or <sc' + 'ript></SC' + 'RIPT> persevering Javascript of your own (or use a URL ending with .js (or persevering .JS)) to begin with" style="z-index:675;position:' + posval + ';top:' + eval(10 + eval(eval(lglat - al) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:0px;">  ' + (('' + al).replace('-','') + (('' + al).substring(0,1) == '-' ? 'S' : 'N')).replace(/^90N$/g,'   North Pole').replace(/^90S$/g,'   South Pole').replace(/^0N$/g,'   Equator').replace(/^0S$/g,' Equator').replace(/S$/g,'°S').replace(/N$/g,'°N') + '</span><hr class=mydl title="Circle of latitude ' + al + '" style="z-index:675;position:' + posval + ';top:' + eval(eval(lglat - al) / eval(lglat - smlat) * eval(screenheight)) + 'px;left:0px;height:1px;width:' + screenwidth + 'px;background-color:rgba(0,0,255,0.5);"></hr>';
}

for (iplot=0; iplot<plotlat.length; iplot++) {
if (Math.abs(plotlat[iplot] - al) <= 5) {
if (plotlong[iplot] >= smlong && plotlong[iplot] <= lglong) {

if (plotplace[iplot].trim() == '') {
if (('' + plotlat[iplot] + plotlong[iplot]).indexOf('.') != -1) {
if (legc.indexOf(',' + iplot + '.') != -1 && sofardone.indexOf(',' + '' + iplot + '.' + legc.split(',' + iplot + '.')[1].split(',')[0] + ',') == -1) {
sofardone+='' + iplot + '.' + legc.split(',' + iplot + '.')[1].split(',')[0] + ',';
plotleg('' + iplot + '.' + legc.split(',' + iplot + '.')[1].split(',')[0], smlong, lglat, lglong, smlat);
}
if (legc.indexOf('.' + iplot + ',') != -1 && sofardone.indexOf(',' + legc.split('.' + iplot + ',')[0].split(',')[eval(-1 + legc.split('.' + iplot + ',')[0].split(',').length)] + '.' + iplot + ',') == -1) {
sofardone+=legc.split('.' + iplot + ',')[0].split(',')[eval(-1 + legc.split('.' + iplot + ',')[0].split(',').length)] + '.' + iplot + ',';
plotleg(legc.split('.' + iplot + ',')[0].split(',')[eval(-1 + legc.split('.' + iplot + ',')[0].split(',').length)] + '.' + iplot, smlong, lglat, lglong, smlat);
}
prebmeridian='<span class=place style="z-index:1675;position:' + posval + ';top:' + eval(0 + eval(eval(lglat - eval('' + plotlat[iplot])) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:' + eval(0 + eval(eval('' + plotlong[iplot]) - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;" onclick="event.stopPropagation(); woit(' + "'" + plotplace[iplot].split(', ')[0] + "'" + ');">' + thepin + '</span>';
if (prebmeridian.indexOf(oneotherway) != -1) {
ocprefix='<div id=yourcanvas>';
ocsufix='</div>';
}
if (prebmeridian.indexOf('<div id="div') != -1 && ocprefix.trim() != '') {
bmeridian=ocprefix.trim() + prebmeridian + ocsuffix.trim();
if (ocprefix.trim() != '') {
//alert('3: ' + bmeridian.split(ocprefix.trim())[1]);
if (prebmeridian.indexOf('<div id="div') != '') {
oneotherway='<div id="div' + prebmeridian.split('<div id="div')[1].split('"')[0] + '"';
}
}
ocprefix='';
ocsuffix='';
} else {
bmeridian=prebmeridian;
}
}
} else {
if (legc.indexOf(',' + iplot + '.') != -1 && sofardone.indexOf(',' + '' + iplot + '.' + legc.split(',' + iplot + '.')[1].split(',')[0] + ',') == -1) {
sofardone+='' + iplot + '.' + legc.split(',' + iplot + '.')[1].split(',')[0] + ',';
plotleg('' + iplot + '.' + legc.split(',' + iplot + '.')[1].split(',')[0], smlong, lglat, lglong, smlat);
}
if (legc.indexOf('.' + iplot + ',') != -1 && sofardone.indexOf(',' + legc.split('.' + iplot + ',')[0].split(',')[eval(-1 + legc.split('.' + iplot + ',')[0].split(',').length)] + '.' + iplot + ',') == -1) {
sofardone+=legc.split('.' + iplot + ',')[0].split(',')[eval(-1 + legc.split('.' + iplot + ',')[0].split(',').length)] + '.' + iplot + ',';
plotleg(legc.split('.' + iplot + ',')[0].split(',')[eval(-1 + legc.split('.' + iplot + ',')[0].split(',').length)] + '.' + iplot, smlong, lglat, lglong, smlat);
}
prebmeridian=bmeranalyze('<span class=place style="z-index:675;position:' + posval + ';top:' + eval(10 + eval(eval(lglat - eval('' + plotlat[iplot])) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:' + eval(10 + eval(eval('' + plotlong[iplot]) - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;" onclick=" if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || 1 == 1) { if (this.title.trim().length > 0) { plotalert(this.title); } }" title="' + plotanno[iplot].replace(/\"/g,'`').replace(/^/g, String.fromCharCode(10)) + '">' + doplotplace(iplot,'g') + '</span><span class=place style="z-index:1675;position:' + posval + ';top:' + eval(0 + eval(eval(lglat - eval('' + plotlat[iplot])) / eval(lglat - smlat) * eval(screenheight))) + 'px;left:' + eval(0 + eval(eval('' + plotlong[iplot]) - smlong) / eval(lglong - smlong) * eval(screenwidth)) + 'px;" id=span' + plotplace[iplot].split(', ')[0].replace(/\ /g,'_') + ' onclick="event.stopPropagation(); woit(' + "'" + plotplace[iplot].split(', ')[0] + "'" + ');">' + thepin + '</span>');
if (prebmeridian.indexOf(oneotherway) != -1) {
ocprefix='<div id=yourcanvas>';
ocsufix='<