<!doctype html>
<html>

<head data-live-domain="api.jquery.com">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">


<meta name="author" content="jQuery Foundation - jquery.org">
<meta name="description" content="jQuery: The Write Less, Do More, JavaScript Library">

<meta name="viewport" content="width=device-width, initial-scale=1">

<!--link rel="shortcut icon" href="//api.jquery.com/jquery-wp-content/themes/api.jquery.com/i/favicon.ico"-->

<link rel="stylesheet" href="//api.jquery.com/jquery-wp-content/themes/jquery/css/base.css?v=1">
<link rel="stylesheet" href="//api.jquery.com/jquery-wp-content/themes/api.jquery.com/style.css">
<link rel="pingback" href="//api.jquery.com/xmlrpc.php" />
<!--[if lt IE 7]><link rel="stylesheet" href="css/font-awesome-ie7.min.css"><![endif]-->

<!--script src="//api.jquery.com/jquery-wp-content/themes/jquery/js/modernizr.custom.2.6.2.min.js"></script-->

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write(unescape('%3Cscript src="//api.jquery.com/jquery-wp-content/themes/jquery/js/jquery-1.9.1.min.js"%3E%3C/script%3E'))</script>

<script src="//api.jquery.com/jquery-wp-content/themes/jquery/js/plugins.js"></script>
<script src="//api.jquery.com/jquery-wp-content/themes/jquery/js/main.js"></script>

<script src="//use.typekit.net/wde1aof.js"></script>
<script>try{Typekit.load();}catch(e){}</script>

<script type='text/javascript' src='//api.jquery.com/wp-includes/js/comment-reply.min.js?ver=3.8'></script>
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<title>Karaoke via YouTube API - RJM Programming - September, 2016</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes" >
<script type='text/javascript' src='keep_parent_background.js'></script>
<style>
body {
background-color: lightblue;
padding-top: 20px;
background: -webkit-linear-gradient(center top , rgb(255, 255, 0), rgb(0, 255, 255)) repeat scroll 0% 0% transparent;
background: -o-linear-gradient(center top , rgb(255, 255, 0), rgb(0, 255, 255)) repeat scroll 0% 0% transparent;
background: -moz-linear-gradient(center top , rgb(255, 255, 0), rgb(0, 255, 255)) repeat scroll 0% 0% transparent;
background: linear-gradient(180deg, rgb(255, 255, 0), rgb(0, 255, 255)); /* linear-gradient(center top , rgb(255, 255, 0), rgb(0, 255, 255)) repeat scroll 0% 0% transparent */
}
input { z-index: 5; }

summary { background-color: #f0f0f0; }

/* #### Tablets and Phones Portrait or Landscape ... thanks to http://www.javascriptkit.com/dhtmltutors/cssmediaqueries2.shtml #### */
@media screen and (min-device-width: 320px) and (max-device-width: 1024px){
input[type=button] { display: inline-block !important; }
}

.emoji { border: 8px solid white; font-size: 20px; }
#youtubeid { width:300px; }
</style>
<script type='text/javascript' id=bigscript>
var defidea='text-align:center; width: 100%;', hashidea='';
// https://www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?feedoffurl=%2e%2e%2fPHP%2fspeech%5fsupervisor%2ephp%3fmode%3d9%26csneg%3d%2d&youtubeid=7v6t3N8YI8g&youtube_duration=180.0&email=&email=&emoji=on&c0=on&i0=92&j0=94&i1=244&j1=246&i2=171&j2=174&i3=&j3=&i4=&j4=&i5=&j5=&i6=&j6=&i7=&j7=&i8=&j8=&i9=&j9=&i10=&j10=&i11=&j11=&i12=&j12=&i13=&j13=&i14=&j14=&i15=&j15=&i16=&j16=&i17=&j17=&i18=&j18=&i19=&j19=&i20=&j20=&i21=&j21=&i22=&j22=&i23=&j23=&i24=&j24=&i25=&j25=&i26=&j26=&i27=&j27=&i28=&j28=&i29=&j29=
//7v6t3N8YI8g 1:32 1:34 2:24-2:26 2:51-2:54
// https://www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?feedoffurl=%2e%2e%2fPHP%2fspeech%5fsupervisor%2ephp%3fmode%3d9%26csneg%3d%2d&youtubeid=Q0Dn5k_MtZM&youtube_duration=30.021&email=&email=&emoji=on&c0=on&i0=11&j0=14&i1=&j1=&i2=&j2=&i3=&j3=&i4=&j4=&i5=&j5=&i6=&j6=&i7=&j7=&i8=&j8=&i9=&j9=&i10=&j10=&i11=&j11=&i12=&j12=&i13=&j13=&i14=&j14=&i15=&j15=&i16=&j16=&i17=&j17=&i18=&j18=&i19=&j19=&i20=&j20=&i21=&j21=&i22=&j22=&i23=&j23=&i24=&j24=&i25=&j25=&i26=&j26=&i27=&j27=&i28=&j28=&i29=&j29=
var lfb='<br>', lfends='', documentURL=document.URL;
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || 1 == 1) { lfb=" "; lfends='<br>'; }
var bitatstart='', bitatend='';
if (('' + location.hash).indexOf('details') != -1) { bitatstart='<details open><summary></summary>'; bitatend='</details></td></TR>'; }
var ptddp=location.search.split('tdd=')[1] ? decodeURIComponent(location.search.split('tdd=')[1].split('&')[0]) : '';
var czzyes=location.search.split('ezj=')[1] ? decodeURIComponent(location.search.split('ezj=')[1].split('&')[0]) : '';
var czzis=location.search.split('c0=')[1] ? decodeURIComponent(location.search.split('c0=')[1].split('&')[0]) : 'on';
var otheriframeoh=location.search.split('feedoffurl=')[1] ? '<iframe style="vertical-align:top;width:100%;height:1200px;transform:scale(0.55);" src=' + decodeURIComponent(location.search.split('feedoffurl=')[1].split('&')[0]).replace(/\+/g,' ') + '></iframe>' : '';
if ((otheriframeoh != '' || (document.URL.indexOf('?') == -1 && document.URL.indexOf('localhost') == -1)) && document.URL.indexOf('http:') == 0) { location.href=document.URL.replace('http://rjm','https://www.rjm').replace('http:','https:'); }
var lastgetytlist=''; // store and compare against the last YouTube (perhaps search functionality) query (if the same, do not repeat)
var amwaiting=null; // variable for a setInterval call dampening down the YouTube request rate ... via the control of ...
var allowable=true; // if true, you are clear to request from YouTube, else false
var additionalask=[''];
var sstr='';
var firstrepeat=true;
var lastdet='';
var optonclick=';';
var myvtableoh='';
var pausecount=0;
var csajaxs='x';
var gsecs=-1, ggsecs=-1;

var honev='', myformv='', spanv='', ddejkaraokev='visible', dothjerurl='';
var rep='';
var looping=false, waslooping=false;
var bigo=null;
var bx=[], by=[];
var ourmto=false, courmto='';
var pgiveprefix='';
var biggesturl='', biggerurl='';
var emojisuffix='ej';
var firstsuffix="&playtime=0&start=0";
var firstprefix="";
var snippet=-1;
var ourvid=location.search.split('vid=')[1] ? decodeURIComponent(location.search.split('vid=')[1].split('&')[0]).replace(/\+/g,' ') : '';
var ourvids=ourvid.split('!||!');
if (ourvids.length == 1) {
ourvids=ourvid.split('|!!|');
}
if (ourvids.length == 1) {
ourvids=ourvid.split('|!|!');
}
if (ourvids.length == 1) {
ourvids=ourvid.split('!|!|');
}
if (ourvids.length == 1) {
ourvids=ourvid.split('!!||');
}
if (ourvids.length == 1) {
ourvids=ourvid.split('||!!');
}
var doemoji=location.search.split('emoji=')[1] ? location.search.split('emoji=')[1].split('&')[0] : 'on';
var doemj=false, ech='';
if (doemoji == 'on') {
doemj=true;
ech='checked';
}

var interesting=true;
var espo=null, espw=null;
var plo=null;
var ajaxclist='', ajaxoncnt=0, ajaxf='';
var ajaxsih='';
var offtop='';
var iofftop=[];
var givefactor=0;
var sgive=false;
var pgive=false;
var givefifteen=-1;
var lastajaxs='';
var thisonetodo=0;
var onestodoprefix='';
var onestodoprefix=location.search.split('andthen=')[1] ? ('&andthen=' + decodeURIComponent(location.search.split('andthen=')[1].split('&')[0])).substring(0,9) : '';
var onestodosuffix=location.search.split('andthen=')[1] ? decodeURIComponent(location.search.split('andthen=')[1].split('&')[0]) : '';
var prevonestodosuffix=onestodosuffix;
var onestodo=[];
var onestododur=[];
var morethanone=false;
var preselc='';
var tdt='';
var defval='0';
var next=0;
var nextthing='mytbody';
var lastfinish=-1;
var next_thing='xx0';
var mbmode=false;
var bigdocbod='';
var ifsa=[];
var jfsa=0;
var nine=29;
var cumd=-1.0;
var bcol='#f0f0f0';
var nextdelay=-1;
var lastokn='';
var okn='';
var lastconto=[];
var morechanges=true;
var lastwo='';
var woi=null;
var oko=null;

var elev='', maxva=0, relifid='', sumo=null;
var repeatz='199';
var karaz='99';

var asuffis='';
var bsuffis='';
var aaconto=null, aaset=false, ibn=0, bnvs=[], waaconto=null;
var ouraidis=location.search.split('theaid=')[1] ? location.search.split('theaid=')[1].split('&')[0] : 'aja';
var ouriframeidis=location.search.split('theiframeid=')[1] ? location.search.split('theiframeid=')[1].split('&')[0] : 'myja';
var ourytaudioonlyofinterestidis='youllneverfindthis';
ourytaudioonlyofinterestidis=location.search.split('youtubeid=')[1] ? (location.search.split('theaid=')[1] ? location.search.split('youtubeid=')[1].split('&')[0] : '7XMW6Z_Oq38') : 'youllneverfindthis';
var oursupwording='';
var ourbuttonwording=location.search.split('thebuttonwording=')[1] ? decodeURIComponent(location.search.split('thebuttonwording=')[1].split('&')[0]).replace(/\+/g,' ') : (String.fromCodePoint(128276) + String.fromCodePoint(128276));
if (ourbuttonwording.indexOf(' <sup') != -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
oursupwording=' <sup' + ourbuttonwording.split(' <sup')[1];
ourbuttonwording=ourbuttonwording.split(' <sup')[0];
oursupwording='';
} else if (ourbuttonwording.indexOf('<sup') != -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
oursupwording=' <sup' + ourbuttonwording.split(' <sup')[1];
ourbuttonwording=ourbuttonwording.split(' <sup')[0];
oursupwording='';
} else if (ourbuttonwording.indexOf('<sup') != -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
oursupwording='<sup' + ourbuttonwording.split('<sup')[1];
ourbuttonwording=ourbuttonwording.split('<sup')[0];
oursupwording='';
}
if (ourbuttonwording.trim() != '') {
if (ourbuttonwording.trim().replace(/\,/g,'').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,'') == '') {
if (ourbuttonwording.trim().substring(0,1).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,'') == '') {
bnvs=ourbuttonwording.trim().replace(/\./g,',').split(',');
ourbuttonwording='';
if (eval('' + bnvs.length) == 1) {
ourbuttonwording=String.fromCodePoint(eval('' + bnvs[0]));
}
for (ibn=1; ibn<bnvs.length; ibn++) {
if (eval('' + bnvs[ibn]) != eval('' + bnvs[eval(-1 + ibn)])) {
ourbuttonwording+=String.fromCodePoint(eval('' + bnvs[eval(-1 + ibn)]), eval('' + bnvs[ibn]));
} else {
if (ourbuttonwording == '') { ourbuttonwording+=String.fromCodePoint(eval('' + bnvs[eval(-1 + ibn)])); }
ourbuttonwording+=String.fromCodePoint(eval('' + bnvs[ibn]));
}
}
}
}

}

//alert(ourbuttonwording + ' ... ' + location.search);
if (('#' + location.hash).indexOf('#inp') != -1) {
hashidea='&#' + 'inp' + ('#' + location.hash).split('#inp')[1];
}

if (window.top) {
if (document.URL.indexOf('youtubeid=' + ourytaudioonlyofinterestidis + '&') != -1 && document.URL.indexOf('c0=off') != -1 && (document.URL.indexOf('thebuttonwording=') != -1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i))) {
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
hashidea='&#' + 'inp' + ouraidis + '_' + ouriframeidis;
}
//alert('1:' + hashidea);
if (top.document.getElementById(ouraidis) && ourbuttonwording.trim() != '') {
if (oursupwording != '') {
top.document.getElementById(ouraidis).innerHTML=ourbuttonwording + oursupwording;
} else {
top.document.getElementById(ouraidis).innerHTML=ourbuttonwording;
}
}
} else if (document.URL.indexOf('youtubeid=' + ourytaudioonlyofinterestidis + '&') != -1 && document.URL.indexOf('c0=on') != -1 && (document.URL.indexOf('thebuttonwording=') != -1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i))) {
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
hashidea='&#' + 'inp' + ouraidis + '_' + ouriframeidis;
}
//alert('2:' + hashidea);
defidea='text-align:left; width: 90%;';
honev='opacity:0.0;';
//myformv='opacity:0.0;';
spanv='opacity:0.0;';
ddejkaraokev='hidden';
dotherurl=' style=height:200px; ';
setTimeout(function(){
repeatz='199';
karaz='99';
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
repeatz='99';
karaz='199';
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(1);
}
setTimeout(function(){
if (document.getElementById('myrepeat')) {
document.getElementById('youtube_duration').title=' ';
}
document.getElementById('youtube_duration').value='22223.000';
}, 1000);
setTimeout(function(){
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(11);
}
if (document.getElementById('audioejkaraoke') || document.getElementById('repeat')) {
if (document.getElementById('audioejkaraoke')) {
document.getElementById('audioejkaraoke').title=' ' + document.getElementById('audioejkaraoke').title;
if (ourbuttonwording.indexOf('<') == -1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('audioejkaraoke').value=ourbuttonwording; //String.fromCodePoint(128276) + String.fromCodePoint(128276);
document.getElementById('audioejkaraoke').style.position='absolute';
document.getElementById('audioejkaraoke').style.left='0px';
document.getElementById('audioejkaraoke').style.top='0px';
document.getElementById('audioejkaraoke').style.backgroundColor='transparent';
document.getElementById('audioejkaraoke').style.zIndex=karaz;
//document.getElementById('audioejkaraoke').onmousedown=function(event){ parent.onmaybesupclick(event); };
//document.getElementById('audioejkaraoke').ontouchstart=function(event){ parent.onmaybesupclick(event); };
}
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn('111 ' + ourbuttonwording);
}
if (!document.getElementById('myrepeat') || 111 == 111) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn('1111 ' + ourbuttonwording);
}
if (ourbuttonwording.indexOf('<') != -1) {
//alert(document.getElementById('repeat').outerHTML.split('/>')[0].split('>')[0].replace(' onclick=',' data-onclick=').replace(' id=',' id=myrepeat data-id=').replace(' type=',' data-type=').replace('<input','<button data-ident="but' + ouraidis + '_' + ouriframeidis + '" ').replace(' style="', ' style="position:absolute;left:0px;top:-10px;background-color:transparent;z-index:' + eval(1 + eval('' + repeatz)) + ';') + '>' + ourbuttonwording + '</button>' + oursupwording);
document.body.innerHTML+=document.getElementById('repeat').outerHTML.split('/>')[0].split('>')[0].replace(' onclick=',' data-onclick=').replace(' id=',' id=myrepeat data-id=').replace(' type=',' data-type=').replace('<input','<button onmousedown=parent.onmaybesupclick(event); ontouchstart=parent.onmaybesupclick(event); data-ident="but' + ouraidis + '_' + ouriframeidis + '" ').replace(' style="', ' style="position:absolute;left:0px;top:-10px;background-color:transparent;z-index:' + eval(1 + eval('' + repeatz)) + ';') + '>' + ourbuttonwording + '</button>' + oursupwording;
document.body.style.width='' + eval(50 + eval('' + document.getElementById('myrepeat').getBoundingClientRect().right)) + 'px';
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
if (top.document.getElementById(ouraidis) && 1 == 7) {
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.position='absolute';
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.left='' + eval(-50 + eval('' + top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)) + 'px';
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.top='' + eval(0 + eval('' + top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().top)) + 'px';
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.zIndex='699';
document.getElementById('myiframe').style.width=eval(100 + eval('' + eval(-50 + eval('' + top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)))) + 'px';
//alert(top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).outerHTML);
}
}
} else {
document.getElementById('repeat').value=nocaret(ourbuttonwording); //String.fromCodePoint(128276) + String.fromCodePoint(128276);
document.getElementById('repeat').style.position='absolute';
document.getElementById('repeat').style.left='0px';
document.getElementById('repeat').style.top='0px';
document.getElementById('repeat').style.backgroundColor='transparent';
document.getElementById('repeat').style.border='0px solid transparent';
document.getElementById('repeat').style.zIndex=repeatz;
//document.getElementById('repeat').onmousedown=function(event){ parent.onmaybesupclick(event); };
//document.getElementById('repeat').ontouchstart=function(event){ parent.onmaybesupclick(event); };
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
if (top.document.getElementById(ouraidis) && 1 == 7) {
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.position='absolute';
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.left='' + eval(-50 + eval('' + top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)) + 'px';
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.top='' + eval(0 + eval('' + top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().top)) + 'px';
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.zIndex='699';
document.getElementById('myiframe').style.width=eval(100 + eval('' + eval(-50 + eval('' + top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)))) + 'px';
//alert(top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).outerHTML);
}
}
}

