Europe/Amsterdamoption value=\"Pacific/Fiji\" data-geo=\"-18.13334,178.41666,+12,FJ,+13\">Pacific/Fiji";
$lastcode='';
$lastcountrycode=' ';
$lastcountry='';
$lastplace='';
$screenheight='0';
// ;Continent;CC1|CC2|:blLAT,blLONG,trLAT,trLONG:width,height:scblX,scblY,sctrX,sctrY
$continfo=';Europe;IS|CY|:35.16666,-27.6,67.0,33.36666:468,450:422,560,890,140'; // 53 523
$continfo.=';Australia;AU|AU|:-44,113.65,-10.26667,161.28333:600,450:422,560,866,140';
$continfo.=';Asia;FI|WS|:-14,37,81,179.9:600,450:422,560,866,140';
$continfo.=';America;GS|US|:-56,-179.9,77,-35:600,450:422,560,866,140';
$continfo.=';Africa;TF||:-35,-17,37,52:600,450:422,560,890,140';
if (isset($_GET['nothing'])) {
exit;
} else if (isset($_GET['returnxytoparent']) || (isset($_POST['returnxytoparent']) && !isset($_POST['ix']))) {
if (isset($_GET['returnxytoparent'])) {
if (isset($_GET['screenheight'])) {
$screenheight=str_replace('+',' ',urldecode($_GET['screenheight']));
}
if (strpos(str_replace('+',' ',urldecode($_GET['returnxytoparent'])), '&chld=') !== false && strpos(str_replace('+',' ',urldecode($_GET['returnxytoparent'])), '&chld=&') === false) {
$lastcountrycode=strtoupper(substr(explode('&chld=', str_replace('+',' ',urldecode($_GET['returnxytoparent'])))[1],0,2));
for ($ihuh=0; $ihuh
var oneoftwo=0, xinxy=[], yinxy=[], opis='1.0', ovnum=1, defzoom=2;
var x=0, y=0, isclear=true;
var xs=10, ys=10, lastsuff='';
var storedsuffs='|';
var screenheight=('" . $screenheight . "' == '0' ? eval('' + screen.height) : eval('' + '" . $screenheight . "'));
var elem=null, context=null;
var origtitle='Optionally click in relevant region for menu';
var ourccd='" . $ourccd . "';
var lastcode='" . $lastcode . "';
var lastplace='" . $lastplace . "';
var lastcountry='" . $lastcountry . "';
var lastcountrycode='" . $lastcountrycode . "';
var gextras='', grcodeis='', gerdescis='', grdescis='';
var myxhr=null;
var blurbone=', where if you click on orange country more functionality available ', zaconto=null, zzaconto=null;
var blurbtwo=', where if you click on orange country more functionality available (change value from No Trip Planning to retain red x placement elements which you can right click to form trip legs, where double click on legs can simulate pen ups)';
var lastgdivid=' ', gdivid='', gw1='', gw2='', gw3='';
var pos3=-999, pos4=-999, blk='hidden';
var isdouble=0, nolineplease=false;
var sofararealist='|';
var nextv='hidden';
var lastspano=null, spanos=[], newone=99999999;
var lastr='';
var refreshword='rand';
var zoomword='zorro';
var iizoom=1, lastiizoom=0, zoomdone=false;
var spancount=0, jjans='No Trip Planning';
var dbwo=null, woit=false, woito=null, isfixed='', twomw='';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || 9 == 19) {
blurbone='';
blurbtwo='';
}
function tryit() {
if (window.opener) {
window.opener.tryit();
} else if (window.top != window.self) {
top.tryit();
}
}
function StringfromCharCode(howmany) {
var prefixer='';
for (var ijk=0; ijk -91 && gextras.indexOf(' (') != -1) { // Airports
window.open('//www.rjmprogramming.com.au/HTMLCSS/intair.php?num=3&lat=' + latdeg + '&long=' + longdeg + '&spawn=' + encodeURIComponent('//www.rjmprogramming.com.au/PHP/Map/map.php?title=' + maybenot(document.getElementById('myp').getAttribute('data-fc').toUpperCase(),rdescis) + ';' + encodeURIComponent(rdescis) + '%' + '20and%' + '20Airports&onclick=y&justmenu=y&label=[%' + '27Lat%' + '27,&value=%' + '27Lon%' + '27,%' + '27Name%' + '27]&data=,' + '[' + latdeg + ',' + longdeg + ',~' + encodeURIComponent(rdescis).replace(/\-/g,'%' + '2d').replace(/\#/g,'%' + '23') + '~]'),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'P' && latdeg >= -91 && gextras.indexOf(' (') != -1) { // Ports
window.open('//www.rjmprogramming.com.au/HTMLCSS/intair.php?num=4&lat=' + latdeg + '&long=' + longdeg + '&port=y&spawn=' + encodeURIComponent('//www.rjmprogramming.com.au/PHP/Map/map.php?title=' + maybenot(document.getElementById('myp').getAttribute('data-fc').toUpperCase(),rdescis) + ';' + encodeURIComponent(rdescis) + '%' + '20and%' + '20Ports&onclick=y&justmenu=y&label=[%' + '27Lat%' + '27,&value=%' + '27Lon%' + '27,%' + '27Name%' + '27]&data=,' + '[' + latdeg + ',' + longdeg + ',~' + encodeURIComponent(rdescis).replace(/\-/g,'%' + '2d').replace(/\#/g,'%' + '23') + '~]'),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'S' && latdeg > -91 && gextras.indexOf(' (') != -1) { // Sun Angle
window.open('//www.rjmprogramming.com.au/PHP/SunAngle/sun_angle_now_at.php?latd=' + ('' + latdeg).split('.')[0] + '&latm=' + Math.round(eval(eval('0.' + ('' + latdeg + '.0').split('.')[1]) * 60)) + '&lats=0&longd=' + ('' + longdeg).split('.')[0] + '&longm=' + Math.round(eval(eval('0.' + ('' + longdeg + '.0').split('.')[1]) * 60)) + '&longs=0&from=from&done=y','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'M' && latdeg > -91 && gextras.indexOf(' (') != -1) { // Moon Angle
window.open('//www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?latd=' + ('' + latdeg).split('.')[0] + '&latm=' + Math.round(eval(eval('0.' + ('' + latdeg + '.0').split('.')[1]) * 60)) + '&lats=0&longd=' + ('' + longdeg).split('.')[0] + '&longm=' + Math.round(eval(eval('0.' + ('' + longdeg + '.0').split('.')[1]) * 60)) + '&longs=0&from=from&done=y','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'C' && latdeg > -91 && gextras.indexOf(' (') != -1) { // Coriolis Effect
window.open('//www.rjmprogramming.com.au/PHP/Coriolis/coriolis_force_at.php?latd=' + ('' + latdeg).split('.')[0] + '&latm=' + Math.round(eval(eval('0.' + ('' + latdeg + '.0').split('.')[1]) * 60)) + '&lats=0&longd=' + ('' + longdeg).split('.')[0] + '&longm=' + Math.round(eval(eval('0.' + ('' + longdeg + '.0').split('.')[1]) * 60)) + '&longs=0&from=from&done=y','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'E' && latdeg > -91 && gextras.indexOf(' (') != -1) { // Google Earth
window.open('//earth.google.com/web/@' + ('+' + latdeg).replace('+-','-') + (',+' + longdeg).replace('+-','-') + ',328.51120179a,63169669.71505167d,1y,0h,0t,0r','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'O' && latdeg > -91 && gextras.indexOf(' (') != -1) { // Geo Chart
window.open('//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php' + '?title=' + maybenot(document.getElementById('myp').getAttribute('data-fc').toUpperCase(),rdescis) + ';' + encodeURIComponent(rdescis).replace(/\-/g,'%' + '2d').replace(/\#/g,'%' + '23') + '&aregexographicals=y&aregeographicals=&width=500&height=312&onclick=y&country=Places&popularity=&data=%20[' + latdeg + '|' + longdeg + '|~' + encodeURIComponent(rdescis).replace(/\-/g,'%' + '2d').replace(/\#/g,'%' + '23') + '~,2]','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'J' && eval(('' + document.getElementById('myp').getAttribute('data-fc')).length) == 2) { // GeoJSON
//window.open('//www.rjmprogramming.com.au/HTMLCSS/countries.html','ifcountries','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
//alert(1);
twomw=document.getElementById('myp').getAttribute('data-fc').substring(0,2).toUpperCase();
document.getElementById('placegeo').value='' + latdeg + ',' + longdeg;
document.getElementById('placegeo').title='';
if ((latdeg < -990 && longdeg < -990) || gextras.trim() == '') {
jjans=jjans + ' ';
}
//alert(11);
if (sofararealist.indexOf('|' + ('' + twomw.substring(0,2).toUpperCase() + ' ').toUpperCase().substring(0,2).trim() + '|') == -1) {
sofararealist+=('' + twomw.substring(0,2).toUpperCase() + ' ').toUpperCase().substring(0,2).trim() + '|';
}
//alert(111);
//document.getElementById('ifcountries').src='//www.rjmprogramming.com.au/HTMLCSS/countries.html?' + (Math.max(lastiizoom,1) == 1 ? zoomword + '=' + Math.max(lastiizoom,1) : 'zoom=' + Math.max(lastiizoom,1)) + '&' + refreshword + '=' + Math.floor(Math.random() * 198767564);
//document.getElementById('ifcountries').src='//www.rjmprogramming.com.au/HTMLCSS/countries.html?' + (Math.max(lastiizoom,1) == 1 ? zoomword + '=' + Math.max(lastiizoom,1) : 'zoom=' + Math.max(lastiizoom,1)) + '&' + refreshword + '=' + Math.floor(Math.random() * 198767564);
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) {
document.getElementById('placegeo').value='';
document.getElementById('placegeo').title='' + latdeg + ',' + longdeg;
sofararealist+=('' + lastcode + ' ').toUpperCase().substring(0,2).trim() + '|';
zoomword='zoom';
refreshword='refresh';
document.getElementById('ifcountries').src+=lhit('#' + (Math.max(lastiizoom,1) == 1 ? zoomword + '=' + Math.max(lastiizoom,1) : 'zoom=' + Math.max(lastiizoom,1)) + '&' + refreshword + '=' + Math.floor(Math.random() * 198767564));
} else {
document.getElementById('ifcountries').src='//www.rjmprogramming.com.au/HTMLCSS/countries.html?' + (Math.max(lastiizoom,1) == 1 ? zoomword + '=' + Math.max(lastiizoom,1) : 'zoom=' + Math.max(lastiizoom,1)) + '&' + refreshword + '=' + Math.floor(Math.random() * 198767564);
}
lastr=rdescis;
//alert(1111);
if ((latdeg < -990 && longdeg < -990) || blurbone == '') {
if (confirm('Taking you to ' + decodeURIComponent(rdescis) + ' on world map now' + blurbone + ' ...')) {
document.getElementById('ifcountries').style.display='block';
//document.getElementById('more').style.display='none';
location.href='#ifcountries';
}
} else {
//alert(11111);
jjans=jjans.replace(/\ \ \ \ \ $/g,'');
jjans=prompt('Taking you to ' + decodeURIComponent(rdescis) + ' on world map now' + blurbtwo + ' ...', '' + jjans);
if (jjans != null) {
//alert(11111);
document.getElementById('ifcountries').style.display='block';
//document.getElementById('more').style.display='none';
location.href='#ifcountries';
}
}
} // new
//}
}
function okd(e){
var charx = e.which || e.keyCode;
var latdeg=-999, longdeg=-999;
if (gextras.indexOf(' (') != -1) {
if (gextras.split('t to (')[1].split(')')[0].indexOf(',') != -1) {
latdeg=eval('' + gextras.split('t to (')[1].split(')')[0].split(',')[0]);
longdeg=eval('' + gextras.split('t to (')[1].split(')')[0].split(',')[1]);
}
} else if (storedsuffs.indexOf('~' + lpw(lastplace) + '`') != -1 && storedsuffs.indexOf('~' + lpw(lastplace) + '`|') == -1) {
gextras=storedsuffs.split('~' + lpw(lastplace) + '`')[1].split('`')[0].split('~')[0]; //.split('|')[0];
if (gextras.split(' (')[1].split(')')[0].indexOf(',') != -1) {
latdeg=eval('' + gextras.split(' (')[1].split(')')[0].split(',')[0]);
longdeg=eval('' + gextras.split(' (')[1].split(')')[0].split(',')[1]);
}
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
charx=charx;
} else if (('' + e.keyCode) == '87') { // Wikipedia
menuize('W');
} else if (('' + e.keyCode) == '89') { // YouTube
menuize('Y');
} else if (('' + e.keyCode) == '84') { // TimeZone tz_places.php
menuize('T');
} else if (('' + e.keyCode) == '71') { // Google
menuize('G');
} else if (latdeg > -91) {
if (('' + e.keyCode) == '65') { // Airports
menuize('A');
} else if (('' + e.keyCode) == '83') { // Sun Angle
menuize('S');
} else if (('' + e.keyCode) == '77') { // Moon Angle
menuize('M');
} else if (('' + e.keyCode) == '80') { // Ports
menuize('P');
} else if (('' + e.keyCode) == '67') { // Coriolis
menuize('C');
} else if (('' + e.keyCode) == '69') { // Google Earth
menuize('E');
} else if (('' + e.keyCode) == '79') { // Geo Chart
menuize('O');
}
//} else if (('' + e.keyCode) == '65') { // Airports
//alert('storedsuffs=' + storedsuffs + ' and lastplace=' + lastplace);
}
return true;
}
function doslptc(cnameis, ccodeis) {
lastcode=ccodeis;
lastplace=cnameis;
if (('' + ccodeis + ' ').substring(2).substring(0,1) == '-') {
lastcountrycode=ccodeis.substring(0,2).toUpperCase();
} else if (eval('' + ccodeis.length) == 2) {
lastcountrycode=ccodeis.toUpperCase();
}
if (cnameis.indexOf(' (') != -1 && cnameis.replace(/\ /g,'').indexOf('()') == -1) {
lastcountry=cnameis.split(' (')[1].split(')')[0];
}
if (window.opener) {
window.opener.slptc(cnameis, ccodeis);
} else if (window.parent) {
parent.slptc(cnameis, ccodeis);
}
return cnameis;
}
function pax(sxis) {
if (window.opener) {
window.opener.sxiss(sxis);
} else if (window.parent) {
parent.sxiss(sxis);
}
return sxis;
}
function paa(syis) {
if (window.opener) {
window.opener.syiss(syis);
} else if (window.parent) {
parent.syiss(syis);
}
return syis;
}
function rgbToHex(r, g, b) { // thanks to https://stackoverflow.com/questions/6735470/get-pixel-color-from-canvas-on-mousemove
if (r > 255 || g > 255 || b > 255)
throw 'Invalid color component';
return ((r << 16) | (g << 8) | b).toString(16);
}
function filloutform(e,isclick) {
var p='', hex='', myid='';
var browserZoomLevel = Math.round(window.devicePixelRatio * 100);
browserZoomLevel=1;
e = e || window.event;
e.preventDefault();
if (e.touches) {
if (e.touches[0].pageX) {
//document.getElementById('myspan').innerHTML+='
1:' + e.touches[0].pageY + ' ' + browserZoomLevel + ' ' + document.body.scrollTop;
x = eval(e.touches[0].pageX + document.body.scrollLeft) * browserZoomLevel;
y = eval(e.touches[0].pageY + document.body.scrollTop) * browserZoomLevel;
xs = pax(e.touches[0].screenX);
ys = paa(e.touches[0].screenY);
} else {
//document.getElementById('myspan').innerHTML+='
' + '2:' + e.touches[0].clientY + ' ' + browserZoomLevel + ' ' + document.body.scrollTop;
x = eval(e.touches[0].clientX + document.body.scrollLeft) * browserZoomLevel;
y = eval(e.touches[0].clientY + document.body.scrollTop) * browserZoomLevel;
xs = pax(e.touches[0].screenX);
ys = paa(e.touches[0].screenY);
}
console.log('pos3=' + pos3 + ',pos4=' + pos4);
} else if (e.clientX || e.clientY) {
//document.getElementById('myspan').innerHTML+='
' + '3:' + e.clientY + ' ' + browserZoomLevel + ' ' + document.body.scrollTop;
x = e.clientX + document.body.scrollLeft;
y = e.clientY + document.body.scrollTop;
xs = pax(e.screenX);
ys = paa(e.screenY);
} else {
//document.getElementById('myspan').innerHTML+='
' + '4:' + e.pageY + ' ' + browserZoomLevel + ' ' + document.body.scrollTop;
x = e.pageX + document.body.scrollLeft;
x = e.pageY + document.body.scrollTop;
xs = pax(e.screenX);
ys = paa(e.screenY);
}
console.log('xs=' + xs + ' and ys=' + ys);
if (eval('' + x) > 2 && eval('' + y) > 2) {
document.getElementById('ix').value='' + x;
document.getElementById('iy').value='' + y;
if (document.getElementById('imode').value == 'click' && isclick != 0) {
document.getElementById('imode').value='click';
if (!context) { thisonl(); }
p = context.getImageData(x, y, 1, 1).data;
hex = ('#' + ('000000' + rgbToHex(p[0], p[1], p[2])).slice(-6)).toUpperCase();
document.getElementById('moimode').value='mouseover';
myid='';
if (document.getElementById('myp').innerHTML.indexOf(hex) != -1) {
myid=document.getElementById('myp').innerHTML.split(hex)[0].split(' id=\"')[eval(-1 + document.getElementById('myp').innerHTML.split(hex)[0].split(' id=\"').length)].split('\"')[0];
document.getElementById('ici').title=doslptc(document.getElementById(myid).title, myid.substring(1));
document.getElementById(myid).click();
} else if (document.getElementById('myp').innerHTML.indexOf(hex.toLowerCase()) != -1) {
myid=document.getElementById('myp').innerHTML.split(hex.toLowerCase())[0].split(' id=\"')[eval(-1 + document.getElementById('myp').innerHTML.split(hex.toLowerCase())[0].split(' id=\"').length)].split('\"')[0];
//document.title='x=' + x + ' and y=' + y + ' ' + hex;
document.getElementById('ici').title=doslptc(document.getElementById(myid).title, myid.substring(1));
document.getElementById(myid).click();
} else if (hex.toUpperCase() != '#D0D0D0' && hex.toUpperCase() != '#FFFFFF' && hex.toUpperCase() != '#000000' && hex.toUpperCase() != '#B3BCC0' && hex.toUpperCase() != '#BCBCBC') {
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('origtitle=' + origtitle + ' and ' + document.getElementById('ici').title + ' and hex=' + hex);
//}
if (document.getElementById('ici').title != origtitle) {
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//document.getElementById('blastcol').click();
// document.getElementById('myform').submit();
//} else {
gmenu('', document.getElementById('ici').title);
//}
} else {
//document.getElementById('blastcol').click();
document.getElementById('myform').submit();
}
}
} else {
document.getElementById('moix').value='' + x;
document.getElementById('moiy').value='' + y;
if (!context) { thisonl(); }
p = context.getImageData(x, y, 1, 1).data;
hex = ('#' + ('000000' + rgbToHex(p[0], p[1], p[2])).slice(-6)).toUpperCase();
document.getElementById('moimode').value='mouseover';
myid='';
if (document.getElementById('myp').innerHTML.indexOf(hex) != -1) {
myid=document.getElementById('myp').innerHTML.split(hex)[0].split(' id=\"')[eval(-1 + document.getElementById('myp').innerHTML.split(hex)[0].split(' id=\"').length)].split('\"')[0];
document.getElementById('ici').title=doslptc(document.getElementById(myid).title, myid.substring(1));
} else if (document.getElementById('myp').innerHTML.indexOf(hex.toLowerCase()) != -1) {
myid=document.getElementById('myp').innerHTML.split(hex.toLowerCase())[0].split(' id=\"')[eval(-1 + document.getElementById('myp').innerHTML.split(hex.toLowerCase())[0].split(' id=\"').length)].split('\"')[0];
//document.title='x=' + x + ' and y=' + y + ' ' + hex;
document.getElementById('ici').title=doslptc(document.getElementById(myid).title, myid.substring(1));
} else if (document.getElementById('ici').title == origtitle) {
//document.getElementById('moblastcol').click();
document.getElementById('myformmo').submit();
}
}
}
}
function latergmenu() {
var rcodeis=grcodeis;
var erdescis=gerdescis;
var rdescis=decodeURIComponent(erdescis);
var latdeg=-999, longdeg=-999;
document.getElementById('ici').style.cursor='pointer';
if (document.getElementById('placegeo').value.indexOf(',') != -1) {
console.log('placegeo=' + document.getElementById('placegeo').value);
latdeg=document.getElementById('placegeo').value.split(',')[0];
longdeg=document.getElementById('placegeo').value.split(',')[1];
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);
gextras='A - Airports Closest to (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')' + StringfromCharCode(2);
gextras+='S - Sun Angle at Noon at (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')' + String.fromCharCode(10);
gextras+='M - Moon Angle at (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')' + StringfromCharCode(9);
gextras+='C - Coriolis Effect at (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')' + String.fromCharCode(10);
gextras+='E - Google Earth at (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')' + StringfromCharCode(8);
gextras+='P - Ports Closest to (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')' + String.fromCharCode(10);
gextras+='O - Geo Chart at (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')';
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, rdescis);
} else if (window.parent) {
parent.putgextras(gextras, rdescis);
}
document.getElementById('placegeo').value='';
} else if (document.getElementById('placegeo').value == ' ') {
gextras='';
if (window.opener) {
window.opener.putgextras(gextras, rdescis);
} else if (window.parent) {
parent.putgextras(gextras, rdescis);
}
}
if (rdescis != lastplace && lastplace.trim() != '') { rdescis=lastplace; }
if ((1 == 1 || rcodeis.trim()) != '' && rdescis.trim() != '') {
if (gextras.trim() == '' && storedsuffs.indexOf('~' + lpw(rdescis) + '`') != -1) {
gextras=storedsuffs.split('~' + lpw(rdescis) + '`')[1].split('`')[0].split('~')[0]; //.split('|')[0];
}
var rans=null; //prompt('What do you want to do with region ' + rdescis + '? ' + String.fromCharCode(10) + String.fromCharCode(10) + 'W - Wikipedia look up ' + String.fromCharCode(10) + 'Y - YouTube look up ' + String.fromCharCode(10) + 'G - Google look up ' + String.fromCharCode(10) + 'T - TimeZone look up ' + String.fromCharCode(10) + 'J - GeoJson look up ' + String.fromCharCode(10) + 'I - Image Chart look up ' + String.fromCharCode(10) + gextras, '');
if (gextras == '') {
rans=prompt('What do you want to do with region ' + rdescis + '? ' + String.fromCharCode(10) + String.fromCharCode(10) + 'W - Wikipedia look up ' + StringfromCharCode(6) + 'Y - YouTube look up ' + String.fromCharCode(10) + 'G - Google look up ' + StringfromCharCode(11) + 'T - TimeZone look up ' + String.fromCharCode(10) + 'J - GeoJson look up ' + StringfromCharCode(9) + 'I - Image Chart look up ' + String.fromCharCode(10) + String.fromCharCode(10) + gextras, '');
} else {
// Thanks to https://stackoverflow.com/questions/17779744/regular-expression-to-get-a-string-between-parentheses-in-javascript for regex below ...
rans=prompt('What to do with ' + rdescis + (' at (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ') ? ').replace(' at (-999,-999) ?', '?').replace(' at (-999.000,-999.000) ?', '?') + String.fromCharCode(10) + String.fromCharCode(10) + 'W - Wikipedia look up ' + StringfromCharCode(6) + 'Y - YouTube look up ' + String.fromCharCode(10) + 'G - Google look up ' + StringfromCharCode(11) + 'T - TimeZone look up ' + String.fromCharCode(10) + 'J - GeoJson look up ' + StringfromCharCode(9) + 'I - Image Chart look up ' + String.fromCharCode(10) + gextras.replace(/\(([^)]+)\)/g, '()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + ('' + latdeg).replace('.000','') + ',' + ('' + longdeg).replace('.000','') + ')','()').replace('(' + ('' + latdeg).replace('.000','') + ',' + ('' + longdeg).replace('.000','') + ')','()').replace('(' + ('' + latdeg).replace('.000','') + ',' + ('' + longdeg).replace('.000','') + ')','()').replace('(' + ('' + latdeg).replace('.000','') + ',' + ('' + longdeg).replace('.000','') + ')','()').replace('(' + ('' + latdeg).replace('.000','') + ',' + ('' + longdeg).replace('.000','') + ')','()').replace('(' + ('' + latdeg).replace('.000','') + ',' + ('' + longdeg).replace('.000','') + ')','()').replace('(' + ('' + latdeg).replace('.000','') + ',' + ('' + longdeg).replace('.000','') + ')','()').replace('(' + ('' + latdeg).replace('.000','') + ',' + ('' + longdeg).replace('.000','') + ')','()').replace('(' + ('' + latdeg).replace('.000','') + ',' + ('' + longdeg).replace('.000','') + ')','()').replace('(' + ('' + latdeg).replace('.000','') + ',' + ('' + longdeg).replace('.000','') + ')','()'), '');
}
if (rans == null) { rans=' '; } else if (rans.trim() != '') { rans+=gextras; }
gextras='';
if ((rans + ' ').toUpperCase().substring(0,1) == 'W') {
window.open('//wikipedia.org/wiki/' + encodeURIComponent(rdescis.replace(/\ \(/g,', ').replace(/\)$/g,'')).replace(/\%20/g,'_'),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'Y') {
window.open('//www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?emoji=on&nokaraoke=y&youtubeid=' + encodeURIComponent(' ' + rdescis.replace(/\ \(/g,', ').replace(/\)$/g,'')),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'G') {
window.open('//www.google.com/search?q=' + encodeURIComponent(rdescis.replace(/\ \(/g,', ').replace(/\)$/g,'')) + '&tbm=isch','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'I' && window.opener) {
window.opener.tryit();
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'I' && window.top != window.self) {
top.tryit();
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'T' && eval(('' + document.getElementById('myp').getAttribute('data-fc')).length) == 2) {
window.open('//www.rjmprogramming.com.au/PHP/tz_places.php?iso=' + document.getElementById('myp').getAttribute('data-fc').toUpperCase(),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'A' && rans.indexOf(' (') != -1) { // Airports
window.open('//www.rjmprogramming.com.au/HTMLCSS/intair.php?num=3&lat=' + latdeg + '&long=' + longdeg + '&spawn=' + encodeURIComponent('//www.rjmprogramming.com.au/PHP/Map/map.php?title=' + maybenot(document.getElementById('myp').getAttribute('data-fc').toUpperCase(),rdescis) + ';' + encodeURIComponent(rdescis) + '%' + '20and%' + '20Airports&onclick=y&justmenu=y&label=[%' + '27Lat%' + '27,&value=%' + '27Lon%' + '27,%' + '27Name%' + '27]&data=,' + '[' + latdeg + ',' + longdeg + ',~' + encodeURIComponent(rdescis).replace(/\-/g,'%' + '2d').replace(/\#/g,'%' + '23') + '~]'),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'P' && rans.indexOf(' (') != -1) { // Ports
window.open('//www.rjmprogramming.com.au/HTMLCSS/intair.php?num=4&lat=' + latdeg + '&long=' + longdeg + '&port=y&spawn=' + encodeURIComponent('//www.rjmprogramming.com.au/PHP/Map/map.php?title=' + maybenot(document.getElementById('myp').getAttribute('data-fc').toUpperCase(),rdescis) + ';' + encodeURIComponent(rdescis) + '%' + '20and%' + '20Ports&onclick=y&justmenu=y&label=[%' + '27Lat%' + '27,&value=%' + '27Lon%' + '27,%' + '27Name%' + '27]&data=,' + '[' + latdeg + ',' + longdeg + ',~' + encodeURIComponent(rdescis).replace(/\-/g,'%' + '2d').replace(/\#/g,'%' + '23') + '~]'),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'S' && rans.indexOf(' (') != -1) { // Sun Angle
window.open('//www.rjmprogramming.com.au/PHP/SunAngle/sun_angle_now_at.php?latd=' + ('' + latdeg).split('.')[0] + '&latm=' + Math.round(eval(eval('0.' + ('' + latdeg + '.0').split('.')[1]) * 60)) + '&lats=0&longd=' + ('' + longdeg).split('.')[0] + '&longm=' + Math.round(eval(eval('0.' + ('' + longdeg + '.0').split('.')[1]) * 60)) + '&longs=0&from=from&done=y','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'M' && rans.indexOf(' (') != -1) { // Moon Angle
window.open('//www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?latd=' + ('' + latdeg).split('.')[0] + '&latm=' + Math.round(eval(eval('0.' + ('' + latdeg + '.0').split('.')[1]) * 60)) + '&lats=0&longd=' + ('' + longdeg).split('.')[0] + '&longm=' + Math.round(eval(eval('0.' + ('' + longdeg + '.0').split('.')[1]) * 60)) + '&longs=0&from=from&done=y','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'C' && rans.indexOf(' (') != -1) { // Coriolis Effect
window.open('//www.rjmprogramming.com.au/PHP/Coriolis/coriolis_force_at.php?latd=' + ('' + latdeg).split('.')[0] + '&latm=' + Math.round(eval(eval('0.' + ('' + latdeg + '.0').split('.')[1]) * 60)) + '&lats=0&longd=' + ('' + longdeg).split('.')[0] + '&longm=' + Math.round(eval(eval('0.' + ('' + longdeg + '.0').split('.')[1]) * 60)) + '&longs=0&from=from&done=y','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'E' && rans.indexOf(' (') != -1) { // Google Earth
window.open('//earth.google.com/web/@' + ('+' + latdeg).replace('+-','-') + (',+' + longdeg).replace('+-','-') + ',328.51120179a,63169669.71505167d,1y,0h,0t,0r','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'O' && rans.indexOf(' (') != -1) { // Geo Chart
window.open('//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php' + '?title=' + maybenot(document.getElementById('myp').getAttribute('data-fc').toUpperCase(),rdescis) + ';' + encodeURIComponent(rdescis).replace(/\-/g,'%' + '2d').replace(/\#/g,'%' + '23') + '&aregexographicals=y&aregeographicals=&width=500&height=312&onclick=y&country=Places&popularity=&data=%20[' + latdeg + '|' + longdeg + '|~' + encodeURIComponent(rdescis).replace(/\-/g,'%' + '2d').replace(/\#/g,'%' + '23') + '~,2]','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'J' && eval(('' + document.getElementById('myp').getAttribute('data-fc')).length) == 2) { // GeoJSON
//window.open('//www.rjmprogramming.com.au/HTMLCSS/countries.html','ifcountries','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
//alert(1);
twomw=document.getElementById('myp').getAttribute('data-fc').substring(0,2).toUpperCase();
document.getElementById('placegeo').value='' + latdeg + ',' + longdeg;
document.getElementById('placegeo').title='';
if ((latdeg < -990 && longdeg < -990) || gextras.trim() == '') {
jjans=jjans + ' ';
}
//alert(11);
if (sofararealist.indexOf('|' + ('' + twomw.substring(0,2).toUpperCase() + ' ').toUpperCase().substring(0,2).trim() + '|') == -1) {
sofararealist+=('' + twomw.substring(0,2).toUpperCase() + ' ').toUpperCase().substring(0,2).trim() + '|';
}
//alert(111);
//document.getElementById('ifcountries').src='//www.rjmprogramming.com.au/HTMLCSS/countries.html?' + (Math.max(lastiizoom,1) == 1 ? zoomword + '=' + Math.max(lastiizoom,1) : 'zoom=' + Math.max(lastiizoom,1)) + '&' + refreshword + '=' + Math.floor(Math.random() * 198767564);
//document.getElementById('ifcountries').src='//www.rjmprogramming.com.au/HTMLCSS/countries.html?' + (Math.max(lastiizoom,1) == 1 ? zoomword + '=' + Math.max(lastiizoom,1) : 'zoom=' + Math.max(lastiizoom,1)) + '&' + refreshword + '=' + Math.floor(Math.random() * 198767564);
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) {
document.getElementById('placegeo').value='';
document.getElementById('placegeo').title='' + latdeg + ',' + longdeg;
sofararealist+=('' + lastcode + ' ').toUpperCase().substring(0,2).trim() + '|';
zoomword='zoom';
refreshword='refresh';
document.getElementById('ifcountries').src+=lhit('#' + (Math.max(lastiizoom,1) == 1 ? zoomword + '=' + Math.max(lastiizoom,1) : 'zoom=' + Math.max(lastiizoom,1)) + '&' + refreshword + '=' + Math.floor(Math.random() * 198767564));
} else {
document.getElementById('ifcountries').src='//www.rjmprogramming.com.au/HTMLCSS/countries.html?' + (Math.max(lastiizoom,1) == 1 ? zoomword + '=' + Math.max(lastiizoom,1) : 'zoom=' + Math.max(lastiizoom,1)) + '&' + refreshword + '=' + Math.floor(Math.random() * 198767564);
}
lastr=rdescis;
//alert(1111);
if ((latdeg < -990 && longdeg < -990) || blurbone == '') {
if (confirm('Taking you to ' + decodeURIComponent(rdescis) + ' on world map now' + blurbone + ' ...')) {
document.getElementById('ifcountries').style.display='block';
//document.getElementById('more').style.display='none';
location.href='#ifcountries';
}
} else {
//alert(11111);
jjans=jjans.replace(/\ \ \ \ \ $/g,'');
jjans=prompt('Taking you to ' + decodeURIComponent(rdescis) + ' on world map now' + blurbtwo + ' ...', '' + jjans);
if (jjans != null) {
//alert(11111);
document.getElementById('ifcountries').style.display='block';
//document.getElementById('more').style.display='none';
location.href='#ifcountries';
}
}
} // new
}
}
function coordit(xiois) {
var xaconto = (xiois.contentWindow || xiois.contentDocument);
//alert(11);
if (xaconto != null) {
//alert('111 ' + xiois.src);
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) {
// 40°11′N
latdeg=subpart.split('\"latitude\"')[1].split('>')[1].split(\"°\")[0].split('<')[0];
console.log('latdeg=' + latdeg);
sparelat=subpart.split('\"latitude\"')[1].split('>')[1].split('<')[0].slice(-1);
console.log('sparelat=' + sparelat);
latmin=subpart.split('\"latitude\"')[1].split('>')[1].split('<')[0].substring(eval(1 + eval('' + latdeg.length))).split(\"′\")[0].split(sparelat)[0].split('<')[0];
console.log('latmin=' + latmin);
if (sparelat == 'S') { latdeg=eval(eval(eval(-1 * latmin) / 60) - latdeg); } else { latdeg+=eval(eval('' + latmin) / 60) }
console.log('Latdeg=' + latdeg);
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);
gextras='A - Airports Closest to (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')' + StringfromCharCode(2);
gextras+='S - Sun Angle at Noon at (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')' + String.fromCharCode(10);
gextras+='M - Moon Angle at (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')' + StringfromCharCode(9);
gextras+='C - Coriolis Effect at (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')' + String.fromCharCode(10);
gextras+='E - Google Earth at (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')' + StringfromCharCode(8);
gextras+='P - Ports Closest to (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')' + String.fromCharCode(10);
gextras+='O - Geo Chart at (' + (('' + latdeg).indexOf('.') != -1 ? ('' + latdeg) : ('' + latdeg + '.000')) + ',' + (('' + longdeg).indexOf('.') != -1 ? ('' + longdeg) : ('' + longdeg + '.000')) + ')';
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, grdescis);
} else if (window.parent) {
parent.putgextras(gextras, grdescis);
}
return true;
}
} else {
gextras='';
if (window.opener) {
window.opener.putgextras(gextras, grdescis);
} else if (window.parent) {
parent.putgextras(gextras, grdescis);
}
}
}
return true;
}
function gmenu(rcodeis, erdescis) {
var rdescis=decodeURIComponent(erdescis);
var latdeg=-999, longdeg=-999;
if (rdescis != lastplace && lastplace.trim() != '') { rdescis=lastplace; }
if (gextras.indexOf(' (') != -1) {
if (gextras.split(' (')[1].split(')')[0].indexOf(',') != -1) {
latdeg=eval('' + gextras.split(' (')[1].split(')')[0].split(',')[0]);
longdeg=eval('' + gextras.split(' (')[1].split(')')[0].split(',')[1]);
}
} else if (storedsuffs.indexOf('~' + lpw(lastplace) + '`') != -1 && storedsuffs.indexOf('~' + lpw(lastplace) + '`|') == -1) {
gextras=storedsuffs.split('~' + lpw(lastplace) + '`')[1].split('`')[0].split('~')[0]; //.split('|')[0];
if (gextras.split(' (')[1].split(')')[0].indexOf(',') != -1) {
latdeg=eval('' + gextras.split(' (')[1].split(')')[0].split(',')[0]);
longdeg=eval('' + gextras.split(' (')[1].split(')')[0].split(',')[1]);
}
}
if ((1 == 1 || rcodeis.trim()) != '' && rdescis.trim() != '') {
grcodeis=rcodeis;
gerdescis=erdescis;
grdescis=rdescis;
//setTimeout(latergmenu, 8000);
if (lastsuff != encodeURIComponent(rdescis.replace(/\ \(/g,', ').replace(/\)$/g,'')).replace(/\%20/g,'_') && storedsuffs.indexOf('~' + lpw(rdescis) + '`') == -1) {
gextras='';
lastsuff=encodeURIComponent(rdescis.replace(/\ \(/g,', ').replace(/\)$/g,'')).replace(/\%20/g,'_');
storedsuffs+='~' + lpw(rdescis) + '`' + '|';
if (storedsuffs.indexOf('~' + lpw(rdescis) + '`') != -1 && storedsuffs.indexOf('~' + lpw(rdescis) + '`|') == -1) {
gextras=storedsuffs.split('~' + lpw(rdescis) + '`')[1].split('`')[0].split('~')[0]; //.split('|')[0];
//alert('rdescis=' + rdescis + ' and storedsuffs=' + storedsuffs);
document.getElementById('placegeo').value=storedsuffs.split('~' + lpw(rdescis) + '`')[1].split(' (')[1].split(')')[0];
document.getElementById('placegeo').title='';
setTimeout(latergmenu, 80);
} else if (1 == 11) {
document.getElementById('ici').style.cursor='progress';
setTimeout(latergmenu, 8000);
myxhr = new XMLHttpRequest();
myxhr.open('GET', '//en.wikipedia.org/wiki/' + encodeURIComponent(rdescis.replace(/\ \(/g,', ').replace(/\)$/g,'')).replace(/\%20/g,'_'), true);
myxhr.responseType = 'text';
myxhr.onreadystatechange=stateChanged;
myxhr.send(null);
} else if (11 == 11) {
document.getElementById('ici').style.cursor='progress';
setTimeout(latergmenu, 8000);
document.getElementById('placegeo').value=' ';
document.getElementById('wif').src='/PHP/fgc/index.php?placegeo=' + encodeURIComponent(rdescis.replace(/\ \(/g,', ').replace(/\)$/g,'')).replace(/\%20/g,'_');
} else {
document.getElementById('ici').style.cursor='progress';
setTimeout(latergmenu, 8000);
document.getElementById('wif').src='//en.wikipedia.org/wiki/' + encodeURIComponent(rdescis.replace(/\ \(/g,', ').replace(/\)$/g,'')).replace(/\%20/g,'_');
}
} else {
if (storedsuffs.indexOf('~' + lpw(rdescis) + '`') != -1) {
gextras=storedsuffs.split('~' + lpw(rdescis) + '`')[1].split('`')[0].split('~')[0];
}
var rans=null; //prompt('What do you want to do with region ' + rdescis + '? ' + String.fromCharCode(10) + String.fromCharCode(10) + 'W - Wikipedia look up ' + String.fromCharCode(10) + 'Y - YouTube look up ' + String.fromCharCode(10) + 'G - Google look up ' + String.fromCharCode(10) + 'T - TimeZone look up ' + String.fromCharCode(10) + 'J - GeoJson look up ' + StringfromCharCode(10) + 'I - Image Chart look up ' + String.fromCharCode(10) + gextras, '');
if (gextras == '') {
rans=prompt('What do you want to do with region ' + rdescis + '? ' + String.fromCharCode(10) + String.fromCharCode(10) + 'W - Wikipedia look up ' + StringfromCharCode(6) + 'Y - YouTube look up ' + String.fromCharCode(10) + 'G - Google look up ' + StringfromCharCode(11) + 'T - TimeZone look up ' + String.fromCharCode(10) + 'J - GeoJson look up ' + StringfromCharCode(9) + 'I - Image Chart look up ' + String.fromCharCode(10) + String.fromCharCode(10) + gextras, '');
} else {
//alert(storedsuffs);
rans=prompt('What to do with ' + rdescis + (' at (' + latdeg + ',' + longdeg + ') ? ').replace(' at (-999,-999) ?', '?').replace(' at (-999.000,-999.000) ?', '?') + String.fromCharCode(10) + String.fromCharCode(10) + 'W - Wikipedia look up ' + StringfromCharCode(6) + 'Y - YouTube look up ' + String.fromCharCode(10) + 'G - Google look up ' + StringfromCharCode(11) + 'T - TimeZone look up ' + String.fromCharCode(10) + 'J - GeoJson look up ' + StringfromCharCode(9) + 'I - Image Chart look up ' + String.fromCharCode(10) + gextras.replace(/\(([^)]+)\)/g, '()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()').replace('(' + latdeg + ',' + longdeg + ')','()'), '');
}
if (rans == null) { rans=' '; } else if (rans.trim() != '') { rans+=gextras; }
if ((rans + ' ').toUpperCase().substring(0,1) == 'W') {
window.open('//wikipedia.org/wiki/' + encodeURIComponent(rdescis.replace(/\ \(/g,', ').replace(/\)$/g,'')).replace(/\%20/g,'_'),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'Y') {
window.open('//www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?emoji=on&nokaraoke=y&youtubeid=' + encodeURIComponent(' ' + rdescis.replace(/\ \(/g,', ').replace(/\)$/g,'')),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'G') {
window.open('//www.google.com/search?q=' + encodeURIComponent(rdescis.replace(/\ \(/g,', ').replace(/\)$/g,'')) + '&tbm=isch','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'T' && eval(('' + document.getElementById('myp').getAttribute('data-fc')).length) == 2) {
window.open('//www.rjmprogramming.com.au/PHP/tz_places.php?iso=' + document.getElementById('myp').getAttribute('data-fc').toUpperCase(),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'A' && rans.indexOf(' (') != -1) { // Airports
window.open('//www.rjmprogramming.com.au/HTMLCSS/intair.php?num=3&lat=' + latdeg + '&long=' + longdeg + '&spawn=' + encodeURIComponent('//www.rjmprogramming.com.au/PHP/Map/map.php?title=' + maybenot(document.getElementById('myp').getAttribute('data-fc').toUpperCase(),rdescis) + ';' + encodeURIComponent(rdescis) + '%' + '20and%' + '20Airports&onclick=y&justmenu=y&label=[%' + '27Lat%' + '27,&value=%' + '27Lon%' + '27,%' + '27Name%' + '27]&data=,' + '[' + latdeg + ',' + longdeg + ',~' + encodeURIComponent(rdescis).replace(/\-/g,'%' + '2d').replace(/\#/g,'%' + '23') + '~]'),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'P' && rans.indexOf(' (') != -1) { // Ports
window.open('//www.rjmprogramming.com.au/HTMLCSS/intair.php?num=4&lat=' + latdeg + '&long=' + longdeg + '&port=y&spawn=' + encodeURIComponent('//www.rjmprogramming.com.au/PHP/Map/map.php?title=' + maybenot(document.getElementById('myp').getAttribute('data-fc').toUpperCase(),rdescis) + ';' + encodeURIComponent(rdescis) + '%' + '20and%' + '20Ports&onclick=y&justmenu=y&label=[%' + '27Lat%' + '27,&value=%' + '27Lon%' + '27,%' + '27Name%' + '27]&data=,' + '[' + latdeg + ',' + longdeg + ',~' + encodeURIComponent(rdescis).replace(/\-/g,'%' + '2d').replace(/\#/g,'%' + '23') + '~]'),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'S' && rans.indexOf(' (') != -1) { // Sun Angle
window.open('//www.rjmprogramming.com.au/PHP/SunAngle/sun_angle_now_at.php?latd=' + ('' + latdeg).split('.')[0] + '&latm=' + Math.round(eval(eval('0.' + ('' + latdeg + '.0').split('.')[1]) * 60)) + '&lats=0&longd=' + ('' + longdeg).split('.')[0] + '&longm=' + Math.round(eval(eval('0.' + ('' + longdeg + '.0').split('.')[1]) * 60)) + '&longs=0&from=from&done=y','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'M' && rans.indexOf(' (') != -1) { // Moon Angle
window.open('//www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?latd=' + ('' + latdeg).split('.')[0] + '&latm=' + Math.round(eval(eval('0.' + ('' + latdeg + '.0').split('.')[1]) * 60)) + '&lats=0&longd=' + ('' + longdeg).split('.')[0] + '&longm=' + Math.round(eval(eval('0.' + ('' + longdeg + '.0').split('.')[1]) * 60)) + '&longs=0&from=from&done=y','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'C' && rans.indexOf(' (') != -1) { // Coriolis Effect
window.open('//www.rjmprogramming.com.au/PHP/Coriolis/coriolis_force_at.php?latd=' + ('' + latdeg).split('.')[0] + '&latm=' + Math.round(eval(eval('0.' + ('' + latdeg + '.0').split('.')[1]) * 60)) + '&lats=0&longd=' + ('' + longdeg).split('.')[0] + '&longm=' + Math.round(eval(eval('0.' + ('' + longdeg + '.0').split('.')[1]) * 60)) + '&longs=0&from=from&done=y','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'E' && rans.indexOf(' (') != -1) { // Google Earth
window.open('//earth.google.com/web/@' + ('+' + latdeg).replace('+-','-') + (',+' + longdeg).replace('+-','-') + ',328.51120179a,63169669.71505167d,1y,0h,0t,0r','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else if ((rans + ' ').toUpperCase().substring(0,1) == 'O' && rans.indexOf(' (') != -1) { // Geo Chart
window.open('//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php' + '?title=' + maybenot(document.getElementById('myp').getAttribute('data-fc').toUpperCase(),rdescis) + ';' + encodeURIComponent(rdescis).replace(/\-/g,'%' + '2d').replace(/\#/g,'%' + '23') + '&aregexographicals=y&aregeographicals=&width=500&height=312&onclick=y&country=Places&popularity=&data=%20[' + latdeg + '|' + longdeg + '|~' + encodeURIComponent(rdescis).replace(/\-/g,'%' + '2d').replace(/\#/g,'%' + '23') + '~,2]','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
}
}
}
}
function maybenot(inmaybe, vspl) {
var fontarr=document.getElementsByTagName('font');
for (var ifo=0; ifo 1) {
origtitle=origtitle.replace('relevant region', 'relevant ' + bits[1].split('\"')[0] + ' region');
document.getElementById('ici').title=origtitle;
}
return inoh;
}
function stateChanged() {
if (myxhr.readyState == 4) {
if (myxhr.status == 200) {
console.log('myxhr=' + myxhr);
var subpart=myxhr.responseText.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, grdescis);
} else if (window.parent) {
parent.putgextras(gextras, grdescis);
}
}
}
}
}
function nospan() {
if (('' + jjans).trim() == 'No Trip Planning') {
document.getElementById('plots').innerHTML='';
spancount=0;
}
}
function sein(iz) {
if (!zoomdone) {
zoomdone=true;
setInterval(rifcheck, 15000);
}
return iz;
}
function lhit(inh) {
locationhash=inh;
ifcheck(document.getElementById('ifcountries'));
return inh;
}
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();
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) {
document.getElementById('plots').innerHTML+='x';
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 (document.getElementById('ifcountries')) {
document.getElementById('ifcountries').style.width='' + eval(2 * eval('' + document.getElementById('ifcountries').style.width.replace('px',''))) + 'px';
document.getElementById('ifcountries').style.height='' + eval(2 * eval('' + document.getElementById('ifcountries').style.height.replace('px',''))) + 'px';
}
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 0) {
ars=zaconto.getElementsByTagName('div');
//alert('' + ars.length + ' ' + sofararealist);
for (iiars=0; iiars 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=\"\";
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+='' + divih + '
';
document.getElementById('plots').innerHTML+='' + divih + '
';
} 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+='' + divih + '
';
document.getElementById('plots').innerHTML+='' + divih + '
';
}
}
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();
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) {
document.getElementById('plots').innerHTML+='x';
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(' ... second yay! ' + lastiizoom + ' vs ' + iiz + ' ' + ev.clientX + ',' + ev.clientY);
if (isdouble == 0) {
document.getElementById('plots').innerHTML+='❓';
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 thisonl() {
//alert(21);
elem = document.getElementById('mycanvas');
//alert(211);
context = elem.getContext('2d');
//alert(2111);
setTimeout(canvasize, 5000);
//alert(21111);
}
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+='x';
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+='x';
mobaccum+='❌';
zaconto.body.innerHTML+=ourm + '❌';
ourm='';
} else {
if (4 == 5) { alert(6786); }
document.getElementById('plots').innerHTML+='x';
}
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 {
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 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 (twomw != '') {
itwo=('' + twomw);
}
if (itwo == '' && lastcode != '') { itwo=lastcode; }
//alert(ziois.src + ' 11111 ' + itwo + ':' + (document.getElementById('placegeo').title + document.getElementById('placegeo').value).trim());
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 {
//alert('2 ' + + ('' + zaconto.getElementById('myimg').width).replace('px',''));
iizoom=eval(eval('' + ('' + zaconto.getElementById('myimg').width).replace('px','')) / 360); //eval('' + zaconto.getzoom());
//alert('' + iizoom);
}
xif=eval(iizoom * eval(180 + eval('' + xlongdeg)));
yif=eval(iizoom * eval(90 - eval('' + xlatdeg)));
//alert('' + xif + ',' + yif);
//alert(itwo + ' ' + jjans + '?');
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();
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) {
//alert(786);
document.getElementById('plots').innerHTML+='x';
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);
//alert(jjans + '?');
if (jjans == jjans.replace(/\ \ \ \ \ $/g,'')) {
//alert(2786);
document.getElementById('plots').innerHTML+='x';
spancount++;
setTimeout(nospan, 30000);
}
}
sofararealist+=itwo + '|';
var ars=zaconto.getElementsByTagName('area');
for (var iars=0; iars {
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 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 getxynow(e) {
e = e || window.event;
e.preventDefault();
if (e.touches) {
if (e.touches[0].pageX) {
xinxy.push(eval(e.touches[0].pageX + document.body.scrollLeft) * browserZoomLevel);
yinxy.push(eval(e.touches[0].pageY + document.body.scrollTop) * browserZoomLevel);
} else {
xinxy.push(eval(e.touches[0].clientX + document.body.scrollLeft) * browserZoomLevel);
yinxy.push(eval(e.touches[0].clientY + document.body.scrollTop) * browserZoomLevel);
}
} else if (e.clientX || e.clientY) {
xinxy.push(e.clientX + document.body.scrollLeft);
yinxy.push(e.clientY + document.body.scrollTop);
} else {
xinxy.push(e.pageX + document.body.scrollLeft);
yinxy.push(e.pageY + document.body.scrollTop);
}
//alert('' + xinxy.length);
filloutform(e,0);
}
function dotwor() {
if (oneoftwo == 1) {
defzoom++;
} else {
defzoom=2;
}
oneoftwo=1;
}
function dotwoc() {
if (oneoftwo == -1) {
defzoom++;
} else {
defzoom=2;
}
oneoftwo=-1;
}
function alternatevisibility() {
var igh=1;
while (document.getElementById('iciov' + igh)) {
if (igh == 1 && document.getElementById('iciov' + igh).outerHTML.indexOf('visibility:') == -1) {
nextv='hidden';
} else if (igh == 1 && document.getElementById('iciov' + igh).outerHTML.split('visibility:')[1].split(';')[0].split('>')[0].toLowerCase().indexOf('visible') != -1) {
nextv='hidden';
} else if (igh == 1) {
nextv='visible';
}
document.getElementById('iciov' + igh).style.visibility='' + nextv;
igh++;
}
}
function overlayit(ootis) {
var prerest='', zb='';
if (ootis == 0) {
if (eval('' + xinxy.length) == 2) {
if (ovnum == 1) { // thanks to https://stackoverflow.com/questions/69491728/how-to-zoom-an-image-on-mouse-hover-using-css
prerest=' .zoom-img { width: ' + document.getElementById('ici').width + 'px; height: ' + document.getElementById('ici').height + 'px; overflow: hidden; } .zoom-img:hover { transform: scale(2.0); } ';
}
if (defzoom != 2) {
zb=' #iciov' + ovnum + ':hover { z-index:1789; transform: scale(' + defzoom + '.0); } ';
}
if (oneoftwo < 0) { // circle
document.getElementById('ici').style.opacity='1.0';
document.getElementById('imgmore').innerHTML+=document.getElementById('ici').outerHTML.replace('ici','iciov' + ovnum).replace('25;','35;position:absolute;background-color:transparent;top:0px;left:0px;').replace(/\\\"\\ on/g, '\" data-on').replace(' ' + prerest + zb + ' #iciov' + ovnum + ' { -webkit-filter: brightness(150%); filter: brightness(150%); transform-origin: ' + 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); } ';
} else { // rectangle
document.getElementById('ici').style.opacity='1.0';
document.getElementById('imgmore').innerHTML+=document.getElementById('ici').outerHTML.replace('ici','iciov' + ovnum).replace('25;','35;position:absolute;background-color:transparent;top:0px;left:0px;').replace(/\\\"\\ on/g, '\" data-on').replace(' ' + prerest + zb + ' #iciov' + ovnum + ' { -webkit-filter: brightness(150%); filter: brightness(150%); 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' + '); } ';
}
if (ovnum == 1) { setInterval(alternatevisibility, 15000); }
ovnum++;
}
oneoftwo=ootis;
defzoom=2;
xinxy=[];
yinxy=[];
}
}