if (top.document.getElementById(ouraidis)) {
// Make the button look like the nesting a or div or span or p
var divelem=top.document.getElementById(ouraidis);
var output=document.getElementById('repeat');
divelem.style.fontFamily = window.getComputedStyle(output,null).fontFamily || output.style.fontFamily || output.currentStyle.getCurrentProperty('font-family');
divelem.style.fontSize = window.getComputedStyle(output,null).fontSize || output.style.fontSize || output.currentStyle.getCurrentProperty('font-size');
divelem.style.fontWeight = window.getComputedStyle(output,null).fontWeight || output.style.fontWeight || output.currentStyle.getCurrentProperty('font-weight');
divelem.style.border = window.getComputedStyle(output,null).border || output.style.border || output.currentStyle.getCurrentProperty('border');
divelem.style.padding = window.getComputedStyle(output,null).padding || output.style.padding || output.currentStyle.getCurrentProperty('padding');
divelem.style.margin = window.getComputedStyle(output,null).margin || output.style.margin || output.currentStyle.getCurrentProperty('margin');
divelem.style.overflow = window.getComputedStyle(output,null).overflow || output.style.overflow || output.currentStyle.getCurrentProperty('overflow');
divelem.style.padding = window.getComputedStyle(output,null).padding || output.style.padding || output.currentStyle.getCurrentProperty('padding');
divelem.style.color = window.getComputedStyle(output,null).color || output.style.color || output.currentStyle.getCurrentProperty('color');
}

}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(11111); // alert('11111 ' + document.URL); //
}
if (document.getElementById('myiframe')) {
document.getElementById('myiframe').style.position='absolute';
document.getElementById('myiframe').style.left='-100px';
document.getElementById('myiframe').style.top='-100px';
document.getElementById('myiframe').style.zIndex='299';
//document.getElementById('myiframe').src=document.getElementById('myiframe').src;
//document.getElementById('myiframe').style.backgroundColor='transparent';
if (1 == 7) {
document.body.onmousedown=function(event){ setTimeout(function(){
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
document.body.ontouchstart=function(event){ setTimeout(function(){
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
}
document.getElementById('myiframe').style.opacity='0.0';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(11117);
}
} else {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(11111); //alert('411111 ' + document.URL); //console.warn(11111);
}
setInterval(function(){
if (document.getElementById('myiframe')) {
if (('' + document.getElementById('myiframe').title).trim() == ('' + document.getElementById('myiframe').title)) {
document.getElementById('myiframe').title=('' + document.getElementById('myiframe').title) + ' ';
document.getElementById('myiframe').style.position='absolute';
document.getElementById('myiframe').style.left='-100px';
document.getElementById('myiframe').style.top='-100px';
document.getElementById('myiframe').style.zIndex='299';
if (1 == 7) {
document.body.onmousedown=function(event){ setTimeout(function(){
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
document.body.ontouchstart=function(event){ setTimeout(function(){
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
}
//document.getElementById('myiframe').src=document.getElementById('myiframe').src;
//document.getElementById('myiframe').style.backgroundColor='transparent';
}
}
}, 6000);
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(11119);
}
if (aaconto) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(122221);
}
aaconto.getElementById('player').style.opacity='0.0';
} else {
aaset=true;
}
document.body.style.backgroundColor='transparent';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(111);
}
} else {
setInterval(function(){
if (interesting) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(21);
}
if (document.getElementById('audioejkaraoke') || document.getElementById('repeat')) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(221);
}
if (document.getElementById('audioejkaraoke')) {
if (('' + document.getElementById('audioejkaraoke').title + ' ').substring(0,1) != ' ') {
document.getElementById('audioejkaraoke').title=' ' + document.getElementById('audioejkaraoke').title;
if (ourbuttonwording.indexOf('<') == -1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('audioejkaraoke').value=ourbuttonwording; //String.fromCodePoint(128276) + String.fromCodePoint(128276);
document.getElementById('audioejkaraoke').style.position='absolute';
document.getElementById('audioejkaraoke').style.left='0px';
document.getElementById('audioejkaraoke').style.top='0px';
document.getElementById('audioejkaraoke').style.backgroundColor='transparent';
document.getElementById('audioejkaraoke').style.zIndex=karaz;
//document.getElementById('audioejkaraoke').onmousedown=function(event){ parent.onmaybesupclick(event); };
//document.getElementById('audioejkaraoke').ontouchstart=function(event){ parent.onmaybesupclick(event); };
}
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(2221);
}
if (!document.getElementById('myrepeat')) {
if (ourbuttonwording.indexOf('<') != -1) {
document.body.innerHTML+=document.getElementById('repeat').outerHTML.split('/>')[0].split('>')[0].replace(' onclick=',' data-onclick=').replace(' type=',' data-type=').replace(' id=',' id=myrepeat data-id=').replace('<input','<button onmousedown=parent.onmaybesupclick(event); ontouchstart=parent.onmaybesupclick(event); data-ident="but' + ouraidis + '_' + ouriframeidis + '" ').replace(' style="', ' style="position:absolute;left:0px;top:-10px;background-color:transparent;z-index:' + eval(1 + eval('' + repeatz)) + ';') + '>' + ourbuttonwording + '</button>';
document.body.style.width='' + eval(50 + eval('' + document.getElementById('myrepeat').getBoundingClientRect().right)) + 'px';
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
if (top.document.getElementById(ouraidis) && 1 == 7) {
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.position='absolute';
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.left='' + eval(-50 + eval('' + top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)) + 'px';
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.top='' + eval(0 + eval('' + top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().top)) + 'px';
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.zIndex='699';
document.getElementById('myiframe').style.width=eval(100 + eval('' + eval(-50 + eval('' + top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)))) + 'px';
alert(top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).outerHTML);
}
}
if (document.getElementById('myiframe')) {
if (document.getElementById('myiframe').outerHTML.split('>')[0].indexOf('absolute') == -1) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(22221);
}
document.getElementById('myiframe').style.position='absolute';
document.getElementById('myiframe').style.left='-100px';
document.getElementById('myiframe').style.top='-100px';
document.getElementById('myiframe').style.zIndex='299';
//document.getElementById('myiframe').style.backgroundColor='transparent';
//document.getElementById('myiframe').src=document.getElementById('myiframe').src;
document.getElementById('myiframe').style.opacity='0.0';
if (1 == 7) {
document.body.onmousedown=function(event){ setTimeout(function(){
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
document.body.ontouchstart=function(event){ setTimeout(function(){
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
}
interesting=false;
}
}
} else {
document.getElementById('repeat').value=nocaret(ourbuttonwording); //String.fromCodePoint(128276) + String.fromCodePoint(128276);
document.getElementById('repeat').style.position='absolute';
document.getElementById('repeat').style.left='0px';
document.getElementById('repeat').style.top='0px';
document.getElementById('repeat').style.backgroundColor='transparent';
document.getElementById('repeat').style.border='0px solid transparent';
document.getElementById('repeat').style.zIndex=repeatz;
//document.getElementById('repeat').onmousedown=function(event){ parent.onmaybesupclick(event); };
//document.getElementById('repeat').ontouchstart=function(event){ parent.onmaybesupclick(event); };
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
if (top.document.getElementById(ouraidis) && 1 == 7) {
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.position='absolute';
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.left='' + eval(-50 + eval('' + top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)) + 'px';
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.top='' + eval(0 + eval('' + top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().top)) + 'px';
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.zIndex='699';
document.getElementById('myiframe').style.width=eval(100 + eval('' + eval(-50 + eval('' + top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)))) + 'px';
alert(top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).outerHTML);
}
}
interesting=false;
}
}
if (document.getElementById('myiframe')) {
if (document.getElementById('myiframe').outerHTML.split('>')[0].indexOf('absolute') == -1) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(22221);
}
document.getElementById('myiframe').style.position='absolute';
document.getElementById('myiframe').style.left='-100px';
document.getElementById('myiframe').style.top='-100px';
document.getElementById('myiframe').style.zIndex='299';
//document.getElementById('myiframe').style.backgroundColor='transparent';
//document.getElementById('myiframe').src=document.getElementById('myiframe').src;
document.getElementById('myiframe').style.opacity='0.0';
if (1 == 7) {
document.body.onmousedown=function(event){ setTimeout(function(){
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
document.body.ontouchstart=function(event){ setTimeout(function(){
if (top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
top.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
}
interesting=false;
}
}
if (aaconto) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(2222221);
}
aaconto.getElementById('player').style.opacity='0.0';
} else {
aaset=true;
}
document.body.style.backgroundColor='transparent';
}
} else {
interesting=false;
}
}
}, 1000);
}
if (top.document.getElementById(ouraidis) || top.document.getElementById(ouriframeidis)) {
if (top.document.getElementById(ouraidis)) {
var boxis=top.document.getElementById(ouraidis).getBoundingClientRect();
//alert('boxis.left=' + boxis.left + ' ' + top.document.getElementById('aja').innerHTML);
if (top.document.getElementById(ouraidis).innerHTML.indexOf('<iframe') == -1) {
//alert('Boxis.left=' + boxis.left);
if (document.URL.indexOf('thebuttonwording=') != -1) {
document.body.style.width='' + eval(2 * boxis.width) + 'px';
}
if (document.getElementById('myrepeat')) {
top.document.getElementById(ouriframeidis).style.width='' + eval(1 * eval('' + document.getElementById('myrepeat').getBoundingClientRect().width)) + 'px';
top.document.getElementById(ouriframeidis).style.height='' + eval(1 * eval('' + document.getElementById('myrepeat').getBoundingClientRect().height)) + 'px';
} else if (document.getElementById('repeat')) {
top.document.getElementById(ouriframeidis).style.width='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().width)) + 'px';
top.document.getElementById(ouriframeidis).style.height='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)) + 'px';
} else {
top.document.getElementById(ouriframeidis).style.width='' + eval(2 * boxis.width) + 'px';
top.document.getElementById(ouriframeidis).style.height='' + eval(1 * boxis.height) + 'px';
}
setTimeout(function(){
if (top.document.getElementById(ouraidis).outerHTML.indexOf('<div') != -1) {
//if (top.document.getElementById(ouriframeidis).outerHTML.indexOf('/About_Us.html')) {
//alert(top.document.getElementById(ouraidis).title.trim());
//}
if (top.document.getElementById(ouraidis).innerHTML.indexOf('<iframe') == -1) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn('09:' + top.document.getElementById(ouraidis).innerHTML);
}
top.document.getElementById(ouraidis).innerHTML=top.document.getElementById(ouriframeidis).outerHTML.replace('/About_Us.html',top.document.getElementById(ouraidis).title.trim()).replace('justaudio','jusJUNKtauJUNKdio').replace(' onload=',' data-onload=').replace(' id=',' data-id=').replace(' name=',' data-name=').replace('none;','inline-block;').replace('NONE;','inline-block;').replace('NONE;','inline-block;').replace('hidden;','visible;');
} else {
console.warn('9:' + top.document.getElementById(ouraidis).innerHTML);
}
} else {
if (top.document.getElementById(ouraidis).innerHTML.indexOf('<iframe') == -1) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn('099:' + top.document.getElementById(ouraidis).innerHTML);
}
top.document.getElementById(ouraidis).innerHTML=top.document.getElementById(ouriframeidis).outerHTML.replace('/About_Us.html',top.document.getElementById(ouraidis).href).replace('justaudio','jusJUNKtauJUNKdio').replace(' onload=',' data-onload=').replace(' id=',' data-id=').replace(' name=',' data-name=').replace('none;','inline-block;').replace('NONE;','inline-block;').replace('NONE;','inline-block;').replace('hidden;','visible;');
} else {
console.warn('99:' + top.document.getElementById(ouraidis).innerHTML);
}
}
if (top.document.getElementById('idivf')) {
top.document.getElementById('idivf').innerHTML='';
//alert(398);
} else if (1 == 1) {
if (document.getElementById('ejkaraokeshare')) {
document.getElementById('ejkaraokeshare').style.opacity='0.0';
}
if (document.getElementById('ddejkaraoke')) {
document.getElementById('ddejkaraoke').style.visibility='hidden';
}
if (document.getElementById('myrepeat')) {
document.getElementById('repeat').style.opacity='0.0';
if (document.getElementById('repeat')) { alert('huh'); }
} else if (document.getElementById('repeat')) {
document.getElementById('repeat').style.opacity='0.0';
//alert('twohuh');
}
if (1 == 5) {
if (document.getElementById('myrepeat')) {
//alert(98);
top.document.getElementById(ouriframeidis).style.width='' + eval(1 * eval('' + document.getElementById('myrepeat').getBoundingClientRect().width)) + 'px';
top.document.getElementById(ouriframeidis).style.height='' + eval(1 * eval('' + document.getElementById('myrepeat').getBoundingClientRect().height)) + 'px';
} else if (document.getElementById('repeat')) {
//alert('298 ' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)));
top.document.getElementById(ouraidis).style.overflowY='hidden';
top.document.getElementById(ouriframeidis).style.overflowY='hidden';
top.document.getElementById(ouraidis).style.width='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().width)) + 'px';
top.document.getElementById(ouraidis).style.height='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)) + 'px';
top.document.getElementById(ouriframeidis).style.width='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().width)) + 'px';
top.document.getElementById(ouriframeidis).style.height='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)) + 'px';
//alert('298a ' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)));
document.getElementById('myh1').style.display='none';
document.getElementById('myform').style.visibility='hidden';
//alert('298b ' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)));
//document.body.style.height='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)) + 'px';
}
}
}
}, 8000); // vs 2000
}
} else if (3 == 4) {
top.document.getElementById(ouriframeidis).style.position='absolute';
top.document.getElementById(ouriframeidis).style.left='' + boxis.left + 'px';
top.document.getElementById(ouriframeidis).style.top='' + boxis.top + 'px';
top.document.getElementById(ouriframeidis).style.width='' + boxis.width + 'px';
top.document.getElementById(ouriframeidis).style.height='' + boxis.height + 'px';
top.document.getElementById(ouriframeidis).style.display='block';
top.document.getElementById(ouriframeidis).style.zIndex='99';
//top.document.getElementById('aja').innerHTML='  ';
}
}
}, 1000);

}, 8000);
}
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
if (top.document.title.indexOf(' justaudio ') != -1) {
asuffis='&justaudio=&';
bsuffis=' name=justaudio ';
}
}
//alert(parent.ajaxsih);
}

var cbut="<br><div style='" + defidea + "'><div id='ddkaraoke' style='display:inline; visibility: hidden; '><input onclick=\"if (document.URL.indexOf('i0=') != -1) { location.href=document.URL; } \" id='repeat' type='button' style='background-color:red;' value='Replay Karaoke Style YouTube Above'></input><br><input onclick=clickto(); id=karaokeshare value='Email Share to ' type='button'></input> <input style=width:60%; onblur=doto(this.value); type=text name=email id=karaokeemail value=></input></div><div id='dkaraoke' style='display:inline; visibility: hidden; '><input id='mousej' type='button' style='background-color:#f0f0f0; display:inline; visibility: hidden;' onclick=' mousebelowj(this);' value='Fill Table Below via Mouse Video Pauses Starting with '></input> <input id='mousei' type='button' style='background-color:#f5f5f5; display:inline; visibility: hidden;' onclick=' mousebelowi(this);' value='Fill Table Starting with 0 cell'></input> <input id='karaoke' onclick=\" mbmode=false; document.getElementById('ddkaraoke').style.visibility='visible'; if (document.URL.indexOf('i0=') != -1) { next=0; } queuenext();\" type='submit' style='background-color:orange;' value='Play Karaoke Style YouTube Via Entries Below'></input></div><div id='dkaraoke' style='display:inline; visibility: hidden; '></div></div>";
var cbutl="<div style='" + defidea + " height: 60px;'><div style=' " + defidea + " height: 60px;'><div id='dkaraoke' style=' display:inline; visibility: hidden; '><div style='" + defidea + "'><div style='" + defidea + "'><input id='karaoke' onclick=\" mbmode=false; document.getElementById('ddkaraoke').style.visibility='visible'; if (document.URL.indexOf('i0=') != -1) { next=0; } queuenext();\" type='submit' style='background-color:orange;' value='Play Karaoke Style YouTube Via Entries Below'></input></div></div></div><br><div id='ddkaraoke' style='margin-top:-100px; visibility: hidden; " + defidea + " '><div style='" + defidea + "'><div style='" + defidea + "'><input onclick=\"if (document.URL.indexOf('i0=') != -1) { location.href=document.URL; } \" id='repeat' type='button' style='background-color:red;' value='Replay Karaoke Style YouTube Above'></input><br><input onclick=clickto(); id=karaokeshare value='Email Share to ' type='button'></input><input onblur=doto(this.value); type=text name=email id=karaokeemail value=></input></div></div></div></div></div><br><br>✔ (<a target=_blank title='Thanks to https://webaudiodemos.appspot.com/AudioRecorder ... if it works for your browser. If not, you can consider using a desktop microphone recorder app such as Mac OS X QuickTime Player as an alternative perhaps.' href='https://webaudiodemos.appspot.com/AudioRecorder/index.html'>Record</a> own parts? <input type=hidden id=justaudio" + bsuffis + " value=''></input><input onchanged='dorecord=!dorecord;' type=checkbox name=recown id=recown value='Record own parts?'></input>) ";
var cbutm="<div style='" + defidea + " height: 60px;'><div id='dkaraokem' style='display:inline; visibility: hidden; '><input id='mousei' type='button' style='background-color:#f5f5f5; display:inline; visibility: hidden;' onclick=' mousebelowi(this);' value='Fill Table Below via Mouse Video Pauses'></input></div></div><br>Start time in seconds <span id=nm style='display:none;'>(negative means you will be singing or Prefix by Audio file URL or YouTube ID delimited by :)</span>";
var cbutr="<div style='" + defidea + " height: 60px;'><div id='dkaraoker' style='display:inline; visibility: hidden; '>        <input id='mousej' type='button' style=' background-color:#f0f0f0; display:inline; visibility: hidden;' onclick=' mousebelowj(this);' value='Fill Table Starting with '></input></div></div><br><span style=text-align:right;width:100%;>Finish</span>";
var zeroplay=-1;
var ylastokn='';
var yokn='';
var validst=true;
var yoko=null;
var donef=false;
var huhaudiow=false;
var audiow=null;
var audiof='';
var audioi=0;
var audioask=false;
var dorecord=false;
var ourrec=location.search.split('recown=')[1] ? location.search.split('recown=')[1].split('&')[0] : 'off';
var ioffset=0;
var domin=false;

var ipbit='';



if (!String.fromCodePoint) { // thanks to http://xahlee.info/js/js_unicode_code_point.html
// ES6 Unicode Shims 0.1 , © 2012 Steven Levithan , MIT License
String.fromCodePoint = function fromCodePoint () {
var chars = [], point, offset, units, i;
for (i = 0; i < arguments.length; ++i) {
point = arguments[i];
offset = point - 0x10000;
units = point > 0xFFFF ? [0xD800 + (offset >> 10), 0xDC00 + (offset & 0x3FF)] : [point];
chars.push(String.fromCharCode.apply(null, units));
}
return chars.join("");
}
}

var audiobut='';
if ((documentURL + '&' + asuffis).indexOf('justaudio=&') != -1 && (documentURL.indexOf('youtube_duration=&') == -1 && documentURL.indexOf('youtube_duration=') != -1) && documentURL.indexOf('youtubeid=') != -1 && documentURL.indexOf('emoji=') != -1) {
audiobut=('<input class="emoji" id="audioejkaraoke" onclick=" document.getElementById(`myiframe`).style.marginTop=`0px`; document.getElementById(`myiframe`).style.opacity=`1`; document.getElementById(`myiframe`).style.filter="invert(0)"; this.style.display=`none`; " type="submit" style="background-color: orange; visibility: visible;" value="' + String.fromCodePoint(128249) + ' Play Video as below" title="Play Karaoke Style YouTube Video Via Entries Below">').replace(/\`/g,"'");
} else {
audiobut=('<input class="emoji" id="audioejkaraoke" onclick=" document.getElementById(`justaudio`).name=`justaudio`; mbmode=false; document.getElementById(`ddejkaraoke`).style.visibility=`visible`; if (document.URL.indexOf(`i0=`) != -1) { next=0; } queuenext();" type="submit" style="background-color: orange; visibility: visible;" value="' + String.fromCodePoint(128483) + ' Play Audio as below" title="Play Karaoke Style YouTube Audio Via Entries Below">').replace(/\`/g,"'");
}

function yesesp() {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) { return true; }
return false;
}


function nocaret(inx) {
if (inx.indexOf('<') != -1) {
var xv, vx, mbits=inx.replace('"','').replace('"','').replace('"','').replace('"','').replace('"','').replace('"','').replace('"','').replace('"','').split(','), outx='';
xv=mbits[0].split('</a>');
vx=xv[0].split('>');
outx=vx[eval(-1 + vx.length)];
xv=mbits[1].split('</a>');
vx=xv[0].split('>');
outx+=',' + vx[eval(-1 + vx.length)];
return outx;
} else {
return inx;
}
}

function checkss(iois) {
if (iois == null) {
aaconto = (iois.contentWindow || iois.contentDocument);
if (aaconto != null) {
waaconto=aaconto;
if (aaconto.document) { aaconto = aaconto.document; }
if (aaset) {
aaset=false;
aaconto.getElementById('player').style.opacity='0.0';
if (document.URL.indexOf('&startagain=') != -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
setTimeout(function(){ waaconto.sagain(); waaconto.playVideo(); }, 5000);
}
}
}
}
}

function checkip(iois) {
if (iois == null) {
if (ipbit != '') {
return ipbit;
}
} else if (iois.src.indexOf('signature_signature.php') != -1) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body.innerHTML.indexOf('<p>') == 0) {
ipbit=aconto.body.innerHTML.split('<p>')[1].split('<')[0];
}
}
}
return '';
}

function mintoajax() {
var postpc='2';
var pc='';
document.getElementById('ominpossible').innerHTML='📹';
if (1 == 1) {
if (('' + document.getElementById('ajaxs').style.left) != '0px') {
if (window.top) {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
pc='26'; //'5';
postpc='';
}
//alert(parent.ajaxsih);
}
document.getElementById('ajaxs').style.position='absolute';
document.getElementById('ajaxs').style.left='0px';
document.getElementById('ajaxs').style.top='' + pc + postpc + 'px';
if (document.getElementById('stz')) {
document.getElementById('stz').scrollIntoView();
}
}
} else {
var rect=document.getElementById('ajaxs').getBoundingClientRect();
window.scrollTo(eval(('' + rect.left).replace('px','').split('.')[0]), eval(('' + rect.top).replace('px','').split('.')[0]));
}
}

function closelastdet() {
var readie=false;
if (lastdet != '') {
var dets=document.getElementsByTagName('details');
for (var idets=0; idets<dets.length; idets++) {
if (('' + dets[idets].id) == lastdet) {
dets[idets].removeAttribute('open');
readie=true;
} else if (readie) {
readie=false;
ets[idets].setAttribute('open', true);
lastdet=('' + dets[idets].id);
}
}
if (readie) {
lastdet='dt1';
document.getElementById(lastdet).setAttribute('open', true);
}
}
}

function oncntapp(sva,svatl,sov) {
var comma='';
rep+='T';
// var ajaxclist='', ajaxoncnt=0;
//var thismulti=document.getElementById('cajaxs').checked;
if ((eval('' + sva.trim().length) == 34 || eval('' + sva.trim().length) == 22) && sva.trim().indexOf(' ') == -1) {
if (plo) {
if (!plo.closed) {
try {
plo.close();
} catch(ert) {
}
}
plo=null;
}
if (eval('' + sva.trim().length) == 34) {
plo=window.open('//www.youtube.com/watch?v=&index=1&list=' + sva, '_blank', 'width=600,height=600,top=0,left=' + eval(-600 + eval('' + screen.width)));
} else if (eval('' + sva.trim().length) == 22) {
plo=window.open('//open.spotify.com/playlist/' + sva, '_blank', 'width=600,height=600,top=0,left=' + eval(-600 + eval('' + screen.width)));
}
} else if (eval('' + sva.trim().length) == 11 && sva.trim().indexOf(' ') == -1) {
ajaxoncnt++;
if (ajaxclist == '') {
ajaxclist=sva.trim();
ajaxf=svatl.split('(')[0];
sov.style.backgroundColor='lightgreen';
} else if ((',' + ajaxclist + ',').indexOf(',' + sva.trim() + ',') != -1 && firstrepeat) {
firstrepeat=false;
if (ajaxclist.indexOf(sva.trim()) == 0) {
ajaxclist=ajaxclist.replace(sva.trim() + ',', '').replace(sva.trim() + '', '');
} else {
ajaxclist=ajaxclist.replace(',' + sva.trim() + '', '');
}
ajaxoncnt=eval('' + ajaxclist.split(',').length);
sov.style.backgroundColor='white';
} else if ((',' + ajaxclist + ',').indexOf(',' + sva.trim() + ',') != -1 && !firstrepeat) {
ajaxclist+=',' + sva.trim();
sov.style.backgroundColor='lightgreen';
} else {
ajaxclist+=',' + sva.trim();
sov.style.backgroundColor='lightgreen';
}
} else if (sva.trim() == '') {
ajaxclist='';
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('why1');
//}
ajaxoncnt=0;
ajaxf='';
}

//document.title='ajaxclist=' + ajaxclist + ' and ajaxoncnt=' + ajaxoncnt;
var tickis=' ' + String.fromCodePoint(10004);
var defc=0;
var sin=document.getElementById('ajaxs');
for (var ii=0; ii<sin.options.length; ii++) {
if (sin.options[ii].selected) {
if (sin.options[ii].value != '') { defc++; }
}
}

if (eval('' + defc) <= eval('' + ajaxoncnt) && eval('' + ajaxoncnt) >= 1 && eval('' + defc) > 1) {
ajaxoncnt=0;
ajaxclist='';
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('why2');
//}
ajaxf='';
for (var iiijk=0; iiijk<sin.options.length; iiijk++) {
if (sin.options[iiijk].selected) {
ajaxoncnt++;
ajaxclist+=comma + sin.options[iiijk].value.trim();
comma=',';
if (sin.options[iiijk].innerText.indexOf(tickis) == -1) {
sin.options[iiijk].innerText+=tickis;
} else {
sin.options[iiijk].innerText=sin.options[iiijk].innerText.split(tickis)[0] + tickis;
}
} else {
sin.options[iiijk].style.backgroundColor='white';
if (sin.options[iiijk].innerText.indexOf(tickis) != -1) {
sin.options[iiijk].innerText=sin.options[iiijk].innerText.split(tickis)[0];
}
}
}
} else if (eval('' + defc) <= eval('' + ajaxoncnt) && eval('' + ajaxoncnt) >= 1) {
var atoone=ajaxclist.split(',');
var asofar=',';
for (var iiii=0; iiii<atoone.length; iiii++) {
for (var iii=0; iii<sin.options.length; iii++) {
if (atoone[iiii] == sin.options[iii].value) {
if (sin.options[iii].innerText.indexOf(tickis) != -1 && asofar.indexOf(',' + atoone[iiii] + ',') == -1) {
sin.options[iii].innerText=sin.options[iii].innerText.split(tickis)[0] + tickis + ' ' + eval(1 + iiii);
} else if (sin.options[iii].innerText.indexOf(tickis) != -1 && asofar.indexOf(',' + atoone[iiii] + ',') != -1) {
sin.options[iii].innerText+=' ' + eval(1 + iiii);
} else {
sin.options[iii].innerText+=tickis + ' ' + eval(1 + iiii);
}
}
}
asofar+=atoone[iiii] + ',';
}
//alert('Defc=' + defc + ' and ajaxoncnt=' + ajaxoncnt);
//} else {
// alert('defc=' + defc + ' and ajaxoncnt=' + ajaxoncnt);
} else {
ajaxoncnt=0;
ajaxclist='';
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('why1');
//}
ajaxf='';
for (var iiij=0; iiij<sin.options.length; iiij++) {
if (sin.options[iiij].selected) {
ajaxoncnt++;
ajaxclist+=comma + sin.options[iiij].value.trim();
comma=',';
if (sin.options[iiij].innerText.indexOf(tickis) == -1) {
sin.options[iiij].innerText+=tickis;
} else {
sin.options[iiij].innerText=sin.options[iiij].innerText.split(tickis)[0] + tickis;
}
} else {
sin.options[iiij].style.backgroundColor='white';
if (sin.options[iiij].innerText.indexOf(tickis) != -1) {
sin.options[iiij].innerText=sin.options[iiij].innerText.split(tickis)[0];
}
}
}
}

}

function hthrb(inihis) {
var outin=inihis;
var ihparts=inihis.split('</option');
if (eval('' + ihparts.length) > 1) {
outin=ihparts[0] + '</option>';
for (var jnb=1; jnb<eval(-1 + eval('' + ihparts.length)); jnb++) {
if (ihparts[jnb].indexOf(' (0') != -1 || ihparts[jnb].indexOf(' (1') != -1 || ihparts[jnb].indexOf(' (2') != -1 || ihparts[jnb].indexOf(' (3') != -1 || ihparts[jnb].indexOf(' (4') != -1 || ihparts[jnb].indexOf(' (5') != -1 || ihparts[jnb].indexOf(' (6') != -1 || ihparts[jnb].indexOf(' (7') != -1 || ihparts[jnb].indexOf(' (8') != -1 || ihparts[jnb].indexOf(' (9') != -1) {
outin+=ihparts[jnb].substring(1) + '>';
}
}
//alert('outin=' + outin + ' from inihis=' + inihis);
}
if (parent.get_ajaxs_ih) {
parent.set_ajaxs_ih(outin + parent.get_ajaxs_ih());
//alert(parent.get_ajaxs_ih());
return parent.get_ajaxs_ih();
} //else if (('' + parent.document.URL).indexOf('/esp_ornot_esp.htm') != -1) {
//alert('why');
//}
return outin;
}

function oncnt(inih) {
if (window.top) {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
inih=hthrb(inih);
}
}
return inih.replace(/\<option\ /g, "<option onclick=oncntapp(this.value,this.innerText,this); ");
}

function andlr() {
if (document.getElementById('cajaxs')) {
if (!document.getElementById('cajaxs').checked) {
document.getElementById('cajaxs').checked=true;
//alert('lastajaxs=' + lastajaxs);
putmorethanone(true);
//alert('Lastajaxs=' + lastajaxs);
}
}
}

function putmorethanone(mto) {
morethanone=mto;
ourmto=mto;
if (ourmto) { courmto=' checked'; } else { courmto=''; }
if (morethanone) {
top.document.title+=' ';
tdt=' ';
document.getElementById('ajaxs').multiple=true;
courmto=' selected';
if (ajaxsih != '') {
//alert(987);
document.getElementById('ajaxs').innerHTML=oncnt(ajaxsih);
if (courmto != '' && document.getElementById('cajaxs')) { document.getElementById('cajaxs').checked=true; }
} else if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//alert(1987);
if (document.getElementById('cajaxs')) {
document.getElementById('cajaxs').style.visibility='hidden';
}
document.getElementById('ajaxs').style.height='565px'; //'300px';
if (document.getElementById('tablenmup')) {
document.getElementById('tablenmup').style.marginTop='-165px';
}
setTimeout(andlr, 5000);
} else {
if (document.getElementById('cajaxs')) {
document.getElementById('cajaxs').style.visibility='hidden';
}
setTimeout(andlr, 5000);
}
givefactor=0;
document.getElementById('dajaxs').innerHTML=lfends + '<input title="Select Video(s) and then Click Here When Ready to Play them (with up to 20 seconds pause or time for your clicks between each)" type=button onclick=" givefactor=givefifteen; " style=display:inline;width:120px;background-color:yellow; value="Ready?" id=iajaxs></input> ' + lfb + '<input title="Select Video(s) and then Click Here When Ready to Play them in a 3x3 grid (where click matches to end result matches keep that order)" type=button onclick=" dnineit(); " style=display:inline;width:120px;background-color:orange; value="Grid?" id=gridajaxs></input> ' + lfb + ' <input title="Select Video(s) and then Click Here When Ready to Play them synchronously as a reveal, if possible" type=button onclick=" revealit(); " style=display:inline;width:120px;background-color:pink; value="Reveal?"></input> ' + lfb + ' <input title="Select Video(s) and then Click Here When Ready to Play them synchronously, if possible" type=button onclick=" sgive=true; givefactor=givefifteen; " style=display:inline;width:120px;background-color:lightgreen; value="Synchronize?" id=iiajaxs></input> ' + lfb + ' <input title="Select Video(s) and then Click Here When Ready to Play them synchronously and superimposed, if possible" type=button onclick=" pgive=true; sgive=true; givefactor=givefifteen; " style=display:inline;width:120px;background-color:lightblue; value="Superimpose?" id=iiajaxs></input> ' + lfends + lfends;
if (document.getElementById('cajaxs')) { document.getElementById('cajaxs').checked=true; }
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// document.getElementById('ajaxs').style.width='80%';
//document.getElementById('myh1').innerHTML+=(' here');
//}
} else {
top.document.title=top.document.title.replace(' ','');
tdt='';
courmto='';
document.getElementById('ajaxs').multiple=false;
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// document.getElementById('myh1').innerHTML+=(' There');
//}
}
}

function revealit() {
sgive=true;
givefactor=givefifteen;
bitatstart='<details open><summary></summary>';
bitatend='</details></td></TR>'; //alert(56);
document.getElementById("iiajaxs").click();
}

function clickto() {
if (1 == 11) {
var ibitis=document.getElementById('emailer').src.split('?')[0].split('#')[0];
ibitis+='?to=' + encodeURIComponent(document.getElementById('to').value);
ibitis+='&cc=' + encodeURIComponent(document.getElementById('cc').value);
ibitis+='&bcc=' + encodeURIComponent(document.getElementById('bcc').value);
ibitis+='&url=' + encodeURIComponent(document.getElementById('url').value);
ibitis+='&urlbig=' + encodeURIComponent(document.getElementById('urlbig').value);
ibitis+='&subject=' + encodeURIComponent(document.getElementById('subject').value);
document.getElementById('emailer').src=ibitis;
} else {
document.getElementById('sendemail').click();
}
}

function doto(etv) {
document.getElementById('to').value=etv;
}

function closeaudio() {
try {
if (audiow != null) {
audiow.close();
audioask=false;
if (audiof == '') {
//audiof='';
var outaf=null;
if (dorecord) outaf=prompt('Please enter URL to access local audio you just captured. There is very little chance you will not need to change the default value. If it starts with file: you will have to double click these when prompted, else .wav ones are automated, and you can use local web servers like Mac OS X Apache/PHP MAMP (https://www.mamp.info) for a filename like //localhost:8888/myRecording00.wav that would work if you have copied the audio from the Downloads folder to /Applications/MAMP/htdocs/ for instance. Windows has Apache/PHP EasyPHP (//www.easyphp.org/) local web server.', 'file:///home/Downloads/myRecording00.wav');
if (outaf) {
if (outaf != '') {
morechanges=false;
document.getElementById('i' + audioi).value+=';' + outaf;
document.getElementById('trbutton').style.visibility='visible';
document.getElementById('dkaraoke').style.visibility='visible';
document.getElementById('dkaraokem').style.visibility='visible';
document.getElementById('dkaraoker').style.visibility='visible';
document.getElementById('trrhead').style.display='none';
document.getElementById('karaoke').style.visibility='visible';
if (document.getElementById('d' + emojisuffix + 'karaoke')) {
document.getElementById('d' + emojisuffix + 'karaoke').style.visibility='visible';
document.getElementById('d' + emojisuffix + 'karaokem').style.visibility='visible';
document.getElementById('d' + emojisuffix + 'karaoker').style.visibility='visible';
document.getElementById(emojisuffix + 'karaoke').style.visibility='visible';
// alert(emojisuffix + 'karaoke');
emojistuff();
}
}
} else {
ioffset=-1;
}
}
}
} catch (ee) { }
audiow=null;
}

function toms(inf) {
if (inf.value != '') {
if (inf.value.split(';')[0].substring(0,1) >= '0' && inf.value.split(';')[0].substring(0,1) <= '9') {
var secsare=eval(inf.value.split(';')[0]);
//alert(Math.floor(secsare / 3600.0));
//alert(('0' + Math.floor(secsare / 60.0)));
//alert(('0' + eval(secsare,60.0)));
//alert('take two off length of ' + ('0' + Math.floor(eval(secsare,60.0))));
inf.title=Math.floor(secsare / 3600.0) + ':' + ('0' + Math.floor(secsare / 60.0)).substring(eval(-2 + ('0' + Math.floor(secsare / 60.0)).length)) + ':' + ('0' + eval(secsare % 60.0)).substring(eval(-2 + ('0' + Math.floor((secsare % 60.0))).length));
//alert(secsare + ' ' + inf.title);
}
}
}

function andthe() {
var ii=eval(1 + eval(document.getElementById('updatethisplease').value.replace('i','').replace('j','')));
next_thing='xx' + ii;
//if (next_thing == 'ddkaraoke') { alert('wow'); }
document.getElementById(next_thing).style.visibility='visible';
document.getElementById(document.getElementById('updatethisplease').value).style.backgroundColor=bcol;
setTimeout(andthe, 1000);
}

function andth() {
document.getElementById('mousei').style.visibility='hidden';
document.getElementById('mousej').style.visibility='hidden';
}

function mousebelowj(omo) {
//alert(omo.id.replace('j','i'));
document.getElementById(omo.id.replace('j','i')).style.visibility='hidden';
//alert(9000);
mbmode=true;
omo.value='When finished with Table Settings click Orange button to Play your Table Settings';
//alert(90000);
bcol='#f0f0f0';
document.getElementById('updatethisplease').value='j0';
document.getElementById(document.getElementById('updatethisplease').value).style.backgroundColor=bcol;
//alert(900000);
if (document.URL.indexOf('c0=off') == -1) {
document.getElementById('c0').checked=true;
}
document.getElementById('thft').innerHTML='Via Mouse Video Click Pauses ... <br>' + 'where Click, DoubleClick for the Finish entries <br>would mean no user Karaoke part ... <br>' + document.getElementById('thft').innerHTML;
//alert(9000000);
//document.getElementById('karaoke').click();
next=0;
queuenext();
setTimeout(andth, 5000);
andthe();
//alert(90000000);
}

function mousebelowi(omo) {
//alert(900);
document.getElementById(omo.id.replace('i','j')).style.visibility='hidden';
omo.value='When finished with Table Settings click Orange button to Play your Table Settings';
document.getElementById('updatethisplease').value='i0';
bcol='#f5f5f5';
document.getElementById(document.getElementById('updatethisplease').value).style.backgroundColor=bcol;
document.getElementById('thst').innerHTML='Via Mouse Video Click Pauses ... <br>' + document.getElementById('thst').innerHTML;
if (document.URL.indexOf('c0=off') == -1) {
document.getElementById('c0').checked=true;
}
//document.getElementById('karaoke').click();
mbmode=true;
next=0;
queuenext();
setTimeout(andth, 5000);
andthe();
}

function ofc(iois) {
okn=iois.value;
oko=iois;
lastokn=okn;
}

function precval(iois) {
//okn=iois.value;
oko=iois;
lastokn=okn;
if (okn.indexOf(':x') != -1) {
var cvi=okn.split(':');
if (cvi.length > 1) {
var scs=0.0, factor=1.0;
for (var ij=eval(-1 + cvi.length); ij>=0; ij--) {
if (cvi[ij] == "") cvi[ij]="00";
scs+=eval(factor * eval(cvi[ij]));
factor*=60.0;
}
okn='' + scs;
oko.value=okn;
lastokn=okn.replace(':','');
//document.title=oko.value;
//setTimeout(fixval,30);
}
}
}

function fixval() {
if (okn != '') {
oko.value=okn;
} else if (lastokn != '') {
oko.value=lastokn;
lastokn='';
} //else {
//document.title='why';
//}
}

function cval(eiois) {
if (document.URL.indexOf('i0=') == -1) {
//alert(eiois.which);
//okn+=String.fromCharCode(eiois.which || eiois.keyCode);
if ((eiois.which || eiois.keyCode) == 8) {
okn='';
} else if ((eiois.which || eiois.keyCode) == 186 || (eiois.which || eiois.keyCode) == 900000016) {
okn=okn.replace(':','') + ':';
//document.title=okn + ' ' + (eiois.which || eiois.keyCode);
var cvi=okn.split(':');
if (cvi.length > 1) {
var scs=0.0, factor=1.0;
for (var ij=eval(-1 + cvi.length); ij>=0; ij--) {
if (cvi[ij] == "") cvi[ij]="00";
scs+=eval(factor * eval(cvi[ij]));
factor*=60.0;
}
//alert(scs + ' ' + okn);
okn='' + scs;
oko.value=okn;
lastokn=okn.replace(':','');
//document.title=okn + ' ' + (eiois.which || eiois.keyCode) + ' ' + oko.value;
//setTimeout(fixval,30);
}
} else if ((eiois.which || eiois.keyCode) < 46 || (eiois.which || eiois.keyCode) > 58) {
okn=okn;
} else {
okn+=String.fromCharCode(eiois.which || eiois.keyCode);
//document.title+='=' + okn + '+' + eiois.which + ' ' + eiois.keyCode + ' ... ';
}
}
}



function checkval(iois) {
if (document.URL.indexOf('i0=') == -1) {
var cvi=iois.value.split(':');
if (cvi.length > 1) {
var scs=0.0, factor=1.0;
for (var ij=eval(-1 + cvi.length); ij>=0; ij--) {
scs+=eval(factor * eval(cvi[ij]));
factor*=60.0;
}
iois.value='' + scs;
}
addrow();
} else {
snippet=eval(iois.id.replace('i','').replace('j','').replace('c',''));
snippet++;
document.getElementById('xx' + snippet).style.visibility='visible';
}
}



function yofc(iois) {
yokn=iois.value;
yoko=iois;
ylastokn=yokn;
}

function yprecval(iois) {
//yokn=iois.value;
yoko=iois;
ylastokn=yokn;
}

function yfixval() {
if (yokn != '') {
yoko.value=yokn;
} else if (ylastokn != '') {
yoko.value=ylastokn;
ylastokn='';
}
}

function ycval(eiois) {
if (document.URL.indexOf('i0=') == -1) {
//alert(eiois.which);
//yokn+=String.fromCharCode(eiois.which || eiois.keyCode);
if ((eiois.which || eiois.keyCode) == 8) {
yokn='';
} else if ((eiois.which || eiois.keyCode) < 33 || (eiois.which || eiois.keyCode) > 126) {
yokn=yokn;
} else {
yokn+=String.fromCharCode(eiois.which || eiois.keyCode);
getytlist(yokn, false);
}
}
}


function addrow() {
var suffix='', vmode='visible', chked='';
snippet++;
if (itt('') != '') { if (document.getElementById('c0')) { document.getElementById('c0').checked=true; } else if (1 == 2) { chked=' checked'; } } // else { alert(43); }
var csnippet=location.search.split('c' + snippet + '=')[1] ? location.search.split('c' + snippet + '=')[1].split('&')[0] : 'off';
var isnippet=location.search.split('i' + snippet + '=')[1] ? decodeURIComponent(location.search.split('i' + snippet + '=')[1].split('&')[0]) : ' ';
var jsnippet=location.search.split('j' + snippet + '=')[1] ? decodeURIComponent(location.search.split('j' + snippet + '=')[1].split('&')[0]) : ' ';
if (isnippet == ' ' && jsnippet == ' ') {
if (defval != '') {
//alert(0);
for (var ii=1; ii<=nine; ii++) {
suffix+='<tr style=visibility:' + vmode + ';background-color:pink; id=xx' + eval(ii + snippet) + '><td><input type=checkbox id=c' + eval(ii + snippet) + ' name=c' + eval(ii + snippet) + chked + '></input></td><td><input style=width:400px; onblur=checkval(this); type=text onmouseover=toms(this); id=i' + eval(ii + snippet) + ' name=i' + eval(ii + snippet) + ' value=></input></td><td><input style=width:100px; type=number onkeyup=cval(event); oninput=precval(this); onclick=ofc(this); onmouseover=toms(this); min=0 id=j' + eval(ii + snippet) + ' name=j' + eval(ii + snippet) + ' step=0.000001 value=></input></td></tr>';
chked='';
vmode='hidden';
}
document.getElementById(nextthing).innerHTML+='<tr id=xx0 style=background-color:pink;><td><input onclick=andth(); type=checkbox id=c' + snippet + ' name=c' + snippet + chked + '></input></td><td><input style=width:400px; onblur=checkval(this); type=text onmouseover=toms(this); id=i' + snippet + ' name=i' + snippet + ' value=' + defval + '></input></td><td><input style=width:100px; type=number onkeyup=cval(event); oninput=precval(this); onclick=ofc(this); onmouseover=toms(this); min=0 max=' + eval(document.getElementById('youtube_duration').value).toFixed(3) + ' id=j' + snippet + ' name=j' + snippet + ' step=0.000001 value=' + eval(document.getElementById('youtube_duration').value).toFixed(3) + '></input></td></tr>' + suffix;
chked='';
} else {
//alert(90);
//if (nextthing == 'ddkaraoke') { alert('Wow'); }
document.getElementById(nextthing).style.visibility='visible';
}
} else if (csnippet == 'off') {
if (defval != '') {
//alert(0);
for (var ii=1; ii<=nine; ii++) {
suffix+='<tr style=visibility:' + vmode + ';background-color:pink; id=xx' + eval(ii + snippet) + '><td><input type=checkbox id=c' + eval(ii + snippet) + ' name=c' + eval(ii + snippet) + chked + '></input></td><td><input style=width:400px; onblur=checkval(this); type=text onmouseover=toms(this); id=i' + eval(ii + snippet) + ' name=i' + eval(ii + snippet) + ' value=></input></td><td><input style=width:100px; type=number onkeyup=cval(event); oninput=precval(this); onclick=ofc(this); onmouseover=toms(this); min=0 id=j' + eval(ii + snippet) + ' name=j' + eval(ii + snippet) + ' step=0.000001 value=></input></td></tr>';
chked='';
vmode='hidden';
}
document.getElementById(nextthing).innerHTML+='<tr id=xx0 style=background-color:pink;><td><input onclick=andth(); type=checkbox id=c' + snippet + ' name=c' + snippet + chked + '></input></td><td><input style=width:400px; onblur=checkval(this); type=text onmouseover=toms(this); id=i' + snippet + ' name=i' + snippet + ' value=' + isnippet + '></input></td><td><input style=width:100px; type=number onkeyup=cval(event); oninput=precval(this); onclick=ofc(this); onmouseover=toms(this); min=0 max=' + document.getElementById('youtube_duration').value + ' id=j' + snippet + ' name=j' + snippet + ' step=0.000001 value=' + jsnippet + '></input></td></tr>' + suffix;
chked='';
} else {
//alert(90);
//if (nextthing == 'ddkaraoke') { alert('wOw'); }
document.getElementById(nextthing).style.visibility='visible';
document.getElementById('i' + snippet).value=isnippet;
document.getElementById('j' + snippet).value=jsnippet;
}
} else {
if (defval != '') {
//alert(0);
for (var ii=1; ii<=nine; ii++) {
suffix+='<tr style=visibility:' + vmode + ';background-color:pink; id=xx' + eval(ii + snippet) + '><td><input type=checkbox id=c' + eval(ii + snippet) + ' name=c' + eval(ii + snippet) + chked + '></input></td><td><input style=width:400px; onblur=checkval(this); type=text onmouseover=toms(this); id=i' + eval(ii + snippet) + ' name=i' + eval(ii + snippet) + ' value=></input></td><td><input style=width:100px; type=number onkeyup=cval(event); oninput=precval(this); onclick=ofc(this); onmouseover=toms(this); min=0 id=j' + eval(ii + snippet) + ' name=j' + eval(ii + snippet) + ' step=0.000001 value=></input></td></tr>';
chked='';
vmode='hidden';
}
document.getElementById(nextthing).innerHTML+='<tr id=xx0 style=background-color:pink;><td><input onclick=andth(); type=checkbox id=c' + snippet + ' name=c' + snippet + ' checked></input></td><td><input style=width:400px; onblur=checkval(this); type=text onmouseover=toms(this); id=i' + snippet + ' name=i' + snippet + ' value=' + isnippet + '></input></td><td><input style=width:100px; type=number onkeyup=cval(event); oninput=precval(this); onclick=ofc(this); onmouseover=toms(this); min=0 max=' + document.getElementById('youtube_duration').value + ' id=j' + snippet + ' name=j' + snippet + ' step=0.000001 value=' + jsnippet + '></input></td></tr>' + suffix;
} else {
//alert(90);
//if (nextthing == 'ddkaraoke') { alert('woW'); }
document.getElementById(nextthing).style.visibility='visible';
if (document.URL.indexOf('c' + snippet + '=off') == -1) {
document.getElementById('c' + snippet).checked=true;
}
document.getElementById('i' + snippet).value=isnippet;
document.getElementById('j' + snippet).value=jsnippet;
}
csnippet=location.search.split('c' + eval(1 + snippet) + '=')[1] ? location.search.split('c' + eval(1 + snippet) + '=')[1].split('&')[0] : 'off';
isnippet=location.search.split('i' + eval(1 + snippet) + '=')[1] ? location.search.split('i' + eval(1 + snippet) + '=')[1].split('&')[0] : ' ';
jsnippet=location.search.split('j' + eval(1 + snippet) + '=')[1] ? location.search.split('j' + eval(1 + snippet) + '=')[1].split('&')[0] : ' ';
//alert('isnippet=' + isnippet + '*and* jsnippet=' + jsnippet + '*');
if (isnippet.trim() == '' && jsnippet.trim() == '') {
//alert('isNippet=' + isnippet + '*and* snippet=' + snippet + '*');
queuenext(); //document.getElementById('dkaraoke').click();
// alert(11);
return;
} else {
nextthing='xx' + eval(1 + snippet);
defval='';
document.getElementById('trbutton').style.visibility='visible';
document.getElementById('dkaraoke').style.visibility='visible';
document.getElementById('dkaraokem').style.visibility='visible';
document.getElementById('dkaraoker').style.visibility='visible';
document.getElementById('trrhead').style.display='none';
if (document.getElementById('dd' + emojisuffix + 'karaoke')) {
//if (emojisuffix == 'd' || emojisuffix == 'dd') { alert('wOW'); }
document.getElementById('d' + emojisuffix + 'karaoke').style.visibility='visible';
document.getElementById('d' + emojisuffix + 'karaokem').style.visibility='visible';
document.getElementById('d' + emojisuffix + 'karaoker').style.visibility='visible';
document.getElementById(emojisuffix + 'karaoke').style.visibility='visible'; // huh
// alert(11111);
emojistuff();
}
//alert('isnippet=' + isnippet + '*and* jsnippet=' + jsnippet + '*');
addrow();
// alert(111);
return;
}
}
nextthing='xx' + eval(1 + snippet);
defval='';
document.getElementById('trbutton').style.visibility='visible';
document.getElementById('dkaraoke').style.visibility='visible';
document.getElementById('dkaraokem').style.visibility='visible';
document.getElementById('dkaraoker').style.visibility='visible';
document.getElementById('trrhead').style.display='none';
if (document.getElementById('dd' + emojisuffix + 'karaoke')) {
//if (emojisuffix == 'dd' || emojisuffix == 'd') { alert('WOW'); }
document.getElementById('d' + emojisuffix + 'karaoke').style.visibility='visible';
document.getElementById('d' + emojisuffix + 'karaokem').style.visibility='visible';
document.getElementById('d' + emojisuffix + 'karaoker').style.visibility='visible';
document.getElementById(emojisuffix + 'karaoke').style.visibility='visible'; // huh
// alert(1111);
emojistuff();
}
if (document.getElementById('j0').value.indexOf('.') == -1) {
document.getElementById('j0').value+='';
} else {
var xxqw=document.getElementById('j0').value.split('.');
if (xxqw[1].length > 3) {
document.getElementById('j0').value=xxqw[0] + '.' + xxqw[1].substring(0,3);
}
}

var nosup=' ';
//alert(zeroplay);
if (zeroplay != 0 && document.getElementById('c0')) {
//alert(4);
if (!top.window) {
//alert(44);
nosup='';
} else {
if (itt('') != '') { nosup=''; }
}
//alert(444);
}

if (zeroplay == 0) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('c0').checked=true;
}
//if (onestodo.length > 1) alert('hERe');
if (document.getElementById('dd' + emojisuffix + 'karaoke')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById(emojisuffix + 'karaoke').click();
}
} else {
document.getElementById('karaoke').click();
}
} else if (nosup == '') {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('c0').checked=true;
}
//if (onestodo.length > 1) alert('hERE');
if (document.getElementById('ejkaraoke')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('ejkaraoke').click();
}
}
} else if (top.document.title.indexOf("Country ") == 0 && top.document.title.indexOf(" Quiz") != -1 && document.getElementById('c0')) {
if (document.URL.indexOf('c0=off') == -1) {
document.getElementById('c0').checked=true;
}
//if (onestodo.length > 1) alert('hERE');
if (document.getElementById('ejkaraoke')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('ejkaraoke').click();
}
}
} else if (((top.document.title.indexOf("Indigenous ") == 0 && top.document.title.indexOf(" Australia") != -1) || (top.document.URL.indexOf('rjmprogramming.com.au/wordpress') != -1 || top.document.URL.indexOf('rjmprogramming.com.au/ITblog') != -1)) && document.getElementById('c0')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('c0').checked=true;
}
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('ejkaraoke').click();
}
}
} else if (((top.document.title.indexOf("Health ") == 0 && top.document.title.indexOf(" Meaning") != -1) || (top.document.URL.indexOf('rjmprogramming.com.au/wordpress') != -1 || top.document.URL.indexOf('rjmprogramming.com.au/ITblog') != -1)) && document.getElementById('c0')) {
if (document.URL.indexOf('c0=off') == -1) {
document.getElementById('c0').checked=true;
}
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('ejkaraoke').click();
}
}
} else if (((top.document.title.indexOf("Dams ") == 0 && top.document.title.indexOf(" United States") != -1) || (top.document.URL.indexOf('rjmprogramming.com.au/wordpress') != -1 || top.document.URL.indexOf('rjmprogramming.com.au/ITblog') != -1)) && document.getElementById('c0')) {
if (document.URL.indexOf('c0=off') == -1) {
document.getElementById('c0').checked=true;
}
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('ejkaraoke').click();
}
}
} else if (((top.document.title.indexOf("Australian ") == 0) || (top.document.URL.indexOf('rjmprogramming.com.au/wordpress') != -1 || top.document.URL.indexOf('rjmprogramming.com.au/ITblog') != -1)) && document.getElementById('c0')) {
if (document.URL.indexOf('c0=off') == -1) {
document.getElementById('c0').checked=true;
}
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('ejkaraoke').click();
}
}
} else if (top.document.title.indexOf("Nostalgia ") == 0 && document.getElementById('c0')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('c0').checked=true;
}
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('ejkaraoke').click();
}
}
} else if (top.document.title.indexOf("(at least on Google Chrome)") != -1 && document.getElementById('c0')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('c0').checked=true;
}
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('ejkaraoke').click();
}
}
} else if (top.document.title.indexOf("Top Look") == 0 && document.getElementById('c0')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('c0').checked=true;
}
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('ejkaraoke').click();
}
}
} else if (top.document.title.indexOf("The Other Side of the World") == 0 && document.getElementById('c0')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('c0').checked=true;
}
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
if (document.URL.indexOf('c0=off') == -1 || itt('') != '') {
document.getElementById('ejkaraoke').click();
}
}
}

tdt='';
}

function nextv() {
if (thisonetodo < onestodo.length) {
ourvid=onestodo[thisonetodo];
//if (thisonetodo > 0) alert(ourvid);
if (document.getElementById('ajax')) { document.getElementById('ajax').innerHTML=''; }
if (document.getElementById('youtubeid')) { document.getElementById('youtubeid').value=ourvid; }
if (document.getElementById('performance')) { console.warn('here at 1'); document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + hashidea + "'></iframe>"); }
firstprefix="";
if (document.getElementById(emojisuffix + 'karaokeemail')) { document.getElementById(emojisuffix + 'karaokeemail').value=document.getElementById('to').value; }
if (document.getElementById('performance')) { document.getElementById('performance').style.display='block'; }
//if (onestodo.length > 1) {
// top.document.title+=" ; " + onestodosuffix;
// alert(eval(1000 * onestododur[thisonetodo]) + " ; " + onestodosuffix);
//}
setTimeout(showd, 200);
setTimeout(nextv, eval(1000 * onestododur[thisonetodo]));
thisonetodo++;
}
}

function yourprefix(suggestedone) {
var outsug=suggestedone, ione=1;
var lastlslook=' ';
if (window.localStorage) {
while (lastlslook != '') {
outsug=('000' + ione).slice(-3);
lastlslook=decodeURIComponent(('' + localStorage.getItem('list' + outsug))).replace(/\+/g,' ').replace(/^null$/g,'').trim();
ione++;
}
}
return outsug;
}

function dnineit() {
var allinc=true;
var wasvl=ajaxoncnt;
var sin=document.getElementById('ajaxs');
var qtitle='', commalist='', commadelim='';
for (var i=0; i<sin.options.length; i++) {
if (sin.options[i].selected) {
if (sin.options[i].value != '') {
ajaxoncnt--;
if (ajaxclist.indexOf(sin.options[i].value) == -1) { allinc=false; }
if (qtitle == '') { qtitle='&atitle=' + encodeURIComponent(('' + sin.options[i].innerText).split(' (')[0]); }
commalist+=commadelim + sin.options[i].value;
commadelim=',';
}
}
}
if (commalist != '') {
if (ajaxoncnt == 0 && allinc && wasvl != 0) {
//alert("./the_wrecking_crew.html?aprefix=" + encodeURIComponent(yourprefix('kar')) + qtitle + '&alist=' + encodeURIComponent(' ' + ajaxclist + ' '));
if (ajaxf != '') {
document.getElementById('dnine').innerHTML="<a style='cursor:pointer;text-decoration:none;' href='#myh1' title=Down>👇</a><br><iframe style='width:100%;height:800px;' id=ifnine src='./the_wrecking_crew.html?aprefix=" + encodeURIComponent(yourprefix('kar')) + '&atitle=' + encodeURIComponent(ajaxf) + '&alist=' + encodeURIComponent(' ' + ajaxclist + ' ') + "'></iframe>";
} else {
document.getElementById('dnine').innerHTML="<a style='cursor:pointer;text-decoration:none;' href='#myh1' title=Down>👇</a><br><iframe style='width:100%;height:800px;' id=ifnine src='./the_wrecking_crew.html?aprefix=" + encodeURIComponent(yourprefix('kar')) + qtitle + '&alist=' + encodeURIComponent(' ' + ajaxclist + ' ') + "'></iframe>";
}
} else {
document.getElementById('dnine').innerHTML="<a style='cursor:pointer;text-decoration:none;' href='#myh1' title=Down>👇</a><br><iframe style='width:100%;height:800px;' id=ifnine src='./the_wrecking_crew.html?aprefix=" + encodeURIComponent(yourprefix('kar')) + qtitle + '&alist=' + encodeURIComponent(commalist) + "'></iframe>";
}
}
ajaxoncnt=wasvl;
}

function getloopstatus() { return looping; }

function getwasloopstatus() { return waslooping; }

function getsecs() { return ggsecs; }

function loopstatus() {
if (top.document.getElementById("listeleven")) {
if (top.document.getElementById("listeleven").innerHTML.replace(" "," ").indexOf(" ") == 0) {
looping=false;
} else {

if (eval('' + gsecs) < 0) {
gsecs=0;
} else {
gsecs++;
}

if (eval('' + ggsecs) < 0 && top.document.getElementById("listeleven").innerHTML.replace(" "," ").indexOf(" ") == 0) {
ggsecs=gsecs;
}

}
}
setTimeout(loopstatus, 1000)
}


function postputy(sin, secok) {
var i=0, ik=0;
var kik=0, lik=0, mik=0;
var onetoone=[], atoone=[];
var ntoone=[], sometoone=[];
cumd=0.0;
var soivc='';
var xrect;
var wasi=0;
var retval='', oneto=true;
var czis='on';
var docbod='', docbodi=1, selbod='';
var aot,jaot=0,aotfactor=1.0,iaot,aotdur=0.0,faot=[60.0,60.0,24.0];
var kbitis=document.URL.split('#')[0].split('?')[0].split('/')[eval(-1 + document.URL.split('#')[0].split('?')[0].split('/').length)];
var utemplate='https://www.rjmprogramming.com.au/HTMLCSS/' + kbitis + '?youtubeid=SuJFdLxisPs&youtube_duration=575.621&email=&email=&emoji=on&c0=' + czzis + '&i0=0&j0=575.621&i1=&j1=&i2=&j2=&i3=&j3=&i4=&j4=&i5=&j5=&i6=&j6=&i7=&j7=&i8=&j8=&i9=&j9=&i10=&j10=&i11=&j11=&i12=&j12=&i13=&j13=&i14=&j14=&i15=&j15=&i16=&j16=&i17=&j17=&i18=&j18=&i19=&j19=&i20=&j20=&i21=&j21=&i22=&j22=&i23=&j23=&i24=&j24=&i25=&j25=&i26=&j26=&i27=&j27=&i28=&j28=&i29=&j29=';
var defc=0;
var origbitatstart=bitatstart;
var extrascript='<script type="text/javascript"> </scr' + 'ipt>';
if (csajaxs == '') {
looping=false;
waslooping=false;
extrascript=extrascript.replace(' </scr' + 'ipt>', String.fromCharCode(10) + 'var looping=false, waslooping=false; ' + String.fromCharCode(10) + ' </scr' + 'ipt>');
} else {
looping=true;
waslooping=true;
extrascript=extrascript.replace(' </scr' + 'ipt>', String.fromCharCode(10) + 'var looping=true, waslooping=true; ' + String.fromCharCode(10) + ' </scr' + 'ipt>');
}

extrascript=extrascript.replace(' </scr' + 'ipt>', String.fromCharCode(10) + 'function getloopstatus() { return looping; } ' + String.fromCharCode(10) + ' </scr' + 'ipt>');
extrascript=extrascript.replace(' </scr' + 'ipt>', String.fromCharCode(10) + 'function getwasloopstatus() { return waslooping; } ' + String.fromCharCode(10) + ' </scr' + 'ipt>');

extrascript=extrascript.replace(' </scr' + 'ipt>', String.fromCharCode(10) + 'function loopstatus() { ' + String.fromCharCode(10) + ' </scr' + 'ipt>');
extrascript=extrascript.replace(' </scr' + 'ipt>', String.fromCharCode(10) + 'if (top.document.getElementById("listeleven")) { ' + String.fromCharCode(10) + ' </scr' + 'ipt>');

extrascript=extrascript.replace(' </scr' + 'ipt>', String.fromCharCode(10) + 'if (top.document.getElementById("listeleven").innerHTML.replace(" "," ").indexOf(" ") == 0) { ' + String.fromCharCode(10) + ' </scr' + 'ipt>');
extrascript=extrascript.replace(' </scr' + 'ipt>', String.fromCharCode(10) + ' looping=false; ' + String.fromCharCode(10) + ' </scr' + 'ipt>');
extrascript=extrascript.replace(' </scr' + 'ipt>', String.fromCharCode(10) + '} ' + String.fromCharCode(10) + ' </scr' + 'ipt>');

extrascript=extrascript.replace(' </scr' + 'ipt>', String.fromCharCode(10) + '} setTimeout(loopstatus, 1000); ' + String.fromCharCode(10) + ' </scr' + 'ipt>');
extrascript=extrascript.replace(' </scr' + 'ipt>', String.fromCharCode(10) + '} ' + String.fromCharCode(10) + ' </scr' + 'ipt>');

if (csajaxs != '') {
setTimeout(loopstatus, 1000);
extrascript=extrascript.replace(' </scr' + 'ipt>', String.fromCharCode(10) + 'setTimeout(loopstatus, 1000); ' + String.fromCharCode(10) + ' </scr' + 'ipt>');
}

extrascript="<script type='text/javascript'> function consolelog(inm) { if (window.top) { if (top.document.getElementById('postlist') && top.document.URL.indexOf('debug=') != -1) { top.document.getElementById('postlist').style.display='block'; top.document.getElementById('postlist').innerHTML+='<br>' + inm; } else { console.log(inm); } } else { console.log(inm); } } </scr" + "ipt>";

if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && lastajaxs != '') {
//preajaxswatch();
ajaxclist=lastajaxs;
ajaxoncnt=eval('' + ajaxclist.split(',').length);
ajaxf='';
//alert(rep + ' lastajaxs=' + lastajaxs);
//} else if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//alert('why? ' + rep + ' Vs ' + lastajaxs + ' ourmto=' + ourmto);
}
for (var ii=0; ii<sin.options.length; ii++) {
ntoone.push(ii);
if (sin.options[ii].selected) {
if (sin.options[ii].value != '') { onetoone.push(sin.options[ii].value); defc++; }
}
}

if (eval('' + defc) <= eval('' + ajaxoncnt) && eval('' + ajaxoncnt) > 1) {
atoone=ajaxclist.split(',');
for (var iiii=0; iiii<atoone.length; iiii++) {
for (var iii=0; iii<sin.options.length; iii++) {
if (atoone[iiii] == sin.options[iii].value) { sometoone.push(iii); }
}
}
//alert('Defc=' + defc + ' and ajaxoncnt=' + ajaxoncnt);
//} else {
// alert('defc=' + defc + ' and ajaxoncnt=' + ajaxoncnt);
}

for (var j=0; j<sin.options.length; j++) {
if (eval('' + atoone.length) > eval('' + j)) {
soivc=atoone[j];
i=eval('' + sometoone[j]);
ntoone[j]=0;
kik=0;
lik=eval(-1 + eval('' + sin.options.length));
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('i=' + i + ' kik=' + kik + ' lik=' + lik + ' soivc=,' + soivc + ', Defc=' + defc + ' and ajaxoncnt=' + ajaxoncnt + ' vs=' + (',' + ajaxclist + ',') + ' found=' + (',' + ajaxclist + ',').indexOf(',' + soivc + ','));
//}
//alert('i=' + i + ' kik=' + kik + ' lik=' + lik + ' soivc=,' + soivc + ', Defc=' + defc + ' and ajaxoncnt=' + ajaxoncnt + ' vs=' + (',' + ajaxclist + ',') + ' found=' + (',' + ajaxclist + ',').indexOf(',' + soivc + ','));
} else if (eval('' + atoone.length) > 0) {
kik=0;
lik=0;
i=-1;
soivc="youllneverfindthis";
//alert('i=' + j + ' soivc=' + soivc + ' Defc=' + defc + ' and ajaxoncnt=' + ajaxoncnt);
} else {
kik=j;
lik=j;
i=j;
soivc=sin.options[j].value;
}
for (ik=kik; ik<=lik; ik++) {
if (sin.options[ik].value != '' && eval('' + i) == eval('' + ik) && (sin.options[ntoone[j]].selected || (sin.options[ik].value == soivc && ('' + (',' + ajaxclist + ',').indexOf(',' + soivc + ',')) != '-1'))) {
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('I=' + i + ' Soivc=' + soivc + ' Defc=' + defc + ' and ajaxoncnt=' + ajaxoncnt + ' text=' + sin.options[i].innerText);
//}
if (sin.options[ik].value != '') {
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('I=' + i + ' soivc=' + soivc + ' Defc=' + defc + ' and ajaxoncnt=' + ajaxoncnt + ' text=' + sin.options[i].innerText);
//}
//alert(sin.options[i].value);
if (oneto) {
oneto=false;
onestodo=[];
onestododur=[];
}
aotdur=0.0;
aotfactor=1.0;
jaot=0;
aot=sin.options[i].text.split('(')[eval(-1 + sin.options[i].text.replace(')',' ').split('(').length)].replace(')',' ').split(':');
if (aot.length == 1 && aot[0].replace(' second ',',').replace(' seconds ',',').indexOf(',') != -1) {
var hvis=aot[0].split(' hour');
if (hvis.length != 1) { console.log(hvis[0]); aotdur+=eval(eval('' + hvis[0]) * 60 * 60); aot[0]=aot[0].replace(' hours,',' hour').replace(' hour,',' hour').split(' hour')[1]; }
hvis=aot[0].split(' minute');
if (hvis.length != 1) { console.log(hvis[0]); aotdur+=eval(eval('' + hvis[0]) * 60); aot[0]=aot[0].replace(' minutes,',' minute').replace(' minute,',' minute').split(' minute')[1]; }
hvis=aot[0].split(' second');
if (hvis.length != 1) { console.log(hvis[0]); aotdur+=eval(eval('' + hvis[0]) * 1); }
} else {
for (iaot=eval(-1 + aot.length); iaot>=0; iaot--) {
aotdur+=eval(aotfactor * aot[iaot]);
jaot++;
aotfactor *= faot[jaot];
}
}
cumd+=aotdur;
cumd+=15;
var oneis="1";
if (bitatstart != '') { oneis="2"; }
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { oneis="2"; }
//alert(sin.options[i].value + ' aotdur=' + aotdur + ' aotfactor=' + aotfactor + ' title=' + sin.options[i].text);
if (sgive) {
document.getElementById('myh1').style.maxWidth='700px';
if (docbod == '') {
selbod='<select style="width:60px;display:inline-block;" onchange="if (this.value.length > 1 || this.value.trim().length == 1) { if (!pgive) { location.href=' + "'#' + this.value;" + ' } } else if (this.value.length == 1 && this.value.trim().length == 0) { addrecline(this.value); }" title="Focus on"><option value="">...</option></select>';
if ((csajaxs + ' ').substring(0,1) == 'X') {
docbod='<h' + oneis + ' id=myh1>YouTube API - RJM Programming - September, 2016 <a target=_blank title="Search again" href="' + document.URL.replace('ht' + 'tp:','ht' + 'tps:').split('?')[0].split('#')[0] + '">...</a> <font size=1>selected from</font> "' + document.getElementById('youtubeid').value.trim() + '" <input onclick=emojirestart(); type=button id=ebutn value=🔁 title=Restart></input> <font size=1>below</font> ' + selbod + '</h' + oneis + '><table id="myvtable" style="border:1px solid red;"><tbody><tr></tr></tbody></table><div id=listeleven style=display:none;>' + document.getElementById('listeleven').innerHTML + '</div><div id=postlist style=display:none;></div>';
} else {
docbod='<h' + oneis + ' id=myh1>YouTube API - RJM Programming - September, 2016 <a target=_blank title="Search again" href="' + document.URL.replace('ht' + 'tp:','ht' + 'tps:').split('?')[0].split('#')[0] + '">...</a> <font size=1>selected from</font> "' + document.getElementById('youtubeid').value.trim() + '" <font size=1>below</font> ' + selbod + '</h' + oneis + '><table id="myvtable" style="border:1px solid red;"><tbody><tr></tr></tbody></table><div id=listeleven style=display:none;>' + document.getElementById('listeleven').innerHTML + '</div>';
}
}
selbod=selbod.replace('</select>', '<option value="td' + docbodi + '">' + sin.options[i].text.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] + '</option></select>');
docbod=docbod.replace(/\<\/select\>/g, '<option value="td' + docbodi + '">' + sin.options[i].text.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] + '</option></select>');
document.getElementById('myh1').innerHTML=sin.options[i].text.replace(/\[/g,'(').replace(/\]/g,')').replace(/junk\~junk/g,'junk|junk').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];
xrect=document.getElementById('myh1').getBoundingClientRect();
if (pgive) {
//alert(1);
docbod=docbod.replace('</tr>', '<td id="td' + docbodi + '"><iframe id=iftd' + docbodi + ' title="' + eval(0 * xrect.height) + '" onload="ifmyh1(this,' + eval(-1 + docbodi) + ');" style="width:700px;height:85vh;" src="' + utemplate.replace('c0=on','c0=' + czis).replace('SuJFdLxisPs',sin.options[i].value).replace(/575\.621/g,'' + aotdur) + '&fixedh1h=y"></iframe>' + selbod.replace("(this.value);","('" + docbodi + "');").replace('...</option>','...</option><option value=" ">... ... Move this video over to left</option>').replace('<select ','<select id=seltd' + docbodi + ' ') + '</td></tr>');
if (sgive && !pgive) {
czis='off&tdd=' + eval(1 + eval('' + docbodi)) + '&ezj=' + ('' + cumd).split('.')[0];
} else if (!pgive) {
czis='off&tdd=' + eval(1 + eval('' + docbodi)) + '&ezj=1';
}
} else {
if (document.getElementById('listeleven').innerHTML == '') {
document.getElementById('listeleven').innerHTML=sin.options[i].value + '## ' + sin.options[i].text;
} else {
document.getElementById('listeleven').innerHTML+='^' + sin.options[i].value + '## ' + sin.options[i].text;
}
if (sgive && !pgive) {
//alert(11);
if (docbod.indexOf(' </summary>') != -1) { docbod=docbod.replace(' </summary>', ' <font size=1>(then ' + sin.options[i].text + ')</font></summary>'); }
docbod=docbod.replace('</tr>', '<td id="td' + docbodi + '">' + bitatstart.replace('></summary>', ' id=sm' + docbodi + '>' + sin.options[i].text + ' </summary>').replace('<details ', '<details id=dt' + docbodi + ' ') + '<iframe title="' + eval(0 * xrect.height) + '" onload="ifmyh1(this,' + eval(-1 + docbodi) + ');" style="width:700px;height:85vh;" src="' + utemplate.replace('c0=on','c0=' + czis).replace('c0=on','c0=' + czis).replace('SuJFdLxisPs',sin.options[i].value).replace(/575\.621/g,'' + aotdur) + '&fixedh1h=y"></iframe>' + selbod.replace("(this.value);","('" + docbodi + "');").replace('...</option>','...</option><option value=" ">... ... Move this video over to left</option>') + ('</td>' + bitatend).replace('</td></d', '</d') + '</tr>');
czis='off&tdd=' + eval(1 + eval('' + docbodi)) + '&ezj=' + ('' + cumd).split('.')[0];
} else if (!pgive) {
if (docbod.indexOf(' </summary>') != -1) { docbod=docbod.replace(' </summary>', ' <font size=1>(then ' + sin.options[i].text + ')</font></summary>'); }
docbod=docbod.replace('</tr>', '<td id="td' + docbodi + '">' + bitatstart.replace('></summary>', ' id=sm' + docbodi + '>' + sin.options[i].text + ' </summary>').replace('<details ', '<details id=dt' + docbodi + ' ') + '<iframe title="' + eval(0 * xrect.height) + '" onload="ifmyh1(this,' + eval(-1 + docbodi) + ');" style="width:700px;height:85vh;" src="' + utemplate.replace('c0=on','c0=' + czis).replace('c0=on','c0=' + czis).replace('SuJFdLxisPs',sin.options[i].value).replace(/575\.621/g,'' + aotdur) + '&fixedh1h=y"></iframe>' + selbod.replace("(this.value);","('" + docbodi + "');").replace('...</option>','...</option><option value=" ">... ... Move this video over to left</option>') + ('</td>' + bitatend).replace('</td></d', '</d') + '</tr>');
czis='off&tdd=' + eval(1 + eval('' + docbodi)) + '&ezj=1';
//alert(111);
} else {
//alert(1111);
if (docbod.indexOf(' </summary>') != -1) { docbod=docbod.replace(' </summary>', ' <font size=1>(then ' + sin.options[i].text + ')</font></summary>'); }
docbod=docbod.replace('</tr>', '<td id="td' + docbodi + '">' + bitatstart.replace('></summary>', ' id=sm' + docbodi + '>' + sin.options[i].text + ' </summary>').replace('<details ', '<details id=dt' + docbodi + ' ') + '<iframe title="' + eval(0 * xrect.height) + '" onload="ifmyh1(this,' + eval(-1 + docbodi) + ');" style="width:700px;height:85vh;" src="' + utemplate.replace('c0=on','c0=' + czis).replace('c0=on','c0=' + czis).replace('SuJFdLxisPs',sin.options[i].value).replace(/575\.621/g,'' + aotdur) + '&fixedh1h=y"></iframe>' + selbod.replace("(this.value);","('" + docbodi + "');").replace('...</option>','...</option><option value=" ">... ... Move this video over to left</option>') + ('</td>' + bitatend).replace('</td></d', '</d') + '</tr>');
}
}
docbodi++;
if (bitatstart.indexOf(' open') != -1) {
bitatstart=bitatstart.replace(' open', '');
} else if (bitatstart == '') {
bitatstart='';
bitatend='';
}
}
thisonetodo=0;
if (onestodo.length <= 1) {
if (onestodo.length == 1) {
onestodoprefix='&andthen=';
onestodosuffix=onestododur[0] + ";" + sin.options[i].value + "," + aotdur;
console.log('yes more than one');
}
} else {
onestodosuffix+=";" + sin.options[i].value + "," + aotdur;
}
onestodo.push(sin.options[i].value);
onestododur.push(aotdur);
//alert('Expected duration for ' + sin.options[i].value + ' (' + eval(i + 1) + ') is ' + aotdur + ' seconds');
}
}
}
}
if (docbod.indexOf('details') != -1) {
lastdet='dt1';
}
//docbod=docbod.replace(/details\>\<\\td\>\<td/g, 'details></td></TR>').replace('</TR></tr>', '</tr>').replace('<div id=listeleven style=display:none;>' + '' + '</div>', '<div id=listeleven style=display:none;>' + document.getElementById('listeleven').innerHTML + '</div>');
docbod=docbod.replace(/details\>\<\\td\>\<td/g, 'details></td></TR>').replace('</TR></tr>', '</tr>').replace('<div id=listeleven style=display:none;></div>', '<div id=listeleven style=display:none; title="' + document.getElementById('listeleven').innerHTML + '" data-title=' + csajaxs + '>' + document.getElementById('listeleven').innerHTML + '</div>' + extrascript);
bigdocbod=docbod;
if (!secok) { return ''; }
if (onestodo.length > 0) {
if (onestodo.length > 1) {
if (prevonestodosuffix == "") {
document.getElementById('myformdiv').innerHTML="<input type=hidden name=andthen value='" + onestodosuffix + "'></input>";
}
//top.document.title+=" ; " + onestodosuffix;
}
nextv();
}
if (docbod != '') {
retval='';
document.title="Top Look";
if (pgive) {
//docbod+=String.fromCharCode(10) + "<scr" + "ipt type='text/javascript'> " + String.fromCharCode(10);
//docbod+= "function aut() { var ifsa=document.getElementsByTagName('iframe'); for (var iaut=0; iaut<ifsa.length; iaut++) { ifsa[iaut].style.position='absolute'; ifsa[iaut].style.opacity='0.5'; ifsa[iaut].style.top='100px'; ifsa[iaut].style.left='0px'; } } " + String.fromCharCode(10) + " setTimeout(aut, 2000); " + String.fromCharCode(10);
//docbod+="</scr" + "ipt> " + String.fromCharCode(10);
docbod=docbod.replace('ifmyh1(', ' setTimeout(aut,2000); ifmyh1(');
docbod=docbod.replace('<select ', '<select id=topselbod ');
}
//alert(0);
//myvtableoh=docbod; //.replace(' - ', ' <a title=Restart style="cursor:pointer;text-decoration:underline;" onclick="parent.document.body.innerHTML=parent.document.getBod();">-</a> ');
//alert((csajaxs + ' ').substring(0,1));
if ((csajaxs + ' ').substring(0,1) == 'X') {
setTimeout(ebutnc, eval(eval(5 + eval('' + cumd)) * 1000)); //alert('cumd=' + cumd);
}
if ((csajaxs + ' ').substring(0,1) == 'X' && 1 == 2) {
//alert('here');
bigo=window.open(document.URL.split('?')[0].split('#')[0], '_blank', 'top=0,left=0,width=' + screen.width + ',height=' + screen.height);
bigo.document.write(docbod);
} else {
document.body.innerHTML=docbod; //myvtableoh;
}
//alert(document.getElementById('bigscript').outerHTML);
//myvtableoh=''; //encodeURIComponent(myvtableoh); // + document.getElementById('bigscript').outerHTML);
}
bitatstart=origbitatstart;
return retval;
}

function preebutnc() {
validst=true;
}

function ebutnc() {
if (validst) {
if (document.getElementById('listeleven') && document.getElementById('ebutn')) {
if (document.getElementById('listeleven').innerHTML.replace(' ',' ').trim() == document.getElementById('listeleven').title) {
document.getElementById('ebutn').click();
} else if ((document.getElementById('listeleven').innerHTML.replace(' ',' ') + 'x').substring(0,1) != ' ') {
document.getElementById('ebutn').click();
}
}
}
validst=true;
}

function postBod() {
if (itt(czzyes) != '') { document.body.style.cursor='progress'; setTimeout(cejy, eval(eval(itt(czzyes)) * 1000)); } if (ourvids.length > 1) { helpoutparent(); } if (document.URL.indexOf('minimize=') != -1) { document.getElementById('dstyle').innerHTML='<style> * { overflow: hidden !important; } </style>'; } preselc='<br><div id=dajaxs style=display:inline;vertical-align:top;><span id=spanner>>1x</span> <input onchange=putmorethanone(this.checked); type=checkbox id=cajaxs' + courmto + '></input></div>'; if (document.URL.indexOf('nokaraoke=') != -1 || (top.document.title.indexOf('Country ') == 0 && top.document.title.indexOf(' Quiz') != -1) || top.document.title.indexOf('The Other Side of the World') == 0 || top.document.title.indexOf('(at least on Google Chrome)') != -1 || top.document.title.indexOf('Nostalgia ') == 0 || top.document.title.indexOf('Using ') == 0 || (top.document.title.indexOf('Dams ') == 0 && top.document.title.indexOf(' United States') != -1) || (top.document.title.indexOf('Health ') == 0 && top.document.title.indexOf(' Meaning') != -1) || (top.document.title.indexOf('Australian ') == 0) || (top.document.title.indexOf('Indigenous ') == 0 && top.document.title.indexOf(' Australia') != -1) || top.document.URL.indexOf('rjmprogramming.com.au/wordpress') != -1 || top.document.URL.indexOf('rjmprogramming.com.au/ITblog') != -1) { document.getElementById('myh1').innerHTML=document.getElementById('myh1').innerHTML.replace('Karaoke via ',ourvid + ' Video Lookup via '); } zeroplay=ourvid.replace('%20',' ').indexOf(' '); if (document.URL.indexOf('?random=') != -1) { playrandom(); } else { checkemailbits(); document.getElementById('urlbig').value=document.URL; document.getElementById('emailform').action=document.getElementById('emailer').src; if (doemoji != 'on') { document.getElementById('emoji').checked=false; } if (ourrec != 'off') { document.getElementById('recown').checked=true; dorecord=true; } if (ourvid == '') { ourvid=(location.search.split('youtubeid=')[1] ? decodeURIComponent(location.search.split('youtubeid=')[1].split('&')[0]).replace(/\+/g,' ') : ''); } if (ourvid != '') { document.getElementById('youtubeid').value=ourvid; findduration(null,ourvid); } }
}

function particularrestart(jtop, jvid) {
var topifs=top.document.getElementsByTagName('iframe');
for (var itop=0; itop<topifs.length; itop++) {
if (eval('' + jtop) < 0 && topifs[itop].src.indexOf('=' + encodeURIComponent(jvid) + '&') != -1) {
topifs[itop].src=topifs[itop].src.split('&rnd=')[0] + '&rnd=' + itop + '' + Math.floor(Math.random() * 1237654567);
} else if (eval('' + itop) == eval('' + jtop)) {
topifs[itop].src=topifs[itop].src.split('&rnd=')[0] + '&rnd=' + itop + '' + Math.floor(Math.random() * 1237654567);
}
}
}

function emojirestart() {
if (('' + top.document.getElementById('myh1').style.marginLeft) == '1px') {
top.document.getElementById('myh1').style.marginLeft='0px';
validst=false;
} else {
validst=false;
var topifs=top.document.getElementsByTagName('iframe');
for (var itop=0; itop<topifs.length; itop++) {
if (itop != -1) { topifs[itop].src=topifs[itop].src.split('&rnd=')[0] + '&rnd=' + itop + '' + Math.floor(Math.random() * 1237654567); }
}
//top.document.title+=' 1';
top.document.getElementById('myh1').style.marginLeft='0px';
//top.document.title+='2';
window.top.scrollTo(0,0);
}
setTimeout(preebutnc, eval(eval(-2 + eval('' + cumd)) * 1000));
setTimeout(ebutnc, eval(eval(5 + eval('' + cumd)) * 1000));
}

function getBod() {
setTimeout(postBod, 200);
return decodeURIComponent(myvtableoh);
}

function givethemfifteen() {
givefifteen-=givefactor;
if (givefifteen <= 0) {
postputy(document.getElementById('ajaxs'), true);
} else {
setTimeout(givethemfifteen,1000);
}
}

function dputy(yt) {
var aot=yt.options[yt.selectedIndex].text.split('(')[eval(-1 + yt.options[yt.selectedIndex].text.replace(')','').split('(').length)].replace(')','').split(':'),jaot=0,aotfactor=1.0,iaot,aotdur=0.0,faot=[60.0,60.0,24.0];
if (morethanone) {
for (iaot=eval(-1 + aot.length); iaot>=0; iaot--) {
aotdur+=eval(aotfactor * aot[iaot]);
jaot++;
aotfactor *= faot[jaot];
}
//alert('Expected duration ' + aotdur + ' seconds');
if (givefifteen < 0) {
givefifteen=15;
givethemfifteen();
}
} else {
ourvid=yt.value;
// document.getElementById('ajax').innerHTML=''; // huh?
document.getElementById('youtubeid').value=ourvid;
if (domin) {
console.log('5:' + (new Date()) + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix));
console.warn('here at 2');
window.open(document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + hashidea, '_blank', 'left=10,top=10,width=600,height=600');
} else {
console.log('6:' + (new Date()) + "<iframe id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + hashidea + "'></iframe>");
console.warn('here at 3');
document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + hashidea + "'></iframe>");
firstprefix="";
if (document.getElementById(emojisuffix + 'karaokeemail')) document.getElementById(emojisuffix + 'karaokeemail').value=document.getElementById('to').value;
document.getElementById('performance').style.display='block';
setTimeout(showd, 200);
}
}
}

function puty(yt) {
var aot=yt.options[yt.selectedIndex].text.split('(')[eval(-1 + yt.options[yt.selectedIndex].text.replace(')',' ').split('(').length)].replace(')',' ').split(':'),jaot=0,aotfactor=1.0,iaot,aotdur=0.0,faot=[60.0,60.0,24.0];
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//alert('rep=' + rep + ' lastajaxs=' + lastajaxs);
//}
if (window.top) {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
//alert('aot.length=' + aot.length + ' ... ' + yt.options[yt.selectedIndex].text);
aotdur=0.0;
aotfactor=1.0;
jaot=0;
if (yt.options[yt.selectedIndex].text.indexOf(' second') != -1) {
//alert('second ... ' + yt.options[yt.selectedIndex].text + ' ... ' + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' second')[0].split(' ')[eval(-1 + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' second')[0].split(' ').length)].trim());
aotdur+=eval(aotfactor * eval(yt.options[yt.selectedIndex].text.replace(' (',' ').split(' second')[0].split(' ')[eval(-1 + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' second')[0].split(' ').length)].trim()));
}
aotfactor *= faot[jaot];
jaot++;
if (yt.options[yt.selectedIndex].text.indexOf(' minute') != -1) {
//alert(' minute ... ' + yt.options[yt.selectedIndex].text + ' ... ' + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' minute')[0].split(' ')[eval(-1 + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' minute')[0].split(' ').length)].trim());
aotdur+=eval(aotfactor * eval(yt.options[yt.selectedIndex].text.replace(' (',' ').split(' minute')[0].split(' ')[eval(-1 + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' minute')[0].split(' ').length)].trim()));
}
aotfactor *= faot[jaot];
jaot++;
if (yt.options[yt.selectedIndex].text.indexOf(' hour') != -1) {
aotdur+=eval(aotfactor * eval(yt.options[yt.selectedIndex].text.replace(' (',' ').split(' hour')[0].split(' ')[eval(-1 + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' hour')[0].split(' ').length)].trim()));
}
aotfactor *= faot[jaot];
jaot++;
var wastop=top.document.getElementById('predivsp').innerHTML;
var randis='' + Math.floor(Math.random() * 19878675);
if (aotdur == 0.0) { aotdur=400.000; }
//alert('' + aotdur);
if (wastop.indexOf('>' + yt.value + '<') == -1 && yt.value.trim() != '' && eval('' + yt.value.length) == 11) {
top.document.getElementById('predivsp').innerHTML='<details onclick="document.getElementById(' + String.fromCharCode(39) + 'ifbtobsix' + randis + String.fromCharCode(39) + ').src=document.getElementById(regit(' + String.fromCharCode(39) + 'ifbtobsix' + randis + String.fromCharCode(39) + ')).src.replace(' + String.fromCharCode(39) + 'c0=' + String.fromCharCode(39) + ',' + String.fromCharCode(39) + 'c0=on&rand=' + String.fromCharCode(39) + ');"><summary id=sumbtobsix' + randis + '>' + yt.value + '</summary><p><iframe data-onclick="event.stopPropagation();" style="width:100%;height:900px;" id="ifbtobsix' + randis + '" onload=" cif(this); if (top.document.URL.indexOf(' + String.fromCharCode(39) + 'showit=' + String.fromCharCode(39) + ') != -1) { document.getElementById(' + String.fromCharCode(39) + 'divsp' + String.fromCharCode(39) + ').style.display=' + String.fromCharCode(39) + 'block' + String.fromCharCode(39) + '; } " src="/HTMLCSS/karaoke_youtube_api.htm?youtubeid=' + yt.value + '&youtube_duration=' + ('' + aotdur).split('.')[0] + '.000&email=&email=&emoji=on&c0=off&i0=0&j0=' + ('' + aotdur).split('.')[0] + '&i1=&j1=&i2=&j2=&i3=&j3=&i4=&j4=&i5=&j5=&i6=&j6=&i7=&j7=&i8=&j8=&i9=&j9=&i10=&j10=&i11=&j11=&i12=&j12=&i13=&j13=&i14=&j14=&i15=&j15=&i16=&j16=&i17=&j17=&i18=&j18=&i19=&j19=&i20=&j20=&i21=&j21=&i22=&j22=&i23=&j23=&i24=&j24=&i25=&j25=&i26=&j26=&i27=&j27=&i28=&j28=&i29=&j29="></iframe><br></p></details>' + wastop;
if (top.appendsel) {
top.appendsel(document.getElementById('ajaxs'));
}
top.document.getElementById('karit').src=top.document.getElementById('karit').src.split('rand=')[0] + 'rand=' + Math.floor(Math.random() * 1987865);
top.document.getElementById('tacode').innerHTML=top.document.getElementById('divsp').outerHTML;
//parent.location.href=parent.document.URL;
return '';
}
return '';
}
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && lastajaxs != '') {
preajaxswatch(); //setTimeout(preajaxswatch,100);
//ajaxclist=lastajaxs;
//ajaxoncnt=eval('' + ajaxclist.split(',').length);
//ajaxf='';
//alert('rEp=' + rep + ' lastajaxs=' + lastajaxs);
} else if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
preajaxswatch();
//ajaxclist=lastajaxs;
//ajaxoncnt=eval('' + ajaxclist.split(',').length);
//ajaxf='';
//alert('reP=' + rep + ' lastajaxs=' + lastajaxs);
}
if (morethanone) {
for (iaot=eval(-1 + aot.length); iaot>=0; iaot--) {
aotdur+=eval(aotfactor * aot[iaot]);
jaot++;
aotfactor *= faot[jaot];
}
//alert('Expected duration ' + aotdur + ' seconds');
if (givefifteen < 0) {
givefifteen=15;
givethemfifteen();
}
} else {
ourvid=yt.value;
// document.getElementById('ajax').innerHTML=''; // huh?
document.getElementById('youtubeid').value=ourvid;
if (domin) {
//alert(document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix));
if (window.parent) {
if (parent.document.getElementById('parnext2') && parent.document.getElementById('divideo')) {
var cellnum=2;
while (parent.document.getElementById('parnext' + cellnum).innerHTML != '') {
cellnum++;
}
//parent.document.getElementById('parnext' + cellnum).innerHTML="<iframe id='myiframe" + cellnum + "' style='z-index:-4;width:720px;height:410px;' src='" + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + "'></iframe><table style=display:table-cell;><tr><td id=parnext" + eval(1 + eval('' + cellnum)) + "></td></tr></table>";
console.warn('here at 4');
parent.document.getElementById('parnext' + cellnum).innerHTML="<table style=display:table-cell;><tr><td id=parnext" + eval(1 + eval('' + cellnum)) + "></td></tr></table><iframe onload=checkss(this); id='myiframe" + cellnum + "' style='z-index:-4;width:720px;height:410px;' src='" + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + hashidea + "'></iframe>";
} else if (parent.document.getElementById('myiframe') && parent.document.getElementById('divideo')) {
//alert('1:' + (new Date()) + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix));
console.warn('here at 5');
parent.document.getElementById('myiframe').src=document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + hashidea;
} else if (parent.document.getElementById('placeforvideo') && parent.document.getElementById('divideo')) {
//parent.document.getElementById('divideo').style.width='760px';
//parent.document.getElementById('divideo').style.height='450px';
//parent.document.getElementById('placeforvideo').innerHTML="<details open><summary>YouTube Videos</summary><table style='overflow:scroll !important;' id=partable><tr id=parrow><td><iframe id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + "'></iframe></td><td id=parnext2></td></tr></table></details>";
console.warn('here at 6');
parent.document.getElementById('placeforvideo').innerHTML="<details open><summary>YouTube Videos</summary><table style='overflow:scroll !important;' id=partable><tr id=parrow><td id=parnext2></td><td><iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + hashidea + "'></iframe></td></tr></table></details>";
if (parent.document.getElementById('divnoresize')) {
parent.document.getElementById('divnoresize').innerHTML='xxx';
}
if (document.URL.indexOf('minimize=') != -1) {
setInterval(function(){
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || document.URL.indexOf('minimize=Y') != -1) {
//document.getElementById('ajaxs').style.position='absolute';
//document.getElementById('ajaxs').style.top='0px';
//document.getElementById('ajaxs').style.left='0px';
//document.getElementById('ajaxs').style.zIndex='999';
mintoajax();
//parent.document.getElementsByTagName('h1')[0].innerHTML=parent.document.getElementsByTagName('h1')[0].innerHTML.replace('</select>', '</select><br>');
//setTimeout(function(){ window.top.scrollTo(0,0); }, 2000);
}
}, 8000);
}
} else {
//alert('2:' + (new Date()) + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix));
console.warn('here at 7');
window.open(document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + hashidea, '_blank', 'left=10,top=10,width=600,height=600');
}
} else {
//alert('3:' + (new Date()) + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix));
console.warn('here at 8');
window.open(document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + hashidea, '_blank', 'left=10,top=10,width=600,height=600');
}
} else {
//alert('4:' + (new Date()) + "<iframe id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + "'></iframe>");
console.warn('here at 9');
document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + hashidea + "'></iframe>");
firstprefix="";
if (document.getElementById(emojisuffix + 'karaokeemail')) document.getElementById(emojisuffix + 'karaokeemail').value=document.getElementById('to').value;
document.getElementById('performance').style.display='block';
setTimeout(showd, 200);
}
}
}

function amw() {
allowable=true;
}

function getytlist(whytid, isfinal) {
// https://www.youtube.com/results/?search_query=South+America%22%2Cintitle%3APaulo
if (!isfinal && lastgetytlist == whytid && whytid != '') {
lastgetytlist=lastgetytlist;
} else {
lastgetytlist=whytid;
if (allowable) {
var selname = "", qsel="", iqq=0, jqq=0, oparts=[whytid], dprefix='', dp='', wparts=[''];
var urlextra='', urln=1;
if (amwaiting && isfinal) {
clearInterval(amwaiting);
amwaiting=null;
allowable=true;
lastgetytlist='';
} else if (!amwaiting) {
amwaiting=setInterval(amw, 2000);
allowable=false;
}
whytid=whytid.replace(/\ \&\&\ /g, '"%2cintitle%3a"').rep ' + xinxy[0] + 'px ' + yinxy[0] + 'px; clip-path: circle(' + Math.sqrt(eval(xinxy[0] - xinxy[1]) * eval(xinxy[0] - xinxy[1]) + eval(yinxy[0] - yinxy[1]) * eval(yinxy[0] - yinxy[1])) + 'px at ' + xinxy[0] + 'px ' + yinxy[0] + 'px); } </style>');
//alert(zaconto.getElementById('imgmore').innerHTML + zaconto.getElementById('dvstyle').innerHTML);
} else { // rectangle
zaconto.getElementById('myimg').style.opacity='1.0';
zaconto.getElementById('imgmore').innerHTML+=zaconto.getElementById('myimg').outerHTML.replace(/myimg/g,'iciov' + ovnum).replace('56;','2365;position:absolute;background-color:transparent;top:0px;left:0px;').replace(/\\\"\\ on/g, '\" data-on').replace('<img ','<img class=zoom-img ').replace(' src=',' src=/HTMLCSS/HYP_50M_SR_W.jpg width=360 height=180 data-src=').replace(' usemap=', ' data-usemap=');
opis='' + eval(-0.1 + eval('' + opis));
zaconto.getElementById('myimg').style.opacity='' + opis;
zaconto.getElementById('dvstyle').innerHTML+='<style> ' + prerest + zb + ' #iciov' + ovnum + ' { margin-top: -385px; -webkit-filter: brightness(110%); filter: brightness(110%); transform-origin: ' + eval(eval(xinxy[0] + xinxy[1]) / 2) + 'px ' + eval(eval(yinxy[0] + yinxy[1]) / 2) + 'px; clip-path: polygon(' + Math.min(eval(xinxy[0]),eval(xinxy[1])) + 'px ' + Math.min(eval(yinxy[0]),eval(yinxy[1])) + 'px,' + Math.min(eval(xinxy[0]),eval(xinxy[1])) + 'px ' + Math.max(eval(yinxy[0]),eval(yinxy[1])) + 'px,' + Math.max(eval(xinxy[0]),eval(xinxy[1])) + 'px ' + Math.max(eval(yinxy[0]),eval(yinxy[1])) + 'px,' + Math.max(eval(xinxy[0]),eval(xinxy[1])) + 'px ' + Math.min(eval(yinxy[0]),eval(yinxy[1])) + 'px,' + Math.min(eval(xinxy[0]),eval(xinxy[1])) + 'px ' + Math.min(eval(yinxy[0]),eval(yinxy[1])) + 'px' + '); } </style>';
}
if (ovnum == 1) { setInterval(alternatevisibility, 15000); }
ovnum++;
}
oneoftwo=ootis;
defzoom=2;
xinxy=[];
yinxy=[];
}
}

function setdefzoom(inv) {
defzoom=inv;
}

function setoneoftwo(inv) {
defzoomoneoftwo=inv;
}

function getoneoftwo() {
return oneoftwo;
}

function nonmifcheck(ziois) {
var waszoom=1;
var sparear=null, gsparear=null;
var xif=-999, yif=-999, xxif=-999, yyif=-999;
zaconto = (ziois.contentWindow || ziois.contentDocument);
//alert(11);
zzaconto=zaconto;
if (zaconto != null) {
//alert('111 ' + xiois.src);
try {
if (zaconto.document) { zaconto = zaconto.document; }
//alert('1111 ' + zaconto.body.innerHTML);
if (zaconto.body.innerHTML.indexOf('>') != -1) {
zoomdone=false;
lastiizoom=(ziois.src.indexOf('zoom=') != -1 ? eval(ziois.src.split('zoom=')[1].split('&')[0].split('#')[0]) : lastiizoom);
var itwo='';
if (document.getElementById('myp')) {
itwo=('' + document.getElementById('myp').getAttribute('data-fc')).replace(/^null/g,'').replace(/^undefined/g,'').trim().toUpperCase();
}
if (itwo == '' && lastcode != '') { itwo=lastcode; }
if (eval('' + itwo.length) == 2 || (document.getElementById('placegeo').title + document.getElementById('placegeo').value).trim() != '') {
var xlatdeg=0, xlongdeg=0;
if ((document.getElementById('placegeo').title + document.getElementById('placegeo').value).indexOf(',') != -1) {
xlatdeg=eval('' + (document.getElementById('placegeo').title + document.getElementById('placegeo').value).split(',')[0]);
xlongdeg=eval('' + (document.getElementById('placegeo').title + document.getElementById('placegeo').value).split(',')[1]);
}
if (ziois.src.indexOf('refresh=') != -1 && ziois.src.indexOf('zoom=') != -1) {
iizoom=lastiizoom;
zaconto.getElementById('mg').onmousedown=function(){ lastiizoom=eval(2 * lastiizoom); setTimeout(parent.rifcheck, 3000); return true; };
zaconto.getElementById('mg').ontouchdown=function(){ lastiizoom=eval(2 * lastiizoom); setTimeout(parent.rifcheck, 3000); return true; };
setTimeout(rifcheck, 2000);
//alert('Where');
return true;
} else {
iizoom=eval(eval('' + ('' + zaconto.getElementById('myimg').style.width).replace('px','')) / 360); //eval('' + zaconto.getzoom());
}
xif=eval(iizoom * eval(180 + eval('' + xlongdeg)));
yif=eval(iizoom * eval(90 - eval('' + xlatdeg)));
//alert('' + xif + ',' + yif);
//alert(itwo);
var isp=0;
var jsp=0;
if (eval('' + itwo.length) == 2) {
if (xif >= -180 && yif >= -90) {
if (lastiizoom != iizoom || ziois.src.indexOf('refresh=') != -1) {
var huhrect=document.getElementById('ifcountries').getBoundingClientRect();
//alert('1:' + huhrect.top + ';' + document.getElementById('ifcountries').offsetLeft + ',' + document.getElementById('ifcountries').offsetTop);
var ospancount=spancount;
newone=eval(1 + spancount);
while (document.getElementById('span' + isp)) {
if (isp < ospancount) {
waszoom=document.getElementById('span' + isp).getAttribute('data-zoom');
if (waszoom != iizoom) {
xlatdeg=eval('' + document.getElementById('span' + isp).getAttribute('data-geo').split(',')[0]);
xlongdeg=eval('' + document.getElementById('span' + isp).getAttribute('data-geo').split(',')[1]);
xxif=eval(iizoom * eval(180 + eval('' + xlongdeg)));
yyif=eval(iizoom * eval(90 - eval('' + xlatdeg)));
if (1 == 1) {
if (4 == 5) { alert(786); }
document.getElementById('plots').innerHTML+='<span id=sspan' + spancount + '><span oncontextmenu="event.stopPropagation(); event.preventDefault(); if (isdouble == 0) { storeaway(this); }" data-zoom="' + iiizoom + '" data-iframepos="' + huhrect.left + ',' + huhrect.top + '" data-geo="' + xlatdeg + ',' + xlongdeg + '" title="' + decodeURIComponent(document.getElementById('span' + isp).title) + '" id=span' + spancount + ' style="font-style:bold;text-shadow:-1px 1px 1px #ff2d95;font-size:6px;margin:0 0 0 0;padding:0 0 0 0;z-index:2134;position:fixed;top:' + eval(eval('' + huhrect.top) + yyif) + 'px;left:' + eval(eval('' + huhrect.left) + xxif) + 'px;">x</span></span>';
nodiv(isp, spancount);
spancount++;
jsp++;
document.getElementById('span' + isp).style.display='none';
} else {
document.getElementById('span' + isp).style.top='' + eval(eval('' + huhrect.top) + yyif) + 'px';
document.getElementById('span' + isp).style.left='' + eval(eval('' + huhrect.left) + xxif) + 'px';
document.getElementById('span' + isp).setAttribute('data-zoom', '' + iizoom);
document.getElementById('span' + isp).setAttribute('data-iframepos', '' + huhrect.left + ',' + huhrect.top);
document.getElementById('sspan' + isp).innerHTML=document.getElementById('span' + isp).outerHTML;
}
}
}
isp++;
}
}
spancount=eval(isp + jsp);
if (jjans == jjans.replace(/\ \ \ \ \ $/g,'')) {
if (4 == 5) { alert(2786); }
document.getElementById('plots').innerHTML+='<span id=sspan' + spancount + '><span oncontextmenu="event.stopPropagation(); event.preventDefault(); if (isdouble == 0) { storeaway(this); }" data-zoom="' + iizoom + '" data-iframepos="' + huhrect.left + ',' + huhrect.top + '" data-geo="' + xlatdeg + ',' + xlongdeg + '" title="' + decodeURIComponent(lastr) + '" id=span' + spancount + ' style="font-style:bold;text-shadow:-1px 1px 1px #ff2d95;font-size:6px;margin:0 0 0 0;padding:0 0 0 0;z-index:2134;position:fixed;top:' + eval(eval('' + huhrect.top) + yif) + 'px;left:' + eval(eval('' + huhrect.left) + xif) + 'px;">x</span></span>';
spancount++;
setTimeout(nospan, 30000);
}
}
sofararealist+=itwo + '|';
var ars=zaconto.getElementsByTagName('area');
for (var iars=0; iars<ars.length; iars++) {
while (('' + ars[iars].getAttribute('data-iso2')) == itwo || sofararealist.indexOf('|' + ('' + ars[iars].getAttribute('data-iso2')) + '|') != -1) {
//document.title='' + iars + ' ... ' + ('' + ars[iars].getAttribute('data-iso2'));
zaconto.getElementsByTagName('table')[0].style.top='385px';
zaconto.getElementsByTagName('table')[0].style.left='0px';
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
zaconto.getElementsByTagName('h3')[0].style.marginTop='6px';
zaconto.getElementsByTagName('h3')[0].innerHTML+=" <button title='One click uses hover 2x zoom afterwards ... more for larger zoom ... right click for no zoom' oncontextmenu=' event.stopPropagation(); parent.setdefzoom(1); ' style=background-color:yellow; id=twoc onclick='event.stopPropagation(); parent.dotwoc();'>Circle of Interest via Next 2 Right Clicks</button> <button title='One click uses hover 2x zoom afterwards ... more for larger zoom ... right click for no zoom' oncontextmenu=' event.stopPropagation(); parent.setdefzoom(1); ' style=background-color:magenta; id=twoc onclick='event.stopPropagation(); parent.dotwor();'>Rectangle via 2 Right Clicks</button><div id=imgmore></div><div id=dvstyle>";
zaconto.body.oncontextmenu=function(event){ if (parent.getoneoftwo() == 0) { event=event; } else if (Math.abs(parent.getoneoftwo()) == 1) { event.stopPropagation(); parent.getxynow(event); if (parent.getoneoftwo() < 0) { parent.setoneoftwo(eval(-1 + eval('' + parent.getoneoftwo()))); } else { parent.setoneoftwo(eval(1 + eval('' + parent.getoneoftwo()))); } } else if (Math.abs(parent.getoneoftwo()) == 2) { event.stopPropagation(); parent.getxynow(event); if (1 == 3) { parent.overlayit(0); } } };
} else {
zaconto.getElementsByTagName('h3')[0].innerHTML+=" <button title='One click uses hover 2x zoom afterwards ... more for larger zoom ... right click for no zoom' oncontextmenu=' event.stopPropagation(); parent.setdefzoom(1); ' style=background-color:yellow; id=twoc onclick='event.stopPropagation(); parent.dotwoc();'>Circle of Interest via Next 2 Double Clicks</button> <button title='One click uses hover 2x zoom afterwards ... more for larger zoom ... right click for no zoom' oncontextmenu=' event.stopPropagation(); parent.setdefzoom(1); ' style=background-color:magenta; id=twoc onclick='event.stopPropagation(); parent.dotwor();'>Rectangle via 2 Double Clicks</button><div id=imgmore></div><div id=dvstyle>";
zaconto.body.ondblclick=function(event){ if (parent.getoneoftwo() == 0) { event=event; } else if (Math.abs(parent.getoneoftwo()) == 1) { event.stopPropagation(); parent.getxynow(event); if (parent.getoneoftwo() < 0) { parent.setoneoftwo(eval(-1 + eval('' + parent.getoneoftwo()))); } else { parent.setoneoftwo(eval(1 + eval('' + parent.getoneoftwo()))); } } else if (Math.abs(parent.getoneoftwo()) == 2) { event.stopPropagation(); parent.getxynow(event); if (1 == 3) { parent.overlayit(0); } } };
}

if (ars[iars].outerHTML.indexOf(' onclick="') != -1) {
//itwo=' ';
if (('' + ars[iars].getAttribute('data-iso2')) == itwo) {
sparear=ars[iars];
//document.title+=' ' + 'zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().substring(0,220);
if (9 == 9) {
//alert(11);
sparear.click();
//alert(1);
sparear.oncontextmenu=function(event){ event.stopPropagation(); event.preventDefault(); return parent.geojsonrightclick(event,iizoom,isdouble); };
//alert(111);
eval('zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().replace(/this\./g,'sparear.').replace(/this\,/g,'sparear,'));
} else {
eval('zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().replace(/this\./g,'sparear.').replace(/this\,/g,'sparear,'));
}
} else {
gsparear=ars[iars];
//document.title+=' ' + 'zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().substring(0,220);
if (9 == 9) {
//alert(911);
gsparear.click();
//alert(91);
gsparear.oncontextmenu=function(event){ event.stopPropagation(); event.preventDefault(); return parent.geojsonrightclick(event,iizoom,isdouble); };
//alert(9111);
eval('zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().replace(/this\./g,'gsparear.').replace(/this\,/g,'gsparear,'));
} else {
eval('zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().replace(/this\./g,'gsparear.').replace(/this\,/g,'gsparear,'));
}
}
}
iars++;
//itwo='';
}
if (sparear) { itwo=''; }
}
}
jjans=jjans.replace(/\ \ \ \ \ $/g,'');
if (!zoomdone) {
lastiizoom=iizoom;
zaconto.getElementById('mg').onmousedown=function(){ setTimeout(parent.rifcheck, 3000); return true; };
zaconto.getElementById('mg').ontouchdown=function(){ setTimeout(parent.rifcheck, 3000); return true; };
} else {
if (ziois.src.indexOf('refresh=') != -1) {
lastiizoom=iizoom;
zaconto.getElementById('mg').onmousedown=function(){ setTimeout(parent.rifcheck, 3000); return true; };
zaconto.getElementById('mg').ontouchdown=function(){ setTimeout(parent.rifcheck, 3000); return true; };
}
lastiizoom=sein(iizoom);
}
if (itwo == '') {
zaconto.getElementsByTagName('canvas')[0].dispatchEvent(new Event("click", {
bubbles: true, // only bubbles and cancelable
cancelable: true, // work in the Event constructor
clientX: xif,
clientY: yif
}));
if (1 == 2) {
if (zaconto.elementsFromPoint) {
var elements = zaconto.elementsFromPoint(xif, yif);
elements.forEach((elt, i) => {
if (i < elements.length - 1) {
zaconto.body.dispatchEvent(new Event("click", {
bubbles: true, // only bubbles and cancelable
cancelable: true, // work in the Event constructor
clientX: xif,
clientY: yif
}));
}
});
} else {
zaconto.elementFromPoint(xif, yif).click();
}
}
}
}
}
} catch(hgjgs) { }
}
jjans=jjans.replace(/\ \ \ \ \ $/g,'');
return true;
}


function rifcheck() {
var waszoom=1;
var xif=-999, yif=-999, xxif=-999, yyif=-999;
var xlatdeg=0, xlongdeg=0;
if (9 == 9) {
var iiizoom=lastiizoom;
if (document.getElementById('ifcountries').src.indexOf('zoom=') == -1 && document.getElementById('ifcountries').src.indexOf('refresh=') == -1) {
iiizoom=eval(2 * lastiizoom); //eval('' + zawconto.getzoom());
}
//alert('' + iiizoom + ' ' + lastiizoom + ' ' + document.getElementById('ifcountries').src);
//alert('' + iiizoom);
if (lastiizoom != iiizoom || (document.getElementById('ifcountries').src.indexOf('zoom=') != -1 && document.getElementById('ifcountries').src.indexOf('refresh=') != -1)) {
var isp=0;
var huhrect=document.getElementById('ifcountries').getBoundingClientRect();
//alert('2:' + document.getElementById('ifcountries').offsetLeft + ',' + document.getElementById('ifcountries').offsetTop);
var ospancount=spancount;
newone=eval(1 + spancount);
while (document.getElementById('span' + isp)) {
if (isp < ospancount) {
waszoom=document.getElementById('span' + isp).getAttribute('data-zoom');
if (waszoom != iiizoom) {
//alert(67);
xlatdeg=eval('' + document.getElementById('span' + isp).getAttribute('data-geo').split(',')[0]);
xlongdeg=eval('' + document.getElementById('span' + isp).getAttribute('data-geo').split(',')[1]);
//alert(167);
xxif=eval(iiizoom * eval(180 + eval('' + xlongdeg)));
yyif=eval(iiizoom * eval(90 - eval('' + xlatdeg)));
//alert(1167);
if (1 == 1) {
if (4 == 5) { alert(3786); }
document.getElementById('plots').innerHTML+='<span id=sspan' + spancount + '><span oncontextmenu="event.stopPropagation(); event.preventDefault(); if (isdouble == 0) { storeaway(this); }" data-zoom="' + iiizoom + '" data-iframepos="' + huhrect.left + ',' + huhrect.top + '" data-geo="' + xlatdeg + ',' + xlongdeg + '" title="' + decodeURIComponent(document.getElementById('span' + isp).title) + '" id=span' + spancount + ' style="font-style:bold;text-shadow:-1px 1px 1px #ff2d95;font-size:6px;margin:0 0 0 0;padding:0 0 0 0;z-index:2134;position:fixed;top:' + eval(eval('' + huhrect.top) + yyif) + 'px;left:' + eval(eval('' + huhrect.left) + xxif) + 'px;">x</span></span>';
nodiv(isp, spancount);
spancount++;
document.getElementById('span' + isp).style.display='none';
} else {
document.getElementById('span' + isp).style.top='' + eval(eval('' + huhrect.top) + yyif) + 'px';
document.getElementById('span' + isp).style.left='' + eval(eval('' + huhrect.left) + xxif) + 'px';
document.getElementById('span' + isp).setAttribute('data-zoom', '' + iiizoom);
document.getElementById('span' + isp).setAttribute('data-iframepos', '' + huhrect.left + ',' + huhrect.top);
document.getElementById('sspan' + isp).innerHTML=document.getElementById('span' + isp).outerHTML;
//alert(document.getElementById('sspan' + isp).innerHTML);
}
}
}
isp++;
}

lastiizoom=iiizoom;
if (document.getElementById('ifcountries').src.indexOf('zoom=') == -1 && document.getElementById('ifcountries').src.indexOf('refresh=') == -1) {
zoomword='zoom';
refreshword='refresh';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && document.getElementById('ifcountries').src.indexOf('?') != -1 && document.getElementById('ifcountries').src.indexOf('/countries.') != -1) {
zoomword='zoom';
refreshword='refresh';
document.getElementById('ifcountries').src+=lhit('#zoom=' + Math.max(lastiizoom,1) + '&refresh=' + Math.floor(Math.random() * 198767564));
} else {
document.getElementById('ifcountries').src='//www.rjmprogramming.com.au/HTMLCSS/countries.html?zoom=' + Math.max(lastiizoom,1) + '&refresh=' + Math.floor(Math.random() * 198767564);
}
} else {
//alert('There');
document.getElementById('more').style.left='' + eval(eval(360 * lastiizoom / 2) + eval('' + document.getElementById('more').style.left.replace('px',''))) + 'px';
var arstart=[], iars=0, iiars=0, kkfound=false;
var ars=zaconto.getElementsByTagName('area');
//alert('' + ars.length + ' ' + sofararealist);
for (iars=0; iars<ars.length; iars++) {
while (sofararealist.indexOf('|' + ('' + ars[iars].getAttribute('data-iso2')) + '|') != -1) {
if (ars[iars].outerHTML.indexOf(' onclick="') != -1) {
//document.title+=' ' + 'zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().substring(0,220);
if (9 == 9) {
//alert(11);
//ars[iars].click();
//alert(1);
arstart.push(('' + ars[iars].coords).substring(0,Math.min(100,('' + ars[iars].coords).length)));
//ars[iars].style.backgroundColor='orange';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
ars[iars].ondblclick=function(event){ event.stopPropagation(); event.preventDefault(); return parent.geojsonrightclick(event,iizoom,isdouble); };
} else {
ars[iars].oncontextmenu=function(event){ event.stopPropagation(); event.preventDefault(); return parent.geojsonrightclick(event,iizoom,isdouble); };
}
//alert(111);
//eval('zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().replace(/this\./g,'gsparear.').replace(/this\,/g,'gsparear,'));
} //else {
//eval('zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().replace(/this\./g,'gsparear.').replace(/this\,/g,'gsparear,'));
//}
}
iars++;
//itwo='';
}
//if (sparear) { itwo=''; }
}

if (arstart.length > 0) {
ars=zaconto.getElementsByTagName('div');
//alert('' + ars.length + ' ' + sofararealist);
for (iiars=0; iiars<arstart.length; iiars++) {
kkfound=false;
for (iars=0; iars<ars.length; iars++) {
if (!kkfound) {
if (('' + ars[iars].title).indexOf(arstart[iiars]) == 0) {
ars[iars].innerHTML=ars[iars].innerHTML.replace('lime','orange');
kkfound=true;
}
}
}
}

}


}
}
} else {
zifcheck(document.getElementById('ifcountries'));
}
return true;
}

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 isdf() {
console.log('nolineplease=' + nolineplease + ' and isdouble=' + isdouble);
isdouble=0;
blk='visible';
nolineplease=false;
}

function storeaway(thisspano) {
var lastspanoid=null;
if (lastspano) { lastspanoid='' + lastspano.id; }
if (('' + thisspano.id).indexOf('sspan') == 0) { thisspano=document.getElementById(('' + thisspano.id).replace('sspan','span')); }
if (('' + lastspanoid) != ('' + thisspano.id) && ('' + thisspano.id).indexOf('span') == 0) {
spanos.push(thisspano);
lastspano=thisspano;
thisspano.style.color='green';
if (thisspano.title.indexOf('Right click ') != -1) {
thisspano.innerHTML='🔴';
} else {
thisspano.innerHTML='❌';
}
if (eval('' + spanos.length) > 1 && !nolineplease) {
setTimeout(function(){ drawlinebetween(spanos[eval(-2 + spanos.length)], spanos[eval(-1 + spanos.length)]); }, 5000);
}
}
}

function drawlinebetween(spanoone, spanotwo) {
var xneeds=[], yneeds=[], classbit='';
if (nolineplease) { isdouble=0; nolineplease=false; return false; }
if (('' + spanoone.id).indexOf('sspan') == 0) { spanoone=document.getElementById(('' + spanoone.id).replace('sspan','span')); }
if (('' + spanotwo.id).indexOf('sspan') == 0) { spanotwo=document.getElementById(('' + spanotwo.id).replace('sspan','span')); }
if (('' + spanoone.id).indexOf('span') == 0 && ('' + spanotwo.id).indexOf('span') == 0) {
xneeds.push(eval('' + ('' + spanoone.style.left).replace('px','')));
yneeds.push(eval('' + ('' + spanoone.style.top).replace('px','')));
xneeds.push(eval('' + ('' + spanotwo.style.left).replace('px','')));
yneeds.push(eval('' + ('' + spanotwo.style.top).replace('px','')));
var divih='';
if (Math.min(xneeds[0],xneeds[1]) == xneeds[0] && Math.min(yneeds[0],yneeds[1]) == yneeds[1]) { // thanks to https://stackoverflow.com/questions/18012420/draw-diagonal-lines-in-div-background-with-css
classbit=' class="crossedtotl" ';
} else if (Math.min(xneeds[0],xneeds[1]) == xneeds[1] && Math.min(yneeds[0],yneeds[1]) == yneeds[0]) { // thanks to https://stackoverflow.com/questions/18012420/draw-diagonal-lines-in-div-background-with-css
classbit=' class="crossedtotl" ';
} else {
classbit=' class="crossedtotr" ';
}
if (classbit == ' class="crossedtotl" ') {
divih="<svg width='100%' height='100%' viewBox='0 0 100 100' preserveAspectRatio='none'><line x1=\"100\" y1=\"0\" x2=\"0\" y2=\"100\" vector-effect=\"non-scaling-stroke\" stroke=\"black\" /></svg>";
classbit='';
}
var fcl='';
var tcl='';
if (spanoone.title.indexOf('Right click ') != -1) {
spanoone.innerHTML='🔴';
fcl=' from your right click ';
} else {
spanoone.innerHTML='❌';
fcl=' from ' + spanoone.title + ' ';
}
if (spanotwo.title.indexOf('Right click ') != -1) {
spanotwo.innerHTML='🔴';
tcl=' to your right click ';
lastwo="//www.google.com/maps/dir/" + spanoone.getAttribute('data-geo') + "/" + spanotwo.getAttribute('data-geo') + "' + '#' + '" + 'Leg' + fcl + tcl + ' heads off at ' + great_circle_bearing(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1]) + ' degrees for ' + eval(eval('' + great_circle_distance(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1])) / 1000.0) + ' kilometers';
//document.getElementById('plots').innerHTML+='<div onclick="setTimeout(function(event){ if (event.target.title == event.target.title.trim()) { window.open(lastwo,' + "'_blank','left=20,top=20,width=1200,height=800'" + '); } event.target.title=event.target.title.trim(); }, 2000); " title="Leg' + fcl + tcl + ' heads off at ' + great_circle_bearing(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1]) + ' degrees for ' + eval(eval('' + great_circle_distance(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1])) / 1000.0) + ' kilometers ... click for Google Directions ... double click to toggle visibility" ondblclick=" this.title+=String.fromCharCode(32); event.stopPropagation(); event.preventDefault(); this.style.visibility=this.style.visibility.replace(' + "'visible','HIDDEN'" + ').replace(' + "'hidden','visible'" + ').replace(' + "'HIDDEN','hidden'" + '); " id=line_' + spanoone.id.split('span')[1] + '_' + spanotwo.id.split('span')[1] + ' ' + classbit + ' style="z-index:2134;margin:0 0 0 0;visibility:' + blk + ';padding:0 0 0 0;position:fixed;left:' + Math.min(xneeds[0],xneeds[1]) + 'px;top:' + Math.min(yneeds[0],yneeds[1]) + 'px;width:' + Math.abs(xneeds[0] - xneeds[1]) + 'px;height:' + Math.abs(yneeds[0] - yneeds[1]) + 'px;">' + divih + '</div>';
document.getElementById('plots').innerHTML+='<div onclick="owindowopen(' + "this,'//www.google.com/maps/dir/" + spanoone.getAttribute('data-geo') + "/" + spanotwo.getAttribute('data-geo') + "' + '#' + '" + 'Leg' + fcl + tcl + ' heads off at ' + great_circle_bearing(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1]) + ' degrees for ' + eval(eval('' + great_circle_distance(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1])) / 1000.0) + ' kilometers' + "','_blank','left=20,top=20,width=1200,height=800'" + ');" title="Leg' + fcl + tcl + ' heads off at ' + great_circle_bearing(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1]) + ' degrees for ' + eval(eval('' + great_circle_distance(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1])) / 1000.0) + ' kilometers ... click for Google Directions" ondblclick=" this.title+=String.fromCharCode(32); event.stopPropagation(); event.preventDefault(); this.style.visibility=this.style.visibility.replace(' + "'visible','HIDDEN'" + ').replace(' + "'hidden','visible'" + ').replace(' + "'HIDDEN','hidden'" + '); " id=line_' + spanoone.id.split('span')[1] + '_' + spanotwo.id.split('span')[1] + ' ' + classbit + ' style="z-index:2134;margin:0 0 0 0;padding:0 0 0 0;position:fixed;left:' + Math.min(xneeds[0],xneeds[1]) + 'px;top:' + Math.min(yneeds[0],yneeds[1]) + 'px;width:' + Math.abs(xneeds[0] - xneeds[1]) + 'px;height:' + Math.abs(yneeds[0] - yneeds[1]) + 'px;">' + divih + '</div>';
} else {
spanotwo.innerHTML='❌';
tcl=' to ' + spanotwo.title + ' ';
lastwo="//www.google.com/maps/dir/" + spanoone.getAttribute('data-geo') + "/" + spanotwo.getAttribute('data-geo') + "' + '#' + '" + 'Leg ' + fcl + tcl + ' heads off at ' + great_circle_bearing(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1]) + ' degrees for ' + eval(eval('' + great_circle_distance(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1])) / 1000.0) + ' kilometers';
//document.getElementById('plots').innerHTML+='<div onclick="setTimeout(function(event){ if (event.target.title == event.target.title.trim()) { window.open(lastwo,' + "'_blank','left=20,top=20,width=1200,height=800'" + '); } event.target.title=event.target.title.trim(); }, 2000); " title="Leg ' + fcl + tcl + ' heads off at ' + great_circle_bearing(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1]) + ' degrees for ' + eval(eval('' + great_circle_distance(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1])) / 1000.0) + ' kilometers ... click for Google Directions ... double click to toggle visibility" ondblclick=" this.title+=String.fromCharCode(32); event.stopPropagation(); event.preventDefault(); this.style.visibility=this.style.visibility.replace(' + "'visible','HIDDEN'" + ').replace(' + "'hidden','visible'" + ').replace(' + "'HIDDEN','hidden'" + '); " id=line_' + spanoone.id.split('span')[1] + '_' + spanotwo.id.split('span')[1] + ' ' + classbit + ' style="z-index:2134;margin:0 0 0 0;visibility:' + blk + ';padding:0 0 0 0;position:fixed;left:' + Math.min(xneeds[0],xneeds[1]) + 'px;top:' + Math.min(yneeds[0],yneeds[1]) + 'px;width:' + Math.abs(xneeds[0] - xneeds[1]) + 'px;height:' + Math.abs(yneeds[0] - yneeds[1]) + 'px;">' + divih + '</div>';
document.getElementById('plots').innerHTML+='<div onclick="owindowopen(' + "this,'//www.google.com/maps/dir/" + spanoone.getAttribute('data-geo') + "/" + spanotwo.getAttribute('data-geo') + "' + '#' + '" + 'Leg ' + fcl + tcl + ' heads off at ' + great_circle_bearing(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1]) + ' degrees for ' + eval(eval('' + great_circle_distance(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1])) / 1000.0) + ' kilometers' + "','_blank','left=20,top=20,width=1200,height=800'" + ');" title="Leg ' + fcl + tcl + ' heads off at ' + great_circle_bearing(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1]) + ' degrees for ' + eval(eval('' + great_circle_distance(spanoone.getAttribute('data-geo').split(',')[0], spanoone.getAttribute('data-geo').split(',')[1], spanotwo.getAttribute('data-geo').split(',')[0], spanotwo.getAttribute('data-geo').split(',')[1])) / 1000.0) + ' kilometers ... click for Google Directions" ondblclick=" this.title+=String.fromCharCode(32); event.stopPropagation(); event.preventDefault(); this.style.visibility=this.style.visibility.replace(' + "'visible','HIDDEN'" + ').replace(' + "'hidden','visible'" + ').replace(' + "'HIDDEN','hidden'" + '); " id=line_' + spanoone.id.split('span')[1] + '_' + spanotwo.id.split('span')[1] + ' ' + classbit + ' style="z-index:2134;margin:0 0 0 0;padding:0 0 0 0;position:fixed;left:' + Math.min(xneeds[0],xneeds[1]) + 'px;top:' + Math.min(yneeds[0],yneeds[1]) + 'px;width:' + Math.abs(xneeds[0] - xneeds[1]) + 'px;height:' + Math.abs(yneeds[0] - yneeds[1]) + 'px;">' + divih + '</div>';
}
}
return true;
}

function winopit() {
if (('' + document.getElementById(gdivid).title) == ('' + document.getElementById(gdivid).title).trim()) {
window.open(gw1,gw2,gw3);
}
document.getElementById(gdivid).title=('' + document.getElementById(gdivid).title).trim();
}

function owindowopen(odiv,w1,w2,w3) {
if (lastgdivid == '' + odiv.id) {
document.getElementById(gdivid).title+=String.fromCharCode(32);
document.getElementById(gdivid).style.visibility='hidden';
} else {
gdivid='' + odiv.id;
lastgdivid=gdivid;
gw1=w1;
gw2=w2;
gw3=w3;
setTimeout(winopit, 3000);
}
}

function zifcheck(zwiois) {
var waszoom=1;
var sparear=null;
var xif=-999, yif=-999, xxif=-999, yyif=-999;
var xlatdeg=0, xlongdeg=0;
var zawconto = (zwiois.contentWindow || zwiois.contentDocument);
if (!zawconto && zaconto) {
zawconto=zaconto;
}
//alert(11);
var zzawconto=zawconto;
if (zawconto != null) {
//alert('111 ' + zwiois.src);
if (zawconto.document) { zawconto = zawconto.document; }
//alert('1111 ' + zawconto.body.innerHTML);
if (zawconto.body.innerHTML.indexOf('>') != -1) {
var iiizoom=eval(eval('' + ('' + zawconto.getElementById('myimg').style.width).replace('px','')) / 360); //eval('' + zawconto.getzoom());
//alert('' + iiizoom);
//alert(eval('' + zawconto.getzoom()));
//alert(zawconto.getElementById('myimg').getBoundingClientRect().width);
if (lastiizoom != iiizoom) {
var isp=0;
var huhrect=document.getElementById('ifcountries').getBoundingClientRect();
//alert('3:' + document.getElementById('ifcountries').offsetLeft + ',' + document.getElementById('ifcountries').offsetTop);
var ospancount=spancount;
newone=eval(1 + spancount);
while (document.getElementById('span' + isp)) {
if (isp < ospancount) {
waszoom=document.getElementById('span' + isp).getAttribute('data-zoom');
if (waszoom != iiizoom) {
xlatdeg=eval('' + document.getElementById('span' + isp).getAttribute('data-geo').split(',')[0]);
xlongdeg=eval('' + document.getElementById('span' + isp).getAttribute('data-geo').split(',')[1]);
xxif=eval(iiizoom * eval(180 + eval('' + xlongdeg)));
yyif=eval(iiizoom * eval(90 - eval('' + xlatdeg)));
if (1 == 1) {
if (4 == 5) { alert(4786); }
document.getElementById('plots').innerHTML+='<span id=sspan' + spancount + '><span oncontextmenu="event.stopPropagation(); event.preventDefault(); if (isdouble == 0) { storeaway(this); }" data-zoom="' + iiizoom + '" data-iframepos="' + huhrect.left + ',' + huhrect.top + '" data-geo="' + xlatdeg + ',' + xlongdeg + '" title="' + decodeURIComponent(document.getElementById('span' + isp).title) + '" id=span' + spancount + ' style="font-style:bold;text-shadow:-1px 1px 1px #ff2d95;font-size:6px;margin:0 0 0 0;padding:0 0 0 0;z-index:2134;position:fixed;top:' + eval(eval('' + huhrect.top) + yyif) + 'px;left:' + eval(eval('' + huhrect.left) + xxif) + 'px;">x</span></span>';
nodiv(isp, spancount);
spancount++;
document.getElementById('span' + isp).style.display='none';
} else {
document.getElementById('span' + isp).style.top='' + eval(eval('' + huhrect.top) + yyif) + 'px';
document.getElementById('span' + isp).style.left='' + eval(eval('' + huhrect.left) + xxif) + 'px';
document.getElementById('span' + isp).setAttribute('data-zoom', '' + iiizoom);
document.getElementById('span' + isp).setAttribute('data-iframepos', '' + huhrect.left + ',' + huhrect.top);
document.getElementById('sspan' + isp).innerHTML=document.getElementById('span' + isp).outerHTML;
}
}
}
isp++;
}
lastiizoom=iiizoom;
}
}
}
}

function geojsonrightclick(ev,iiz,isd) {
pos3=-999;
pos4=-999;
if (ev.touches) {
if (ev.touches[0].pageX) {
pos3 = ev.touches[0].pageX;
pos4 = ev.touches[0].pageY;
} else {
pos3 = ev.touches[0].clientX;
pos4 = ev.touches[0].clientY;
}
console.log('pos3 = ' + pos3 + ',pos4 = ' + pos4);
} else if (ev.clientX || ev.clientY) {
pos3 = ev.clientX;
pos4 = ev.clientY;
console.log('pos3 = ' + pos3 + ' ,pos4 = ' + pos4);
} else {
pos3 = ev.pageX;
pos4 = ev.pageY;
console.log('pos3 = ' + pos3 + ', pos4 = ' + pos4);
}
if (pos3 >= 0 && pos4 >= 0) {
if (iiz < lastiizoom) { iiz=lastiizoom; }
xlatdeg=eval(90 - eval(eval('' + pos4) / iiz));
xlongdeg=eval(-180 + eval(eval('' + pos3) / iiz));
var huhrect=document.getElementById('ifcountries').getBoundingClientRect();
//alert('4:' + document.getElementById('ifcountries').offsetLeft + ',' + document.getElementById('ifcountries').offsetTop);
//alert(' ... second yay! ' + lastiizoom + ' vs ' + iiz + ' ' + ev.clientX + ',' + ev.clientY);
if (isdouble == 0) {
document.getElementById('plots').innerHTML+='<span id=sspan' + spancount + '><span oncontextmenu="event.stopPropagation(); event.preventDefault(); if (isdouble == 0) { storeaway(this); }" data-zoom="' + iiz + '" data-iframepos="' + huhrect.left + ',' + huhrect.top + '" data-geo="' + xlatdeg + ',' + xlongdeg + '" title="Right Click at ' + xlatdeg + ',' + xlongdeg + '" id=span' + spancount + ' style="font-style:bold;text-shadow:-1px 1px 1px #ff2d95;font-size:6px;margin:0 0 0 0;padding:0 0 0 0;z-index:2134;position:fixed;top:' + eval(eval('' + huhrect.top) + pos4) + 'px;left:' + eval(eval('' + huhrect.left) + pos3) + 'px;">❓</span></span>';
storeaway(document.getElementById('span' + spancount));
spancount++;
setTimeout(nospan, 30000);
isdouble=1;
//nolineplease=true;
blk='hidden';
setTimeout(isdf, 3000);
//alert('Nolineplease');
} else {
blk='hidden';
nolineplease=true;
//alert('nolineplease');
}
}
return false; //' ... second yay! ' + lastiizoom + ' vs ' + iiz + ' ' + e.clientX + ',' + e.clientY;
}

function ifcheck(ziois) {
var ourm=mobaccum;
var waszoom=1;
var sparear=null, gsparear=null;
var xif=-999, yif=-999, xxif=-999, yyif=-999;
var zioissrc=ziois.src.split('#')[0];
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && zaconto != null && locationhash != '') {
zaconto=zaconto;
zioissrc=ziois.src.split('#')[0] + ('#' + locationhash + '#' + location.hash).replace('##','&').replace('##','&').replace('#','&').replace('#','&');
} else {
zaconto = (ziois.contentWindow || ziois.contentDocument);
//alert(11);
}
zzaconto=zaconto;
if (zaconto != null) {
//alert('111 ' + xiois.src);
try {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && locationhash != '') {
zaconto=zaconto;
} else {
if (zaconto.document) { zaconto = zaconto.document; zzaconto=zaconto; }
}
//alert('1111 ' + zaconto.body.innerHTML);
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && locationhash != '') {
// alert(111);
//}
if (zaconto.body.innerHTML.indexOf('>') != -1) {
zoomdone=false;
lastiizoom=(zioissrc.indexOf('zoom=') != -1 ? eval(zioissrc.split('zoom=')[1].split('&')[0].split('#')[0]) : lastiizoom);
var itwo='';
if (document.getElementById('myp')) {
itwo=('' + document.getElementById('myp').getAttribute('data-fc')).replace(/^null/g,'').replace(/^undefined/g,'').trim().toUpperCase();
}
if (itwo == '' && lastcode != '') { itwo=lastcode; }
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && locationhash != '') {
// alert(itwo);
//}
if (eval('' + itwo.length) == 2 || (document.getElementById('placegeo').title + document.getElementById('placegeo').value).trim() != '') {
var xlatdeg=0, xlongdeg=0;
if ((document.getElementById('placegeo').title + document.getElementById('placegeo').value).indexOf(',') != -1) {
xlatdeg=eval('' + (document.getElementById('placegeo').title + document.getElementById('placegeo').value).split(',')[0]);
xlongdeg=eval('' + (document.getElementById('placegeo').title + document.getElementById('placegeo').value).split(',')[1]);
}
if (zioissrc.indexOf('refresh=') != -1 && zioissrc.indexOf('zoom=') != -1) {
iizoom=lastiizoom;
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && locationhash != '') {
zaconto=zaconto;
// alert('99');
} else if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
zaconto.getElementById('mg').style.visibility='hidden'; //zaconto.getElementById('mg').setAttribute('readonly', true);
zaconto.getElementById('mg').style.display='none';
} else {
zaconto.getElementById('mg').onmousedown=function(){ lastiizoom=eval(2 * lastiizoom); setTimeout(parent.rifcheck, 3000); return true; };
zaconto.getElementById('mg').ontouchdown=function(){ lastiizoom=eval(2 * lastiizoom); setTimeout(parent.rifcheck, 3000); return true; };
document.body.ontouchend=function(){ alert('heRe'); return true; };
}
setTimeout(rifcheck, 2000);
//alert('Where');
jjans=jjans.replace(/\ \ \ \ \ $/g,'');
if (locationhash == '' && !navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { return true; }
} else {
iizoom=eval(eval('' + ('' + zaconto.getElementById('myimg').style.width).replace('px','')) / 360); //eval('' + zaconto.getzoom());
}
xif=eval(iizoom * eval(180 + eval('' + xlongdeg)));
yif=eval(iizoom * eval(90 - eval('' + xlatdeg)));
//alert('' + xif + ',' + yif);
//alert(itwo);
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert(4987);
//}
var isp=0;
var jsp=0;
if (eval('' + itwo.length) == 2) {
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && locationhash != '') {
// alert(2);
//}
if (xif >= -180 && yif >= -90) {
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && locationhash != '') {
// alert(zioissrc);
//}
if (lastiizoom != iizoom || zioissrc.indexOf('refresh=') != -1) {
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && locationhash != '') {
// alert(222);
//}
var huhrect=document.getElementById('ifcountries').getBoundingClientRect();
//alert('5:' + document.getElementById('ifcountries').offsetLeft + ',' + document.getElementById('ifcountries').offsetTop);
var ospancount=spancount;
newone=eval(1 + spancount);
while (document.getElementById('span' + isp)) {
if (isp < ospancount) {
waszoom=document.getElementById('span' + isp).getAttribute('data-zoom');
if (waszoom != iizoom) {
xlatdeg=eval('' + document.getElementById('span' + isp).getAttribute('data-geo').split(',')[0]);
xlongdeg=eval('' + document.getElementById('span' + isp).getAttribute('data-geo').split(',')[1]);
xxif=eval(iizoom * eval(180 + eval('' + xlongdeg)));
yyif=eval(iizoom * eval(90 - eval('' + xlatdeg)));
if (1 == 1) {
if (4 == 5) { alert(5786); }
document.getElementById('plots').innerHTML+='<span id=sspan' + spancount + '><span oncontextmenu="event.stopPropagation(); event.preventDefault(); if (isdouble == 0) { storeaway(this); }" data-zoom="' + iiizoom + '" data-iframepos="' + huhrect.left + ',' + huhrect.top + '" data-geo="' + xlatdeg + ',' + xlongdeg + '" title="' + decodeURIComponent(document.getElementById('span' + isp).title) + '" id=span' + spancount + ' style="font-style:bold;text-shadow:-1px 1px 1px #ff2d95;font-size:6px;margin:0 0 0 0;padding:0 0 0 0;z-index:2134;position:fixed;top:' + eval(eval('' + huhrect.top) + yyif) + 'px;left:' + eval(eval('' + huhrect.left) + xxif) + 'px;">x</span></span>';
nodiv(isp, spancount);
spancount++;
jsp++;
document.getElementById('span' + isp).style.display='none';
} else {
document.getElementById('span' + isp).style.top='' + eval(eval('' + huhrect.top) + yyif) + 'px';
document.getElementById('span' + isp).style.left='' + eval(eval('' + huhrect.left) + xxif) + 'px';
document.getElementById('span' + isp).setAttribute('data-zoom', '' + iizoom);
document.getElementById('span' + isp).setAttribute('data-iframepos', '' + huhrect.left + ',' + huhrect.top);
document.getElementById('sspan' + isp).innerHTML=document.getElementById('span' + isp).outerHTML;
}
}
}
isp++;
}
}
spancount=eval(isp + jsp);
var dars=null, kkkfound=false, idars=0;
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('|' + jjans + '|vs|' + jjans.replace(/\ \ \ \ \ $/g,'') + '|');
//}
if (jjans == jjans.replace(/\ \ \ \ \ $/g,'')) {
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('huhyes|' + jjans + '|');
//}
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert(14987);
//}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//document.getElementById('plots').innerHTML+='<span id=sspan' + spancount + '><span ondblclick="event.stopPropagation(); event.preventDefault(); if (isdouble == 0) { storeaway(this); }" data-zoom="' + iizoom + '" data-iframepos="' + huhrect.left + ',' + huhrect.top + '" data-geo="' + xlatdeg + ',' + xlongdeg + '" title="' + decodeURIComponent(lastr) + '" id=span' + spancount + ' style="font-style:bold;text-shadow:-1px 1px 1px #ff2d95;font-size:6px;margin:0 0 0 0;padding:0 0 0 0;z-index:2134;position:fixed;top:' + eval(eval('' + huhrect.top) + yif) + 'px;left:' + eval(eval('' + huhrect.left) + xif) + 'px;">x</span></span>';
mobaccum+='<span id=sspan' + spancount + '><span ondblclick="event.stopPropagation(); event.preventDefault(); if (isdouble == 0) { storeaway(this); }" data-zoom="' + iizoom + '" data-iframepos="' + huhrect.left + ',' + huhrect.top + '" data-geo="' + xlatdeg + ',' + xlongdeg + '" title="' + decodeURIComponent(lastr) + '" id=span' + spancount + ' style="text-shadow:-1px 1px 1px #ff2d95;margin:0 0 0 0;padding:0 0 0 0;z-index:2135;position:fixed;font-size:6px;top:' + eval(eval('' + huhrect.top) * 0 + yif) + 'px;left:' + eval(eval('' + huhrect.left) * 0 + xif) + 'px;">❌</span></span>';
zaconto.body.innerHTML+=ourm + '<span id=sspan' + spancount + '><span ondblclick="event.stopPropagation(); event.preventDefault(); if (isdouble == 0) { storeaway(this); }" data-zoom="' + iizoom + '" data-iframepos="' + huhrect.left + ',' + huhrect.top + '" data-geo="' + xlatdeg + ',' + xlongdeg + '" title="' + decodeURIComponent(lastr) + '" id=span' + spancount + ' style="text-shadow:-1px 1px 1px #ff2d95;margin:0 0 0 0;padding:0 0 0 0;z-index:2135;position:fixed;font-size:6px;top:' + eval(eval('' + huhrect.top) * 0 + yif) + 'px;left:' + eval(eval('' + huhrect.left) * 0 + xif) + 'px;">❌</span></span>';
ourm='';
// alert('<span id=sspan' + spancount + '><span oncontextmenu="event.stopPropagation(); event.preventDefault(); if (isdouble == 0) { storeaway(this); }" data-zoom="' + iizoom + '" data-iframepos="' + huhrect.left + ',' + huhrect.top + '" data-geo="' + xlatdeg + ',' + xlongdeg + '" title="' + decodeURIComponent(lastr) + '" id=span' + spancount + ' style="font-style:bold;text-shadow:-1px 1px 1px #ff2d95;font-size:6px;margin:0 0 0 0;padding:0 0 0 0;z-index:2135;position:fixed;top:' + eval(eval('' + huhrect.top) + yif) + 'px;left:' + eval(eval('' + huhrect.left) + xif) + 'px;">❌</span></span>');
} else {
if (4 == 5) { alert(6786); }
document.getElementById('plots').innerHTML+='<span id=sspan' + spancount + '><span oncontextmenu="event.stopPropagation(); event.preventDefault(); if (isdouble == 0) { storeaway(this); }" data-zoom="' + iizoom + '" data-iframepos="' + huhrect.left + ',' + huhrect.top + '" data-geo="' + xlatdeg + ',' + xlongdeg + '" title="' + decodeURIComponent(lastr) + '" id=span' + spancount + ' style="font-style:bold;text-shadow:-1px 1px 1px #ff2d95;font-size:6px;margin:0 0 0 0;padding:0 0 0 0;z-index:2134;position:fixed;top:' + eval(eval('' + huhrect.top) + yif) + 'px;left:' + eval(eval('' + huhrect.left) + xif) + 'px;">x</span></span>';
}
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('<span id=sspan' + spancount + '><span oncontextmenu="event.stopPropagation(); event.preventDefault(); if (isdouble == 0) { storeaway(this); }" data-zoom="' + iizoom + '" data-iframepos="' + huhrect.left + ',' + huhrect.top + '" data-geo="' + xlatdeg + ',' + xlongdeg + '" title="' + decodeURIComponent(lastr) + '" id=span' + spancount + ' style="font-style:bold;text-shadow:-1px 1px 1px #ff2d95;font-size:6px;margin:0 0 0 0;padding:0 0 0 0;z-index:2134;position:fixed;top:' + eval(eval('' + huhrect.top) + yif) + 'px;left:' + eval(eval('' + huhrect.left) + xif) + 'px;">x</span></span>');
//}
spancount++;
//if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
setTimeout(nospan, 30000);
//}
}
}
sofararealist+=itwo + '|';
var ars=zaconto.getElementsByTagName('area');
for (var iars=0; iars<ars.length; iars++) {
kkkfound=false;
while (('' + ars[iars].getAttribute('data-iso2')) == itwo || sofararealist.indexOf('|' + ('' + ars[iars].getAttribute('data-iso2')) + '|') != -1) {
//document.title='' + iars + ' ... ' + ('' + ars[iars].getAttribute('data-iso2'));
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert(zaconto.body.innerHTML.split('<table')[1].substring(0,200));
//}
zaconto.getElementsByTagName('table')[0].style.top='385px';
zaconto.getElementsByTagName('table')[0].style.left='0px';
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
zaconto.getElementsByTagName('h3')[0].style.marginTop='6px';
zaconto.getElementsByTagName('h3')[0].innerHTML+=" <button title='One click uses hover 2x zoom afterwards ... more for larger zoom ... right click for no zoom' oncontextmenu=' event.stopPropagation(); parent.setdefzoom(1); ' style=background-color:yellow; id=twoc onclick='event.stopPropagation(); parent.dotwoc();'>Circle of Interest via Next 2 Right Clicks</button> <button title='One click uses hover 2x zoom afterwards ... more for larger zoom ... right click for no zoom' oncontextmenu=' event.stopPropagation(); parent.setdefzoom(1); ' style=background-color:magenta; id=twoc onclick='event.stopPropagation(); parent.dotwor();'>Rectangle via 2 Right Clicks</button><div id=imgmore></div><div id=dvstyle>";
zaconto.body.oncontextmenu=function(event){ if (parent.getoneoftwo() == 0) { event.event; } else if (Math.abs(parent.getoneoftwo()) == 1) { event.stopPropagation(); parent.getxynow(event); if (parent.getoneoftwo() < 0) { parent.setoneoftwo(eval(-1 + eval('' + parent.getoneoftwo()))); } else { parent.setoneoftwo(eval(1 + eval('' + parent.getoneoftwo()))); } } else if (Math.abs(parent.getoneoftwo()) == 2) { event.stopPropagation(); parent.getxynow(event); parent.overlayit(0); } };
} else {
zaconto.getElementsByTagName('h3')[0].innerHTML+=" <button title='One click uses hover 2x zoom afterwards ... more for larger zoom ... right click for no zoom' oncontextmenu=' event.stopPropagation(); parent.setdefzoom(1); ' style=background-color:yellow; id=twoc onclick='event.stopPropagation(); parent.dotwoc();'>Circle of Interest via Next 2 Double Clicks</button> <button title='One click uses hover 2x zoom afterwards ... more for larger zoom ... right click for no zoom' oncontextmenu=' event.stopPropagation(); parent.setdefzoom(1); ' style=background-color:magenta; id=twoc onclick='event.stopPropagation(); parent.dotwor();'>Rectangle via 2 Double Clicks</button><div id=imgmore></div><div id=dvstyle>";
zaconto.body.ondblclick=function(event){ if (parent.getoneoftwo() == 0) { event=event; } else if (Math.abs(parent.getoneoftwo()) == 1) { event.stopPropagation(); parent.getxynow(event); if (parent.getoneoftwo() < 0) { parent.setoneoftwo(eval(-1 + eval('' + parent.getoneoftwo()))); } else { parent.setoneoftwo(eval(1 + eval('' + parent.getoneoftwo()))); } } else if (Math.abs(parent.getoneoftwo()) == 2) { event.stopPropagation(); parent.getxynow(event); if (1 == 3) { parent.overlayit(0); } } };
}

//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert(1987);
//}
if (ars[iars].outerHTML.indexOf(' onclick="') != -1) {
//itwo=' ';
if (('' + ars[iars].getAttribute('data-iso2')) == itwo) {
sparear=ars[iars];
//document.title+=' ' + 'zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().substring(0,220);
if (9 == 9) {
//alert(11);
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert(sparear.outerHTML);
dars=zaconto.getElementsByTagName('div');
kkkfound=false;
//alert('' + ars.length + ' ' + sofararealist);
for (idars=0; idars<dars.length; idars++) {
if (!kkkfound) {
if (('' + dars[idars].title).indexOf(sparear.coords.substring(0,100)) == 0) {
dars[idars].innerHTML=dars[idars].innerHTML.replace('lime','orange');
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert(dars[idars].innerHTML);
//}
zaconto.getElementById('mg').style.visibility='hidden'; //zaconto.getElementById('mg').setAttribute('readonly', true);
zaconto.getElementById('mg').style.display='none';
kkkfound=true;
}
}
}
//}

//} else {
// alert(sparear.outerHTML);
}
sparear.click();
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//alert(sparear.outerHTML);
sparear.ondblclick=function(event){ event.stopPropagation(); event.preventDefault(); return parent.geojsonrightclick(event,iizoom,isdouble); };
//alert(sparear.outerHTML);
} else {
sparear.oncontextmenu=function(event){ event.stopPropagation(); event.preventDefault(); return parent.geojsonrightclick(event,iizoom,isdouble); };
}
//alert(111);
eval('zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().replace(/this\./g,'sparear.').replace(/this\,/g,'sparear,'));
} else {
eval('zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().replace(/this\./g,'sparear.').replace(/this\,/g,'sparear,'));
}
} else {
gsparear=ars[iars];
//document.title+=' ' + 'zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().substring(0,220);
if (9 == 9) {
//alert(911);
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert(gsparear.outerHTML);
//}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert(sparear.outerHTML);
dars=zaconto.getElementsByTagName('div');
kkkfound=false;
//alert('' + ars.length + ' ' + sofararealist);
for (idars=0; idars<dars.length; idars++) {
if (!kkkfound) {
if (('' + dars[idars].title).indexOf(gsparear.coords.substring(0,100)) == 0) {
dars[idars].innerHTML=dars[idars].innerHTML.replace('lime','orange');
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert(dars[idars].innerHTML);
//}
zaconto.getElementById('mg').style.visibility='hidden'; //zaconto.getElementById('mg').setAttribute('readonly', true);
zaconto.getElementById('mg').style.display='none';
kkkfound=true;
}
}
}
//}

}
gsparear.click();
//alert(91);
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
gsparear.ondblclick=function(event){ event.stopPropagation(); event.preventDefault(); return parent.geojsonrightclick(event,iizoom,isdouble); };
} else {
gsparear.oncontextmenu=function(event){ event.stopPropagation(); event.preventDefault(); return parent.geojsonrightclick(event,iizoom,isdouble); };
}
//alert(9111);
eval('zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().replace(/this\./g,'gsparear.').replace(/this\,/g,'gsparear,'));
} else {
eval('zzaconto.' + ars[iars].outerHTML.split(' onclick="')[1].split('"')[0].trim().replace(/this\./g,'gsparear.').replace(/this\,/g,'gsparear,'));
}
}
}
iars++;
//itwo='';
}
if (sparear) { itwo=''; }
}
}
jjans=jjans.replace(/\ \ \ \ \ $/g,'');
if (!zoomdone) {
lastiizoom=iizoom;
zaconto.getElementById('mg').onmousedown=function(){ setTimeout(parent.rifcheck, 3000); return true; };
zaconto.getElementById('mg').ontouchdown=function(){ setTimeout(parent.rifcheck, 3000); return true; };
//document.body.ontouchend=function(){ alert('hERe'); return true; };
} else {
if (zioissrc.indexOf('refresh=') != -1) {
lastiizoom=iizoom;
zaconto.getElementById('mg').onmousedown=function(){ setTimeout(parent.rifcheck, 3000); return true; };
zaconto.getElementById('mg').ontouchdown=function(){ setTimeout(parent.rifcheck, 3000); return true; };
//document.body.ontouchend=function(){ alert('heRE'); return true; };
}
lastiizoom=sein(iizoom);
}
if (itwo == '') {
zaconto.getElementsByTagName('canvas')[0].dispatchEvent(new Event("click", {
bubbles: true, // only bubbles and cancelable
cancelable: true, // work in the Event constructor
clientX: xif,
clientY: yif
}));
if (1 == 2) {
if (zaconto.elementsFromPoint) {
var elements = zaconto.elementsFromPoint(xif, yif);
elements.forEach((elt, i) => {
if (i < elements.length - 1) {
zaconto.body.dispatchEvent(new Event("click", {
bubbles: true, // only bubbles and cancelable
cancelable: true, // work in the Event constructor
clientX: xif,
clientY: yif
}));
}
});
} else {
zaconto.elementFromPoint(xif, yif).click();
}
}
}
}
}
} catch(hgjgs) { }
}
jjans=jjans.replace(/\ \ \ \ \ $/g,'');
return true;
}

function nodiv(wasid, newid) {
var divsoarr=document.getElementsByTagName('div');
for (var idivs=0; idivs<divsoarr.length; idivs++) {
if (('' + divsoarr[idivs].id).indexOf('line_' + wasid + '_') == 0) {
divsoarr[idivs].style.display='none';
spanos.push(document.getElementById('span' + newid));
//alert('here ' + wasid + ' ' + spanos.length + ' ' + newone);
if (eval('' + spanos.length) > newone) {
//alert('here2');
setTimeout(function(){ drawlinebetween(spanos[eval(-2 + spanos.length)], spanos[eval(-1 + spanos.length)]); }, 5000);
}
} else if (('' + divsoarr[idivs].id).indexOf('line_') == 0 && ('' + divsoarr[idivs].id + '~').indexOf('_' + wasid + '~') != -1) {
divsoarr[idivs].style.display='none';
spanos.push(document.getElementById('span' + newid));
//alert('there ' + wasid + ' ' + spanos.length + ' ' + newone);
if (eval('' + spanos.length) > newone) {
//alert('there2');
setTimeout(function(){ drawlinebetween(spanos[eval(-2 + spanos.length)], spanos[eval(-1 + spanos.length)]); }, 5000);
}
}
}
}

function coordit(xiois) {
var 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];
var 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) }

gextras='A - Airports Closest to (' + latdeg + ',' + longdeg + ')' + String.fromCharCode(10);
gextras+='S - Sun Angle at Noon at (' + latdeg + ',' + longdeg + ')' + String.fromCharCode(10);
gextras+='M - Moon Angle at (' + latdeg + ',' + longdeg + ')' + String.fromCharCode(10);
gextras+='C - Coriolis Effect at (' + latdeg + ',' + longdeg + ')' + String.fromCharCode(10);
gextras+='E - Google Earth at (' + latdeg + ',' + longdeg + ')' + String.fromCharCode(10);
gextras+='P - Ports Closest to (' + latdeg + ',' + longdeg + ')' + String.fromCharCode(10);
gextras+='O - Geo Chart at (' + latdeg + ',' + longdeg + ')' + String.fromCharCode(10);
if (storedsuffs.indexOf('~' + lpw(lastsuff) + '`' + gextras) == -1 && storedsuffs.indexOf('~' + lpw(lastsuff) + '`@') == -1) {
storedsuffs+='~' + lpw(lastsuff) + '`' + gextras + '@';
}
storedsuffs=storedsuffs.replace('~' + lpw(lastsuff) + '`@', '~' + lpw(lastsuff) + '`' + gextras + '@');
//if (window.opener) {
// window.opener.putgextras(gextras);
//} else if (window.parent) {
// parent.putgextras(gextras);
//}
return true;

}

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

function gevit() {

if (eval('' + ('' + gevtarget.id).length) == 3) {
lastcode=('' + gevtarget.id).substring(1);
lastplace=('' + gevtarget.innerHTML).substring(0);
lastcountry=('' + gevtarget.innerHTML).substring(0);
lastcountrycode=lastcode;
} else if (('' + gevtarget.id + ' ').substring(3).substring(0,1) == '-') {
lastcode=('' + gevtarget.id).substring(1);
if (lastcode.indexOf(lastcountrycode) == 1) {
lastplace=('' + gevtarget.innerHTML).substring(0) + (' (' + lastcountry + ')').replace(/\ \(\)/g, '');
} else {
lastplace=('' + gevtarget.innerHTML).substring(0); // + (' (' + lastcountry + ')').replace(/\ \(\)/g, '');
}
}
if (5 == 5 && eval('' + gevtarget.innerHTML.length) > 3 && gevtarget.outerHTML.indexOf('<a ') == 0) { // && gevtarget.innerHTML.indexOf('rjmprogramming.com.au') != -1) {
//alert('1:' + gevtarget.id);
console.log('1:' + gevtarget.innerHTML);
jall=0;
st=gevtarget.innerHTML;
selstuff='<button id=bremember ondblclick="event.stopPropagation(); document.getElementById(' + "'myp'" + ').innerHTML=' + "''" + '; sofar=' + "''" + '; sofardetail=' + "''" + '; remember();" onclick=remember(); style=background-color:lightgreen;>Remember<br><font size=1>(double click clears first)</font></button><br><br><select title="' + st + ' ' + orflag(lastcode.substring(0,2)) + '" style="font-weight:bold;" size=1 id=s' + ('' + gevtarget.id).substring(1) + ' multiple></select>';
selstuff=selstuff.replace('</select>', '<option data-title="' + st + '" ondblclick="event.stopPropagation(); selall();" id=opt1 style="font-size:12px;" title="' + ('' + gevtarget.id).substring(1) + '" value="' + ('' + gevtarget.id).substring(1) + '">' + gevtarget.innerHTML + '</option></select>');
for (iall=0; iall<allas.length; iall++) {
if (('' + allas[iall].id).indexOf('' + gevtarget.id) == 0 && ('' + allas[iall].id) != ('' + gevtarget.id)) {
selstuff=selstuff.replace('</select>', '<option data-title="' + st + '" ondblclick="event.stopPropagation(); selall();" title="' + ('' + allas[iall].id).substring(1) + '" value="' + ('' + allas[iall].id).substring(1) + '">' + allas[iall].innerHTML + '</option></select>');
jall++;
}
}
//if (jall > 34) { jall=1; }
if (document.getElementById('subrmore')) {
subrmbit='<br><br>' + document.getElementById('subrmore').outerHTML;
} else {
subrmbit='<br><br><span id="subrmore"></span>';
}
console.log('12:' + selstuff);
sp1.innerHTML = selstuff.replace(' size=1 ', ' size=' + jall + ' ').replace('</select>', '<option data-title="" title="" value=""></option></select>') + subrmbit;
if (isfixed == '') {
myr=sp1.getBoundingClientRect();
//isfixed=' style="position:fixed;top:' + myr.top + 'px;left:' + myr.left + 'px;" ';
isfixed=' style="position:sticky;top:' + eval(eval('' + myr.top) * 0) + 'px;left:' + myr.left + 'px;" ';
sp1.style.position='fixed'; //'fixed';
sp1.style.left='' + eval(40 + eval('' + document.getElementsByTagName('span')[0].getBoundingClientRect().right)) + 'px'; // myr.left
sp1.style.top='10px'; // myr.top
sp1.style.border='5px dotted yellow';

sp1.style.width='160px'; /* viewport width */
sp1.style.height='80%'; /* viewport height */
sp1.style.bottom='0px'; // myr.top
//sp1.style.minHeight='100%';
sp1.style.overflowY='scroll';
sp1.style.overflowX='hidden';

} else if (1 == 11) {
sp1.style.position='sticky'; //'fixed';
}
//setTimeout(function(){ location.href='#myheading'; }, 8000);
} else if (gevtarget.href.substring(0,1) != '#' && gevtarget.href.indexOf(document.URL + '#') == -1) {
if (gevtarget.innerHTML.indexOf(' (') != -1) {
sp1.innerHTML = '<a style="text-decoration:underline;cursor:pointer;" target=_blank title="Google search for ' + gevtarget.innerHTML + '" href="' + gp + gevtarget.innerHTML.split(' (')[0].replace(/\ /g,'+') + '+mountain' + '">' + gevtarget.innerHTML + '</a>';
} else if (gevtarget.href.indexOf('rjmprogramming.com.au') == -1) {
sp1.innerHTML = gevtarget.href;
}
} else if (gevtarget.outerHTML.split('>')[0].indexOf('http') != -1) {
sp1.innerHTML = '<a style="text-decoration:underline;cursor:pointer;" target=_blank title="Wikipedia page for highest mountains in ' + gevtarget.innerHTML + '" href="http' + gevtarget.outerHTML.split('>')[0].split('http')[1].split("'")[0].split('"')[0] + '"> in ' + gevtarget.innerHTML + '</a>';
}

}

function onl() { // thanks to https://coursesweb.net/javascript/queryselector-queryselectorall
var gp='https://www.google.com/search?q='; // Mount+Kenya&rlz=1C5CHFA_enAU832AU832&oq='; //Mount+Kenya
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('dstyle').innerHTML='<style> select { font-size: 12px; } </style>';
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
gp=gp;
document.getElementById('rmore').innerHTML='<select size=1 style=display:inline-block; id="language" title="Translations courtesy of Google Translate ... thanks" onmouseenter="event.stopProgagation();" onmousedown="event.stopProgagation();" onmouseover="event.stopProgagation();" onclick="event.stopProgagation();" onchange="olang=olangit(this.value);"><option value="">Translate to Language ...</option><option value="af">Afrikaans</option><option value="sq">Albanian</option><option value="am">Amharic ✨</option><option value="ar">Arabic</option><option value="hy">Armenian</option><option value="az">Azerbaijani</option><option value="eu">Basque</option><option value="be">Belarusian</option><option value="bn">Bengali ✨</option><option value="bs">Bosnian ✨</option><option value="bg">Bulgarian</option><option value="ca">Catalan</option><option value="ceb">Cebuano ✨</option><option value="zh-CN">Chinese (Simplified)</option><option value="zh-TW">Chinese (Traditional)</option><option value="co">Corsican ✨</option><option value="hr">Croatian</option><option value="cs">Czech</option><option value="da">Danish</option><option value="nl">Dutch</option><option value="en">English</option><option value="eo">Esperanto ✨</option><option value="et">Estonian</option><option value="fi">Finnish</option><option value="fr">French</option><option value="fy">Frisian ✨</option><option value="gl">Galician</option><option value="ka">Georgian</option><option value="de">German</option><option value="el">Greek</option><option value="gu">Gujarati ✨</option><option value="ht">Haitian Creole</option><option value="ha">Hausa ✨</option><option value="haw">Hawaiian ✨</option><option value="he">Hebrew</option><option value="hi">Hindi</option><option value="hmn">Hmong ✨</option><option value="hu">Hungarian</option><option value="is">Icelandic</option><option value="ig">Igbo ✨</option><option value="id">Indonesian</option><option value="ga">Irish</option><option value="it">Italian</option><option value="ja">Japanese</option><option value="jv">Javanese ✨</option><option value="kn">Kannada ✨</option><option value="kk">Kazakh ✨</option><option value="km">Khmer ✨</option><option value="rw">Kinyarwanda ✨</option><option value="ko">Korean</option><option value="ku">Kurdish ✨</option><option value="ky">Kyrgyz ✨</option><option value="lo">Lao ✨</option><option value="lv">Latvian</option><option value="lt">Lithuanian</option><option value="lb">Luxembourgish ✨</option><option value="mk">Macedonian</option><option value="mg">Malagasy ✨</option><option value="ms">Malay</option><option value="ml">Malayalam ✨</option><option value="mt">Maltese</option><option value="mi">Maori ✨</option><option value="mr">Marathi ✨</option><option value="mn">Mongolian ✨</option><option value="my">Myanmar (Burmese) ✨</option><option value="ne">Nepali ✨</option><option value="no">Norwegian</option><option value="ny">Nyanja (Chichewa) ✨</option><option value="or">Odia (Oriya) ✨</option><option value="ps">Pashto ✨</option><option value="fa">Persian</option><option value="pl">Polish</option><option value="pt">Portuguese (Portugal, Brazil)</option><option value="pa">Punjabi ✨</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sm">Samoan ✨</option><option value="gd">Scots Gaelic ✨</option><option value="sr">Serbian</option><option value="st">Sesotho ✨</option><option value="sn">Shona ✨</option><option value="sd">Sindhi ✨</option><option value="si">Sinhala (Sinhalese) ✨</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="so">Somali ✨</option><option value="es">Spanish</option><option value="su">Sundanese ✨</option><option value="sw">Swahili</option><option value="sv">Swedish</option><option value="tl">Tagalog (Filipino)</option><option value="tg">Tajik ✨</option><option value="ta">Tamil ✨</option><option value="tt">Tatar ✨</option><option value="te">Telugu ✨</option><option value="th">Thai</option><option value="tr">Turkish</option><option value="tk">Turkmen ✨</option><option value="uk">Ukrainian</option><option value="ur">Urdu</option><option value="ug">Uyghur ✨</option><option value="uz">Uzbek ✨</option><option value="vi">Vietnamese</option><option value="cy">Welsh</option><option value="xh">Xhosa ✨</option><option value="yi">Yiddish</option><option value="yo">Yoruba ✨</option><option value="zu">Zulu ✨</option></select>';
} else {
document.getElementById('rmore').innerHTML='<select size=1 style=display:inline-block; id="language" title="Translations courtesy of Google Translate ... thanks" onmouseenter="event.stopProgagation();" onmousedown="event.stopProgagation();" onmouseover="event.stopProgagation();" onclick="event.stopProgagation();" onchange="olang=olangit(this.value);"><option value="">Translate to Language ...</option><option value="af">Afrikaans</option><option value="sq">Albanian</option><option value="am">Amharic ✨</option><option value="ar">Arabic</option><option value="hy">Armenian</option><option value="az">Azerbaijani</option><option value="eu">Basque</option><option value="be">Belarusian</option><option value="bn">Bengali ✨</option><option value="bs">Bosnian ✨</option><option value="bg">Bulgarian</option><option value="ca">Catalan</option><option value="ceb">Cebuano ✨</option><option value="zh-CN">Chinese (Simplified)</option><option value="zh-TW">Chinese (Traditional)</option><option value="co">Corsican ✨</option><option value="hr">Croatian</option><option value="cs">Czech</option><option value="da">Danish</option><option value="nl">Dutch</option><option value="en">English</option><option value="eo">Esperanto ✨</option><option value="et">Estonian</option><option value="fi">Finnish</option><option value="fr">French</option><option value="fy">Frisian ✨</option><option value="gl">Galician</option><option value="ka">Georgian</option><option value="de">German</option><option value="el">Greek</option><option value="gu">Gujarati ✨</option><option value="ht">Haitian Creole</option><option value="ha">Hausa ✨</option><option value="haw">Hawaiian ✨</option><option value="he">Hebrew</option><option value="hi">Hindi</option><option value="hmn">Hmong ✨</option><option value="hu">Hungarian</option><option value="is">Icelandic</option><option value="ig">Igbo ✨</option><option value="id">Indonesian</option><option value="ga">Irish</option><option value="it">Italian</option><option value="ja">Japanese</option><option value="jv">Javanese ✨</option><option value="kn">Kannada ✨</option><option value="kk">Kazakh ✨</option><option value="km">Khmer ✨</option><option value="rw">Kinyarwanda ✨</option><option value="ko">Korean</option><option value="ku">Kurdish ✨</option><option value="ky">Kyrgyz ✨</option><option value="lo">Lao ✨</option><option value="lv">Latvian</option><option value="lt">Lithuanian</option><option value="lb">Luxembourgish ✨</option><option value="mk">Macedonian</option><option value="mg">Malagasy ✨</option><option value="ms">Malay</option><option value="ml">Malayalam ✨</option><option value="mt">Maltese</option><option value="mi">Maori ✨</option><option value="mr">Marathi ✨</option><option value="mn">Mongolian ✨</option><option value="my">Myanmar (Burmese) ✨</option><option value="ne">Nepali ✨</option><option value="no">Norwegian</option><option value="ny">Nyanja (Chichewa) ✨</option><option value="or">Odia (Oriya) ✨</option><option value="ps">Pashto ✨</option><option value="fa">Persian</option><option value="pl">Polish</option><option value="pt">Portuguese (Portugal, Brazil)</option><option value="pa">Punjabi ✨</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sm">Samoan ✨</option><option value="gd">Scots Gaelic ✨</option><option value="sr">Serbian</option><option value="st">Sesotho ✨</option><option value="sn">Shona ✨</option><option value="sd">Sindhi ✨</option><option value="si">Sinhala (Sinhalese) ✨</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="so">Somali ✨</option><option value="es">Spanish</option><option value="su">Sundanese ✨</option><option value="sw">Swahili</option><option value="sv">Swedish</option><option value="tl">Tagalog (Filipino)</option><option value="tg">Tajik ✨</option><option value="ta">Tamil ✨</option><option value="tt">Tatar ✨</option><option value="te">Telugu ✨</option><option value="th">Thai</option><option value="tr">Turkish</option><option value="tk">Turkmen ✨</option><option value="uk">Ukrainian</option><option value="ur">Urdu</option><option value="ug">Uyghur ✨</option><option value="uz">Uzbek ✨</option><option value="vi">Vietnamese</option><option value="cy">Welsh</option><option value="xh">Xhosa ✨</option><option value="yi">Yiddish</option><option value="yo">Yoruba ✨</option><option value="zu">Zulu ✨</option></select>';
document.getElementById('tdleft').style.backgroundImage="URL('./keyboard_choices.jpg')";
document.getElementById('tdleft').style.backgroundRepeat="no-repeat";
document.getElementById('tdleft').style.backgroundPosition="right top";
}
if (sp1 == null) { sp1 = document.getElementById('more'); }
allas=document.getElementsByTagName('a');

// gets A tags added in document.body
var xelms = document.body.querySelectorAll('a');
var nexttodo='A', inexttodo='🇦', nextih='                               ', ournext='';
var orignextih=nextih;
var newih='';

//registers mouseenter to each element in xelms array
nextih+=orignextih;
nextih+=orignextih;
newih=nextih;
for(var xi=0; xi<xelms.length; xi++){
if (eval(('' + xelms[xi].id).length) == 3) {
if (('' + xelms[xi].innerHTML).substring(0).substring(0,1) >= nexttodo) {
ournext=('' + xelms[xi].innerHTML).substring(0).substring(0,1)
//alert('nexttodo=' + nexttodo + ' andpleasedonotbeequalveryoften ournext=' + ournext + ' and ' + xelms[xi].id);
while (nexttodo < ournext) {
nextih+=' <a style="color:blue;z-index:786;text-shadow:-1px 1px 1px #2dff95;" href="#' + xelms[xi].id + '">' + inexttodo + '</a>';
nexttodo=String.fromCharCode(1 + nexttodo.charCodeAt(0));
inexttodo='&#' + eval(1 + eval('' + inexttodo.replace('&#','').replace(';',''))) + ';';
//alert('Nexttodo=' + nexttodo + ' and ournext=' + ournext + ' and ' + xelms[xi].id);
}
if (nexttodo <= 'Z') {
nextih+=' <a style="color:blue;z-index:786;text-shadow:-1px 1px 1px #2dff95;" href="#' + xelms[xi].id + '">' + inexttodo + '</a>';
nexttodo=String.fromCharCode(1 + nexttodo.charCodeAt(0));
inexttodo='&#' + eval(1 + eval('' + inexttodo.replace('&#','').replace(';',''))) + ';';
}
} //else {
//alert('no for nexttodo=' + nexttodo + ' and ournext=' + ournext + ' and ' + xelms[xi].id);
//}
}

xelms[xi].addEventListener('mouseenter', (ev)=>{
gev=ev;
gevtarget=ev.target;
if (9 == 19) {
setTimeout(gevit, 8000);
} else {
if (eval('' + ('' + ev.target.id).length) == 3) {
lastcode=('' + ev.target.id).substring(1);
lastplace=('' + ev.target.innerHTML).substring(0);
lastcountry=('' + ev.target.innerHTML).substring(0);
lastcountrycode=lastcode;
} else if (('' + ev.target.id + ' ').substring(3).substring(0,1) == '-') {
lastcode=('' + ev.target.id).substring(1);
if (lastcode.indexOf(lastcountrycode) == 1) {
lastplace=('' + ev.target.innerHTML).substring(0) + (' (' + lastcountry + ')').replace(/\ \(\)/g, '');
} else {
lastplace=('' + ev.target.innerHTML).substring(0); // + (' (' + lastcountry + ')').replace(/\ \(\)/g, '');
}
}
if (5 == 5 && eval('' + ev.target.innerHTML.length) > 3 && ev.target.outerHTML.indexOf('<a ') == 0) { // && ev.target.innerHTML.indexOf('rjmprogramming.com.au') != -1) {
//alert('1:' + ev.target.id);
console.log('2:' + ev.target.innerHTML);
jall=0;
st=ev.target.innerHTML;
selstuff='<button id=bremember ondblclick="event.stopPropagation(); document.getElementById(' + "'myp'" + ').innerHTML=' + "''" + '; sofar=' + "''" + '; sofardetail=' + "''" + '; remember();" onclick=remember(); style=background-color:lightgreen;>Remember<br><font size=1>(double click clears first)</font></button><br><br><select title="' + st + ' ' + orflag(lastcode.substring(0,2)) + '" style="font-weight:bold;" size=1 id=s' + ('' + ev.target.id).substring(1) + ' multiple></select>';
selstuff=selstuff.replace('</select>', '<option data-title="' + st + '" ondblclick="event.stopPropagation(); selall();" id=opt1 style="font-size:12px;" title="' + ('' + ev.target.id).substring(1) + '" value="' + ('' + ev.target.id).substring(1) + '">' + ev.target.innerHTML + '</option></select>');
for (iall=0; iall<allas.length; iall++) {
if (('' + allas[iall].id).indexOf('' + ev.target.id) == 0 && ('' + allas[iall].id) != ('' + ev.target.id)) {
selstuff=selstuff.replace('</select>', '<option data-title="' + st + '" ondblclick="event.stopPropagation(); selall();" title="' + ('' + allas[iall].id).substring(1) + '" value="' + ('' + allas[iall].id).substring(1) + '">' + allas[iall].innerHTML + '</option></select>');
jall++;
}
}
//if (jall > 34) { jall=1; }
if (document.getElementById('subrmore')) {
subrmbit='<br><br>' + document.getElementById('subrmore').outerHTML;
} else {
subrmbit='<br><br><span id="subrmore"></span>';
}
sp1.innerHTML = selstuff.replace(' size=1 ', ' size=' + jall + ' ').replace('</select>', '<option data-title="" title="" value=""></option></select>') + subrmbit;
if (isfixed == '') {
myr=sp1.getBoundingClientRect();
//isfixed=' style="position:fixed;top:' + myr.top + 'px;left:' + myr.left + 'px;" ';
isfixed=' style="position:sticky;top:' + eval(eval('' + myr.top) * 0) + 'px;left:' + myr.left + 'px;" ';
sp1.style.position='fixed'; //'fixed';
sp1.style.left='' + eval(40 + eval('' + document.getElementsByTagName('span')[0].getBoundingClientRect().right)) + 'px'; // myr.left
sp1.style.top='10px'; // myr.top
sp1.style.border='5px dotted yellow';

sp1.style.width='160px'; /* viewport width */
sp1.style.height='80%'; /* viewport height */
sp1.style.bottom='0px'; // myr.top
//sp1.style.minHeight='100%';
sp1.style.overflowY='scroll';
sp1.style.overflowX='hidden';

} else if (1 == 11) {
sp1.style.position='sticky'; //'fixed';
}
//setTimeout(function(){ location.href='#myheading'; }, 8000);
} else if (ev.target.href.substring(0,1) != '#' && ev.target.href.indexOf(document.URL + '#') == -1) {
if (ev.target.innerHTML.indexOf(' (') != -1) {
sp1.innerHTML = '<a style="text-decoration:underline;cursor:pointer;" target=_blank title="Google search for ' + ev.target.innerHTML + '" href="' + gp + ev.target.innerHTML.split(' (')[0].replace(/\ /g,'+') + '+mountain' + '">' + ev.target.innerHTML + '</a>';
} else if (ev.target.href.indexOf('rjmprogramming.com.au') == -1) {
sp1.innerHTML = ev.target.href;
}
} else if (ev.target.outerHTML.split('>')[0].indexOf('http') != -1) {
sp1.innerHTML = '<a style="text-decoration:underline;cursor:pointer;" target=_blank title="Wikipedia page for highest mountains in ' + ev.target.innerHTML + '" href="http' + ev.target.outerHTML.split('>')[0].split('http')[1].split("'")[0].split('"')[0] + '"> in ' + ev.target.innerHTML + '</a>';
}
}
});
}

if (nextih != '') {
nextih=nextih.replace('>F</a>', '>F</a>' + '<br>' + newih);
nextih=nextih.replace('>K</a>', '>K</a>' + '<br>' + newih);
nextih=nextih.replace('>P</a>', '>P</a>' + '<br>' + newih);
nextih=nextih.replace('>U</a>', '>U</a>' + '<br>' + newih);
nextih=nextih.replace('>🇫</a>', '>🇫</a>' + '<br>' + newih);
nextih=nextih.replace('>🇰</a>', '>🇰</a>' + '<br>' + newih);
nextih=nextih.replace('>🇵</a>', '>🇵</a>' + '<br>' + newih);
nextih=nextih.replace('>🇺</a>', '>🇺</a>' + '<br>' + newih);

if (document.getElementById('myh3').innerHTML == '') {
//document.getElementById('myh3').innerHTML=nextih + "<br>        &nb